/* ==========================================================================
   Wrenline Studio: design system
   --------------------------------------------------------------------------
   Concept: "the line". A single drafting hairline runs through the site:
   section markers, the Diagnose → Recommend → Build line in the hero, rules
   between rows. Editorial serif display type, a precise grotesk for reading,
   and mono "annotations" like the margin notes on a technical drawing.

   1. Tokens           6. Masthead & menu     11. Software ("lab")
   2. Fonts            7. Hero                12. Case study / detail
   3. Base             8. Home sections       13. Forms
   4. Layout helpers   9. Plates & video      14. Footer
   5. Components      10. Page headers        15. Motion & utilities
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink: #14171b;
  --ink-2: #1c2026;
  --ink-3: #2a3038;
  --paper: #f1ede4;
  --paper-2: #e8e2d6;
  --paper-3: #dcd4c4;
  --paper-hi: #f8f6f1;
  --text: var(--ink);
  --muted: #565a60;
  --rule: rgba(20, 23, 27, .16);
  --rule-strong: rgba(20, 23, 27, .42);
  --wren: #b8562b;          /* russet, after the wren's plumage */
  --wren-deep: #9a4520;
  --signal: #a8d5c2;        /* software accent, used on ink only */
  --on-ink: #f1ede4;
  --on-ink-muted: #a4a8ae;
  --rule-ink: rgba(241, 237, 228, .14);
  --danger: #a3261a;

  --f-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --head: 72px;
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2.5rem;
  --space-5: clamp(3rem, 6vw, 5rem); --space-6: clamp(4.5rem, 10vw, 9rem);

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.15rem, 1rem + .5vw, 1.35rem);
  --t-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  --t-2xl: clamp(2.2rem, 1.4rem + 3.4vw, 4.4rem);
  --t-3xl: clamp(2.7rem, 1.4rem + 5.6vw, 6.6rem);
  --t-hero: clamp(3rem, 1rem + 8.4vw, 9.6rem);

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --radius: 2px;
}

/* 2. Fonts (self-hosted, latin subset, SIL OFL) ---------------------------- */
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/static/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 var(--t-md)/1.6 var(--f-sans); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol[role="list"], ul[role="list"] { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--wren); color: var(--paper); }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--wren); outline-offset: 3px; border-radius: 1px; }

.display { font-family: var(--f-display); font-weight: 400; letter-spacing: -.012em; line-height: .98; }
.display em { font-style: italic; }
.mono { font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 450; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; transition: top .2s; }
.skip:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* 4. Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* 5. Components ------------------------------------------------------------ */
/* Section marker: "§ 02  SELECTED WORK  ──────────" */
.shead { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); color: var(--muted); }
.shead__num { color: var(--wren-deep); }
.shead__rule { height: 1px; background: var(--rule-strong); transform-origin: left; }
.shead--light { color: var(--on-ink-muted); }
.shead--light .shead__num { color: var(--signal); }
.shead--light .shead__rule { background: var(--rule-ink); }

