/* ==========================================================================
   STRATUM TECH — site styles
   ========================================================================== */

:root {
  --paper: #F5F2EA;
  --ink: #132A43;
  --blue: #2456D8;
  --signal: #F16A35;
  --grey: #777C80;
  --rule: #D7D4CB;
  --grid-dark: rgba(255, 255, 255, .05);
  --muted-text: #5F6468; /* grey darkened for AA body contrast on paper */

  --f-sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.signal { color: var(--signal); }
.blue { color: var(--blue); }
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.label--light { color: rgba(245, 242, 234, .7); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.systems :focus-visible, .footer :focus-visible { outline-color: var(--signal); }
.next :focus-visible { outline-color: var(--ink); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.arrow { width: 14px; height: 14px; flex: none; transition: transform .35s var(--ease); }

/* --- Navigation -------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 234, .94);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(1px)) { .nav { backdrop-filter: saturate(1.2) blur(8px); } }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 28px; height: 28px; }
.brand__word { font-weight: 700; font-size: 17px; letter-spacing: .14em; white-space: nowrap; }
.brand__thin { font-weight: 400; }

.nav__menu { display: flex; align-items: center; gap: 40px; }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  text-decoration: none; font-size: 15px; font-weight: 500; position: relative; padding-block: 6px;
  display: inline-flex; gap: 8px; align-items: baseline;
}
.nav__links .mono { font-size: 10px; color: var(--grey); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 16px; min-height: 44px;
  transition: background-color .25s;
}
.nav__cta:hover { background: var(--blue); }
.nav__cta:hover .arrow, .next__cta:hover .arrow { transform: translate(2px, -2px); }

.nav__toggle {
  display: none; align-items: center; gap: 12px;
  background: none; border: 1px solid var(--ink); padding: 0 14px; height: 44px; cursor: pointer;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.nav__toggle-bars { display: grid; gap: 5px; width: 18px; }
.nav__toggle-bars span { height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: 8px var(--gutter) 24px;
  }
  .js .nav__menu:not(.is-open) { display: none; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a { display: flex; padding: 18px 0; font-size: 22px; border-bottom: 1px solid var(--rule); }
  .nav__links a::after { display: none; }
  .nav__cta { margin-top: 20px; justify-content: space-between; padding: 16px; }
}
@media (max-width: 380px) {
  .brand__word { font-size: 15px; letter-spacing: .1em; }
  .nav__toggle-label { display: none; }
}

/* --- Hero -------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; color: var(--ink);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.eyebrow__tick { width: 10px; height: 10px; background: var(--signal); flex: none; }

.hero__title {
  font-weight: 700;
  font-size: clamp(3rem, 13.4vw, 9.1rem);
  line-height: .86;
  letter-spacing: -.055em;
  margin-left: -.05em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__word { display: inline-block; }
.hero__word--outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero__word--signal { color: var(--signal); }
@supports not (-webkit-text-stroke: 1px black) { .hero__word--outline { color: var(--ink); } }

.hero__foot {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px;
  align-items: end; margin-top: clamp(40px, 6vw, 88px);
}
.hero__lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 36ch; }
.hero__next {
  justify-self: end; display: inline-flex; align-items: center; gap: 18px;
  text-decoration: none; padding: 6px 0;
}
.dial { position: relative; width: 64px; height: 64px; color: var(--ink); flex: none; }
.dial svg:first-child { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.dial .arrow { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; color: var(--signal); }
.hero__next:hover .dial svg:first-child { transform: rotate(90deg); }
.hero__next:hover .dial .arrow { transform: translateY(4px); }
.hero__next-label { font-size: 13px; letter-spacing: .14em; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }


@media (max-width: 720px) {
  .hero__title { font-size: 18vw; line-height: .88; }
  .hero__word--outline { -webkit-text-stroke-width: 1.5px; }
  .hero__foot { grid-template-columns: 1fr; gap: 32px; }
  .hero__next { justify-self: start; }
}

/* Hero entrance (only when JS present and motion allowed) */
.js .hero__word { transform: translateY(105%); }
.js .eyebrow, .js .hero__foot { opacity: 0; }
.is-ready .hero__word { transform: none; transition: transform 1s var(--ease); }
.is-ready .hero__line:nth-child(2) .hero__word { transition-delay: .12s; }
.is-ready .hero__line:nth-child(2) .hero__word--signal { transition-delay: .2s; }
.is-ready .eyebrow, .is-ready .hero__foot { opacity: 1; transition: opacity .9s ease .45s; }

/* --- Systems diagram --------------------------------------------------- */
.systems {
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--grid-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-dark) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  color: var(--paper);
  padding-block: clamp(72px, 10vw, 144px);
}
.systems__head {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 48px;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.systems__head .label { grid-column: 1; }
.systems__title {
  grid-column: 2; font-weight: 500; font-size: clamp(2rem, 4.6vw, 4.3rem);
  line-height: 1.02; letter-spacing: -.035em; max-width: 17ch;
}
.systems__note { grid-column: 2; color: var(--signal); line-height: 1.9; font-size: 13px; }

.diagram { border: 1px solid rgba(245, 242, 234, .18); padding: clamp(20px, 3vw, 40px); position: relative; }
.diagram::before, .diagram::after {
  content: ""; position: absolute; width: 12px; height: 12px; border: solid var(--signal);
}
.diagram::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.diagram::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.diagram__axis {
  display: flex; flex-wrap: wrap; gap: 8px 16px; color: rgba(245, 242, 234, .6);
  padding-bottom: 20px; margin-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px dashed rgba(245, 242, 234, .18);
}
.diagram__axis span:last-child { color: var(--signal); }

.diagram__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, .45fr) minmax(0, 1.25fr) minmax(48px, .45fr) minmax(0, 1fr);
  align-items: stretch;
}
.diagram__col { display: grid; grid-template-rows: repeat(3, 1fr); gap: 16px; }
.module {
  position: relative; border: 1px solid rgba(245, 242, 234, .35); background: rgba(19, 42, 67, .9);
  padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 104px;
}
.module__code { color: rgba(245, 242, 234, .6); font-size: 11px; }
.module__name { font-size: clamp(17px, 1.45vw, 21px); font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
.module__port {
  position: absolute; top: 50%; right: -5px; width: 9px; height: 9px; margin-top: -4.5px;
  background: var(--ink); border: 1px solid var(--paper);
}
.module--out { border-color: rgba(241, 106, 53, .6); border-left: 3px solid var(--signal); }
.module--out .module__code { color: var(--signal); }
.module--out .module__port { right: auto; left: -6px; background: var(--signal); border-color: var(--signal); }

.diagram__wire { width: 100%; height: 100%; overflow: visible; }
.diagram__wire path {
  fill: none; stroke: rgba(245, 242, 234, .55); stroke-width: 1; vector-effect: non-scaling-stroke;
}
.diagram__wire--out path { stroke: var(--signal); }

.core {
  position: relative; background: var(--paper); color: var(--ink);
  padding: clamp(24px, 2.6vw, 40px); display: flex; flex-direction: column; justify-content: center;
}
.core__frame i { position: absolute; width: 8px; height: 8px; background: var(--signal); }
.core__frame i:nth-child(1) { top: -4px; left: -4px; }
.core__frame i:nth-child(2) { top: -4px; right: -4px; }
.core__frame i:nth-child(3) { bottom: -4px; left: -4px; }
.core__frame i:nth-child(4) { bottom: -4px; right: -4px; }
.core__code { color: var(--grey); font-size: 11px; }
.core__symbol { width: clamp(64px, 6vw, 88px); height: auto; margin: 20px 0; color: var(--ink); background: var(--ink); }
.core__name { font-family: var(--f-mono); font-size: 12px; letter-spacing: .2em; color: var(--blue); }
.core__title { font-weight: 700; font-size: clamp(24px, 2.4vw, 36px); line-height: 1; letter-spacing: -.03em; margin-top: 8px; }
.core__list { margin-top: 20px; border-top: 1px solid var(--rule); }
.core__list li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 11px; display: flex; gap: 10px; align-items: center; }
.core__list li::before { content: ""; width: 6px; height: 6px; background: var(--signal); flex: none; }

.diagram__legend {
  display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: clamp(24px, 3vw, 40px);
  padding-top: 20px; border-top: 1px dashed rgba(245, 242, 234, .18); color: rgba(245, 242, 234, .6); font-size: 11px;
}
.diagram__legend span:last-child { margin-left: auto; }
.sw { display: inline-block; vertical-align: middle; margin-right: 8px; width: 24px; height: 1px; background: rgba(245, 242, 234, .6); }
.sw--sig { background: var(--signal); height: 2px; }

/* Line-drawing + module reveal */
.js .diagram__wire path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .diagram .module, .js .diagram .core { opacity: 0; transform: translateY(12px); }
.diagram.is-in .module, .diagram.is-in .core { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s var(--ease); }
.diagram.is-in .module { transition-delay: calc(var(--i) * 90ms + (var(--i) / 3) * 500ms); }
.diagram.is-in .core { transition-delay: .3s; }
.diagram__col--in .module:nth-child(1) { --i: 0; }
.diagram__col--in .module:nth-child(2) { --i: 1; }
.diagram__col--in .module:nth-child(3) { --i: 2; }
.diagram__col--out .module:nth-child(1) { --i: 3; }
.diagram__col--out .module:nth-child(2) { --i: 4; }
.diagram__col--out .module:nth-child(3) { --i: 5; }
.diagram.is-in .diagram__wire--in path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) .35s; }
.diagram.is-in .diagram__wire--out path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease) .9s; }

