/* RCI Engineering, Inc. · coming soon page
   Fonts: Inter (headings and text) and Mulish (labels and buttons), as on the previous rcieng.com
   Brand greens from the RCI logo: Dark Green #006225, Lite Green #54b948 */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/fonts/mulish-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/fonts/mulish-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("/fonts/mulish-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* color tokens */
  --green-dark: #006225;
  --green-lite: #54b948;
  --ink: #06130b;
  --ink-2: #0a2214;
  --paper: #f3f5f0;
  --paper-2: #e8ede5;
  --text-dark: #0f1d14;
  --text-dark-muted: #3d4d42;
  --text-light: #eaf0ea;
  --text-light-muted: rgba(234, 240, 234, 0.72);
  --line-light: rgba(234, 240, 234, 0.16);
  --line-dark: rgba(15, 29, 20, 0.14);
  --error: #ffb4a3;

  /* type tokens */
  --f-eyebrow: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-sub: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* spacing and layout tokens */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --radius: 2px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green-lite); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--paper); color: var(--text-dark); padding: 10px 14px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- primitives ---------- */
.eyebrow {
  font-family: var(--f-eyebrow);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-lite);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-paper .eyebrow { color: var(--green-dark); }

.btn {
  font-family: var(--f-eyebrow);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--primary { background: var(--green-lite); color: var(--ink); }
.btn--primary:hover { background: var(--text-light); }
.btn--ghost { border-color: var(--line-light); color: var(--text-light); }
.btn--ghost:hover { border-color: var(--green-lite); color: var(--green-lite); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn .arrow { width: 16px; height: 1px; background: currentColor; position: relative; }
.btn .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* ---------- header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding: 26px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { width: clamp(150px, 16vw, 210px); height: auto; }
.header-phone {
  font-family: var(--f-eyebrow); font-size: 0.8125rem; letter-spacing: 0.12em;
  text-decoration: none; color: var(--text-light);
  display: inline-flex; align-items: center; min-height: 44px;
}
.header-phone:hover { color: var(--green-lite); }

/* ---------- hero ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 30px;
  padding: 14px 24px 14px 20px;
  border: 1px solid rgba(84, 185, 72, 0.55);
  border-radius: var(--radius);
  background: rgba(84, 185, 72, 0.1);
  font-family: var(--f-eyebrow);
  font-weight: 700;
  font-size: clamp(1rem, 1.55vw, 1.375rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-lite);
  line-height: 1.2;
}
.status__dot { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--green-lite); }
.status__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green-lite);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .status__dot::after { animation: none; opacity: 0; } }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 40%, rgba(0, 98, 37, 0.34), transparent 60%),
    var(--ink);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(6, 19, 11, 0.96) 36%, rgba(6, 19, 11, 0.6) 54%, rgba(6, 19, 11, 0) 76%),
    linear-gradient(0deg, var(--ink) 0%, rgba(6, 19, 11, 0) 22%);
}
.hero__content { position: relative; z-index: 2; padding-top: 140px; padding-bottom: 120px; }
.hero__text { max-width: 720px; }
.hero h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.3vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  color: var(--text-light);
}
.hero h1 span { display: block; color: var(--green-lite); }
.hero__sub {
  font-family: var(--f-sub);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.7vw, 1.375rem);
  letter-spacing: 0.01em;
  color: var(--text-light);
  margin: 0 0 18px;
}
.hero__note { color: var(--text-light-muted); max-width: 540px; margin: 0 0 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__disciplines {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 30px;
  font-family: var(--f-eyebrow); font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-light-muted);
}
.hero__disciplines ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.hero__disciplines li { display: inline-flex; align-items: center; gap: 10px; }
.hero__disciplines li::before { content: ""; width: 5px; height: 5px; background: var(--green-lite); }

/* ---------- plan stage (hero motion) ---------- */
.plan-stage {
  position: absolute; z-index: 0;
  top: 50%; right: -12%;
  width: min(78vw, 1240px);
  aspect-ratio: 16 / 10;
  transform: translateY(-50%);
  perspective: 2400px;
  perspective-origin: 50% 30%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.plan-stage.is-ready { opacity: 1; }
.plan-stack {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-34deg) scale(0.74);
  animation: stack 28s var(--ease) infinite;
  will-change: transform;
}
.plan-layer {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.plan-layer svg { width: 100%; height: 100%; overflow: visible; }
.plan-layer--a { animation: lift-a 28s var(--ease) infinite; }
.plan-layer--p { animation: lift-p 28s var(--ease) infinite; }
.plan-layer--m { animation: lift-m 28s var(--ease) infinite; }
.plan-layer--e { animation: lift-e 28s var(--ease) infinite; }
.plan-layer--f { animation: lift-f 28s var(--ease) infinite; }
.is-paused .plan-stack, .is-paused .plan-layer, .is-paused .plan-tag, .is-paused .plan-sweep { animation-play-state: paused; }

.plan-sheet { fill: rgba(84, 185, 72, 0.035); stroke: rgba(234, 240, 234, 0.2); stroke-width: 1.5; animation: sheet 28s var(--ease) infinite; }
.plan-layer--a .plan-sheet { fill: rgba(234, 240, 234, 0.02); }

.plan-line {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 3.2s var(--ease) forwards;
}
.a-wall   { stroke: rgba(234, 240, 234, 0.62); stroke-width: 1.4; }
.a-grid   { stroke: rgba(234, 240, 234, 0.16); stroke-width: 1; }
.a-detail { stroke: rgba(234, 240, 234, 0.36); stroke-width: 1; }
.p-water  { stroke: #8fd18a; stroke-width: 1.4; }
.p-san    { stroke: #3fa35a; stroke-width: 1.8; }
.p-fix    { stroke: #8fd18a; stroke-width: 1.1; }
.m-duct   { stroke: var(--green-lite); stroke-width: 1.5; }
.m-diff   { stroke: var(--green-lite); stroke-width: 1; opacity: 0.8; }
.e-fix    { stroke: rgba(234, 240, 234, 0.7); stroke-width: 1; }
.e-circ   { stroke: rgba(234, 240, 234, 0.42); stroke-width: 1; }
.e-panel  { stroke: rgba(234, 240, 234, 0.8); stroke-width: 1.4; }
.f-main   { stroke: #c9ecc4; stroke-width: 1.6; }
.f-branch { stroke: rgba(201, 236, 196, 0.55); stroke-width: 1; }
.f-head   { stroke: #c9ecc4; stroke-width: 1.2; }
/* electrical runs and sanitary runs read as dashed once drawn */
.plan-line.is-drawn { animation: none; stroke-dasharray: 6 6; stroke-dashoffset: 0; }

.plan-tag { animation: tag 28s var(--ease) infinite; }
.plan-tag rect { fill: var(--green-lite); }
.plan-tag text { font-family: var(--f-eyebrow); font-size: 26px; letter-spacing: 0.18em; fill: rgba(234, 240, 234, 0.85); }
.plan-sweep { opacity: 0; animation: sweep 28s linear infinite; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* exploded sheet set → coordinated plan → exploded again */
@keyframes stack {
  0%, 22%   { transform: rotateX(58deg) rotateZ(-34deg) scale(0.74); }
  42%, 74%  { transform: translateX(10%) rotateX(14deg) rotateZ(-6deg) scale(1); }
  94%, 100% { transform: rotateX(58deg) rotateZ(-34deg) scale(0.74); }
}
@keyframes lift-a { 0%, 22% { transform: translateZ(-300px); } 42%, 74% { transform: translateZ(0); } 94%, 100% { transform: translateZ(-300px); } }
@keyframes lift-p { 0%, 22% { transform: translateZ(-150px); } 42%, 74% { transform: translateZ(0); } 94%, 100% { transform: translateZ(-150px); } }
@keyframes lift-m { 0%, 22% { transform: translateZ(0); }      42%, 74% { transform: translateZ(0); } 94%, 100% { transform: translateZ(0); } }
@keyframes lift-e { 0%, 22% { transform: translateZ(150px); }  42%, 74% { transform: translateZ(0); } 94%, 100% { transform: translateZ(150px); } }
@keyframes lift-f { 0%, 22% { transform: translateZ(300px); }  42%, 74% { transform: translateZ(0); } 94%, 100% { transform: translateZ(300px); } }
@keyframes tag   { 0%, 24% { opacity: 1; } 36%, 80% { opacity: 0; } 92%, 100% { opacity: 1; } }
@keyframes sheet { 0%, 24% { opacity: 1; } 38%, 78% { opacity: 0.15; } 92%, 100% { opacity: 1; } }
@keyframes sweep {
  0%, 46%  { opacity: 0; transform: translateX(-240px); }
  48%      { opacity: 1; transform: translateX(-240px); }
  68%      { opacity: 1; transform: translateX(1600px); }
  70%, 100%{ opacity: 0; transform: translateX(1600px); }
}

@media (prefers-reduced-motion: reduce) {
  .plan-stack { animation: none; transform: rotateX(28deg) rotateZ(-14deg) scale(0.95); }
  .plan-layer, .plan-tag, .plan-sheet, .plan-sweep { animation: none; }
  .plan-tag, .plan-sweep { opacity: 0; }
  .plan-line { animation: none; stroke-dashoffset: 0; }
  .plan-stage { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.on-paper { background: var(--paper); color: var(--text-dark); }
.on-paper ::selection { background: var(--green-lite); color: var(--ink); }
.grid-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
}
.lede { font-family: var(--f-sub); font-weight: 400; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; margin: 0 0 22px; }
.on-paper p { color: var(--text-dark-muted); }
.on-paper .lede { color: var(--text-dark); }

.disciplines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.disciplines li { display: grid; grid-template-columns: 54px 1fr; gap: 4px 18px; padding: 22px 0; border-bottom: 1px solid var(--line-dark); }
.disciplines .code { font-family: var(--f-eyebrow); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--green-dark); padding-top: 4px; grid-row: span 2; }
.disciplines .name { font-family: var(--f-sub); font-weight: 600; font-size: 1.2rem; color: var(--text-dark); }
.disciplines .detail { font-size: 0.975rem; color: var(--text-dark-muted); }

/* ---------- contact ---------- */
.contact { background: var(--ink-2); }
.contact .grid-7-5 { grid-template-columns: 5fr 7fr; }
.contact p { color: var(--text-light-muted); }
.contact .eyebrow { color: var(--green-lite); }
.office { margin-top: 40px; border-top: 1px solid var(--line-light); }
.office__row { padding: 18px 0; border-bottom: 1px solid var(--line-light); display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.office__label { font-family: var(--f-eyebrow); font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green-lite); padding-top: 4px; }
.office__value { font-style: normal; color: var(--text-light); }
.office__value a { text-decoration: none; border-bottom: 1px solid var(--line-light); }
.office__value a:hover { color: var(--green-lite); border-color: var(--green-lite); }

.form-card { border: 1px solid var(--line-light); padding: clamp(24px, 4vw, 48px); background: rgba(6, 19, 11, 0.5); }
.form-card h3 { font-family: var(--f-sub); font-weight: 600; font-size: 1.35rem; margin: 0 0 6px; color: var(--text-light); }
.form-card > p { margin: 0 0 28px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend {
  font-family: var(--f-eyebrow); font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-light-muted);
}
.req { color: var(--green-lite); }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; color: var(--text-light);
  background: rgba(234, 240, 234, 0.04);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-height: 50px;
  width: 100%;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--green-lite) 50%), linear-gradient(135deg, var(--green-lite) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { color: var(--text-dark); background: var(--paper); }
.field input::placeholder, .field textarea::placeholder { color: rgba(234, 240, 234, 0.38); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-lite); background: rgba(84, 185, 72, 0.06); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .hint { font-size: 0.875rem; color: var(--text-light-muted); margin: 0; line-height: 1.5; }
.field .err { font-size: 0.875rem; color: var(--error); margin: 0; min-height: 0; }
.field .err:empty { display: none; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.form-status { font-size: 0.95rem; margin: 0; }
.form-status.is-error { color: var(--error); }
.form-status a { color: var(--text-light); }
.form-success { display: none; text-align: left; }
.form-success img { width: 56px; height: 56px; margin-bottom: 22px; }
.form-success h3 { font-family: var(--f-display); font-weight: 600; font-size: 2rem; margin: 0 0 12px; }
.form-card.is-sent form { display: none; }
.form-card.is-sent .form-success { display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--line-light); padding: 44px 0; font-size: 0.9rem; color: var(--text-light-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.site-footer img { width: 150px; height: auto; }
.site-footer address { font-style: normal; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--green-lite); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-7-5, .contact .grid-7-5 { grid-template-columns: 1fr; }
  .plan-stage { right: -40%; width: 140vw; top: 26%; }
  .plan-stage.is-ready { opacity: 0.9; }
  .hero::after { background: linear-gradient(180deg, rgba(6, 19, 11, 0.35) 0%, rgba(6, 19, 11, 0.55) 30%, rgba(6, 19, 11, 0.88) 60%, var(--ink) 100%); }
  .hero__content { padding-top: 130px; padding-bottom: 150px; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .fields { grid-template-columns: 1fr; }
  .plan-stage { right: -62%; width: 190vw; top: 22%; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .office__row { grid-template-columns: 1fr; gap: 4px; }
  .header-phone span { display: none; }
  .status { font-size: 0.9375rem; letter-spacing: 0.14em; gap: 12px; padding: 12px 18px 12px 16px; }
}
