/* BlankTec — site stylesheet
   Layout concept: drawing-sheet grid. Full-bleed black/graphite/white bands, 12-col architectural grid,
   hairline rules instead of boxes, mono "title-block" labels, navy from the cube logo as the single accent. */
:root {
  --ink: #05070c;          /* near-black, navy-biased */
  --graphite: #13171f;
  --graphite-2: #1e232d;
  --steel: #2b313d;
  --paper: #ffffff;
  --paper-2: #f2f3f6;
  --navy: #10306b;         /* logo navy */
  --navy-deep: #0a1f47;
  --navy-ui: #1a43a0;      /* fills for actions */
  --navy-glow: 31, 79, 181;
  --navy-tint: #9db8ec;    /* accent text on dark */
  --fg-dark: #f4f6fa;
  --muted-dark: #9ba4b4;
  --fg-light: #05070c;
  --muted-light: #59606d;
  --rule-dark: rgba(255, 255, 255, .12);
  --rule-light: rgba(5, 7, 12, .12);

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-hero: clamp(3.1rem, 10.5vw, 9.5rem);
  --t-xl: clamp(2.6rem, 7.6vw, 6.6rem);
  --t-l: clamp(2rem, 4.8vw, 3.9rem);
  --t-m: clamp(1.45rem, 2.6vw, 2.1rem);
  --t-s: clamp(1.08rem, 1.4vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-label: .74rem;

  --max: 1240px;
  --hdr: 56px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg-dark);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--ink);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--navy-tint); outline-offset: 3px; border-radius: 2px; }
.s-light :focus-visible { outline-color: var(--navy-ui); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 14px; font-weight: 600; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* ---------- layout ---------- */
.wrap {
  width: 100%; max-width: calc(var(--max) + 2 * 32px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.band { position: relative; padding-block: clamp(88px, 12vw, 168px); }
.band.tight { padding-block: clamp(64px, 8vw, 112px); }
.s-dark { background: var(--ink); color: var(--fg-dark); color-scheme: dark; }
.s-graphite { background: var(--graphite); color: var(--fg-dark); color-scheme: dark; }
.s-light { background: var(--paper); color: var(--fg-light); color-scheme: light; }
.s-light-2 { background: var(--paper-2); color: var(--fg-light); color-scheme: light; }
.s-light .muted, .s-light-2 .muted { color: var(--muted-light); }
.muted { color: var(--muted-dark); }

/* drawing-sheet grid overlay */
.gridlines::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 85%);
}

/* ---------- type ---------- */
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 800; letter-spacing: -.035em; line-height: .98; text-wrap: balance; }
p { margin: 0; }
.t-hero { font-size: var(--t-hero); letter-spacing: -.045em; line-height: .92; }
.t-xl { font-size: var(--t-xl); line-height: .95; }
.t-l { font-size: var(--t-l); line-height: 1.02; }
.t-m { font-size: var(--t-m); line-height: 1.12; letter-spacing: -.02em; }
.lede { font-size: var(--t-s); line-height: 1.55; max-width: 38ch; }
.statement { font-family: var(--f-display); font-weight: 600; font-size: var(--t-m); letter-spacing: -.02em; line-height: 1.22; max-width: 30ch; text-wrap: pretty; }
.statement .dim { color: var(--muted-dark); }
.s-light .statement .dim, .s-light-2 .statement .dim { color: #8b919c; }
.prose { max-width: 64ch; display: grid; gap: 1.1em; }
.prose h2 { font-size: var(--t-m); margin-top: .8em; letter-spacing: -.02em; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: .35em; }
.label {
  font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-tint); font-weight: 500;
}
.s-light .label, .s-light-2 .label { color: var(--navy-ui); }
.mono { font-family: var(--f-mono); }
.accent { color: var(--navy-tint); }
.s-light .accent, .s-light-2 .accent { color: var(--navy-ui); }
.ph {
  font-family: var(--f-mono); font-size: .92em; padding: .05em .45em; border: 1px dashed currentColor;
  border-radius: 3px; opacity: .8; white-space: normal; overflow-wrap: anywhere;
}

