/* Layout: an editorial single page. Name and a live ledger entry open it; one flagship case study
   carries the proof; the manufacturer offer closes as an inverted band before contact. */
:root {
  --bg: #ECE8DF;        /* cream */
  --surface: #F5F2EB;   /* raised paper */
  --ink: #161514;       /* matte black */
  --muted: #5F5A52;     /* dark stone */
  --stone: #9C958A;     /* stone */
  --line: #D2CCC1;
  --ok: #2E6A4E;
  --ok-tint: #DCE8DF;
  --warn: #8F6212;
  --warn-tint: #F1E4C6;
  --font-display: "Gilda Display", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1B1A18; --ink: #ECE8DF; --muted: #ABA59A; --stone: #736D64;
    --line: #2F2D29; --ok: #79C59C; --ok-tint: #1D2B23; --warn: #E2B65E; --warn-tint: #2E2617;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1B1A18; --ink: #ECE8DF; --muted: #ABA59A; --stone: #736D64;
  --line: #2F2D29; --ok: #79C59C; --ok-tint: #1D2B23; --warn: #E2B65E; --warn-tint: #2E2617;
  color-scheme: dark;
}

/* Language switch */
:root:not([data-lang="en"]) .en { display: none !important; }
:root[data-lang="en"] .fr { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--stone); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: var(--wrap); margin: 0 auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0; }
.eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.12rem; line-height: 1.6; max-width: 34em; }
.prose { max-width: 65ch; color: var(--ink); }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 0.82rem; }
.todo { background: var(--warn-tint); color: var(--warn); padding: 0 0.3em; border-bottom: 1px dashed var(--warn); font-style: normal; }