/* Buttons: one shape, five tones */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper); --b-bd: var(--ink); --b-hover: var(--wren);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 20px 0 22px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd); border-radius: var(--radius);
  font: 500 .95rem/1 var(--f-sans); letter-spacing: .005em; cursor: pointer; white-space: nowrap;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--b-hover); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.btn .icon { transition: transform .35s var(--ease); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover .icon { transform: translateX(4px); }
.btn:hover { border-color: var(--b-hover); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--rule-strong); --b-hover: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--light { --b-bg: var(--paper); --b-fg: var(--ink); --b-bd: var(--paper); --b-hover: var(--wren); }
.btn--light:hover { color: var(--paper); }
.btn--signal { --b-bg: var(--signal); --b-fg: var(--ink); --b-bd: var(--signal); --b-hover: var(--paper); }
.btn--ghost-light { --b-bg: transparent; --b-fg: var(--on-ink); --b-bd: var(--rule-ink); --b-hover: var(--paper); }
.btn--ghost-light:hover { color: var(--ink); }
.btn--small { min-height: 40px; padding: 0 14px 0 16px; font-size: .875rem; gap: 10px; }
.btn--large { min-height: 58px; padding: 0 26px 0 28px; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--rule-strong); transition: color .2s, text-decoration-color .2s; }
.link:hover { color: var(--wren-deep); text-decoration-color: currentColor; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.25rem 0; }
.tags li { border: 1px solid var(--rule-strong); padding: 5px 10px; border-radius: var(--radius); color: var(--muted); }
.tags--large li { padding: 8px 14px; color: var(--ink); }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid currentColor; border-radius: 99px; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--concept { color: #b9bcc1; }
.status--in-development { color: #e7c27a; }
.status--demo-available { color: var(--signal); }
.status--live-product { color: #b7e08a; }

.metatable { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 clamp(16px, 2vw, 32px); margin: clamp(2rem, 4vw, 3rem) 0 2rem; }
.metatable div { border-top: 1px solid var(--rule-strong); padding: 12px 0 14px; }
.metatable dt { color: var(--muted); margin-bottom: 4px; }
.metatable dd { font-weight: 500; }

.note { display: grid; gap: 6px; border-left: 2px solid var(--wren); padding: 4px 0 4px 18px; margin-top: 2rem; max-width: 62ch; color: var(--muted); }
.note .mono { color: var(--wren-deep); }

.prose { max-width: 64ch; }
.prose p + p, .prose h2 + p { margin-top: 1em; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-xl); margin: 2.2em 0 .5em; }
.prose--large { font-size: var(--t-lg); line-height: 1.55; }

.crumbs { margin-bottom: clamp(2rem, 5vw, 3.5rem); color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: .5; }
.crumbs a:hover { color: var(--wren-deep); }

/* Steps & item lists */
.steps { border-bottom: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 4rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--rule); }
.steps .mono { color: var(--wren-deep); padding-top: .3em; }
.steps p { max-width: 60ch; }
.sitems { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 clamp(20px, 3vw, 48px); }
.sitems li { border-top: 1px solid var(--rule-strong); padding: 20px 0 28px; }
.sitems .mono { color: var(--wren-deep); }
.sitems h3 { font: 400 1.6rem/1.1 var(--f-display); margin: 10px 0 8px; }
.sitems h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.sitems p { color: var(--muted); max-width: 46ch; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 32px; }
.checks li { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.checks .icon { color: var(--wren-deep); margin-top: .2em; }

/* FAQ disclosure */
.faqs { border-bottom: 1px solid var(--rule-strong); }
.faq { border-top: 1px solid var(--rule-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq__q { font: 500 1.125rem/1.35 var(--f-sans); }
.faq__icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--rule-strong); border-radius: 50%; flex: none; transition: transform .35s var(--ease), background .25s; }
.faq[open] .faq__icon { transform: rotate(45deg); background: var(--ink); color: var(--paper); }
.faq summary:hover .faq__q { color: var(--wren-deep); }
.faq__a { padding: 0 3.5rem 24px 0; color: var(--muted); max-width: 68ch; }

/* 6. Masthead & menu ------------------------------------------------------- */
.masthead { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .35s, box-shadow .35s, transform .45s var(--ease); }
.masthead__inner { display: flex; align-items: center; gap: 24px; height: var(--head); }
.masthead.is-scrolled { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--rule); }
.masthead.is-hidden { transform: translateY(-100%); }
.masthead__brand { margin-right: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.wordmark__mark { width: 30px; height: 30px; }
.wordmark__name { font: 400 1.6rem/1 var(--f-display); letter-spacing: -.01em; }
.wordmark__studio { font: 500 .62rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; padding-left: 10px; border-left: 1px solid var(--rule-strong); color: var(--muted); }
.wordmark--light { color: var(--on-ink); }
.wordmark--light .wordmark__studio { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.masthead__nav { display: none; }
.masthead__nav ul { display: flex; gap: clamp(16px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }
.navlink { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 0; font-weight: 500; font-size: .95rem; }
.navlink__n { font-size: .62rem; color: var(--muted); transition: color .2s; }
.navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.navlink:hover::after, .navlink.is-current::after { transform: scaleX(1); transform-origin: left; }
.navlink:hover .navlink__n, .navlink.is-current .navlink__n { color: var(--wren-deep); }
.masthead__cta { display: none; }
.masthead__toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px 0 12px; background: none; border: 0; cursor: pointer; font: 500 .8rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.masthead__toggle-lines { position: relative; width: 26px; height: 10px; }
.masthead__toggle-lines i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease); }
.masthead__toggle-lines i:first-child { top: 0; }
.masthead__toggle-lines i:last-child { top: 8.5px; }
.menu-open .masthead__toggle-lines i:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-open .masthead__toggle-lines i:last-child { top: 4.25px; transform: rotate(-45deg); }
.menu-open .masthead { color: var(--on-ink); background: transparent; box-shadow: none; backdrop-filter: none; }
.menu-open .masthead .wordmark { color: var(--on-ink); }
.menu-open .masthead .wordmark__studio { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.menu-open { overflow: hidden; }

.menu { position: fixed; inset: 0; z-index: -1; background: var(--ink); color: var(--on-ink); overflow-y: auto; clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease-io), visibility 0s .6s; visibility: hidden; }
.menu[hidden] { display: block; }
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease-io); }
.menu__inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--head) + 4vh); padding-bottom: 32px; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { border-top: 1px solid var(--rule-ink); opacity: 0; transform: translateY(18px); transition: opacity .4s, transform .5s var(--ease); }
.menu-open .menu__list li { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .05s); }
.menu__list a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; font: 400 clamp(2.4rem, 10vw, 4rem)/1 var(--f-display); }
.menu__list .mono { color: var(--signal); }
.menu__list a[aria-current] { font-style: italic; }
.menu__foot { display: grid; gap: 20px; justify-items: start; margin-top: 40px; color: var(--on-ink-muted); }

@media (min-width: 64em) {
  .masthead__nav, .masthead__cta { display: block; }
  .masthead__cta { display: inline-flex; }
  .masthead__toggle, .menu { display: none !important; }
  .masthead__nav { margin-right: 12px; }
}

/* 7. Hero ------------------------------------------------------------------ */
.hero { padding: calc(var(--head) + clamp(2.5rem, 8vh, 6rem)) 0 var(--space-5); }
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); }
.hero__kicker { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 0; color: var(--muted); margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero__kicker > span:not(:last-child)::after { content: "·"; margin: 0 12px; color: var(--wren-deep); }
.hero__title { grid-column: 1 / -1; font-size: var(--t-hero); line-height: .92; letter-spacing: -.025em; }
.hero__title em { color: var(--wren-deep); padding-right: .04em; }
.line-mask { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line-mask > span { display: block; }
.hero__body { grid-column: 1 / -1; margin-top: clamp(2rem, 4vw, 3.25rem); }
.lede { font-size: var(--t-lg); line-height: 1.5; max-width: 40ch; margin-bottom: 2rem; color: #2c3036; }
.hero__note { grid-column: 1 / -1; margin-top: 2.5rem; padding: 4px 0 4px 18px; border-left: 1px solid var(--rule-strong); max-width: 34ch; font-size: var(--t-sm); color: var(--muted); }
.hero__note-label { color: var(--wren-deep); margin-bottom: 6px; }

.hero__stations { position: relative; grid-column: 1 / -1; display: grid; gap: 0; margin-top: clamp(3rem, 7vw, 5.5rem); padding: 0; list-style: none; }
.hero__stations::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--ink); transform-origin: top; }
.hero__stations li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding: 0 0 22px 32px; }
.hero__stations li::before { content: ""; position: absolute; left: 0; top: .35em; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); }
.hero__stations li:last-child::before { background: var(--wren); border-color: var(--wren); }
.hero__stations .mono { color: var(--wren-deep); grid-row: span 2; padding-top: .25em; }
.hero__stations strong { font: 400 1.6rem/1.1 var(--f-display); }
.hero__stations span:last-child { color: var(--muted); font-size: var(--t-sm); }