/* ---------- buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .55em; min-height: 46px; padding: 0 24px;
  font: 600 1rem/1 var(--f-body); text-decoration: none; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy-ui); color: #fff; border-color: rgba(157,184,236,.35); }
.btn-primary:hover { background: #2251bd; }
.btn-ghost { background: transparent; color: inherit; border-color: var(--rule-dark); }
.btn-ghost:hover { border-color: rgba(255,255,255,.5); }
.s-light .btn-ghost, .s-light-2 .btn-ghost { border-color: rgba(5,7,12,.22); }
.s-light .btn-ghost:hover, .s-light-2 .btn-ghost:hover { border-color: var(--ink); }
.s-light .btn-dark, .s-light-2 .btn-dark { background: var(--ink); color: #fff; }
.s-light .btn-dark:hover, .s-light-2 .btn-dark:hover { background: var(--navy); }
.link-arrow {
  display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none;
  color: var(--navy-tint); border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color .25s var(--ease), gap .25s var(--ease);
}
.link-arrow::after { content: "\2192"; transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: currentColor; }
.link-arrow:hover::after { transform: translateX(3px); }
.s-light .link-arrow, .s-light-2 .link-arrow { color: var(--navy-ui); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--hdr);
  background: rgba(5, 7, 12, .9);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.hdr-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.brand .cube { width: 24px; height: 24px; }
.wordmark { font-family: var(--f-display); font-weight: 700; font-stretch: 125%; font-size: .98rem; letter-spacing: .06em; }
.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .9rem; color: rgba(244,246,250,.78); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.btn-quote {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 16px; border-radius: 999px;
  background: var(--navy-ui); color: #fff; text-decoration: none; font-size: .86rem; font-weight: 600;
  border: 1px solid rgba(157,184,236,.35); transition: background-color .2s;
}
.btn-quote:hover { background: #2251bd; }
.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; cursor: pointer;
  position: relative;
}
.menu-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-toggle span:nth-child(1) { top: 18px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }
@media (max-width: 860px) {
  .nav, .hdr-inner > .btn-quote { display: none; }
  .menu-toggle { display: block; }
}

/* full-screen mobile menu */
.mnav {
  position: fixed; inset: 0; z-index: 45; background: var(--ink);
  padding-top: calc(var(--hdr) + env(safe-area-inset-top, 0px) + 24px);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.mnav.open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.mnav ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mnav li { border-bottom: 1px solid var(--rule-dark); transform: translateY(-8px); transition: transform .5s var(--ease); }
.mnav.open li { transform: none; }
.mnav li a { display: block; padding: 18px 0; font-family: var(--f-display); font-weight: 700; font-size: 2rem; letter-spacing: -.03em; text-decoration: none; }
.mnav .btn { margin-top: 32px; align-self: flex-start; }
.mnav .mnav-meta { margin-top: auto; padding-top: 40px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - var(--hdr)); display: grid; align-items: center;
  overflow: hidden; padding-block: clamp(40px, 6vw, 72px);
}
.hero-glow {
  position: absolute; inset: auto -20% -35% -20%; height: 90%; pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 62% 55%, rgba(var(--navy-glow), .32), transparent 70%);
  animation: glow 9s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: .7; } to { opacity: 1; } }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); }
  .hero .t-hero { font-size: clamp(3.4rem, 5.4vw, 5.7rem); }
}
.hero-copy { display: grid; gap: 28px; position: relative; z-index: 2; }
.hero-copy .lede { color: rgba(244,246,250,.82); }
.hero-visual { position: relative; min-width: 0; }
.hero-visual svg { width: 100%; height: auto; overflow: visible; }
.titleblock {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin-top: 10px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dark);
  border: 1px solid var(--rule-dark); width: max-content; max-width: 100%;
}
.titleblock span { padding: 6px 10px; border-right: 1px solid var(--rule-dark); white-space: nowrap; }
.titleblock span:last-child { border-right: 0; }
.titleblock b { color: var(--fg-dark); font-weight: 500; }
@media (max-width: 520px) { .titleblock { grid-template-columns: repeat(2, auto); } .titleblock span:nth-child(2) { border-right: 0; } .titleblock span:nth-child(-n+2) { border-bottom: 1px solid var(--rule-dark); } }
.hero-scroll {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .2em; color: var(--muted-dark); text-transform: uppercase;
  display: grid; justify-items: center; gap: 8px; text-decoration: none;
}
.hero-scroll::after { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--muted-dark), transparent); animation: drip 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-height: 640px), (max-width: 979px) { .hero-scroll { display: none; } }