/* Header */
.site-head { padding-block: 22px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mark { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 0.82rem; font-weight: 500; }
.nav .links { display: contents; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { font: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; background: none; border: 0; color: var(--muted); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Hero */
.hero { padding-block: 40px 88px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.hero h1 em { font-style: italic; }
.status { font-size: 0.92rem; color: var(--muted); max-width: 36em; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 0.86rem; font-weight: 600; text-decoration: none; padding: 12px 20px; border-radius: 2px; border: 1px solid var(--ink); cursor: pointer; }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 10px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.facts div { min-width: 0; }
.facts dt { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 0.9rem; font-weight: 500; }

/* Ledger demo */
.ledger { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(0,0,0,0.35); min-width: 0; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ledger-body { padding: 16px 20px; display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 0.86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-family: var(--font-mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.entry { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding-block: 12px; display: grid; gap: 6px; }
.entry-row { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 8px; font-family: var(--font-mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.entry-row .side { color: var(--muted); }
.entry-row.cr .acct { padding-left: 1.4em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.chip.ok { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
.ledger-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.state-line { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.ledger[data-state="approved"] .dot { background: var(--ok); }
.ledger[data-state="rejected"] .dot { background: var(--stone); }
.state-msg { display: none; }
.ledger[data-state="pending"] .state-msg[data-for="pending"],
.ledger[data-state="approved"] .state-msg[data-for="approved"],
.ledger[data-state="rejected"] .state-msg[data-for="rejected"] { display: inline; }
.ledger-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ledger-actions .btn { padding: 8px 14px; font-size: 0.8rem; }
.ledger:not([data-state="pending"]) .act-decide { display: none; }
.ledger[data-state="pending"] .act-reset { display: none; }
.caption { font-size: 0.76rem; color: var(--muted); padding-top: 10px; }

/* Sections */
section { scroll-margin-top: 16px; }
.sec { padding-block: 88px; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 46em; }

/* Case study */
.case-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.case-meta div { min-width: 0; display: grid; gap: 4px; font-size: 0.9rem; }
.case-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; margin-bottom: 64px; }
.case-grid > * { min-width: 0; }
.block-title { font-family: var(--font-display); font-size: 1.45rem; margin-bottom: 14px; }
.evidence { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.evidence li { display: grid; grid-template-columns: 5.6em 1fr; gap: 12px; font-size: 0.88rem; padding-top: 10px; border-top: 1px solid var(--line); }
.evidence .mono { color: var(--muted); padding-top: 1px; }

.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.flow li { display: grid; grid-template-columns: 2.4em 1fr; gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); counter-increment: step; }
.flow li:last-child { border-bottom: 1px solid var(--line); }
.flow li::before { content: counter(step); font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--stone); padding-top: 2px; }
.flow strong { display: block; font-weight: 600; font-size: 0.95rem; }
.flow span.d { font-size: 0.88rem; color: var(--muted); }
.flow li.human::before { color: var(--ink); }
.flow li.human strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: 8px; vertical-align: middle; }

.params { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); background: var(--surface); margin-bottom: 64px; }
.params > div { padding: 22px 20px 24px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.params > div + div { border-left: 1px solid var(--line); }
.params h3 { font-size: 1.15rem; }
.params p { font-size: 0.88rem; color: var(--muted); }

.results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 64px; }
.results > div { display: grid; gap: 6px; align-content: start; min-width: 0; }
.results .n { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.results p { font-size: 0.86rem; color: var(--muted); }
.results .next .n { color: var(--stone); }

.lessons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.lessons > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.lessons strong { font-weight: 600; font-size: 0.95rem; }
.lessons p { font-size: 0.88rem; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 0.72rem; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); }

/* Other projects */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }

/* SupplyPilot showcase */
.sp-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-bottom: 40px; }
.sp-top > * { min-width: 0; }
.shot { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.shot img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.shot figcaption { font-size: 0.84rem; color: var(--muted); }
.shot figcaption strong { color: var(--ink); font-weight: 600; }
.sp-aside { display: grid; gap: 22px; }
.sp-aside dl { margin: 0; display: grid; gap: 14px; }
.sp-aside dl div { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.sp-aside dd { margin: 0; }
.sp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wf { margin-bottom: 64px; }
.tests { margin-bottom: 64px; display: grid; gap: 24px; }
.tests-head { display: grid; gap: 4px; }
.tests-head .block-title { margin-bottom: 4px; }
.tests .shot img { aspect-ratio: auto; object-fit: contain; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.ledger-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.86rem; }
.ledger-table th { text-align: left; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.ledger-table tbody tr:last-child td { border-bottom: 0; }
.ledger-table .num { font-family: var(--font-mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.ledger-table td.mono { font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap; }
.ledger-table .chip { display: inline-block; margin-bottom: 6px; }

/* Case-study storyline: progress rail + numbered steps (a real sequence) */
.rail { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 12px; }
.rail li { min-width: 0; border-top: 2px solid var(--ink); }
.rail li.next { border-top-color: var(--line); }
.rail a { display: grid; gap: 4px; padding: 12px 0 4px; text-decoration: none; font-size: 0.86rem; font-weight: 500; line-height: 1.35; }
.rail li.next a { color: var(--muted); }
.rail a:hover > span:last-child { text-decoration: underline; text-decoration-color: var(--stone); }
.rail .rn { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.step { padding-block: 40px 48px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.step:last-child { padding-bottom: 0; }
.step-head { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 24px; }
.step-head .rn { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; color: var(--stone); font-variant-numeric: lining-nums; }
.step-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; margin-top: 4px; }
.st { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.next { color: var(--muted); }
.st.next::before { background: transparent; border: 1px solid var(--stone); }
.step-body { display: grid; gap: 24px; min-width: 0; }
.step-body > * { margin-bottom: 0; min-width: 0; }
.step-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.step-intro { color: var(--ink); }
.results.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; }
.flow-row li { grid-template-columns: 1.8em 1fr; gap: 8px; border-bottom: 1px solid var(--line); }
.scenarios { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.scenarios li { display: grid; grid-template-columns: 2.4em 1fr; gap: 8px; padding-block: 10px; border-top: 1px solid var(--line); font-size: 0.9rem; min-width: 0; }
.scenarios .mono { color: var(--muted); padding-top: 2px; }
.results.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.params.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-row.two .shot img { aspect-ratio: auto; object-fit: contain; background: var(--surface); }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--ink); max-width: 52em; }
.doc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.doc-list a { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; justify-self: start; }
.doc-list .dl-title { font-family: var(--font-display); font-size: 1.3rem; text-decoration: underline; text-decoration-color: var(--stone); text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-color .15s; }
.doc-list a:hover .dl-title { text-decoration-color: var(--ink); }
.doc-list .dl-arrow { font-size: 0.95rem; color: var(--muted); transition: transform .15s; }
.doc-list a:hover .dl-arrow { transform: translate(2px, -2px); color: var(--ink); }
.doc-list .dl-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); align-self: center; text-align: right; }
.doc-list p { grid-column: 1 / -1; font-size: 0.9rem; color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .doc-list li { grid-template-columns: minmax(0, 1fr); } .doc-list .dl-meta { text-align: left; } }
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.doc { border: 1px solid var(--line); background: var(--surface); display: grid; min-width: 0; }
.doc button { font: inherit; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.doc-cover { aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line) !important; background: var(--bg) !important; }
.doc-cover img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 14px; transition: transform .2s; }
.doc-cover:hover img { transform: scale(1.02); }
.doc-body { padding: 18px 18px 20px; display: grid; gap: 10px; align-content: start; }
.doc-body h3 { font-size: 1.15rem; }
.doc-body p { font-size: 0.88rem; color: var(--muted); }
.thumbs { display: flex; gap: 8px; padding-top: 4px; }
.thumbs button { width: 56px; flex: none; border: 1px solid var(--line); background: #fff; }
.thumbs.wide button { width: 84px; }
.thumbs img { display: block; width: 100%; height: auto; }
.thumbs button:hover, .thumbs button:focus-visible { border-color: var(--ink); }
.doc-link { font-size: 0.86rem; font-weight: 600; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,9,.95); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); gap: 10px; }
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #ECE8DF; font-size: 0.86rem; }
.lb-bar button { font: inherit; font-size: 0.82rem; font-weight: 600; color: #ECE8DF; background: transparent; border: 1px solid rgba(236,232,223,.4); padding: 6px 12px; cursor: pointer; }
.lb-stage { display: grid; place-items: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (max-width: 960px) { .docs { grid-template-columns: minmax(0, 1fr); } }
.projects.single { grid-template-columns: minmax(0, 1fr); }
.projects.single .project { max-width: 46em; padding-right: 0; }
@media (max-width: 960px) {
  .params.three > div:nth-child(3) { border-left: 0; }
  .params.three { grid-template-columns: minmax(0, 1fr); }
  .params.three > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .sp-row.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .step-cols, .flow-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .flow-row { gap: 0; }
  .scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rail, .results.three, .scenarios { grid-template-columns: minmax(0, 1fr); }
  .rail a { padding-block: 8px 2px; }
  .step-head { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .step-head .rn { font-size: 1.8rem; }
}
.wf-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.wf-scroll img { display: block; width: auto; max-width: none; height: clamp(240px, 32vw, 430px); aspect-ratio: auto; border: 0; }
.project { padding: 26px 24px 28px 0; display: grid; gap: 12px; align-content: start; min-width: 0; }
.project + .project { padding-left: 24px; border-left: 1px solid var(--line); }
.project p { font-size: 0.9rem; }
.project .ctx { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Method */
.method { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: m; }
.method li { display: grid; gap: 10px; align-content: start; counter-increment: m; min-width: 0; }
.method li::before { content: counter(m, decimal-leading-zero); font-family: var(--font-mono); font-size: 0.78rem; color: var(--stone); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.method strong { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; line-height: 1.25; }
.method p { font-size: 0.88rem; color: var(--muted); }

/* Background */
.bg-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.bg-grid > * { min-width: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding-block: 14px; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .yr { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.timeline strong { font-weight: 600; font-size: 0.95rem; display: block; }
.timeline .org { display: block; font-size: 0.88rem; color: var(--muted); }
.timeline .win { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--ok); }
.timeline li.now strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-left: 8px; vertical-align: middle; }

/* Manufacturers band (inverted) */
.inverse { background: var(--ink); color: var(--bg); }
.inverse .eyebrow, .inverse .muted { color: var(--stone); }
.mfg { padding-block: 88px; }
.mfg .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.mfg .wrap > * { min-width: 0; }
.mfg-text { display: grid; gap: 18px; }
.mfg ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mfg li { padding-block: 12px; border-top: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); font-size: 0.92rem; display: flex; justify-content: space-between; gap: 16px; }
.mfg li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); }
.mfg li span:last-child { color: var(--stone); font-family: var(--font-mono); font-size: 0.78rem; text-align: right; }
.btn-inverse { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* Contact */
.contact { padding-block: 88px 56px; }
.contact .wrap { display: grid; gap: 28px; }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.contact-list div { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.contact-list .v { font-size: 1rem; font-weight: 500; }
.foot { padding-block: 28px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap, .case-grid, .bg-grid, .mfg .wrap, .sp-top { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .params, .results, .method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .params > div:nth-child(3) { border-left: 0; }
  .params > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project, .project + .project { padding: 24px 0; border-left: 0; }
  .project + .project { border-top: 1px solid var(--line); }
  .lessons { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .nav .links { display: none; }
  .hero { padding-block: 24px 64px; }
  .sec, .mfg, .contact { padding-block: 64px; }
  .facts, .case-meta, .contact-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .params, .results, .method, .sp-row { grid-template-columns: minmax(0, 1fr); }
  .params > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .evidence li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Reset that the publish skeleton gives the home page; sub-pages need it too */
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.nav a[aria-current="page"] { color: var(--ink); }

/* Home: project cards */
.pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pcard { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; min-width: 0; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--ink); transform: translateY(-2px); }
.pcard.featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto; }
.pc-img { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.pcard.featured .pc-img { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--line); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.pc-body { padding: 22px 22px 24px; display: grid; gap: 12px; align-content: start; }
.pcard.featured .pc-body { padding: 32px; align-content: center; }
.pc-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.pc-body p { font-size: 0.92rem; color: var(--muted); max-width: 46ch; }
.pc-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-facts li { font-family: var(--font-mono); font-size: 0.72rem; padding: 3px 9px; border: 1px solid var(--line); color: var(--muted); }
.pc-cta { font-size: 0.86rem; font-weight: 600; padding-top: 4px; }
.pcard:hover .pc-cta { text-decoration: underline; text-underline-offset: 4px; }

/* Project pages: breadcrumb + next project */
.crumb { padding-block: 4px 0; }
.crumb a { font-size: 0.82rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.next-proj { padding-block: 56px; border-top: 1px solid var(--line); }
.next-proj .wrap { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.next-proj .back { font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.next-proj .np { display: grid; gap: 6px; text-decoration: none; text-align: right; }
.np-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; }
.next-proj .np:hover .np-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.page-cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .pcards { grid-template-columns: minmax(0, 1fr); }
  .pcard.featured { grid-template-columns: minmax(0, 1fr); }
  .pcard.featured .pc-img { aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .pcard.featured .pc-body { padding: 22px; }
  .next-proj .np { text-align: left; }
}

.crumb ~ main > .sec:first-of-type { border-top: 0; padding-top: 32px; }

.try { display: grid; gap: 48px; align-items: center; }
.try .prose { margin-top: 8px; }

.hero-solo .wrap { grid-template-columns: minmax(0, 1fr); }
.hero-solo .hero-text { max-width: 52rem; }


/* ===== Home hero — adapted from template 16 "Last Light" ===== */
html { font-synthesis: none; }
h1, h2, h3, .step-title, .np-title, .method strong { font-weight: 400; }
.lh { position: relative; overflow: hidden; isolation: isolate; background: #23262b; color: #fff; padding-block: 24px 40px; }
.lh-bg { position: absolute; inset: -15%; z-index: -1;
  background:
    radial-gradient(55% 60% at 12% 18%, rgba(28, 94, 102, .9), transparent 70%),
    radial-gradient(50% 60% at 88% 28%, rgba(160, 104, 44, .8), transparent 70%),
    radial-gradient(60% 55% at 70% 105%, rgba(112, 60, 38, .65), transparent 70%),
    linear-gradient(115deg, #17343a 0%, #34383b 45%, #5b432b 78%, #2a1c15 100%);
  animation: lh-drift 26s ease-in-out infinite alternate; }
@keyframes lh-drift { to { transform: translate(4%, -3%) scale(1.07); } }
.lh-wrap { max-width: 1320px; margin: 0 auto; position: relative; display: grid; gap: clamp(24px, 4vw, 48px); }
.lh-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lh-mark { font-family: var(--font-body); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; text-decoration: none; }
.lh-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.lh-nav a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 0.84rem; font-weight: 500; }
.lh-nav a:hover { color: #fff; }
.lh-stage { position: relative; padding-right: 76px; }
.lh-title { margin: 0; font-family: "Gilda Display", Georgia, serif; font-weight: 400; text-transform: uppercase; color: #fff;
  font-size: clamp(2.5rem, 9.4vw, 9.6rem); line-height: 0.96; letter-spacing: -0.01em; display: grid; text-wrap: nowrap; }
.lh-title > span { display: block; animation: lh-rise .9s cubic-bezier(.2,.7,.2,1) both; }
.lh-title .l1 { animation-delay: .05s; }
.lh-title .l2 { text-align: right; padding-right: 6%; animation-delay: .15s; }
.lh-title .l3 { padding-left: 27%; animation-delay: .25s; }
@keyframes lh-rise { from { transform: translateY(28px); opacity: .001; } to { transform: none; opacity: 1; } }
.lh-object { position: absolute; left: 7%; top: 27%; width: clamp(100px, 17vw, 250px); height: auto; max-width: 100%; z-index: 2;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); animation: lh-float 7s ease-in-out infinite alternate, lh-in 1.1s .2s cubic-bezier(.2,.7,.2,1) both; pointer-events: none; }
@keyframes lh-float { from { translate: 0 0; rotate: -5deg; } to { translate: 0 -16px; rotate: 5deg; } }
@keyframes lh-in { from { scale: .6; opacity: .001; } to { scale: 1; opacity: 1; } }
.lh-side { position: absolute; right: 0; top: 4%; display: grid; gap: 14px; }
.lh-side button, .lh-side a { width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(248, 198, 90, .55); background: transparent; color: #fff;
  font-family: "Gilda Display", Georgia, serif; font-size: 1rem; display: grid; place-items: center; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.lh-side button[aria-pressed="true"] { background: #f8c65a; color: #23262b; border-color: #f8c65a; }
.lh-side button:hover, .lh-side a:hover { border-color: #f8c65a; }
.lh-bottom { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.lh-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lh-index a { display: grid; gap: 12px; color: #fff; text-decoration: none; }
.lh-index .n { font-family: "Gilda Display", Georgia, serif; font-size: 2rem; line-height: 1; letter-spacing: -0.06em; }
.lh-index .h { color: #f8c65a; }
.lh-index .t { font-size: 0.88rem; font-weight: 500; color: rgba(255,255,255,.6); line-height: 1.35; transition: color .2s; }
.lh-index a:hover .t, .lh-index a:focus-visible .t { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #f8c65a; }
.lh-intro { display: grid; gap: 8px; max-width: 30em; justify-self: end; }
.lh-intro p { font-size: 1rem; line-height: 1.45; font-weight: 500; color: #fff; }
.lh-intro .lh-name { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #f8c65a; font-weight: 600; }
.lh :focus-visible { outline-color: #f8c65a; }
.intro { padding-block: 40px; border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) auto; gap: 32px; align-items: center; }
.intro-status { font-size: 0.95rem; color: var(--muted); max-width: 40em; }
.intro .facts { margin: 0; padding: 0; border: 0; }
.intro .ctas { padding: 0; }
@media (max-width: 1000px) {
  .lh-bottom { grid-template-columns: minmax(0, 1fr); }
  .lh-intro { justify-self: start; }
  .intro-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .lh-nav { gap: 14px; }
  .lh-stage { padding-right: 0; padding-top: 104px; }
  .lh-side { top: 0; right: 0; display: flex; gap: 10px; }
  .lh-side button, .lh-side a { width: 44px; height: 44px; font-size: .9rem; }
  .lh-title .l2 { padding-right: 0; }
  .lh-title .l3 { padding-left: 8%; }
  .lh-object { top: 0; left: 0; width: 92px; }
  .lh-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .lh-bg, .lh-object, .lh-title > span { animation: none !important; }
}

/* ===== One background everywhere (template 16 look), single dark theme ===== */
:root:not(#_) {
  --bg: #23262b;
  --surface: rgba(255, 255, 255, 0.05);
  --ink: #F3EFE7;
  --muted: rgba(243, 239, 231, 0.64);
  --stone: rgba(243, 239, 231, 0.40);
  --line: rgba(243, 239, 231, 0.14);
  --ok: #86d6a9;
  --ok-tint: rgba(134, 214, 169, 0.14);
  --warn: #f8c65a;
  --warn-tint: rgba(248, 198, 90, 0.14);
  --gold: #f8c65a;
  color-scheme: dark;
}
body { background: #23262b; color: var(--ink); isolation: isolate; }
body::after { content: ""; position: fixed; inset: -15%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 60% at 12% 18%, rgba(28, 94, 102, .9), transparent 70%),
    radial-gradient(50% 60% at 88% 28%, rgba(160, 104, 44, .8), transparent 70%),
    radial-gradient(60% 55% at 70% 105%, rgba(112, 60, 38, .65), transparent 70%),
    linear-gradient(115deg, #17343a 0%, #34383b 45%, #5b432b 78%, #2a1c15 100%);
  animation: lh-drift 26s ease-in-out infinite alternate; }
.lh { background: transparent; }
.lh-bg { display: none; }
.intro { border-bottom-color: var(--line); }
.params, .ledger, .table-wrap, .pcard, .doc-list li, .wf-scroll { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ledger { box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6); }
.btn-solid { background: var(--gold); border-color: var(--gold); color: #23262b; }
.btn-ghost { border-color: rgba(243, 239, 231, .45); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.lang button[aria-pressed="true"] { background: var(--gold); color: #23262b; }
.inverse { background: rgba(0, 0, 0, .22); color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inverse .eyebrow, .inverse .muted { color: var(--gold); }
.mfg li, .mfg li:last-child { border-color: var(--line); }
.btn-inverse { background: var(--gold); border-color: var(--gold); color: #23262b; }
.timeline .win { color: var(--ok); }
.rail li { border-top-color: var(--gold); }
.rail li.next { border-top-color: var(--line); }
.step-head .rn { color: var(--gold); opacity: .85; }
.pc-facts li, .tag { border-color: var(--line); }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
canvas.lh-3d { aspect-ratio: 1 / 1; height: auto; width: clamp(130px, 21vw, 300px); left: 5%; top: 18%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.45));
  animation: lh-float3d 7s ease-in-out infinite alternate, lh-in 1.1s .1s cubic-bezier(.2,.7,.2,1) both; pointer-events: none; }
@keyframes lh-float3d { from { translate: 0 0; } to { translate: 0 -14px; } }
@media (max-width: 640px) { canvas.lh-3d { width: 110px; top: -8px; left: -6px; } }


/* ===== Cinematic case study (project pages) ===== */
body:has(.cs)::before { content: ""; position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 220px 220px; animation: cs-grain 1.2s steps(6) infinite; }
@keyframes cs-grain { 0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } 100% { transform: translate(0,0); } }

.cs { padding-block: clamp(40px, 7vw, 96px) clamp(80px, 12vw, 160px); }
.cs-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.cs-sticky { position: sticky; top: 12vh; }
.cs-sticky-in { display: grid; gap: 26px; }
.cs-kicker { color: var(--gold); }
.cs-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 6.4vw, 6.4rem); line-height: .94; letter-spacing: -0.03em; text-wrap: balance; }
.cs-lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--muted); max-width: 34ch; }
.cs-meta { display: grid; gap: 14px; margin: 0; padding-top: 22px; border-top: 1px solid var(--line); max-width: 44ch; }
.cs-meta div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; }
.cs-meta dt { padding-top: 3px; }
.cs-meta dd { margin: 0; font-size: .92rem; line-height: 1.5; }
.cs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cs-down { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.cs-down:hover { text-decoration: underline; text-underline-offset: 4px; }

.cs-flow { display: grid; gap: clamp(72px, 11vw, 150px); padding-top: 4vh; }
.cs-shot { margin: 0; display: grid; gap: 16px; }
.cs-frame { display: block; position: relative; overflow: hidden; border-radius: 3px; background: #15181c;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.7), 0 0 0 1px rgba(243,239,231,.08); }
.cs-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); will-change: transform; }
.cs-frame.pan { aspect-ratio: 4 / 3; }
.cs-frame.pan img { position: absolute; top: 0; left: 0; width: auto; height: 100%; max-width: none; transform: none; }
.cs-frame.pan::after { content: "↗"; position: absolute; right: 14px; bottom: 12px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(20,22,26,.7); color: var(--ink); font-size: .9rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cs-shot figcaption { font-size: .86rem; line-height: 1.55; color: var(--muted); max-width: 60ch; }
.cs-shot figcaption strong { color: var(--ink); font-weight: 600; }

.cs-quote { margin: 0; padding: 0 0 0 clamp(0px, 3vw, 40px); }
.cs-quote p { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; color: var(--ink); }
.cs-quote cite { display: block; margin-top: 18px; font-style: normal; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

.cs-results { padding-block: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cs-counts { margin-top: 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.cs-count { display: grid; gap: 12px; align-content: start; padding-top: 22px; border-top: 1px solid rgba(248,198,90,.45); }
.cs-num { font-family: var(--font-display); font-size: clamp(3.4rem, 7vw, 6.2rem); line-height: .9; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.cs-count p { font-size: .92rem; line-height: 1.45; color: var(--muted); max-width: 22ch; }

.cs-detail-head { padding-block: clamp(80px, 10vw, 130px) 0; }
.cs-detail-head h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 400; margin-top: 10px; }
.cs-detail-head + .sec { border-top: 0; padding-top: 40px; }

.cs-back { padding-block: 56px 40px; border-top: 1px solid var(--line); }
.cs-next { position: relative; display: grid; align-items: end; min-height: clamp(380px, 70vh, 720px); overflow: hidden; isolation: isolate; text-decoration: none; color: #F3EFE7; }
.cs-next-media { position: absolute; inset: 0; z-index: -2; }
.cs-next-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.06); transition: transform 1.4s cubic-bezier(.16,1,.3,1), filter 1s; filter: saturate(.55) brightness(.42) blur(2px); }
.cs-next::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,23,27,.55) 0%, rgba(20,23,27,.35) 40%, rgba(20,23,27,.92) 100%), radial-gradient(80% 60% at 20% 100%, rgba(248,198,90,.18), transparent 70%); }
.cs-next-in { display: grid; gap: 14px; width: 100%; max-width: calc(var(--wrap) + 32px); margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) clamp(40px, 7vw, 88px) max(16px, env(safe-area-inset-left, 0px)); }
.cs-next .eyebrow { color: var(--gold); }
.cs-next-title { font-family: var(--font-display); font-size: clamp(2.8rem, 9vw, 8.5rem); line-height: .92; letter-spacing: -0.035em; text-wrap: balance; }
.cs-arrow { display: inline-block; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.cs-next:hover .cs-next-media img, .cs-next:focus-visible .cs-next-media img { transform: scale(1.12); filter: saturate(.75) brightness(.55) blur(0px); }
.cs-next:hover .cs-arrow, .cs-next:focus-visible .cs-arrow { transform: translateX(.18em); }
.cs-next:focus-visible { outline: 2px solid var(--gold); outline-offset: -6px; }

@media (max-width: 900px) {
  .cs-grid { grid-template-columns: 1fr; }
  .cs-sticky { position: static; }
  .cs-lead { max-width: none; }
  .cs-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-flow { padding-top: 0; }
}
@media (max-width: 480px) {
  .cs-meta div { grid-template-columns: 1fr; gap: 4px; }
  .cs-counts { gap: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.cs)::before { animation: none; }
  .cs-frame img { transform: none; }
  .cs-next-media img, .cs-arrow { transition: none; }
}


/* ===== About + contact (cinematic, near-black) ===== */
.ac { position: relative; isolation: isolate; overflow: hidden; background: transparent; color: var(--ink); border-top: 1px solid var(--line);
  padding: clamp(96px, 13vw, 180px) max(16px, env(safe-area-inset-right, 0px)) clamp(80px, 10vw, 140px) max(16px, env(safe-area-inset-left, 0px)); }
.ac::after { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 45% at 75% 62%, rgba(248,198,90,.10), transparent 70%); }
.ac-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.ac-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 110px); align-items: center; }

.ac-portrait { margin: 0; display: grid; gap: 14px; }
.ac-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; isolation: isolate; background: #f8c65a;
  box-shadow: 0 50px 100px -50px rgba(0,0,0,.9), 0 0 0 1px rgba(243,239,231,.08); }
.ac-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 25%;
  filter: grayscale(1) contrast(1.15) brightness(1.02); mix-blend-mode: multiply; animation: ac-zoom 26s ease-in-out infinite alternate; transform-origin: 50% 35%; }
.ac-frame::after { content: ""; position: absolute; inset: 0; background: #0f2d31; mix-blend-mode: lighten; pointer-events: none; }
@keyframes ac-zoom { from { transform: scale(1.02); } to { transform: scale(1.16); } }
.ac-photo--empty { display: grid; place-items: center; mix-blend-mode: normal; filter: none;
  background: radial-gradient(70% 55% at 50% 38%, #c79a45 0%, #6d5a33 38%, #1d3a3d 72%, #0f2d31 100%); }
.ac-photo--empty span { font-family: var(--font-display); font-size: clamp(6rem, 16vw, 13rem); line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(243,239,231,.55); }
.ac-photo--empty + .ac-grain { opacity: .22; }
.ac-grain { position: absolute; inset: -50%; z-index: 2; pointer-events: none; opacity: .28; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 200px 200px; animation: cs-grain 1.1s steps(6) infinite; }
.ac-todo { position: absolute; left: 12px; top: 12px; z-index: 3; font-size: .72rem; }
.ac-portrait figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,239,231,.5); }

.ac-copy { display: grid; gap: 26px; min-width: 0; }
.ac-eyebrow { color: #f8c65a; }
.ac-bio { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.35rem, 2.1vw, 1.85rem); line-height: 1.4; color: rgba(243,239,231,.88); max-width: 30ch; text-wrap: pretty; }
.ac-sig { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(243,239,231,.5); line-height: 1.7; }

.ac-cta { --pad: .14em; position: relative; justify-self: start; display: inline-flex; align-items: flex-end; gap: .35em; margin-top: clamp(20px, 4vw, 48px);
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2.9rem, 6.6vw, 6.8rem); line-height: .92; letter-spacing: -0.035em;
  color: #F3EFE7; text-decoration: none; padding: var(--pad) .3em var(--pad) .22em; margin-left: -.22em; border-radius: .32em; isolation: isolate; will-change: transform; }
.ac-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #f8c65a;
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.ac-cta-text { display: grid; will-change: transform; transition: color .4s; }
.ac-cta .ln { display: block; overflow-x: visible; overflow-y: clip; padding-bottom: .06em; white-space: nowrap; }
.ac-cta .ln > span { display: inline-block; }
.ac-cta-dot { flex: none; display: grid; place-items: center; width: 2.6em; height: 2.6em; margin-bottom: .9em; border-radius: 50%;
  font-family: var(--font-body, inherit); font-size: .24em; line-height: 1; border: 1px solid rgba(243,239,231,.4); transition: background .4s, color .4s, border-color .4s, transform .6s cubic-bezier(.16,1,.3,1); }
.ac-cta:hover::before, .ac-cta:focus-visible::before { transform: scaleY(1); }
.ac-cta:hover .ac-cta-text, .ac-cta:focus-visible .ac-cta-text { color: #121316; }
.ac-cta:hover .ac-cta-dot, .ac-cta:focus-visible .ac-cta-dot { background: #121316; color: #f8c65a; border-color: #121316; transform: rotate(-45deg); }
.ac-cta:focus-visible { outline: 2px solid #f8c65a; outline-offset: 6px; }
.ac-mail { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(243,239,231,.6); }

.ac-social { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 18px; }
.ac-social li { animation: ac-float 6s ease-in-out infinite; }
.ac-social li:nth-child(2) { animation-delay: -2s; }
.ac-social li:nth-child(3) { animation-delay: -4s; }
@keyframes ac-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ac-social a { display: inline-flex; align-items: center; gap: 12px; padding: 7px 18px 7px 7px; border-radius: 999px; text-decoration: none; color: rgba(243,239,231,.8);
  border: 1px solid rgba(243,239,231,.14); background: rgba(255,255,255,.03); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: .86rem; transition: color .3s, border-color .3s, box-shadow .4s, background .3s; }
.ac-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(248,198,90,.5); color: #f8c65a;
  font-family: var(--font-mono); font-size: .8rem; transition: background .3s, color .3s, box-shadow .4s; }
.ac-social a:hover, .ac-social a:focus-visible { color: #F3EFE7; border-color: rgba(248,198,90,.6); background: rgba(248,198,90,.06);
  box-shadow: 0 0 0 1px rgba(248,198,90,.15), 0 0 28px rgba(248,198,90,.28), 0 0 70px rgba(248,198,90,.12); }
.ac-social a:hover .ac-ico, .ac-social a:focus-visible .ac-ico { background: #f8c65a; color: #121316; box-shadow: 0 0 22px rgba(248,198,90,.6); }


@media (max-width: 860px) {
  .ac-grid { grid-template-columns: 1fr; }
  .ac-portrait { max-width: 420px; }
  .ac-bio { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-photo, .ac-grain, .ac-social li { animation: none; }
  .ac-cta::before, .ac-cta-dot { transition: none; }
}

/* About + contact without portrait */
.ac-grid { grid-template-columns: 1fr; }
.ac-copy { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 28px clamp(32px, 6vw, 96px); align-items: start; }
.ac-eyebrow { padding-top: .6em; }
.ac-about { display: grid; gap: 22px; }
.ac-bio { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.32; max-width: 32ch; }
.ac-cta { grid-column: 1 / -1; font-size: clamp(3.2rem, 11vw, 11rem); margin-top: clamp(48px, 8vw, 110px); }
.ac-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding-top: 26px; border-top: 1px solid var(--line); }
.ac-foot .ac-social { margin: 0; }
@media (max-width: 760px) {
  .ac-copy { grid-template-columns: 1fr; }
  .ac-eyebrow { padding-top: 0; }
}
.ac-mail a { color: var(--gold); text-transform: none; letter-spacing: .04em; text-decoration: underline; text-decoration-color: rgba(248,198,90,.4); text-underline-offset: 4px; }
.ac-mail a:hover { text-decoration-color: var(--gold); }
.ac-foot { margin-top: clamp(40px, 6vw, 80px); }
.ac-mail a { font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.3rem); letter-spacing: -0.01em; margin-left: .3em; }

/* Method steps: gold fill on hover */
.method { gap: 16px; margin-inline: -16px; }
.method li { position: relative; isolation: isolate; padding: 18px 16px 22px; border-radius: 4px; cursor: default; transition: color .35s; }
.method li::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--gold);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.method li::before, .method strong, .method p { transition: color .35s, border-color .35s; }
.method li:hover::after { transform: scaleY(1); }
.method li:hover, .method li:hover strong, .method li:hover p, .method li:hover::before { color: #14161a; }
.method li:hover::before { border-bottom-color: rgba(20,22,26,.25); }
@media (prefers-reduced-motion: reduce) { .method li::after { transition: none; } }

/* Hero index (#01–#04): gold fill on hover, like the method steps */
.lh-index { gap: 8px; margin-inline: -12px; }
.lh-index a { position: relative; isolation: isolate; padding: 14px 12px 16px; border-radius: 4px; }
.lh-index a::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #f8c65a;
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.lh-index .n, .lh-index .h { transition: color .35s; }
.lh-index a:hover::after, .lh-index a:focus-visible::after { transform: scaleY(1); }
.lh-index a:hover .n, .lh-index a:hover .h, .lh-index a:hover .t,
.lh-index a:focus-visible .n, .lh-index a:focus-visible .h, .lh-index a:focus-visible .t { color: #14161a; text-decoration: none; }
.lh-index a:focus-visible { outline: 2px solid #f8c65a; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .lh-index a::after { transition: none; } }

/* Hero index: gentle float, like the contact links */
.lh-index li { animation: ac-float 6s ease-in-out infinite; }
.lh-index li:nth-child(2) { animation-delay: -1.5s; }
.lh-index li:nth-child(3) { animation-delay: -3s; }
.lh-index li:nth-child(4) { animation-delay: -4.5s; }
@media (prefers-reduced-motion: reduce) { .lh-index li { animation: none; } }
.ac-foot { justify-content: flex-start; }