@media (min-width: 48em) {
  .hero__body { grid-column: 1 / span 8; }
  .hero__note { grid-column: 9 / -1; align-self: end; margin-top: 0; }
  .hero__stations { grid-template-columns: repeat(3, 1fr); column-gap: clamp(16px, 3vw, 48px); padding-top: 28px; }
  .hero__stations::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1px; transform-origin: left; }
  .hero__stations li { padding: 0; grid-template-columns: 1fr; }
  .hero__stations li::before { top: -33px; left: 0; }
  .hero__stations li:last-child::before { left: auto; right: 0; }
  .hero__stations .mono { grid-row: auto; }
}
@media (min-width: 64em) {
  .hero__body { grid-column: 1 / span 6; }
  .hero__note { grid-column: 9 / span 4; }
}

/* 8. Home sections --------------------------------------------------------- */
section { position: relative; }
.intro, .showcase, .services, .approach, .qa { padding: var(--space-6) 0 0; }
.intro__grid { display: grid; gap: 2rem; }
.intro__title { color: var(--muted); }
.intro__statement { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.5rem); line-height: 1.06; letter-spacing: -.012em; max-width: 26ch; }
.intro__statement em { color: var(--wren-deep); }
.intro__facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 clamp(16px, 2vw, 32px); margin-top: clamp(1.5rem, 4vw, 3rem); }
.intro__facets li { border-top: 1px solid var(--rule-strong); padding: 16px 0 8px; }
.intro__facets .mono { display: block; color: var(--wren-deep); }
.intro__facets a { display: inline-block; font: 400 1.9rem/1.1 var(--f-display); margin: 6px 0 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease); }
.intro__facets a:hover { background-size: 100% 1px; }
.intro__facets p { color: var(--muted); font-size: var(--t-sm); max-width: 32ch; }
@media (min-width: 64em) {
  .intro__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .intro__title { grid-column: 1 / span 3; padding-top: 1rem; }
  .intro__statement { grid-column: 4 / -1; }
  .intro__facets { grid-column: 4 / -1; }
}

.showcase__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.showcase__title { font-size: var(--t-3xl); }
.showcase__title em { color: var(--wren-deep); }
.showcase__intro { color: var(--muted); max-width: 46ch; }
@media (min-width: 64em) { .showcase__head { grid-template-columns: 1.4fr 1fr; align-items: end; } .showcase__intro { justify-self: end; } }

.plates { display: grid; gap: clamp(2.5rem, 6vw, 4rem) clamp(16px, 2vw, 32px); }
.plates__link { display: block; }
.plates__caption { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 4px 14px; padding-top: 16px; }
.plates__fig { color: var(--wren-deep); }
.plates__name { font: 400 clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem)/1.05 var(--f-display); }
.plates__meta { grid-column: 2; color: var(--muted); }
.plates__go { grid-row: 1; grid-column: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule-strong); border-radius: 50%; transition: background .3s, color .3s, transform .4s var(--ease); }
.plates__link:hover .plates__go { background: var(--ink); color: var(--paper); transform: rotate(-45deg); }
@media (min-width: 64em) {
  .plates { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .plates__item:nth-child(3n+1) { grid-column: 1 / span 8; }
  .plates__item:nth-child(3n+2) { grid-column: 9 / span 4; margin-top: 38%; }
  .plates__item:nth-child(3n+3) { grid-column: 3 / span 6; }
}
.showcase__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 24px; border-top: 1px solid var(--rule); color: var(--muted); }

