/* whynord — homepage styles. Tokens from the whynord design system. */
/* Self-hosted fonts (SIL Open Font License, see assets/fonts) */
@font-face { font-family: "Bitcount Grid Single"; src: url("/assets/fonts/bitcount-grid-single-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inclusive Sans"; src: url("/assets/fonts/inclusive-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inclusive Sans"; src: url("/assets/fonts/inclusive-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Thai"; src: url("/assets/fonts/noto-sans-thai-thai-300-normal.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; src: url("/assets/fonts/noto-sans-thai-thai-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }

:root,
:root[data-theme="lime"] {
  --ground: #63ba23;
  --ink-display: #07583e;
  --ink-body: #07583e;
  --ink-strong: #000000;
  --ink-muted: #0b2a1b;
  --ink-eyebrow: #c0f73c;
  --rule: #000000;
  --btn-bg: #07583e;
  --btn-fg: #b0f57a;
  --block-bg: #171910;
  --block-fg: #b0f57a;
  --hover: #07583e;
}
:root[data-theme="night"] {
  --ground: #171910;
  --ink-display: #63ba23;
  --ink-body: #f1f2e8;
  --ink-strong: #f1f2e8;
  --ink-muted: #9a9e8c;
  --ink-eyebrow: #b0f57a;
  --rule: #b0f57a;
  --btn-bg: #63ba23;
  --btn-fg: #171910;
  --block-bg: #07583e;
  --block-fg: #b0f57a;
  --hover: #63ba23;
}

:root {
  --header-h: 112px;
  --hero-fg: #f1f2e8; /* bone — hero text over the dark video, both themes */
  --font-display: "Bitcount Grid Single", "Noto Sans Thai", ui-monospace, monospace;
  --font-sans: "Inclusive Sans", "Noto Sans Thai", system-ui, sans-serif;
  --radius: 15px;
  --pad-x: 88px;
  --label-col: 472px;
  --display-size: clamp(56px, 8.4vw, 120px);
  color-scheme: light;
}
:root[data-theme="night"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-strong);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-strong); }
a:hover { color: var(--hover); }
:focus-visible { outline: 3px solid var(--ink-strong); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--btn-bg); color: var(--btn-fg); padding: 12px 16px; border-radius: var(--radius); z-index: 10; }

/* Logo: black on lime, white on night */
.mark-night { display: none; }
:root[data-theme="night"] .mark-lime { display: none; }
:root[data-theme="night"] .mark-night { display: block; }

/* Header */
.site-header {
  min-height: 112px; padding: 0 var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.brand img { width: 68px; height: 44px; }
.brand span { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--ink-strong); }
.nav { display: flex; align-items: center; gap: 40px; font-size: 20px; }
.nav a { text-decoration: none; padding: 12px 0; }
.nav-links { display: flex; gap: 40px; }
.nav .pill {
  padding: 12px 20px; border: 2px solid var(--rule); border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.pill { white-space: nowrap; }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-strong); }
.theme-toggle {
  min-width: 44px; min-height: 44px; padding: 0 16px;
  background: transparent; color: var(--ink-strong); border: 2px solid var(--rule); border-radius: var(--radius);
  font: inherit; font-size: 20px; cursor: pointer;
}
.theme-toggle:hover { color: var(--hover); border-color: var(--hover); }