/* line-drawing primitives (used by generated SVG) */
.ln { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pop { animation: pop .7s var(--ease) both; }
@keyframes pop { from { opacity: .18; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; }
  .pop, .hero-glow, .hero-scroll::after { animation: none; }
}
.svg-label { font-family: var(--f-mono); }

/* ---------- intro statement ---------- */
.intro { display: grid; gap: 40px; }
@media (min-width: 900px) { .intro { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); } }

/* ---------- scroll stories ---------- */
.story { position: relative; }
.story-pin { height: 260vh; }
.story-sticky {
  position: sticky; top: calc(env(safe-area-inset-top, 0px)); height: 100svh; overflow: hidden;
  display: grid; align-items: center; padding-top: var(--hdr);
}
.story-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .story-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; } }
.story-copy { display: grid; gap: 22px; align-content: start; }
.story-copy .lede { color: rgba(244,246,250,.8); }
.story-visual { min-width: 0; position: relative; }
.story-visual svg { width: 100%; height: auto; }
.story-visual figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.progress-rail { height: 1px; background: var(--rule-dark); position: relative; margin-top: 18px; }
.progress-rail i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: var(--navy-tint); }
@media (max-width: 979px), (max-height: 600px) {
  .story-pin { height: auto; }
  .story-sticky { position: relative; height: auto; overflow: visible; padding-block: clamp(88px, 14vw, 140px); }
}
.wide-visual { margin-top: clamp(40px, 6vw, 72px); overflow-x: auto; }
.wide-visual svg { width: 100%; min-width: 640px; height: auto; }