.services__grid { display: grid; gap: 2.5rem; }
.services__title { font-size: var(--t-2xl); margin-bottom: 1.25rem; }
.services__title em { color: var(--wren-deep); }
.services__aside > p { color: var(--muted); margin-bottom: 1.75rem; max-width: 34ch; }
.svc-index { border-bottom: 1px solid var(--rule-strong); }
.svc-index__row { border-top: 1px solid var(--rule-strong); }
.svc-index__row a { position: relative; display: grid; grid-template-columns: 3rem 1fr auto; gap: 6px 16px; padding: 24px 0 26px; isolation: isolate; }
.svc-index__row a::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--paper-2); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); }
.svc-index__row a:hover::before { transform: scaleY(1); }
.svc-index__code { color: var(--wren-deep); padding-top: .55em; }
.svc-index__name { font: 400 clamp(1.7rem, 1.2rem + 1.4vw, 2.6rem)/1.05 var(--f-display); transition: transform .45s var(--ease); }
.svc-index__row a:hover .svc-index__name { transform: translateX(6px); }
.svc-index__sum, .svc-index__items { grid-column: 2; max-width: 56ch; }
.svc-index__sum { color: #34383e; }
.svc-index__items { color: var(--muted); font-size: .68rem; }
.svc-index__go { grid-row: 1; grid-column: 3; align-self: center; transition: transform .35s var(--ease); }
.svc-index__row a:hover .svc-index__go { transform: translateX(4px); color: var(--wren-deep); }
@media (min-width: 64em) {
  .services__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .services__aside { grid-column: 1 / span 4; position: sticky; top: calc(var(--head) + 24px); align-self: start; }
  .svc-index { grid-column: 6 / -1; margin-top: 3.4rem; }
}

.approach__title { font-size: var(--t-2xl); max-width: 24ch; line-height: 1.04; }
.approach__title em { color: var(--wren-deep); }
.stages { display: grid; gap: 0 clamp(16px, 3vw, 48px); margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.stage { border-top: 1px solid var(--ink); padding: 18px 0 32px; }
.stage__n { display: block; font-size: clamp(3.5rem, 2.5rem + 4vw, 6.5rem); color: var(--wren-deep); line-height: .9; margin-bottom: 18px; }
.stage h3 { font: 500 1.25rem/1.2 var(--f-sans); margin-bottom: 8px; }
.stage p { color: var(--muted); max-width: 40ch; }
@media (min-width: 48em) { .stages { grid-template-columns: repeat(3, 1fr); } }
.approach__aside { margin-top: 1.5rem; padding: 26px 0 0; border-top: 1px dashed var(--rule-strong); font: 400 var(--t-xl)/1.2 var(--f-display); max-width: 40ch; }
.approach__aside .mono { display: block; color: var(--wren-deep); margin-bottom: 10px; font-family: var(--f-mono); }

.qa__grid { display: grid; gap: 2rem; }
.qa__title { font-size: var(--t-2xl); margin-bottom: 1.5rem; }
.qa__title em { color: var(--wren-deep); }
@media (min-width: 64em) { .qa__grid { grid-template-columns: 4fr 7fr; column-gap: clamp(32px, 6vw, 96px); } }

.cta { margin-top: var(--space-6); padding: var(--space-6) 0; background: var(--paper-2); border-top: 1px solid var(--rule); }
.cta__grid { display: grid; gap: 1.5rem; }
.cta__kicker { color: var(--wren-deep); }
.cta__title { font-size: var(--t-3xl); max-width: 14ch; }
.cta__body p { max-width: 42ch; color: #34383e; margin-bottom: 1.75rem; }
@media (min-width: 64em) {
  .cta__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .cta__kicker { grid-column: 1 / -1; }
  .cta__title { grid-column: 1 / span 8; }
  .cta__body { grid-column: 9 / span 4; }
}

/* 9. Plates & video -------------------------------------------------------- */
.plate { position: relative; background: var(--paper-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.plate__bar { display: flex; justify-content: center; align-items: center; height: 30px; border-bottom: 1px solid var(--rule); background: var(--paper-hi); }
.plate__bar::before { content: ""; position: absolute; left: 12px; top: 12px; width: 26px; height: 6px; background: radial-gradient(circle, var(--paper-3) 2.6px, transparent 3px) 0 0 / 10px 6px repeat-x; }
.plate__url { font-size: .62rem; color: var(--muted); text-transform: none; letter-spacing: .02em; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate__view { aspect-ratio: 16 / 10; overflow: hidden; }
.plate__view > img, .plate__view > .plate__svg { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.1s var(--ease); }
a:hover .plate__view > img, a:hover .plate__view > .plate__svg { transform: scale(1.035); }

.video { margin-top: 1rem; }
.video__trigger { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--rule-ink); border-radius: var(--radius); background: var(--ink-2); overflow: hidden; cursor: pointer; }
.video__poster, .video__poster img, .video__poster svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__poster img, .video__poster svg { transition: transform 1.2s var(--ease), filter .6s; }
.video__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 23, 27, .05) 40%, rgba(20, 23, 27, .65)); }
.video__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: clamp(64px, 9vw, 104px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); color: var(--ink); transform: translate(-50%, -50%); transition: transform .45s var(--ease), background .3s, color .3s; box-shadow: 0 0 0 0 rgba(241, 237, 228, .35); }
.video__play .icon { width: 34%; height: 34%; margin-left: 6%; }
.video__trigger:hover .video__play, .video__trigger:focus-visible .video__play { transform: translate(-50%, -50%) scale(1.08); background: var(--wren); color: var(--paper); box-shadow: 0 0 0 14px rgba(241, 237, 228, .12); }
.video__trigger:hover .video__poster img, .video__trigger:hover .video__poster svg { transform: scale(1.03); }
.video__meta { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; color: var(--on-ink); }
.video__caption { margin-top: 14px; color: var(--on-ink-muted); }
.video__caption .mono { color: var(--signal); margin-right: 8px; }

.vmodal { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--on-ink); }
.vmodal::backdrop { background: rgba(14, 16, 19, .92); backdrop-filter: blur(6px); }
.vmodal[open] { display: grid; place-items: center; animation: vm-in .35s var(--ease); }
.vmodal__inner { width: min(100% - 2 * var(--gutter), 1280px, (100dvh - 140px) * 16 / 9); }
.vmodal__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.vmodal__title { color: var(--on-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmodal__close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule-ink); border-radius: 50%; background: transparent; cursor: pointer; transition: background .25s, color .25s; }
.vmodal__close:hover { background: var(--paper); color: var(--ink); }
.vmodal__frame { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.vmodal__frame video, .vmodal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@keyframes vm-in { from { opacity: 0; transform: scale(.98); } }

/* 10. Page headers & index pages ------------------------------------------- */
.phead { padding-top: calc(var(--head) + clamp(2rem, 6vh, 4.5rem)); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.phead__kicker { color: var(--wren-deep); margin-bottom: 1.25rem; }
.phead__title { font-size: var(--t-3xl); max-width: 16ch; letter-spacing: -.02em; }
.phead__title em { color: var(--wren-deep); }
.phead__lede { font-size: var(--t-lg); line-height: 1.5; max-width: 52ch; margin-top: 1.75rem; color: #34383e; }
.phead--center { text-align: center; min-height: 70vh; display: grid; align-content: center; justify-items: center; }
.phead--center .phead__lede { margin-inline: auto; }
.phead--center .actions { justify-content: center; margin-top: 2rem; }

.windex { position: relative; padding-bottom: var(--space-5); }
.windex__list { border-bottom: 1px solid var(--rule-strong); }
.windex__row { border-top: 1px solid var(--rule-strong); }
.windex__row a { position: relative; display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 4px 16px; align-items: baseline; padding: 22px 0; transition: padding .45s var(--ease), color .3s; }
.windex__n { color: var(--wren-deep); }
.windex__name { font-size: clamp(1.9rem, 1.2rem + 3vw, 4.4rem); line-height: 1; }
.windex__ind, .windex__cat { grid-column: 2; color: var(--muted); }
.windex__go { grid-row: 1; grid-column: 3; align-self: center; transition: transform .35s var(--ease); }
.windex__row a:hover { color: var(--wren-deep); }
.windex__row a:hover .windex__go { transform: translateX(6px); }
@media (min-width: 64em) {
  .windex__row a { grid-template-columns: 4rem minmax(0, 6fr) minmax(0, 3fr) minmax(0, 2fr) 2rem; padding: 28px 0; }
  .windex__ind, .windex__cat { grid-column: auto; }
  .windex__row a:hover { padding-left: 14px; }
  .windex__go { grid-column: 5; }
}
.windex__float { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 64em) {
  .js .windex__float { display: block; position: fixed; left: 0; top: 0; z-index: 30; width: 380px; pointer-events: none; opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0); transition: opacity .3s; }
  .windex__float.is-on { opacity: 1; }
  .windex__float-item { position: absolute; inset: 0 auto auto 0; width: 100%; opacity: 0; transform: scale(.96) rotate(-1.5deg); transition: opacity .35s, transform .5s var(--ease); box-shadow: 0 30px 60px -20px rgba(20, 23, 27, .35); }
  .windex__float-item.is-active { opacity: 1; transform: none; }
}

.wgrid { padding-bottom: var(--space-4); }
.wcase { display: grid; gap: 1.5rem; padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule); }
.wcase__fig { color: var(--wren-deep); margin-bottom: 10px; }
.wcase__name { font-size: var(--t-2xl); margin-bottom: 1rem; }
.wcase__name a:hover { color: var(--wren-deep); }
.wcase__text > p { color: #34383e; max-width: 44ch; }
@media (min-width: 64em) {
  .wcase { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .wcase__visual { grid-column: 1 / span 8; }
  .wcase__text { grid-column: 9 / span 4; }
  .wcase--flip .wcase__visual { grid-column: 5 / span 8; grid-row: 1; }
  .wcase--flip .wcase__text { grid-column: 1 / span 4; grid-row: 1; }
}

.svc { display: grid; gap: 2rem; padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule-strong); }
.svc__code { color: var(--wren-deep); }
.svc__name { font-size: var(--t-2xl); margin: 12px 0 14px; }
.svc__name a:hover { color: var(--wren-deep); }
.svc__sum { color: #34383e; margin-bottom: 1.5rem; max-width: 42ch; }
.svc__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 28px; align-content: start; }
.svc__items li { border-top: 1px solid var(--rule); padding: 16px 0 18px; }
.svc__items h3 { font-size: 1.05rem; margin-bottom: 4px; }
.svc__items h3 a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.svc__items p { color: var(--muted); font-size: var(--t-sm); }
@media (min-width: 64em) { .svc { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); } .svc__head { position: sticky; top: calc(var(--head) + 24px); align-self: start; } }

/* Detail pages share a two-column "label + content" rhythm */
.sdetail > section, .case__sec, .about__sec, .prbody > section { display: grid; gap: 1rem 32px; padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
.sdetail > section > .shead, .case__sec > .shead, .about__sec > .shead, .prbody > section > .shead { grid-column: 1 / -1; margin-bottom: .5rem; }
.case__h { font: 400 var(--t-xl)/1.08 var(--f-display); max-width: 14ch; }
@media (min-width: 64em) {
  .sdetail > section, .case__sec, .about__sec, .prbody > section { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .sdetail > section > :not(.shead), .case__sec > :not(.shead), .about__sec > :not(.shead), .prbody > section > :not(.shead) { grid-column: 5 / -1; }
  .sdetail > section > .case__h, .case__sec > .case__h, .about__sec > .case__h, .prbody > section > .case__h { grid-column: 1 / span 4; grid-row: span 6; align-self: start; }
  .sdetail__intro > .prose { grid-column: 1 / span 8 !important; }
  .sdetail__intro > .sdetail__who { grid-column: 9 / -1 !important; }
}
.sdetail__who { border-top: 1px solid var(--rule-strong); padding-top: 14px; color: var(--muted); }
.sdetail__who .mono { color: var(--wren-deep); margin-bottom: 6px; font-weight: 500; }
.sdetail__child { margin-top: 1.5rem; }

.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 28px 24px; }
.minis a { display: grid; gap: 6px; }
.minis .plate { margin-bottom: 8px; }
.minis__name { font: 400 1.4rem/1.1 var(--f-display); }
.minis .mono { color: var(--muted); }

.others { margin-top: var(--space-5); padding-top: 1rem; }
.others h2 { color: var(--muted); margin-bottom: 1rem; }
.others ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--rule-strong); }
.others a { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); font: 400 1.35rem/1.1 var(--f-display); }
.others a .mono { color: var(--wren-deep); }
.others a .icon { margin-left: auto; margin-right: 16px; transition: transform .3s var(--ease); }
.others a:hover .icon { transform: translateX(4px); }