@media (max-width: 1020px) {
  .systems__head { grid-template-columns: 1fr; }
  .systems__head > * { grid-column: 1; }
  .diagram__grid { grid-template-columns: 1fr; }
  .diagram__col { grid-template-rows: none; }
  .diagram__col--in, .diagram__col--out { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .module { min-height: 0; }
  .module__port { top: auto; bottom: -5px; right: auto; left: 50%; margin: 0 0 0 -4.5px; }
  .module--out .module__port { top: -6px; bottom: auto; left: 50%; }
  .diagram__wire { display: none; }
  /* vertical spine replaces the horizontal fan connectors */
  .core { margin-block: 40px; }
  .core::before, .core::after {
    content: ""; position: absolute; left: 50%; width: 1px; height: 40px; background: rgba(245, 242, 234, .55);
  }
  .core::before { bottom: 100%; }
  .core::after { top: 100%; background: var(--signal); }
  .diagram__legend span:last-child { margin-left: 0; }
}
@media (max-width: 640px) {
  .diagram { padding: 16px; }
  .diagram__col--in, .diagram__col--out { grid-template-columns: 1fr; gap: 0; }
  .diagram__col .module { border-bottom-width: 0; }
  .diagram__col .module:last-child { border-bottom-width: 1px; }
  .module { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 16px; }
  .module__code { order: 2; flex: none; }
  .module__port { display: none; }
  .module--out { border-left-width: 3px; }
  .diagram__col--out .module:first-child { border-top-color: rgba(241, 106, 53, .6); }
  .core::before, .core::after { height: 40px; }
}

/* --- Principle --------------------------------------------------------- */
.principle {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px;
  padding-block: clamp(80px, 11vw, 168px);
}
.principle__side { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--ink); padding-top: 16px; }
.principle__index { font-size: 13px; letter-spacing: .14em; }
.principle__glyph { width: 120px; height: 120px; margin-top: auto; }
.principle__body { border-top: 1px solid var(--rule); padding-top: 16px; }
.principle__title {
  font-weight: 700; font-size: clamp(2.1rem, 5.2vw, 5.4rem); line-height: .94; letter-spacing: -.045em;
}
.principle__title span { display: block; }
.principle__title span + span { margin-top: .18em; }
.principle__text { margin-top: clamp(32px, 4vw, 56px); font-size: clamp(18px, 1.5vw, 21px); max-width: 44ch; margin-left: auto; }
.principle__steps {
  margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}