/* ---------- partner (white) ---------- */
.partner { display: grid; gap: 40px; }
.partner .t-xl { max-width: 11ch; }
.who { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule-light); }
@media (min-width: 760px) { .who { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.who > div { padding: 22px 0; border-bottom: 1px solid var(--rule-light); display: grid; gap: 6px; }
@media (min-width: 760px) { .who > div { padding: 26px 28px 26px 0; border-bottom: 0; } .who > div + div { padding-left: 28px; border-left: 1px solid var(--rule-light); } }
.who h3 { font-size: 1.25rem; letter-spacing: -.02em; }

/* ---------- process (real sequence) ---------- */
.process { display: grid; grid-template-columns: minmax(0, 1fr); counter-reset: step; border-top: 1px solid var(--rule-dark); }
.s-light .process, .s-light-2 .process { border-color: var(--rule-light); }
@media (min-width: 760px) { .process { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .process { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.process li { list-style: none; padding: 28px 24px 28px 0; display: grid; gap: 10px; align-content: start; border-bottom: 1px solid var(--rule-dark); position: relative; }
.s-light .process li, .s-light-2 .process li { border-color: var(--rule-light); }
.process li::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--f-mono); font-size: .8rem; color: var(--navy-tint); letter-spacing: .1em; }
.s-light .process li::before, .s-light-2 .process li::before { color: var(--navy-ui); }
.process h3 { font-size: 1.6rem; letter-spacing: -.03em; }
.process ol { margin: 0; padding: 0; }

/* ---------- editorial service list ---------- */
.svc-list { border-top: 1px solid var(--rule-dark); }
.s-light .svc-list, .s-light-2 .svc-list { border-color: var(--rule-light); }
.svc {
  display: grid; gap: 10px 40px; padding-block: clamp(26px, 3.4vw, 40px); border-bottom: 1px solid var(--rule-dark);
  grid-template-columns: minmax(0, 1fr); align-items: baseline;
}
.s-light .svc, .s-light-2 .svc { border-color: var(--rule-light); }
@media (min-width: 900px) { .svc { grid-template-columns: 140px minmax(0, 6fr) minmax(0, 5fr); } }
.svc h3 { font-size: clamp(1.6rem, 3.4vw, 2.7rem); letter-spacing: -.035em; line-height: 1.02; }
.svc p { max-width: 46ch; }
.svc .label { padding-top: .5em; }
.svc a.link-arrow { margin-top: 10px; }
.svc-body { display: grid; gap: 4px; justify-items: start; }

/* values */
.values { display: grid; gap: 0; border-top: 1px solid var(--rule-dark); }
.values > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 32px; padding-block: 22px; border-bottom: 1px solid var(--rule-dark); }
@media (min-width: 760px) { .values > div { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: baseline; } }
.values dt { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; }
.values dd { margin: 0; color: var(--muted-dark); }

/* scope note */
.scope {
  display: grid; gap: 10px; padding: 24px 0 0; border-top: 2px solid var(--navy-tint); max-width: 74ch;
}
.s-light .scope, .s-light-2 .scope { border-color: var(--navy-ui); }

/* page heads */
.page-head { padding-block: clamp(72px, 11vw, 150px) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.page-head .wrap { display: grid; gap: 26px; position: relative; }
.page-head .lede { color: rgba(244,246,250,.8); max-width: 44ch; }
.s-light.page-head .lede { color: var(--muted-light); }

.two-col { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; } }
.ticks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-dark); }
.s-light .ticks, .s-light-2 .ticks { border-color: var(--rule-light); }
.ticks li { padding: 15px 0 15px 30px; border-bottom: 1px solid var(--rule-dark); position: relative; }
.s-light .ticks li, .s-light-2 .ticks li { border-color: var(--rule-light); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.45em; width: 14px; height: 1px; background: var(--navy-tint); }
.s-light .ticks li::before, .s-light-2 .ticks li::before { background: var(--navy-ui); }
.stack { display: grid; gap: 22px; align-content: start; }
.stack-lg { display: grid; gap: clamp(56px, 8vw, 104px); }

/* solar compare control */
.compare { display: grid; gap: 16px; }
.compare-ctl { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; border: 1px solid var(--rule-dark); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted-dark); font: 500 .86rem/1 var(--f-body); padding: 9px 16px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--graphite-2); color: #fff; }
.range { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); flex: 1 1 240px; max-width: 420px; }
.range input { flex: 1; accent-color: var(--navy-tint); min-width: 0; }

/* ---------- projects ---------- */
.projects { display: grid; gap: clamp(72px, 10vw, 140px); }
.project { display: grid; gap: 28px; }
.project figure { margin: 0; background: var(--graphite); border: 1px solid var(--rule-dark); overflow: hidden; position: relative; }
.project figure svg { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.project:hover figure svg { transform: scale(1.015); }
.project-meta { display: grid; gap: 14px 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .project-meta { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.project h3 { font-size: var(--t-l); }
.demo-tag {
  position: absolute; top: 14px; left: 14px; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(5,7,12,.82); color: var(--fg-dark); border: 1px solid var(--rule-dark); padding: 6px 10px;
}

/* ---------- contact form ---------- */
.contact-grid { display: grid; gap: 56px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .contact-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; } }
.form { display: grid; gap: 22px; }
.form .row { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form .row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: .86rem; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted-light); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--fg-light); background: var(--paper);
  border: 1px solid rgba(5,7,12,.22); border-radius: 10px; padding: 13px 14px; min-height: 50px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-ui); box-shadow: 0 0 0 3px rgba(26,67,160,.18); }