.pledges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 32px; }
.pledges li { border-top: 1px solid var(--rule-strong); padding: 16px 0 22px; }
.pledges h3 { font: 400 1.55rem/1.1 var(--f-display); margin-bottom: 6px; }
.pledges p { color: var(--muted); }
.about { padding-bottom: var(--space-4); }
.about__facts .metatable { margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.faqpage { display: grid; gap: 2rem; padding-bottom: var(--space-4); }
.faqpage__toc ol { list-style: none; padding: 0; border-top: 1px solid var(--rule-strong); }
.faqpage__toc a { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); color: var(--muted); }
.faqpage__toc a:hover { color: var(--wren-deep); }
.qa-item { display: grid; grid-template-columns: 3rem 1fr; gap: 6px 12px; padding: 28px 0 32px; border-top: 1px solid var(--rule-strong); }
.qa-item__n { color: var(--wren-deep); padding-top: .7em; }
.qa-item__q { font: 400 var(--t-xl)/1.1 var(--f-display); }
.qa-item__a { grid-column: 2; font-size: var(--t-lg); line-height: 1.55; color: #34383e; max-width: 62ch; }
@media (min-width: 64em) {
  .faqpage { grid-template-columns: 4fr 8fr; column-gap: clamp(32px, 6vw, 96px); }
  .faqpage__toc { position: sticky; top: calc(var(--head) + 24px); align-self: start; }
}
.legal { padding-bottom: var(--space-5); }
.legal h2:first-child { margin-top: 0; }

/* 11. Software ("lab") ------------------------------------------------------ */
.lab, .theme-lab main, .case__video, .labcta {
  --grid-line: rgba(241, 237, 228, .045);
  background-color: var(--ink);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
  color: var(--on-ink);
}
.lab { margin-top: calc(var(--space-6) + 34px); padding: var(--space-6) 0; }
.lab__tab { position: absolute; left: var(--gutter); top: -34px; height: 34px; display: flex; align-items: center; padding: 0 18px; background: var(--ink); color: var(--signal); border-radius: var(--radius) var(--radius) 0 0; }
@media (min-width: 90em) { .lab__tab { left: calc((100vw - var(--max)) / 2 + var(--gutter)); } }
.lab__grid { display: grid; gap: 3rem; }
.lab__kicker { color: var(--signal); margin-bottom: 1.25rem; }
.lab__title { font-size: var(--t-3xl); max-width: 13ch; margin-bottom: 1.5rem; }
.lab__title em, .theme-lab .phead__title em, .case__video-title em, .labcta em, .labnotes__title em { color: var(--signal); }
.lab__lede { color: var(--on-ink-muted); max-width: 46ch; margin-bottom: 2rem; font-size: var(--t-lg); line-height: 1.5; }
@media (min-width: 64em) { .lab__grid { grid-template-columns: 6fr 5fr; column-gap: clamp(32px, 6vw, 96px); align-items: center; } }

.lab__console, .console { border: 1px solid var(--rule-ink); border-radius: var(--radius); background: rgba(20, 23, 27, .72); }
.console__bar { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rule-ink); color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; }
.console__bar span:first-child::before { content: "● "; color: var(--signal); }
.console__list { list-style: none; margin: 0; padding: 0; }
.console__list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px; border-bottom: 1px solid var(--rule-ink); }
.console__list a:hover { background: rgba(241, 237, 228, .04); }
.console__name { font: 400 1.5rem/1.1 var(--f-display); }
.console__ind { color: var(--on-ink-muted); grid-column: 1; }
.console__list .status { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.console__empty { padding: clamp(24px, 4vw, 40px) 16px; display: grid; gap: 12px; }
.console__empty .mono { color: var(--signal); text-transform: none; letter-spacing: .01em; font-size: .8rem; }
.console__empty p:last-child { color: var(--on-ink-muted); max-width: 44ch; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-right: 10px; vertical-align: -.18em; background: var(--signal); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console__caps { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px; border-top: 1px solid var(--rule-ink); list-style: none; margin: 0; }
.console__caps li { padding: 5px 9px; border: 1px solid var(--rule-ink); color: var(--on-ink-muted); font-size: .64rem; }

.theme-lab { background: var(--ink); }
.theme-lab .masthead { color: var(--on-ink); }
.theme-lab .masthead .wordmark { color: var(--on-ink); }
.theme-lab .masthead .wordmark__studio, .theme-lab .navlink__n { color: var(--on-ink-muted); border-color: var(--rule-ink); }
.theme-lab .masthead.is-scrolled { background: color-mix(in srgb, var(--ink) 86%, transparent); box-shadow: 0 1px 0 var(--rule-ink); }
.theme-lab .masthead__cta { --b-bg: var(--signal); --b-fg: var(--ink); --b-bd: var(--signal); --b-hover: var(--paper); }
.theme-lab .phead__kicker { color: var(--signal); }
.theme-lab .phead__lede, .theme-lab .prose--large, .theme-lab .crumbs { color: var(--on-ink-muted); }
.theme-lab .crumbs a:hover { color: var(--signal); }
.theme-lab .metatable div { border-color: var(--rule-ink); }
.theme-lab .metatable dt { color: var(--on-ink-muted); }
.theme-lab .checks li, .theme-lab .steps li { border-color: var(--rule-ink); }
.theme-lab .checks .icon { color: var(--signal); }
.theme-lab :focus-visible { outline-color: var(--signal); }
.theme-lab .cta { display: none; }

.products { padding-bottom: var(--space-5); }
.products__list { border-bottom: 1px solid var(--rule-ink); }
.product { border-top: 1px solid var(--rule-ink); }
.product__link { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px 20px; align-items: center; padding: 22px 0; }
.product__logo { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--rule-ink); border-radius: var(--radius); overflow: hidden; color: var(--signal); }
.product__logo--large { width: 96px; height: 96px; font-size: 1.2rem; }
.product__name { display: block; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 3rem); }
.product__tag { color: var(--on-ink-muted); }
.product__ind { grid-column: 2; color: var(--on-ink-muted); }
.product .status { grid-column: 2; justify-self: start; }
.product__go { grid-row: 1; grid-column: 3; transition: transform .3s var(--ease); }
.product__link:hover .product__name { color: var(--signal); }
.product__link:hover .product__go { transform: translateX(6px); }
@media (min-width: 64em) {
  .product__link { grid-template-columns: 56px minmax(0, 6fr) minmax(0, 2fr) auto 2rem; }
  .product__ind, .product .status { grid-column: auto; }
  .product__go { grid-column: 5; }
}
.products__empty { display: grid; gap: 2rem; }
.products__legend h3 { color: var(--signal); margin-bottom: 12px; }
.products__legend ul { list-style: none; padding: 0; border-top: 1px solid var(--rule-ink); }
.products__legend li { padding: 12px 0; border-bottom: 1px solid var(--rule-ink); color: var(--on-ink-muted); }
@media (min-width: 64em) { .products__empty { grid-template-columns: 7fr 5fr; column-gap: 64px; } }