.principle__steps li { padding: 14px 16px 0 0; display: flex; gap: 10px; font-size: 12px; color: var(--muted-text); }
.principle__steps li span { color: var(--signal); }

@media (max-width: 860px) {
  .principle { grid-template-columns: 1fr; gap: 32px; }
  .principle__side { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .principle__glyph { display: none; }
  .principle__body { border-top: 0; padding-top: 0; }
  .principle__text { margin-left: 0; }
  .principle__steps { grid-template-columns: 1fr; }
  .principle__steps li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
}

/* --- Capabilities ------------------------------------------------------ */
.build { border-top: 1px solid var(--rule); padding-block: clamp(72px, 9vw, 136px); background: #EFEBE1; }
.build__head {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 3fr); gap: 24px 32px; align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.build__title { font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -.02em; line-height: 1; }
.build__aside { color: var(--muted-text); line-height: 1.8; font-size: 11px; justify-self: end; text-align: right; }

.caps { border-top: 1px solid var(--ink); }
.cap {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 4fr); gap: 16px 32px;
  align-items: baseline; padding-block: clamp(28px, 3.4vw, 48px);
  border-bottom: 1px solid var(--rule);
  transition: border-color .4s ease;
}
.cap::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.cap__num {
  color: var(--signal); font-size: 14px; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 0;
  transition: transform .45s var(--ease);
}
.cap__ind { display: inline-block; width: 0; height: 2px; background: var(--signal); transition: width .45s var(--ease), margin .45s var(--ease); }
.cap__title {
  font-weight: 700; font-size: clamp(1.75rem, 4vw, 4rem); line-height: .95; letter-spacing: -.045em; color: var(--ink);
  transition: transform .5s var(--ease) .04s;
}
.cap__desc { color: var(--muted-text); font-size: 16px; line-height: 1.6; max-width: 38ch; }
.cap__tags { margin-top: 14px; font-size: 11px; color: var(--grey); }
@media (hover: hover) {
  .cap:hover::after { transform: scaleX(1); }
  .cap:hover .cap__ind { width: 24px; margin-right: 12px; }
  .cap:hover .cap__num { transform: translateX(2px); }
  .cap:hover .cap__title { transform: translateX(8px); }
}

@media (max-width: 960px) {
  .build__head { grid-template-columns: 1fr; }
  .build__aside { justify-self: start; text-align: left; }
  .cap { grid-template-columns: 56px minmax(0, 1fr); }
  .cap__desc { grid-column: 2; }
}

/* --- Next step (orange) ------------------------------------------------ */
.next { background: var(--signal); color: var(--ink); padding-block: clamp(72px, 10vw, 152px); overflow: hidden; }
.next__grid {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 56px; align-items: end;
}
.next__label { grid-column: 1 / -1; font-size: 13px; letter-spacing: .14em; border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.next__title {
  font-weight: 700; font-size: clamp(2.5rem, 7.4vw, 7.6rem); line-height: .88; letter-spacing: -.05em;
}
.next__side p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; max-width: 30ch; }
.next__cta {
  margin-top: 28px; display: flex; align-items: stretch; justify-content: space-between;
  border: 1.5px solid var(--ink); text-decoration: none; font-family: var(--f-mono);
  font-size: 13px; letter-spacing: .12em; min-height: 56px;
  transition: background-color .3s, color .3s;
}
.next__cta > span:first-child { padding: 18px 20px; }
.next__cta-box { display: grid; place-items: center; width: 56px; background: var(--ink); color: var(--signal); flex: none; }
.next__cta:hover { background: var(--ink); color: var(--paper); }
.next__motif { grid-column: 1 / -1; width: min(100%, 520px); height: 80px; margin-top: 24px; }
@media (max-width: 860px) {
  .next__grid { grid-template-columns: 1fr; }
}

/* --- Contact form ------------------------------------------------------ */
.contact { padding-block: clamp(72px, 9vw, 136px); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(32px, 6vw, 112px); }
.contact__intro { display: flex; flex-direction: column; gap: 20px; }
.contact__title { font-weight: 700; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: .98; letter-spacing: -.04em; max-width: 12ch; }
.contact__text { color: var(--muted-text); max-width: 38ch; }
.contact__spec { margin-top: 16px; border-top: 1px solid var(--ink); }
.contact__spec div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 11px; }
.contact__spec dt { color: var(--grey); }
.contact__spec dd { text-align: right; }