.field input[type="file"] { padding: 10px; min-height: 0; font-size: .9rem; }
.field input[type="file"]::file-selector-button { font: 600 .86rem var(--f-body); border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.field .hint { font-size: .82rem; color: var(--muted-light); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.field .err { font-size: .82rem; color: #b3261e; display: none; }
.field.invalid .err { display: block; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.files { display: grid; gap: 10px; }
.consent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-size: .92rem; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy-ui); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .86rem; color: var(--muted-light); }
.form-status { padding: 16px 18px; border-left: 2px solid var(--navy-ui); background: var(--paper-2); font-size: .95rem; }
.contact-side { display: grid; gap: 36px; align-content: start; }
.contact-side dl { margin: 0; display: grid; gap: 18px; }
.contact-side dt { font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-light); }
.contact-side dd { margin: 4px 0 0; font-size: 1.05rem; }

/* ---------- closing CTA ---------- */
.cta { display: grid; gap: 30px; justify-items: start; }

/* ---------- footer ---------- */
.site-footer { background: #000; color: var(--fg-dark); padding-block: 72px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255,255,255,.06); }
.foot-top { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); padding-bottom: 48px; border-bottom: 1px solid var(--rule-dark); }
@media (min-width: 900px) { .foot-top { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); } }
.foot-brand { display: grid; gap: 20px; align-content: start; }
.foot-brand .cube { width: 44px; height: 44px; }
.foot-brand .closing { font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.03em; line-height: 1.1; max-width: 18ch; }
.foot-col h4 { font-family: var(--f-mono); font-size: var(--t-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 16px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-col a { text-decoration: none; color: rgba(244,246,250,.82); font-size: .95rem; }
.foot-col a:hover { color: #fff; }
.foot-col p { font-size: .95rem; color: rgba(244,246,250,.82); }
.foot-bottom { padding-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: .82rem; color: var(--muted-dark); }
.foot-bottom a { color: inherit; }

/* ---------- reveal (starts visible) ---------- */
.rv { transition: transform 1s var(--ease), opacity 1s var(--ease); }
.js .rv:not(.in) { transform: translateY(26px); opacity: .45; }
@media (prefers-reduced-motion: reduce) { .js .rv:not(.in) { transform: none; opacity: 1; } }

/* preview-only notice */
.preview-note { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-light); }

/* =====================================================================
   v2 — "tech" layer: wider display type, 3D hero, HUD, CAD viewer
   ===================================================================== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

h1, h2, .t-hero, .t-xl, .t-l { font-stretch: 112%; font-weight: 800; }
.t-hero { letter-spacing: -.05em; }
.statement { font-stretch: 104%; }
.label::before { content: "[ "; opacity: .55; }
.label::after { content: " ]"; opacity: .55; }
.svc .label::before, .svc .label::after, .titleblock .label::before { content: none; }
[data-decode] { font-variant-ligatures: none; }

/* corner brackets for drawing viewports */
.brackets { position: relative; --bc: rgba(157,184,236,.55); }
.brackets::after {
  content: ""; position: absolute; inset: -8px; pointer-events: none;
  background:
    linear-gradient(var(--bc), var(--bc)) left top / 16px 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) left top / 1px 16px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / 16px 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right top / 1px 16px no-repeat,
    linear-gradient(var(--bc), var(--bc)) left bottom / 16px 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) left bottom / 1px 16px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right bottom / 16px 1px no-repeat,
    linear-gradient(var(--bc), var(--bc)) right bottom / 1px 16px no-repeat;
}