/* Shared */
.section { padding: 120px var(--pad-x); }
.section-head { display: flex; flex-direction: column; gap: 40px; margin-bottom: 72px; }
.eyebrow { font-size: 16px; line-height: 16px; letter-spacing: 0.1em; color: var(--ink-eyebrow); white-space: pre-wrap; margin: 0; }
.display {
  margin: 0; padding-top: 16px; font-family: var(--font-display); font-weight: 400;
  font-size: var(--display-size); line-height: 0.7; color: var(--ink-display); max-width: 1180px;
}
.body { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 300; color: var(--ink-body); max-width: 720px; }
.caption { font-size: 20px; line-height: 1.2; color: var(--ink-muted); }
.split { display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); }
.label { padding-right: 48px; display: flex; flex-direction: column; gap: 10px; }
.label-name { font-size: 26px; line-height: 1.2; font-weight: 300; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.stack-48 { display: flex; flex-direction: column; gap: 48px; }

.btn {
  min-height: 56px; padding: 0 28px; display: inline-flex; align-items: center; gap: 14px;
  border-radius: var(--radius); text-decoration: none; font-size: 20px;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { color: var(--btn-fg); filter: brightness(1.12); }
.btn-ghost { border: 2px solid var(--rule); }
.btns { display: flex; flex-wrap: wrap; gap: 16px; }
.arrow { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }

/* Hero */
.hero { padding: 120px var(--pad-x) 104px; display: flex; flex-direction: column; gap: 56px; }
.hero .display { padding-top: 24px; max-width: 1200px; }
.hero .split { margin-top: 24px; }
.hero-copy { display: flex; flex-direction: column; gap: 40px; }

/* Hero with full-viewport background video */
.hero.hero-video {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--header-h));
  padding: 56px var(--pad-x) 64px;
  justify-content: flex-end; gap: 40px;
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #0b0c08; }
.hero-video-el { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Bone text over the video in BOTH themes. A light scrim, weighted to the
   bottom where the headline sits, keeps the footage's colour vibrant while
   holding legibility. */
.hero-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.14) 45%, rgba(0,0,0,.60) 100%); }
.hero-video .hero-intro { position: relative; z-index: 1; min-height: auto; gap: 32px; }
.hero-video .eyebrow { color: var(--hero-fg); text-shadow: 0 1px 16px rgba(0,0,0,.5); }
.hero-video .type-hero { color: var(--hero-fg); text-shadow: 0 2px 30px rgba(0, 0, 0, .55); }
.hero-video .scroll-cue {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 18px; border: 2px solid currentColor; border-radius: var(--radius);
  font-size: 16px; text-decoration: none; color: var(--hero-fg); transition: opacity .3s ease;
}
.hero-video .scroll-arrow { transform: rotate(90deg); width: 16px; height: 16px; animation: cue-bob 1.8s ease-in-out infinite; }
.hero-video .scroll-cue.is-hidden { opacity: 0; pointer-events: none; }
/* Sound on/off toggle (revealed by JS only when the video is playing) */
.hero-sound {
  position: absolute; z-index: 2; bottom: 64px; right: var(--pad-x);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  background: rgba(8, 10, 6, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 2px solid var(--hero-fg); border-radius: var(--radius);
  color: var(--hero-fg); font: inherit; font-size: 16px; line-height: 1; cursor: pointer;
  transition: background .2s ease;
}
.hero-sound[hidden] { display: none; }
.hero-sound:hover { background: rgba(8, 10, 6, .55); }
.hero-sound .snd-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.hero-sound .snd-on { display: none; }
.hero-sound.is-on .snd-off { display: none; }
.hero-sound.is-on .snd-on { display: inline-block; }
@media (max-width: 760px) {
  .hero-sound { bottom: 44px; font-size: 14px; padding: 0 12px; min-height: 40px; }
  .hero-sound .hero-sound-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-video .scroll-arrow { animation: none; } }
@media (max-width: 760px) {
  .hero.hero-video { min-height: calc(100svh - var(--header-h)); padding: 40px var(--pad-x) 44px; }
}
.facts {
  list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.facts li { padding: 28px 24px; display: flex; flex-direction: column; gap: 8px; border-left: 1px solid var(--rule); }
.facts li:first-child { padding-left: 0; border-left: 0; }
.facts li:last-child { padding-right: 0; }
.fact-num { font-family: var(--font-display); font-size: 56px; line-height: 0.8; color: var(--ink-display); }

/* Offerings */
.offerings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.offerings li {
  display: grid; grid-template-columns: 120px 352px minmax(0, 1fr); align-items: baseline;
  padding: 36px 0; border-bottom: 1px solid var(--rule);
}
.off-num { font-family: var(--font-display); font-size: 40px; color: var(--ink-display); }
.off-name { font-size: 30px; line-height: 1.2; padding-right: 32px; margin: 0; font-weight: 400; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 64px; }
.work { display: flex; flex-direction: column; gap: 24px; text-decoration: none; }
.work-media {
  aspect-ratio: 16 / 9; background: var(--block-bg); border-radius: var(--radius);
  padding: 28px; display: flex; align-items: flex-end; color: var(--block-fg); font-size: 20px;
}
.work-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.work-name { font-size: 30px; line-height: 1.2; margin: 0; font-weight: 400; }

/* Thinking */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.posts a {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.posts .post-title { font-size: 26px; line-height: 1.3; font-weight: 300; color: var(--ink-body); margin-top: 8px; }
.posts a:hover .post-title { text-decoration: underline; text-underline-offset: 6px; }
.thinking-more { margin-top: 32px; }

/* Contact */
.contact { padding-bottom: 88px; }
.email { font-size: 48px; line-height: 1.1; font-weight: 300; color: var(--ink-body); text-decoration: none; overflow-wrap: anywhere; }
.phone { font-size: 26px; line-height: 1.2; font-weight: 300; color: var(--ink-body); text-decoration: none; }
.socials { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 16px; font-size: 20px; }
.socials a { padding: 12px 0; }
.contact-links { display: flex; flex-direction: column; gap: 20px; }
.site-footer {
  margin-top: 120px; padding-top: 32px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.site-footer img { width: 170px; height: 110px; }
.foot-text { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* Tablet */
@media (max-width: 1100px) {
  :root { --pad-x: 48px; --label-col: 300px; }
  .offerings li { grid-template-columns: 80px 280px minmax(0, 1fr); }
  .nav-links { display: none; }
}

/* Phone */
@media (max-width: 760px) {
  :root { --pad-x: 16px; --header-h: 80px; }
  .site-header { min-height: 80px; }
  .brand img { width: 50px; height: 32px; }
  .brand span { font-size: 26px; }
  .nav { gap: 12px; font-size: 16px; }
  .eyebrow-2 { display: none; }
  .nav .pill { display: none; }
  .theme-toggle { font-size: 16px; padding: 0 12px; }
  .section, .hero { padding-top: 72px; padding-bottom: 72px; }
  .section-head { margin-bottom: 48px; gap: 28px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .label { padding-right: 0; }
  .body { font-size: 24px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li, .facts li:first-child, .facts li:last-child { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .facts li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .facts li:last-child { border-bottom: 0; }
  .fact-num { font-size: 40px; }
  .offerings li { grid-template-columns: 56px minmax(0, 1fr); row-gap: 8px; padding: 28px 0; }
  .offerings li .body { grid-column: 2; }
  .off-num { font-size: 28px; }
  .off-name { font-size: 24px; padding-right: 0; }
  .work-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .work-meta { flex-direction: column; gap: 4px; }
  .email { font-size: 30px; }
  .site-footer img { width: 102px; height: 66px; }
  .site-footer { margin-top: 72px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Work covers */
.work-media { position: relative; overflow: hidden; padding: 0; }
.work-media img { width: 100%; height: 100%; object-fit: cover; }
.work-feature { grid-column: 1 / -1; }

/* ---------- About / CV ---------- */
.print-mark { display: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.display-wide { max-width: 1264px; }
.btn-button { background: transparent; color: var(--ink-strong); font: inherit; font-size: 20px; cursor: pointer; }
.btn-button:hover { color: var(--hover); border-color: var(--hover); }

.roles { display: flex; flex-direction: column; }
.role {
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr);
  padding: 40px 0; border-bottom: 1px solid var(--rule);
}
.role-when { display: flex; flex-direction: column; gap: 12px; padding-right: 48px; }
.role-years { font-family: var(--font-display); font-size: 40px; line-height: 0.8; color: var(--ink-display); }
.role-what { display: flex; flex-direction: column; gap: 12px; }
.role-title { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 400; }
.role-what .body { margin-top: 8px; }

.role-now {
  --label-col-now: calc(var(--label-col) - 48px);
  grid-template-columns: var(--label-col-now) minmax(0, 1fr);
  background: var(--block-bg); color: var(--block-fg); border: 0; border-radius: var(--radius);
  padding: 48px 48px 52px; margin-bottom: 16px;
}
.role-now .eyebrow, .role-now .role-years, .role-now .caption, .role-now .role-title, .role-now .body { color: var(--block-fg); }
.role-now .role-years { font-size: 56px; }
.role-now .role-org { padding-bottom: 16px; border-bottom: 1px solid var(--block-fg); }
.role-now .body { margin-top: 0; }

.clients {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 28px;
}
.clients li { padding-top: 20px; border-top: 1px solid var(--block-fg); display: flex; flex-direction: column; gap: 8px; }
.client-name { font-size: 30px; line-height: 1.2; }
.client-line { font-size: 20px; line-height: 1.3; font-style: italic; }

.degrees { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.degrees li {
  display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); align-items: baseline;
  padding: 32px 0; border-bottom: 1px solid var(--rule);
}
.degrees li > div { display: flex; flex-direction: column; gap: 8px; }
.degree { font-size: 30px; line-height: 1.2; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; font-size: 20px; line-height: 1.2; }
.chips li { padding: 12px 20px; border: 2px solid var(--rule); border-radius: var(--radius); }

@media (max-width: 760px) {
  .role, .degrees li { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .role-when { padding-right: 0; }
  .role-now { padding: 28px 20px 32px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .role-now .role-years { font-size: 40px; }
  .role-title, .degree, .client-name { font-size: 24px; }
  .clients { grid-template-columns: minmax(0, 1fr); }
  .chips { font-size: 16px; }
}

/* ---------- Print: the CV in the lime theme ---------- */
@media print {
  :root, :root[data-theme] {
    --ground: #63ba23; --ink-display: #07583e; --ink-body: #000000; --ink-strong: #000000; --ink-muted: #000000;
    --ink-eyebrow: #c0f73c; --rule: #000000; --block-bg: #171910; --block-fg: #b0f57a;
    --display-size: 30px; --pad-x: 0px; --label-col: 170px;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 0; }
  html, body { background: var(--ground); }
  body { padding: 14mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .mark-night { display: none !important; }
  .print-mark { display: flex !important; }
  .site-header, .no-print, .skip, .socials, .site-footer, #contact .section-head { display: none !important; }
  .hero, .section { padding: 0 0 18px; border-top: 0; }
  .section-head { gap: 8px; margin-bottom: 12px; }
  .display { line-height: 0.9; padding-top: 0; }
  .eyebrow { font-size: 9pt; }
  .body { font-size: 11pt; }
  .caption, .chips { font-size: 10pt; }
  .role-title, .degree, .client-name { font-size: 12pt; }
  .role-years { font-size: 16pt !important; }
  .role { padding: 10px 0; break-inside: avoid; }
  .role-now { padding: 14px; margin-bottom: 8px; break-inside: auto; }
  .label-name { font-size: 13pt; padding-bottom: 6px; }
  .body, .client-line { font-weight: 400; }
  .role-years { white-space: nowrap; }
  .role-now { grid-template-columns: var(--label-col) minmax(0, 1fr); }
  .role-now .role-when { padding-right: 12px; }
  .client-line { font-size: 10pt; }
  .clients { row-gap: 10px; margin-top: 6px; }
  .clients li { padding-top: 8px; }
  .split { margin-top: 0 !important; }
  .clients li { break-inside: avoid; }
  .degrees li { padding: 8px 0; }
  .chips li { padding: 4px 8px; border-width: 1px; }
  .email { font-size: 14pt; }
  .hero { gap: 12px; }
}
@media print {
  .print-mark { align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-size: 10pt; }
  .print-mark img { width: 51px; height: 33px; }
}
@media print {
  .role-now { display: block; }
  .role-now .role-when { flex-direction: row; align-items: baseline; gap: 14px; padding: 0 0 10px; }
  .role-now .role-when .eyebrow { margin-right: 4px; }
}
@media print {
  .clients { display: flex; flex-wrap: wrap; column-gap: 0; justify-content: space-between; }
  .clients li { width: 48%; box-sizing: border-box; margin-top: 10px; }
}
@media print {
  .section-head { break-after: avoid; page-break-after: avoid; }
  #capabilities, #education { break-inside: avoid; }
}

/* Names and titles in the display face, for contrast with running text */
.role-title, .client-name, .degree, .work-name, .off-name {
  font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: 0.01em;
}
.role-title, .degree, .work-name, .off-name, .client-name,
.role-now .role-title { color: #ffffff; }
@media print {
  .role-title, .degree, .client-name { font-size: 14pt; }
}

/* ---------- Project pages ---------- */
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; font-size: 20px; text-decoration: none; padding: 12px 0; margin-bottom: -24px; }
.arrow-back { transform: scaleX(-1); }
.case-hero { padding-top: 64px; }
.case-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--block-bg); margin-top: 16px; }
.case-copy { display: flex; flex-direction: column; gap: 31px; }
.case-chips { margin-top: 16px; }
.facts-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.facts-4 > div { padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--rule); }
.facts-4 > div:first-child { padding-left: 0; border-left: 0; }
.facts-4 > div:last-child { padding-right: 0; }
.facts-4 dt, .facts-4 dd { margin: 0; }
.fact-value { font-family: var(--font-display); font-size: 30px; line-height: 1; color: #ffffff; }
.quote-wrap { padding: 0 var(--pad-x) 120px; }
.quote { margin: 0; background: var(--block-bg); border-radius: var(--radius); padding: 72px 64px; display: flex; flex-direction: column; gap: 32px; }
.quote blockquote { margin: 0; }
.quote p { margin: 0; font-family: var(--font-display); font-size: clamp(32px, 3.9vw, 56px); line-height: 1; color: #ffffff; max-width: 1080px; }
.quote .caption { color: var(--block-fg); }
.gallery { padding: 0 var(--pad-x) 120px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.gallery img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: var(--radius); background: var(--block-bg); }
.next-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 632px); gap: 48px; align-items: center;
  background: var(--block-bg); color: var(--block-fg); border-radius: var(--radius); padding: 48px; text-decoration: none;
}
.next-card:hover { color: var(--block-fg); }
.next-card:hover .next-cta { text-decoration: underline; text-underline-offset: 6px; }
.next-text { display: flex; flex-direction: column; gap: 24px; }
.next-text .eyebrow, .next-text .caption { color: var(--block-fg); }
.next-name { font-family: var(--font-display); font-size: clamp(48px, 5.6vw, 80px); line-height: 0.8; color: #ffffff; }
.next-cta { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; }
.next-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.work-link { color: var(--ink-strong); }
.work-link:hover .work-name { text-decoration: underline; text-underline-offset: 6px; }
.work-cta { display: inline-flex; align-items: center; gap: 10px; }

@media (max-width: 760px) {
  .facts-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-4 > div, .facts-4 > div:first-child, .facts-4 > div:last-child { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .facts-4 > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .facts-4 > div:nth-last-child(-n+2) { border-bottom: 0; }
  .fact-value { font-size: 22px; }
  .quote { padding: 32px 24px; }
  .quote-wrap, .gallery { padding-bottom: 72px; }
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .next-card { grid-template-columns: minmax(0, 1fr); padding: 24px; gap: 24px; }
  .next-card img { order: -1; }
}
@media (max-width: 760px) {
  :root { --display-size: 40px; }
  .display { overflow-wrap: break-word; hyphens: manual; }
}

/* Naming trail (VE•LA) */
.names { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.names li { border: 2px solid var(--rule); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.name-word { font-family: var(--font-display); font-size: 40px; line-height: 0.9; color: #ffffff; text-decoration: line-through; text-decoration-thickness: 3px; }
.name-note { font-size: 20px; line-height: 1.3; }
.names .name-chosen { background: var(--block-bg); border-color: var(--block-bg); color: var(--block-fg); }
.names .name-chosen .name-word { text-decoration: none; }
.gallery-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .names { grid-template-columns: minmax(0, 1fr); }
  .name-word { font-size: 32px; }
  .gallery-3 { grid-template-columns: minmax(0, 1fr); }
}
.client-link { text-decoration: none; }
.client-link:hover { text-decoration: underline; text-underline-offset: 6px; color: #ffffff; }

/* ---------- Persistent header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); }
section[id], main [id] { scroll-margin-top: 128px; }

/* ---------- Mobile menu ---------- */
.menu-toggle {
  display: none; min-width: 44px; min-height: 44px; padding: 0 10px; align-items: center; justify-content: center;
  background: transparent; border: 2px solid var(--rule); border-radius: var(--radius); color: var(--ink-strong); cursor: pointer;
}
.menu-toggle:hover { color: var(--hover); border-color: var(--hover); }
.menu-icon { width: 24px; height: 18px; fill: currentColor; display: block; }
.menu-x { display: none; }
.menu-toggle[aria-expanded="true"] .menu-bars { display: none; }
.menu-toggle[aria-expanded="true"] .menu-x { display: inline; }
.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ground); border-bottom: 1px solid var(--rule);
  padding: 8px var(--pad-x) 32px; display: flex; flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--ink-display);
  text-decoration: none; padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.mobile-menu a:hover { color: var(--ink-strong); }
.mobile-menu .mobile-menu-cta { font-family: var(--font-sans); font-size: 20px; color: var(--ink-strong); display: flex; align-items: center; gap: 10px; border-bottom: 0; padding-top: 24px; }
.mobile-menu .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-strong); }
@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .nav .pill { display: none; }
}
@media (max-width: 760px) {
  section[id], main [id] { scroll-margin-top: 96px; }
  .mobile-menu a { font-size: 32px; padding: 16px 0; }
}
@media print { .menu-toggle, .mobile-menu { display: none !important; } }

/* ---------- Typing hero ---------- */
[data-type] { position: relative; }
.type-live { display: none; }
[data-type].is-typing .type-ghost { visibility: hidden; }
[data-type].is-typing .type-live { display: block; position: absolute; left: 0; right: 0; top: 0; padding-top: inherit; }
.type-caret {
  display: inline-block; width: 0.08em; height: 0.58em; margin-left: 0.04em;
  background: currentColor; vertical-align: baseline; border-radius: 0.04em;
}
[data-type].is-paused .type-caret { animation: caret-blink 1.05s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- Hero intro (headline block) ---------- */
.hero-intro { display: flex; flex-direction: column; gap: 56px; }
.scroll-cue { display: none; }

@media (max-width: 760px) {
  .hero { padding-top: 0; }
  .hero-intro {
    min-height: calc(100svh - 80px); box-sizing: border-box;
    padding: 40px 0 24px; gap: 24px; justify-content: space-between;
  }
  .hero-intro .type-hero {
    font-size: min(calc((100vw - 32px) / 6.9), 76px); line-height: 0.78;
    margin: auto 0; padding-top: 0;
  }
  .scroll-cue {
    display: inline-flex; align-self: flex-start; align-items: center; gap: 12px;
    min-height: 44px; padding: 0 18px; border: 2px solid var(--rule); border-radius: var(--radius);
    font-size: 16px; text-decoration: none; color: var(--ink-strong); transition: opacity .3s ease;
  }
  .scroll-arrow { transform: rotate(90deg); width: 16px; height: 16px; animation: cue-bob 1.8s ease-in-out infinite; }
  .scroll-cue.is-hidden { opacity: 0; pointer-events: none; }
}
@keyframes cue-bob { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .scroll-arrow { animation: none; } }
@media print { .scroll-cue { display: none !important; } }

/* ---------- Footer legal line ---------- */
.foot-legal { margin-top: 6px; }
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-copy code { font-family: ui-monospace, "Bitcount Grid Single", monospace; font-size: 0.9em; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 8px; }
.case-copy strong { font-weight: 400; color: var(--ink-strong); }

/* ---------- Gallery disclaimer ---------- */
.gallery-note { margin: -96px var(--pad-x) 120px; max-width: 760px; }
@media (max-width: 760px) { .gallery-note { margin: -56px var(--pad-x) 72px; } }

/* ---------- Full-width stacked gallery (16:9) ---------- */
.gallery-wide { grid-template-columns: minmax(0, 1fr); }
.gallery-wide img { aspect-ratio: 16 / 9; }