.form { display: grid; gap: 24px; border-top: 1px solid var(--ink); padding-top: 24px; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  display: flex; justify-content: space-between; gap: 8px;
}
.req { color: var(--signal); }
.opt { color: var(--grey); }
.field input, .field select, .field textarea, .form__compose {
  width: 100%; border: 1px solid var(--rule); background: #FBF9F4; border-radius: 0;
  padding: 14px 14px; min-height: 52px; font-size: 16px; color: var(--ink);
  transition: border-color .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23132A43' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 128px; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--grey); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: #fff; outline: 2px solid var(--blue); outline-offset: -1px; }
.field [aria-invalid="true"] { border-color: #C2410C; background: #FFF6F1; }
.field__error { color: #B23A0C; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.field__error::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.field__error[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.form__note { color: var(--grey); font-size: 11px; }
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 0; cursor: pointer;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  padding: 16px 20px; min-height: 52px; text-decoration: none;
  transition: background-color .25s;
}
.btn:hover { background: var(--blue); }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--light { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); justify-self: start; }
.btn--light:hover { background: var(--ink); color: var(--paper); }

.form__status { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--ink); border-left: 4px solid var(--blue); background: #FBF9F4; }
.form__status[hidden] { display: none; }
.form__status[data-state="sent"] { border-left-color: #2F7D4F; }
.form__status[data-state="invalid"], .form__status[data-state="error"] { border-left-color: var(--signal); }
.form__status[data-state="compose"] { border-left-color: var(--blue); }
.form__status-msg { font-weight: 500; }
.form__compose-label { font-size: 11px; color: var(--grey); }
.form__compose { font-family: var(--f-mono); font-size: 13px; min-height: 160px; resize: vertical; }
.form__status-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 960px) {
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form__row--2 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .form__foot { flex-direction: column-reverse; align-items: stretch; }
}

/* --- Footer ------------------------------------------------------------ */
.footer { background: var(--ink); color: var(--paper); border-top: 1px solid var(--rule); }
.footer__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px 32px; align-items: center;
  padding-block: 32px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 14px; letter-spacing: .06em; }