/* ---------- 3D hero ---------- */
.hero { display: flex; flex-direction: column; justify-content: center; }
.hero-grid { order: 1; }
.hero-stage { order: 2; position: relative; height: 380px; margin-top: 8px; cursor: grab; touch-action: pan-y; outline: none; }
.hero-stage.grabbing { cursor: grabbing; }
.hero-stage canvas { width: 100%; height: 100%; display: block; }
.hero-stage:focus-visible { box-shadow: inset 0 0 0 1px var(--navy-tint); }
.hero-hud { order: 3; position: relative; z-index: 3; }
.hero:not(.has-3d) .hero-stage, .hero:not(.has-3d) .hero-hud .hud-panel, .hero:not(.has-3d) .hud-hint { display: none; }
.hero.has-3d .hero-visual { display: none; }
@media (min-width: 980px) {
  .hero { min-height: max(640px, calc(100svh - var(--hdr))); }
  .hero-stage { position: absolute; inset: 0; height: auto; margin: 0; z-index: 1; }
  .hero-grid { z-index: 2; pointer-events: none; }
  .hero-grid a, .hero-grid button { pointer-events: auto; }
  .hero.has-3d .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); }
  .hero-hud { position: absolute; left: 0; right: 0; bottom: 26px; pointer-events: none; }
}
.hero-copy { text-shadow: 0 2px 24px rgba(5,7,12,.6); }
.hud-row { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.hud-panel {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; min-width: 0;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--rule-dark); background: rgba(5,7,12,.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hud-panel > div { display: grid; gap: 3px; padding: 8px 12px; border-right: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); }
.hud-panel > div:nth-child(2n) { border-right: 0; }
.hud-panel > div:nth-last-child(-n+2) { border-bottom: 0; }
.hud-panel span { color: var(--muted-dark); }
.hud-panel b { color: var(--fg-dark); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 980px) { .hud-panel { grid-template-columns: repeat(4, auto); } .hud-panel > div { border-bottom: 0; border-right: 1px solid var(--rule-dark); } .hud-panel > div:last-child { border-right: 0; } }
.hud-left { display: grid; gap: 10px; min-width: 0; }
.cmdline { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; color: var(--navy-tint); white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 100%; }
.cmdline .prompt { color: var(--muted-dark); margin-right: .6em; }
.caret { display: inline-block; width: .6em; height: 1em; vertical-align: -2px; background: var(--navy-tint); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud-hint { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-dark); }
@media (max-width: 979px) {
  .hero-hud { margin-top: 14px; }
  .cmdline, .hero-hud .titleblock { display: none; }
  .hero:not(.has-3d) .hero-hud { display: none; }
  .hud-row { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* ---------- deliverables ticker ---------- */
.ticker { border-block: 1px solid var(--rule-dark); background: var(--ink); overflow: hidden; padding-block: 16px; }
.ticker-track { display: flex; width: max-content; animation: tick 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker li { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); padding-inline: 22px; white-space: nowrap; display: flex; align-items: center; gap: 44px; }
.ticker li::after { content: ""; width: 5px; height: 5px; border: 1px solid var(--navy-tint); transform: rotate(45deg); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; flex-wrap: wrap; width: auto; } .ticker ul[aria-hidden] { display: none; } }

/* ---------- section rail ---------- */
.rail { position: fixed; left: max(18px, env(safe-area-inset-left, 0px)); top: 50%; transform: translate(-12px, -50%); z-index: 40; display: none; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .4s var(--ease), transform .4s var(--ease); pointer-events: none; }
@media (min-width: 1400px) { .rail { display: flex; } }
.rail.show { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.rail a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; color: rgba(155,164,180,.6); padding: 5px 0; mix-blend-mode: difference; }
.rail a::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.rail a span { opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s; text-transform: uppercase; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail a[aria-current] { color: #fff; }
.rail a[aria-current]::before { width: 28px; background: var(--navy-tint); }

/* ---------- story numerals ---------- */
.story-index {
  position: absolute; left: max(8px, env(safe-area-inset-left, 0px)); bottom: -0.12em; z-index: 0; pointer-events: none;
  font-family: var(--f-display); font-weight: 800; font-stretch: 125%; font-size: clamp(9rem, 26vw, 24rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(157,184,236,.10); letter-spacing: -.04em;
}
.story-grid, .story .wrap { position: relative; z-index: 1; }

/* ---------- layer legend & stats ---------- */
.layer-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.layer-legend li { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--rule-dark); color: rgba(155,164,180,.5); transition: color .3s, border-color .3s, background-color .3s; display: inline-flex; align-items: center; gap: 7px; }
.layer-legend li::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; }
.layer-legend li.on { color: var(--fg-dark); border-color: rgba(157,184,236,.45); }
.layer-legend li.on::before { background: var(--navy-tint); border-color: var(--navy-tint); }
.stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 14px; border: 1px solid var(--rule-dark); width: fit-content; max-width: 100%; }
.stats > div { padding: 8px 14px; border-right: 1px solid var(--rule-dark); display: grid; gap: 2px; }
.stats > div:last-child { border-right: 0; }
.stats span { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); }
.stats b { font-family: var(--f-display); font-stretch: 112%; font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- CAD viewer ---------- */
.cadview { border: 1px solid var(--rule-dark); background: #070b14; display: grid; outline: none; }
.cadview:focus-visible { box-shadow: 0 0 0 1px var(--navy-tint); }
.cad-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--rule-dark); }
.cad-layers, .cad-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  font: 500 .66rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  border: 1px solid var(--rule-dark); background: transparent; color: var(--muted-dark); padding: 8px 10px; min-height: 32px;
  display: inline-flex; align-items: center; gap: 7px; transition: color .2s, border-color .2s;
}
.chip::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; }
.chip[aria-pressed="true"] { color: var(--fg-dark); border-color: rgba(157,184,236,.45); }
.chip[aria-pressed="true"]::before { background: var(--navy-tint); border-color: var(--navy-tint); }
.chip.icon::before { content: none; }
.chip:hover { color: #fff; }
.cad-canvas { position: relative; overflow: hidden; cursor: crosshair; }
.cad-canvas svg { width: 100%; height: auto; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cadview.active .cad-canvas svg { touch-action: none; }
.cadview.panning .cad-canvas { cursor: grabbing; }
.cad-status { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--rule-dark); font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.cad-status b { color: var(--fg-dark); font-weight: 500; font-variant-numeric: tabular-nums; white-space: pre; }
.cad-hint::before { content: "Click to activate \00B7  Drag to pan \00B7  Scroll or +/\2212 to zoom"; }
.cadview.active .cad-hint::before { content: "Active \00B7  Scroll to zoom \00B7  Esc to release"; color: var(--navy-tint); }
@media (hover: none) { .cad-hint::before, .cadview.active .cad-hint::before { content: "Drag to pan \00B7  Use + / \2212 to zoom"; } }
.hero.has-3d .hero-scroll { display: none; }
@media (max-width: 640px) {
  .cad-layers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding-inline: 2px; max-width: 100%; }
  .cad-layers::-webkit-scrollbar { display: none; }
  .cad-layers .chip { flex: none; }
  .cad-bar { display: grid; }
}

/* ---------- v3: services dropdown ---------- */
.nav { align-items: center; }
.nav-drop { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; cursor: pointer; font: inherit; font-size: .9rem; color: rgba(244,246,250,.78); }
.nav-drop-btn:hover, .nav-drop.open .nav-drop-btn, .nav-drop:has([aria-current]) .nav-drop-btn { color: #fff; }
.nav-drop-btn svg { width: 10px; height: 6px; transition: transform .25s var(--ease); }
.nav-drop.open .nav-drop-btn svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 280px; transform: translate(-50%, -6px);
  display: grid; padding: 8px; background: rgba(10,14,24,.96); border: 1px solid var(--rule-dark); border-radius: 12px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
}
.nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-drop.open .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.nav-menu a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.nav-menu a:hover, .nav-menu a:focus-visible, .nav-menu a[aria-current] { background: var(--graphite-2); }
.nav-menu b { font-weight: 600; font-size: .92rem; color: #fff; }
.nav-menu span { font-size: .8rem; color: var(--muted-dark); }

/* ---------- v3: home routes ---------- */
.routes { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule-dark); }
@media (min-width: 860px) { .routes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.route { display: grid; gap: 10px; align-content: start; padding: 30px 0; text-decoration: none; border-bottom: 1px solid var(--rule-dark); transition: background-color .3s var(--ease); }
@media (min-width: 860px) { .route { padding: 34px 30px 38px; border-bottom: 0; } .route + .route { border-left: 1px solid var(--rule-dark); } .route:first-child { padding-left: 0; } }
.route h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -.035em; }
.route:hover h2 { color: var(--navy-tint); }
.route .link-arrow { margin-top: 6px; }
.route .label::before, .route .label::after { content: none; }

/* ---------- v3: bold front page ---------- */
@media (min-width: 980px) {
  .hero.has-3d { min-height: max(720px, calc(100svh - var(--hdr))); justify-content: flex-start; padding-top: clamp(48px, 7vh, 96px); }
  .hero.has-3d .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero.has-3d .t-hero { font-size: clamp(5rem, 9.4vw, 10rem); line-height: .88; letter-spacing: -.055em; }
  .hero.has-3d .hero-copy { gap: 32px; }
  .hero.has-3d .lede { max-width: 30ch; font-size: 1.3rem; }
}
.big-links { display: grid; border-top: 1px solid var(--rule-dark); }
.big-links a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 28px;
  padding-block: clamp(22px, 3.2vw, 40px); border-bottom: 1px solid var(--rule-dark); text-decoration: none; color: var(--fg-dark);
}
.bl-title { font-family: var(--f-display); font-weight: 800; font-stretch: 112%; font-size: clamp(2rem, 6vw, 5.4rem); letter-spacing: -.05em; line-height: .95; transition: color .3s var(--ease), transform .4s var(--ease); }
.bl-desc { grid-column: 1; font-size: .95rem; color: var(--muted-dark); }
.bl-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: clamp(1.6rem, 4vw, 3.4rem); color: var(--muted-dark); transition: transform .4s var(--ease), color .3s; }
@media (min-width: 860px) { .bl-desc { grid-column: 2; grid-row: 1; text-align: right; } .bl-arrow { grid-column: 3; grid-row: 1; } .big-links a { grid-template-columns: minmax(0, 1fr) auto auto; } }
.big-links a:hover .bl-title, .big-links a:focus-visible .bl-title { color: var(--navy-tint); transform: translateX(10px); }
.big-links a:hover .bl-arrow { color: var(--navy-tint); transform: translateX(6px); }
@media (prefers-reduced-motion: reduce) { .bl-title, .bl-arrow { transition: none; } }
.hud-row { justify-content: flex-end; }
@media (max-width: 979px) { .hud-row { justify-content: flex-start; } .hud-row .hud-left { justify-items: start !important; } }

/* ---------- v4: touch target sizing ---------- */
@media (hover: none), (max-width: 860px) {
  .brand { min-height: 44px; align-items: center; }
  .mnav-meta a { display: inline-block; padding: 10px 0; }
  .foot-col ul { gap: 2px; }
  .foot-col ul a,
  .foot-col ul p { display: block; padding-block: 11px; margin: 0; }
  .foot-bottom a { display: inline-block; padding: 10px 0; }
  .contact-side dd a { display: inline-block; padding: 9px 0; }
  .seg button { min-height: 44px; padding-inline: 18px; }
  .range input[type="range"] { height: 44px; }
  .chip { min-height: 44px; }
  .link-arrow { padding-block: 8px; }
}
.range input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; }
.range input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: var(--rule-dark); border-radius: 2px; }
.range input[type="range"]::-moz-range-track { height: 4px; background: var(--rule-dark); border-radius: 2px; }
.range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy-tint); margin-top: -9px; cursor: pointer; }
.range input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--navy-tint); cursor: pointer; }