.prhead { display: flex; gap: 24px; align-items: flex-start; }
.prhead .status { margin-bottom: 14px; }

.labnotes { padding: var(--space-5) 0; border-top: 1px solid var(--rule-ink); }
.labnotes__grid { display: grid; gap: 2rem; }
.labnotes__title { font-size: var(--t-2xl); max-width: 12ch; }
.labnotes__list li { display: grid; grid-template-columns: 3rem 1fr; gap: 4px 12px; padding: 20px 0; border-top: 1px solid var(--rule-ink); }
.labnotes__list .mono { color: var(--signal); grid-row: span 2; padding-top: .35em; }
.labnotes__list h3 { font: 400 1.6rem/1.1 var(--f-display); }
.labnotes__list p { color: var(--on-ink-muted); max-width: 52ch; }
@media (min-width: 64em) { .labnotes__grid { grid-template-columns: 5fr 7fr; column-gap: 64px; } }
.labcta { padding: var(--space-5) 0 var(--space-6); border-top: 1px solid var(--rule-ink); }
.labcta__grid { display: grid; gap: 1.5rem; }
.labcta h2 { font-size: var(--t-2xl); max-width: 16ch; }
.labcta p { color: var(--on-ink-muted); margin-bottom: 1.5rem; max-width: 44ch; }
@media (min-width: 64em) { .labcta__grid { grid-template-columns: 7fr 5fr; align-items: end; column-gap: 64px; } }