.footer__mark { width: 20px; height: 20px; color: var(--paper); flex: none; }
.footer__tag { color: var(--signal); font-size: 11px; }
.footer__copy { justify-self: end; color: rgba(245, 242, 234, .65); font-size: 11px; }
@media (max-width: 860px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__copy { justify-self: start; }
}

/* --- Scroll reveal ----------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s var(--ease); }

/* --- Reduced motion: everything static and visible --------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .js .hero__word, .js .reveal, .js .diagram .module, .js .diagram .core { transform: none; opacity: 1; }
  .js .eyebrow, .js .hero__foot, .js .reveal { opacity: 1; }
  .js .diagram__wire path { stroke-dashoffset: 0; }
}

/* --- Preview bar, draft tags ------------------------------------------- */
.preview-bar {
  background: var(--blue); color: #fff; padding: 10px var(--gutter); font-size: 14px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.preview-bar .mono { background: #fff; color: var(--blue); padding: 2px 8px; font-size: 11px; }
.draft-tag {
  display: inline-block; vertical-align: middle; font-size: 11px; letter-spacing: .1em;
  border: 1px solid var(--signal); color: var(--signal); padding: 2px 8px; margin-left: 8px;
}
.brand__mark--img { width: auto; height: 32px; object-fit: contain; }
.cap__title a { text-decoration: none; }
.cap__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.text-link { text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.text-link:hover { text-decoration: underline; }

/* --- Portfolio --------------------------------------------------------- */
.work { padding-block: clamp(72px, 9vw, 136px); border-top: 1px solid var(--rule); }
.work__head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 10fr); gap: 24px 32px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.work__title { font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -.02em; line-height: 1; }
.work__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.work__item { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.work__link { display: grid; gap: 10px; padding: 20px; text-decoration: none; height: 100%; }
.work__media { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #EFEBE1; overflow: hidden; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.work__placeholder { width: 48px; height: 48px; color: var(--rule); }
.work__meta { color: var(--signal); font-size: 11px; }
.work__name { font-weight: 700; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.work__summary { color: var(--muted-text); font-size: 15px; }
.work__link:hover .work__media img { transform: scale(1.03); }
.work__link:hover .work__name { text-decoration: underline; }
@media (max-width: 860px) { .work__head { grid-template-columns: 1fr; } }

/* --- Document pages (services, projects, custom pages) ----------------- */
.doc { padding-block: clamp(48px, 7vw, 112px); max-width: 1100px; }
.doc__title { font-weight: 700; font-size: clamp(2.4rem, 6vw, 5.6rem); line-height: .92; letter-spacing: -.045em; margin-top: 24px; }
.doc__lede { font-size: clamp(18px, 1.6vw, 22px); max-width: 48ch; margin-top: 28px; }
.doc__figure { margin-top: 48px; border: 1px solid var(--rule); }
.doc__figure img, .doc__gallery img { width: 100%; height: auto; display: block; }
.doc__body, .doc__section { margin-top: 48px; max-width: 68ch; }
.doc__h { font-size: 13px; letter-spacing: .14em; border-top: 1px solid var(--ink); padding-top: 12px; margin-bottom: 20px; }
.doc__facts { margin-top: 40px; border-top: 1px solid var(--ink); max-width: 640px; }
.doc__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 12px; }
.doc__facts dt { color: var(--grey); }
.doc__tags { margin-top: 32px; color: var(--grey); }
.doc__gallery { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.doc__next { margin-top: 64px; max-width: 420px; }
.doc__cta { margin-top: 0; }
.prose p, .prose ul { margin-bottom: 1em; }
.prose ul { list-style: square; padding-left: 1.2em; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin: 1.6em 0 .6em; }

/* ==========================================================================
   v2 — simpler hero, guided scrolling, hover details, What We've Built
   ========================================================================== */

/* --- Guided scrolling: snap to major sections only ("proximity" never traps) */
@media (min-height: 560px) {
  html { scroll-snap-type: y proximity; }
  .hero, .systems, .built, .build, .next { scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-snap-type: none; } }

/* --- Hero ------------------------------------------------------------------ */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(32px, 6vh, 80px); padding-bottom: clamp(72px, 10vh, 112px);
}
.hero__copy { display: grid; gap: 18px; }
.hero__tagline {
  font-weight: 700; font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -.02em; line-height: 1.2;
  padding-left: 16px; border-left: 3px solid var(--signal);
}
.hero__lede { display: grid; gap: .8em; max-width: 42ch; }
.hero__foot { align-items: end; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px; text-decoration: none; color: var(--grey); padding: 4px 8px;
}
.hero__scroll .mono { font-size: 10px; letter-spacing: .2em; }
.hero__scroll-line { width: 1px; height: 36px; background: var(--rule); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--signal);
  animation: scroll-cue 2.4s var(--ease) 1.5s 3;
}
.hero__scroll:hover { color: var(--ink); }
@keyframes scroll-cue { to { top: 100%; } }
.js .hero__scroll { opacity: 0; }
.is-ready .hero__scroll { opacity: 1; transition: opacity .9s ease .8s; }
@media (max-height: 640px), (max-width: 720px) { .hero__scroll { display: none; } }

/* --- Diagram: details on hover / focus / touch -------------------------------- */
.module__note {
  font-size: 14px; line-height: 1.4; color: rgba(245, 242, 234, .78);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .35s var(--ease), opacity .3s ease, margin .35s var(--ease);
}
.module[tabindex] { cursor: default; transition: border-color .3s ease, background-color .3s ease; }
.module[tabindex]:hover, .module[tabindex]:focus { border-color: var(--paper); background: #1A3654; }
.module--out[tabindex]:hover, .module--out[tabindex]:focus { border-color: var(--signal); }
.module:hover .module__note, .module:focus .module__note, .module:focus-within .module__note { max-height: 4em; opacity: 1; margin-top: 2px; }
.module:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
/* Highlight the path a module feeds into */
.diagram__grid:has(.diagram__col--in .module:hover, .diagram__col--in .module:focus) .diagram__wire--in path,
.diagram__grid:has(.diagram__col--out .module:hover, .diagram__col--out .module:focus) .diagram__wire--out path { stroke: var(--signal); }
.diagram__grid:has(.module:hover, .module:focus) .core { box-shadow: 0 0 0 2px var(--signal); }
/* Touch screens and small layouts: show details directly */
@media (hover: none), (max-width: 640px) {
  .module__note { max-height: none; opacity: 1; }
  .diagram__legend span:last-child { display: none; }
}
@media (max-width: 640px) {
  .module { flex-wrap: wrap; }
  .module__note { flex-basis: 100%; order: 3; }
}

/* --- Services: extra detail on hover / focus ------------------------------------ */
.cap__more {
  color: var(--ink); font-size: 15px; max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s var(--ease), opacity .3s ease, margin .4s var(--ease);
}
.cap__arrow { color: var(--signal); font-weight: 700; display: inline-block; transition: transform .35s var(--ease); }
.cap { transition: background-color .4s ease, border-color .4s ease; }
.cap:focus-within { background: rgba(255, 255, 255, .45); }
.cap:focus-within .cap__more, .cap:focus .cap__more { max-height: 5em; opacity: 1; margin-top: 12px; }
@media (hover: hover) {
  .cap:hover { background: rgba(255, 255, 255, .45); }
  .cap:hover .cap__more { max-height: 5em; opacity: 1; margin-top: 12px; }
  .cap:hover .cap__arrow { transform: translateX(3px); }
}
@media (hover: none) { .cap__more { max-height: none; opacity: 1; margin-top: 12px; } }
.cap__title a::after { content: ""; position: absolute; inset: 0; }   /* whole row clickable */
.cap:focus-within::after { transform: scaleX(1); }

/* --- What We've Built (homepage) ------------------------------------------------ */
.built { padding-block: clamp(72px, 9vw, 136px); border-top: 1px solid var(--rule); }
.built__head {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 16px 32px; align-items: end;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.built__head .label { grid-column: 1 / -1; }
.built__title { font-weight: 700; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: .92; letter-spacing: -.045em; grid-column: 1 / 3; }
.built__intro { grid-column: 1 / 3; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted-text); max-width: 46ch; }
.built__all {
  grid-column: 3; grid-row: 2 / 4; justify-self: end; align-self: end;
  display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-size: 13px; letter-spacing: .12em;
  border-bottom: 1.5px solid var(--ink); padding: 8px 0 6px;
}
.built__all:hover .arrow { transform: translate(2px, -2px); }
.built__empty { border-top: 1px solid var(--ink); padding-top: 20px; color: var(--muted-text); display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .built__head { grid-template-columns: 1fr; }
  .built__title, .built__intro, .built__all { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* --- Showcase: editorial, alternating rows (not a card grid) -------------------- */
.showcase { border-top: 1px solid var(--ink); }
.show { border-bottom: 1px solid var(--rule); }
.show__link {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px);
  align-items: center; padding-block: clamp(24px, 3.5vw, 48px); text-decoration: none; position: relative;
}
.show:nth-child(even) .show__link { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.show:nth-child(even) .show__media { order: 2; }
.show__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #EAE6DB; border: 1px solid var(--rule); }
.show__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .6s ease; }
.show__img--alt { opacity: 0; }
.show__body { display: grid; gap: 12px; align-content: center; }
.show__meta { color: var(--signal); font-size: 12px; }
.show__name { font-weight: 700; font-size: clamp(2rem, 4vw, 3.6rem); line-height: .95; letter-spacing: -.045em; }
.show__summary { color: var(--muted-text); font-size: 17px; max-width: 40ch; }
.show__cta { display: inline-flex; gap: 10px; align-items: center; font-size: 12px; letter-spacing: .12em; color: var(--ink); }
.show__cta .arrow { color: var(--signal); }
@media (hover: hover) {
  .show__summary, .show__cta { opacity: .0; transform: translateY(8px); transition: opacity .4s ease, transform .5s var(--ease); }
  .show__link:hover .show__summary, .show__link:hover .show__cta,
  .show__link:focus-visible .show__summary, .show__link:focus-visible .show__cta { opacity: 1; transform: none; }
  .show__link:hover .show__img { transform: scale(1.035); }
  .show__link:hover .show__img--alt { opacity: 1; }
  .show__link:hover .show__name { color: var(--blue); }
  .show__link:hover .show__cta .arrow { transform: translateX(4px); }
  /* Keyboard users: same reveal on focus */
  .show__link:focus-visible .show__img--alt { opacity: 1; }
  /* Pages with few products: keep text visible so nothing looks empty */
  .showcase--page .show__summary, .showcase--page .show__cta { opacity: 1; transform: none; }
}
.show__link:focus-visible { outline-offset: 6px; }
@media (max-width: 760px) {
  .show__link, .show:nth-child(even) .show__link { grid-template-columns: 1fr; }
  .show:nth-child(even) .show__media { order: 0; }
}

/* --- Drawn placeholder (until a real image is uploaded) ------------------------- */
.ph { position: absolute; inset: 0; display: block; background: var(--ink); color: var(--paper); overflow: hidden; }
.ph__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.ph__word { position: absolute; right: -0.06em; bottom: -0.2em; font-weight: 700; font-size: clamp(140px, 22vw, 320px); line-height: 1; letter-spacing: -.06em; color: rgba(245, 242, 234, .1); }
.ph__label { position: absolute; left: 20px; top: 18px; font-size: 11px; color: var(--signal); letter-spacing: .14em; }
.ph__bars { position: absolute; left: 20px; bottom: 20px; display: grid; gap: 8px; width: 40%; }
.ph__bars i { display: block; height: 8px; background: rgba(245, 242, 234, .85); }
.ph__bars i:nth-child(2) { width: 72%; background: rgba(245, 242, 234, .5); }
.ph__bars i:nth-child(3) { width: 40%; background: var(--signal); }
.show__link:hover .ph__bars i:nth-child(3) { width: 56%; }
.ph__bars i { transition: width .6s var(--ease); }
.product__cover { position: relative; aspect-ratio: 16 / 9; }
.product__cover:has(img) { aspect-ratio: auto; }

/* --- /work/ page and product pages ------------------------------------------------ */
.worklist { padding-block: clamp(48px, 7vw, 112px); }
.worklist__head { margin-bottom: clamp(40px, 5vw, 72px); }
.doc--product { max-width: 1200px; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--ink); }
.features li { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: baseline; font-weight: 500; }
.features li::before { content: ""; width: 8px; height: 8px; background: var(--signal); flex: none; transform: translateY(-1px); }
.doc__section--wide { max-width: none; }

/* --- Footer tagline -------------------------------------------------------------- */
.footer__tag { font-weight: 500; font-size: 15px; color: var(--signal); letter-spacing: -.01em; }

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-line::after { animation: none; }
  .show__summary, .show__cta { opacity: 1 !important; transform: none !important; }
}

/* JS section paging takes over on desktop; CSS snapping would fight the animation */
html.is-paged { scroll-snap-type: none; }
