:root {
  --ink: #121412;
  --ink-2: #1a1d1a;
  --concrete: #d3cec4;
  --rust: #9c4a26;
  --paper: #efebe3;
  --orange: #ff6a1a;
  --muted: rgba(239, 235, 227, 0.68);
  --line: rgba(239, 235, 227, 0.14);
  --gutter: clamp(1rem, 4.5vw, 4rem);
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: 0.7rem 1rem; background: var(--orange); color: var(--ink); }
.skip:focus { top: 1rem; }

.kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); }
.muted { color: var(--muted); }
.h2 { font-family: var(--display); font-stretch: 115%; font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: 0.92; letter-spacing: -0.01em; }
.btn { display: inline-flex; align-items: center; min-height: 3.1rem; padding: 0 1.6rem; border: 0; background: var(--orange); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; transition: transform 0.3s var(--ease), background 0.3s; }
.btn:hover { background: #ff8340; transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; padding: 1.1rem var(--gutter); transition: background 0.4s, padding 0.4s; }
.nav.is-solid { background: rgba(15, 17, 15, 0.9); backdrop-filter: blur(8px); padding-block: 0.7rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* Logo: light steel variant on dark backgrounds, original on the light site board. */
.brand-logo { display: block; height: 4.2rem; width: auto; transition: height 0.4s; }
.nav.is-solid .brand-logo { height: 3.2rem; }
.nav nav { display: flex; align-items: center; gap: clamp(0.8rem, 2.5vw, 2rem); font-size: 0.85rem; }
.nav nav a { text-decoration: none; padding: 0.5rem 0; }
.nav nav a:not(.nav-cta):hover { color: var(--orange); }
.nav-tel { font-variant-numeric: tabular-nums; font-weight: 600; }
.nav-cta { border: 1px solid rgba(239, 235, 227, 0.4); padding: 0.55rem 1rem !important; }

/* ---------- Cover ---------- */
.cover { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 3s var(--ease); }
.is-loaded .cover-img { transform: scale(1); }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 17, 15, 0.92), rgba(15, 17, 15, 0.25) 55%, rgba(15, 17, 15, 0.45)); }
.cover-inner { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 6.5rem; display: grid; gap: 1.4rem; }
.mega { font-family: var(--display); font-stretch: 118%; font-weight: 900; text-transform: uppercase; font-size: clamp(2.8rem, 9.5vw, 9.5rem); line-height: 0.86; letter-spacing: -0.02em; }
.mega .line { display: block; overflow: hidden; }
.mega .line > span { display: block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.is-loaded .mega .line > span { transform: none; }
.is-loaded .mega .line:nth-child(2) > span { transition-delay: 0.1s; }
.is-loaded .mega .line:nth-child(3) > span { transition-delay: 0.2s; }
.accent { color: var(--orange); }
.lede { max-width: 42ch; color: var(--muted); font-size: 1.1rem; opacity: 0; transition: opacity 1s 0.6s; }
.is-loaded .lede { opacity: 1; }
.cue { position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.cue span { display: inline-block; animation: cue 2.2s ease-in-out infinite; }
.cue::after { content: ''; display: block; width: 1px; height: 2.2rem; margin: 0.6rem auto 0; background: linear-gradient(var(--orange), transparent); }
@keyframes cue { 50% { transform: translateY(5px); opacity: 0.5; } }

/* ---------- Builds ---------- */
.build { position: relative; height: 520svh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--ink); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(15, 17, 15, 0.8), rgba(15, 17, 15, 0) 42%), linear-gradient(to bottom, rgba(15, 17, 15, 0.55), rgba(15, 17, 15, 0) 22%); }
.stage-label { position: absolute; left: var(--gutter); top: 5rem; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; }
.stage-label span { color: var(--orange); margin-right: 0.6rem; }
.phase { position: absolute; left: var(--gutter); bottom: calc(4.5rem + 2vh); display: grid; gap: 0.6rem; max-width: 36rem; }
.phase > * { transition: opacity 0.3s, transform 0.5s var(--ease); }
.phase.swap > * { opacity: 0; transform: translateY(0.8rem); }
.phase-num { font-variant-numeric: tabular-nums; font-size: 0.85rem; letter-spacing: 0.12em; color: var(--muted); }
.phase-num b { color: var(--orange); font-weight: 600; }
.phase-title { font-family: var(--display); font-stretch: 115%; font-weight: 900; text-transform: uppercase; font-size: clamp(2.2rem, 5.5vw, 5rem); line-height: 0.9; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35); }
.phase-text { color: rgba(239, 235, 227, 0.85); max-width: 38ch; }
.pct { position: absolute; right: var(--gutter); bottom: 1.4rem; font-family: var(--display); font-stretch: 125%; font-weight: 800; font-variant-numeric: tabular-nums; font-size: clamp(1.4rem, 3vw, 2.4rem); }
.loading { position: absolute; right: var(--gutter); top: 5rem; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(239, 235, 227, 0.12); }
.bar span { display: block; height: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }

/* ---------- About ---------- */
.about { padding: clamp(6rem, 14vw, 11rem) var(--gutter); display: grid; gap: clamp(3rem, 7vw, 6rem); }
.about-head { display: grid; gap: 1.2rem; max-width: 56rem; }
.big-p { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 50ch; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.step { padding: 1.6rem 1.4rem 1rem 0; border-right: 1px solid var(--line); display: grid; gap: 0.8rem; align-content: start; }
.step + .step { padding-left: 1.4rem; }
.step:last-child { border-right: 0; }
.step-num { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 2.6rem; color: var(--orange); line-height: 1; }
.step h3 { font-size: 1.15rem; font-weight: 600; }
.step p { color: var(--muted); font-size: 0.92rem; }
.service-list { position: relative; }
.service-list li { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(12rem, 1.1fr); gap: clamp(1rem, 3vw, 3rem); align-items: center; border-top: 1px solid var(--line); }
.service-list li:last-child { border-bottom: 1px solid var(--line); }
.service-list h3 { font-family: var(--display); font-stretch: 112%; font-weight: 800; text-transform: uppercase; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1; }
.service-list p { color: var(--muted); max-width: 34ch; }
/* The 3D models are drawn by one canvas laid over the whole list (site3d.js). */
.svc-model { height: clamp(11rem, 18vw, 15rem); cursor: grab; touch-action: pan-y; }
.svc-model:active { cursor: grabbing; }
.models-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Foundation (3D) ---------- */
.strata { position: relative; height: 340svh; background: var(--concrete); color: var(--ink);
  background-image: linear-gradient(rgba(18, 20, 18, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 20, 18, 0.06) 1px, transparent 1px);
  background-size: 2rem 2rem; }
.strata-stage { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); align-items: center; gap: 2rem; padding: 5rem var(--gutter) 2rem; }
.strata-copy { display: grid; gap: 1.4rem; align-content: center; }
.strata .h2 { font-size: clamp(2.2rem, 4.6vw, 4.4rem); }
.strata-lede { max-width: 34ch; color: rgba(18, 20, 18, 0.72); }
.strata-layers { display: grid; margin-top: 0.6rem; counter-reset: layer; }
.strata-layers li { display: grid; grid-template-columns: 1.1rem 1fr; column-gap: 0.9rem; padding: 0.55rem 0; border-top: 1px solid rgba(18, 20, 18, 0.16); opacity: 0.32; transition: opacity 0.5s var(--ease); }
.strata-layers li::before { content: ''; grid-row: span 2; width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; background: var(--sw, var(--ink)); }
.strata-layers li:nth-child(1) { --sw: #6e5a45; }
.strata-layers li:nth-child(2) { --sw: #958e82; }
.strata-layers li:nth-child(3) { --sw: #a39e93; }
.strata-layers li:nth-child(4) { --sw: #2a2c2e; }
.strata-layers li:nth-child(5) { --sw: var(--rust); }
.strata-layers li:nth-child(6) { --sw: #f2eee6; }
.strata-layers li:nth-child(6)::before { box-shadow: inset 0 0 0 1px rgba(18, 20, 18, 0.35); }
.strata-layers li.is-on { opacity: 1; }
.strata-layers b { font-weight: 600; }
.strata-layers span { font-size: 0.85rem; color: rgba(18, 20, 18, 0.62); }
.strata-canvas { width: 100%; height: min(78svh, 46rem); display: block; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2.5rem, 7vw, 7rem); padding: clamp(5rem, 12vw, 9rem) var(--gutter); background: var(--ink-2); }
.contact-intro { display: grid; gap: 1.2rem; align-content: start; }
/* Contact card styled as a site identification board: hazard band, bolted corners, a light tilt. */
.panel { position: relative; margin-top: 1.5rem; background: #f2eee6; color: var(--ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.6s var(--ease); }
.panel-band { height: 1.1rem; background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, var(--ink) 14px 28px); }
.panel-body { display: grid; grid-template-columns: 1fr 1fr; }
.panel-row { padding: 1rem 1.4rem; border-top: 1px solid rgba(18, 20, 18, 0.14); min-width: 0; }
.panel-row:nth-child(2) { border-right: 1px solid rgba(18, 20, 18, 0.14); }
.panel-row:first-child { border-top: 0; }
.panel-row--wide { grid-column: 1 / -1; }
.panel dt { font-size: 0.78rem; color: rgba(18, 20, 18, 0.6); }
.panel dd { font-weight: 600; overflow-wrap: anywhere; }
.panel a { text-decoration: none; }
.panel a:hover { color: #c94a0a; }
.panel-name img { display: block; width: min(100%, 20rem); height: auto; margin-top: 0.4rem; }
.panel-tel { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bolt { position: absolute; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d9d4ca, #7d786f); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); }
.bolt:nth-of-type(1) { left: 0.45rem; top: 1.55rem; }
.bolt:nth-of-type(2) { right: 0.45rem; top: 1.55rem; }
.bolt:nth-of-type(3) { left: 0.45rem; bottom: 0.45rem; }
.bolt:nth-of-type(4) { right: 0.45rem; bottom: 0.45rem; }
.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: 0.4rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field > label, .field legend { font-size: 0.78rem; color: var(--muted); padding: 0; margin-bottom: 0.4rem; }
.opt { opacity: 0.7; }
.field input, .field textarea { width: 100%; min-height: 3rem; padding: 0.7rem 0; border: 0; border-bottom: 1px solid rgba(239, 235, 227, 0.3); background: transparent; border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); cursor: pointer; font-size: 0.88rem; transition: all 0.25s; }
.chip input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--orange); }
.form .btn { justify-self: start; }
.form-status:empty { display: none; }
.form-status { padding: 0.9rem 1rem; border-left: 3px solid var(--orange); background: var(--ink); font-size: 0.92rem; }
.form-status.err { border-color: #e2483d; }

.footer { padding: 2.5rem var(--gutter); border-top: 1px solid var(--line); display: grid; gap: 1.2rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-logo { display: block; height: 4.5rem; width: auto; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-size: 0.92rem; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--orange); }

.tour-pill {
  position: fixed; z-index: 60; left: 50%; top: 4.6rem; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.6rem; padding: 0 1.1rem;
  border: 1px solid rgba(239, 235, 227, 0.25); border-radius: 999px; background: rgba(15, 17, 15, 0.75);
  backdrop-filter: blur(8px); font-size: 0.8rem; cursor: pointer;
  animation: pill-in 0.5s var(--ease) both; transition: opacity 0.4s;
}
.tour-pill.out { opacity: 0; }
.tour-pill u { text-underline-offset: 0.2em; }
.tour-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--orange); animation: blink 1.4s ease-in-out infinite; }
@keyframes pill-in { from { opacity: 0; transform: translateY(-0.6rem); } }
@keyframes blink { 50% { opacity: 0.3; } }

.rv { opacity: 0; transform: translateY(2rem); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 1100px) and (min-width: 761px) {
  .nav-tel { display: none; }
}
@media (max-width: 760px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .brand-logo, .nav.is-solid .brand-logo { height: 3rem; }
  .nav-cta { font-size: 0.78rem; padding: 0.5rem 0.7rem !important; }
  .strata { height: 300svh; }
  .strata-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 0.5rem; padding-top: 4.6rem; }
  .strata-lede { display: none; }
  .strata-copy { gap: 0.8rem; }
  .strata-layers li { padding: 0.3rem 0; font-size: 0.9rem; }
  .strata-layers span { display: none; }
  .strata-canvas { height: 100%; min-height: 0; }
  .service-list li { grid-template-columns: 1fr; gap: 0.6rem; padding-top: 1.6rem; }
  .svc-model { height: 14rem; }
  .panel-body { grid-template-columns: 1fr; }
  .panel-row:nth-child(2) { border-right: 0; }
  .build { height: 380svh; }
  .phase { right: var(--gutter); bottom: 5rem; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 1.4rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .contact, .field-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .rv, .lede, .mega .line > span, .cover-img { opacity: 1 !important; transform: none !important; }
}