/* 12. Case study ----------------------------------------------------------- */
.case__head { padding-top: calc(var(--head) + clamp(2rem, 6vh, 4.5rem)); }
.case__title { font-size: var(--t-hero); line-height: .92; letter-spacing: -.025em; max-width: 12ch; }
.case__lede { font-size: var(--t-lg); line-height: 1.5; max-width: 50ch; margin-top: 1.5rem; color: #34383e; }
.case__head .actions { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.case__hero .plate__view { aspect-ratio: 16 / 9; }
.case__body { padding-bottom: var(--space-5); }
.case__video { padding: var(--space-5) 0 var(--space-6); }
.case__video-title { font-size: var(--t-3xl); margin-bottom: 2rem; }
.case__gallery { padding: var(--space-5) var(--gutter) 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; }
.gallery__item img { border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.gallery__item figcaption { margin-top: 10px; color: var(--muted); }
.case__related { display: grid; gap: 8px; padding-top: var(--space-4); padding-bottom: var(--space-4); color: var(--muted); }
.nextcase { border-top: 1px solid var(--rule-strong); }
.nextcase__link { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.nextcase__link .mono { color: var(--wren-deep); grid-column: 1; }
.nextcase__name { grid-column: 1; font-size: var(--t-2xl); transition: transform .5s var(--ease); }
.nextcase__go { grid-row: 1 / span 2; grid-column: 2; display: grid; place-items: center; width: clamp(56px, 8vw, 96px); aspect-ratio: 1; border: 1px solid var(--ink); border-radius: 50%; transition: background .3s, color .3s, transform .5s var(--ease); }
.nextcase__link:hover .nextcase__name { transform: translateX(10px); }
.nextcase__link:hover .nextcase__go { background: var(--ink); color: var(--paper); transform: rotate(-45deg); }

/* 13. Forms ---------------------------------------------------------------- */
.contact { display: grid; gap: 3rem; padding-top: calc(var(--head) + clamp(2rem, 6vh, 4.5rem)); padding-bottom: var(--space-6); }
.contact .phead__title { font-size: var(--t-2xl); }
.contact__next { margin-top: 2.5rem; border-bottom: 1px solid var(--rule); }
.contact__next li { display: grid; grid-template-columns: 3rem 1fr; padding: 14px 0; border-top: 1px solid var(--rule); color: var(--muted); }
.contact__next strong { color: var(--ink); font-weight: 500; }
.contact__next .mono { color: var(--wren-deep); padding-top: .3em; }
.contact__alt { margin-top: 1.5rem; }
@media (min-width: 64em) {
  .contact { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .contact__intro { grid-column: 1 / span 5; position: sticky; top: calc(var(--head) + 24px); align-self: start; }
  .contact__form { grid-column: 7 / -1; padding-top: 2.5rem; }
}
.form { display: grid; gap: 2.5rem; }
.form__group { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 22px 20px; border: 0; padding: 0; margin: 0; min-width: 0; }
.form__group legend { grid-column: 1 / -1; width: 100%; padding: 0 0 12px; margin-bottom: 18px; border-bottom: 1px solid var(--rule-strong); color: var(--wren-deep); }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 500; font-size: .95rem; }
.req { color: var(--wren-deep); }
.opt { color: var(--muted); font-weight: 400; }
.field__hint { color: var(--muted); font-size: var(--t-sm); margin-top: -4px; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; font: 400 1rem/1.4 var(--f-sans); color: var(--ink);
  background: var(--paper-hi); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(184, 86, 43, .28); background: #fff; }
.field [aria-invalid="true"] { border-color: var(--danger); background: #fdf6f4; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(163, 38, 26, .2); }
.field__error { display: flex; align-items: flex-start; gap: 8px; color: var(--danger); font-size: var(--t-sm); font-weight: 500; }
.field__error[hidden] { display: none; }
.field__error .icon { margin-top: .12em; }
.field__count { color: var(--muted); justify-self: end; margin-top: -2px; text-transform: none; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-hi); font-size: .95rem; transition: background .2s, color .2s, border-color .2s; }
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--wren); outline-offset: 2px; }
[role="radiogroup"][aria-invalid="true"] .choice span { border-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 8px; border-top: 1px solid var(--rule-strong); padding-top: 28px; }
.form__privacy { color: var(--muted); font-size: var(--t-sm); max-width: 36ch; }
.form__summary, .form__failure { border: 1px solid var(--danger); border-left-width: 3px; background: #fdf6f4; padding: 16px 18px; color: var(--danger); border-radius: var(--radius); }
.form__summary ul { margin: 8px 0 0; padding-left: 18px; }
.form__summary a { text-decoration: underline; }
.form__failure { color: #5b1a12; }
.form__success { padding: clamp(32px, 5vw, 56px); border: 1px solid var(--rule-strong); background: var(--paper-hi); border-radius: var(--radius); display: grid; gap: 16px; }
.form__success:focus { outline: none; }
.form__success-mark { width: 56px; height: 56px; color: var(--ink); }
.form__success h2 { font-size: var(--t-2xl); }
.form__success h2 em { color: var(--wren-deep); }
.form__success p { color: var(--muted); max-width: 44ch; }
.is-sending [data-submit] .icon { animation: nudge .8s var(--ease-io) infinite alternate; }
@keyframes nudge { to { transform: translateX(6px); } }

/* 14. Footer --------------------------------------------------------------- */
.footer { background: var(--ink); color: var(--on-ink); padding: var(--space-6) 0 28px; }
.theme-lab .footer { border-top: 1px solid var(--rule-ink); }
.footer__top { display: grid; gap: 2rem; align-items: end; padding-bottom: var(--space-5); border-bottom: 1px solid var(--rule-ink); }
.footer__statement { font-size: var(--t-2xl); line-height: 1; }
.footer__statement em { color: var(--signal); }
@media (min-width: 64em) { .footer__top { grid-template-columns: 1fr auto; } }
.footer__grid { display: grid; gap: 2.5rem 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); padding: var(--space-4) 0; }
.footer__entity { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; max-width: 46ch; color: var(--on-ink-muted); }
.footer__brand { justify-self: start; }
.footer__loc { text-transform: none; letter-spacing: .01em; font-size: .78rem; }
@media (min-width: 64em) { .footer__grid { grid-template-columns: 5fr 2fr 3fr 3fr; } .footer__entity { grid-column: auto; } }
.footer__col h2 { color: var(--signal); margin-bottom: 14px; font-weight: 500; }
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__col a { color: var(--on-ink-muted); transition: color .2s; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--on-ink); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; border-top: 1px solid var(--rule-ink); color: var(--on-ink-muted); text-transform: none; letter-spacing: .02em; }
.footer__base a:hover { color: var(--on-ink); }
.footer :focus-visible { outline-color: var(--signal); }

/* 15. Motion --------------------------------------------------------------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .shead__rule { transform: scaleX(0); transition: transform 1.2s var(--ease-io) .1s; }
  .js .shead.is-in .shead__rule { transform: scaleX(1); }

  .js .hero__title .line-mask > span { transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
  .js .hero__title .line-mask:nth-child(2) > span { animation-delay: .08s; }
  .js .hero__title .line-mask:nth-child(3) > span { animation-delay: .16s; }
  .js .hero .reveal { animation: fade-up .9s var(--ease) var(--d, 0s) forwards; }
  .js .hero__stations::before { transform: scale(0); animation: draw 1.4s var(--ease-io) .5s forwards; }
  .js .hero__stations li { opacity: 0; animation: fade-up .7s var(--ease) var(--d, .8s) forwards; }
  .js .hero__stations li::before { transform: scale(0); animation: pop .5s var(--ease) calc(var(--d, .8s) - .1s) forwards; }
}
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scale(1); } }
@keyframes pop { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .caret { animation: none; }
  @view-transition { navigation: none; }
}

@media print {
  .masthead, .menu, .footer, .cta, .vmodal, .skip { display: none !important; }
  body { background: #fff; }
}
