@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Onest:wght@400;500;600&display=swap');

/* Tokens measured from the live Hey Digital site at 1440px and 390px,
   cross-checked against the frequency extraction (colors, spacing, radii). */
:root {
  --white: #fff;
  --ink: #070a1a;          /* section headings */
  --ink-hero: #0e1433;     /* hero headline */
  --body: #36405d;         /* body copy */
  --blue: #4865ff;         /* links + eyebrow */
  --blue-deep: #3f59e0;
  --tint: #f8f9fe;         /* neutral tinted band/card */
  --line: #f4f4f4;         /* hairline border */
  --line-strong: #e4e6ef;  /* control border */
  --pass: #15734f;
  --pass-bg: #e6f4ee;
  --fail: #b3261e;
  --fail-bg: #fbeae9;

  --head: Onest, 'Onest Placeholder', system-ui, sans-serif;
  --text: 'IBM Plex Sans', 'IBM Plex Sans Placeholder', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  --wrap: 1440px;                            /* 1184px content + 128px gutters */
  --gutter: clamp(24px, calc(9.9vw - 14.6px), 128px);
  --section: clamp(48px, 5.6vw, 80px);
  --gap: 24px;
  --r-sm: 4px;
  --r-md: 8px;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100% }

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font: 400 16px/24px var(--text);
  letter-spacing: -.16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto }
a { color: inherit }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px }
code, .mono { font-family: var(--mono); overflow-wrap: anywhere }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); min-width: 0 }

/* ---------------- typography ---------------- */

h1, h2, h3, h4 { margin: 0; font-family: var(--head); font-weight: 500; color: var(--ink); letter-spacing: -.02em; text-wrap: balance }

h1 { font-size: clamp(36px, 3.6vw, 52px); line-height: 1.2; color: var(--ink-hero) }
h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.25 }
h3 { font-size: clamp(22px, 1.9vw, 26px); line-height: 1.25 }
h4 { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.3 }
.h-sub { font-family: var(--head); font-weight: 500; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); margin: 0 }

.lede { margin: 20px 0 0; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.55; color: var(--body); max-width: 640px }

.prose { max-width: 760px }
.prose p { margin: 0 0 22px; font-size: 17px; line-height: 27px; color: var(--body) }
.prose p:last-child { margin-bottom: 0 }
.prose strong { color: var(--ink); font-weight: 600 }

/* ---------------- links ---------------- */

.link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 16px/22px var(--text); letter-spacing: -.16px;
  color: var(--blue); text-decoration: none;
}
.link:hover { text-decoration: underline; text-underline-offset: 3px }

/* ---------------- header ---------------- */

.site-header { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line) }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; position: relative }
.wordmark {
  font-family: var(--head); font-weight: 600; font-size: 19px; line-height: 1;
  letter-spacing: -.03em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark span { color: var(--blue) }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto }
.nav a {
  padding: 6px 10px; border-radius: var(--r-sm); text-decoration: none;
  font: 400 15px/22px var(--text); letter-spacing: -.15px; color: var(--ink);
}
.nav a:hover { background: var(--tint) }
.nav-check { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none }
.nav-burger { display: none }

/* ---------------- sections ---------------- */

.section { padding: var(--section) 0 }
.section--tint { background: var(--tint) }
.hero { padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 4.4vw, 56px) }

/* ---------------- evidence photo (shared by home + experiment pages) ---------------- */

.shot { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px }
.shot-pane { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--tint); padding: 10px }
.shot-scroll {
  border-radius: var(--r-sm); overflow-y: auto; overscroll-behavior: contain;
  background: var(--white); box-shadow: 0 0 0 1px var(--line-strong);
  max-height: clamp(420px, 55vw, 760px);
}
.shot-scroll img { display: block; width: 100%; height: auto }
.shot-cap { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap }
.shot-who { font-family: var(--head); font-weight: 500; font-size: 16px; letter-spacing: -.02em; color: var(--ink) }
.shot-sub { font-size: 13px; color: var(--body); opacity: .75 }
.shot-cap a { margin-left: auto; font: 400 13px/20px var(--text); color: var(--blue); text-decoration: none }
.shot-cap a:hover { text-decoration: underline; text-underline-offset: 3px }

.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px) }
.shot-grid--solo { grid-template-columns: minmax(0, 1fr); max-width: 900px; margin: 0 auto }

/* smaller variant used inside expandable "supporting evidence" sections */
.reveal-body .shot-grid .shot-scroll { max-height: clamp(320px, 30vw, 440px) }

/* ---------------- homepage experiment list ---------------- */

.exp-list { display: flex; flex-direction: column; gap: clamp(56px, 6vw, 88px) }
.exp { padding-top: clamp(40px, 4.4vw, 56px); border-top: 1px solid var(--line) }
.exp:first-child { padding-top: 0; border-top: 0 }
.exp h2 { margin: 0 }
.exp h2 a { color: var(--ink); text-decoration: none }
.exp h2 a:hover { color: var(--blue) }
.exp-dek { margin: 12px 0 0; font-size: 16px; line-height: 25px; color: var(--body); max-width: 68ch }
.exp-media { margin-top: 24px }
.exp-take { margin: 20px 0 0; font-size: 15px; line-height: 24px; color: var(--body); max-width: 68ch }
.exp > .link { margin-top: 16px }

/* ---------------- experiment-page template ---------------- */

.study-head { padding: clamp(48px, 6vw, 80px) 0 clamp(28px, 3.4vw, 40px) }
.study-title { font-family: var(--head); font-weight: 500; font-size: clamp(32px, 4vw, 48px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); margin: 0 }
.study-dek { margin: 18px 0 0; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--body); max-width: 62ch }

.study-builds { padding: 0 0 clamp(40px, 5vw, 64px) }

.study-section { padding: clamp(36px, 4.4vw, 56px) 0; border-top: 1px solid var(--line) }
.study-section h2 { font-size: clamp(22px, 2vw, 27px); margin: 0 0 20px }
.study-note { margin: 0 0 20px; font-size: 15px; line-height: 23px; color: var(--body) }
.study-next { margin: 0; font-size: 16px; color: var(--body) }

/* ---------------- compact rule-separated comparison columns ---------------- */

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 }
.cols > * { padding: 0 clamp(20px, 2.2vw, 32px); border-left: 1px solid var(--line-strong) }
.cols > *:first-child { padding-left: 0; border-left: 0 }
.cols > *:last-child { padding-right: 0 }
.cols h4 { margin-bottom: 12px }
.cols p { margin: 0 0 12px; font-size: 15px; line-height: 23px; color: var(--body) }

/* ---------------- lists / tables ---------------- */

.ticks { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 23px }
.ticks li { padding: 8px 0 8px 24px; position: relative; border-bottom: 1px solid var(--line) }
.ticks li:last-child { border-bottom: 0; padding-bottom: 0 }
.ticks li::before { position: absolute; left: 0; top: 8px; font-size: 13px; font-weight: 600 }
.ticks--pass li::before { content: '✓'; color: var(--pass) }
.ticks--fail li::before { content: '✕'; color: var(--fail) }
.ticks code { font-size: 13.5px }

.limits { margin: 0; padding-left: 20px; max-width: 84ch; font-size: 16px; line-height: 25px }
.limits li { margin: 0 0 14px }
.limits li:last-child { margin-bottom: 0 }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--white); max-width: 100% }
table.checks { width: 100%; border-collapse: collapse; font-size: 15px }
.checks th, .checks td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body) }
.checks th { font: 500 13px/18px var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); white-space: nowrap }
.checks td:first-child { color: var(--ink) }
.checks tr:last-child td { border-bottom: 0 }
.checks .mono { font-size: 13px; color: var(--body) }
.pass, .fail { display: inline-block; font: 500 12px/16px var(--text); letter-spacing: .06em; padding: 4px 8px; border-radius: var(--r-sm) }
.pass { color: var(--pass); background: var(--pass-bg) }
.fail { color: var(--fail); background: var(--fail-bg) }

.brief {
  white-space: pre-wrap; max-height: 440px; overflow: auto; padding: 24px; margin: 0;
  background: var(--tint); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  color: var(--ink); font: 400 13px/22px var(--mono);
}

.facts { margin: 0 }
.facts dt { font: 500 14px/21px var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--body); opacity: .7; margin-bottom: 4px }
.facts dd { margin: 0 0 20px; font-size: 15px; line-height: 23px; color: var(--ink); overflow-wrap: anywhere }
.facts dd:last-child { margin-bottom: 0 }
.facts dd.mono { font-size: 13px; line-height: 21px }

.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap) }
.meta-grid > div { min-width: 0 }
.meta-grid .h-sub { margin-bottom: 16px }

/* ---------------- expandable "supporting evidence" sections ---------------- */

.reveals { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.reveal { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--white); min-width: 0 }
.reveal > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 24px; font-family: var(--head); font-weight: 500; font-size: 16px; line-height: 1.35;
  letter-spacing: -.02em; color: var(--ink);
}
.reveal > summary::-webkit-details-marker { display: none }
.reveal > summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 1.5px solid var(--body); border-bottom: 1.5px solid var(--body); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s }
.reveal[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px) }
.reveal-body { padding: 0 24px 28px }
.reveal-body > * + * { margin-top: 24px }
.reveal-body p { margin: 0; font-size: 15px; line-height: 24px; max-width: 84ch }

/* ---------------- footer ---------------- */

.site-footer { border-top: 1px solid var(--line-strong); padding: clamp(40px, 5vw, 56px) 0 32px; background: var(--white) }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 4vw, 64px) }
.footer-brand p { margin: 16px 0 0; font-size: 14px; line-height: 21px; letter-spacing: -.14px; color: var(--body); max-width: 44ch }
.footer-col h2 { font: 500 13px/20px var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin: 0 0 16px }
.footer-col a { display: block; margin-bottom: 10px; font-size: 15px; line-height: 22px; letter-spacing: -.15px; color: var(--body); text-decoration: none }
.footer-col a:hover { color: var(--blue) }

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .site-header .wrap { height: 60px }
  .nav { display: none }
  .nav-burger { display: flex; flex-direction: column; gap: 4px; margin-left: auto; padding: 10px; border-radius: var(--r-sm); cursor: pointer }
  .nav-burger i { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px }
  .nav-check:focus-visible ~ .nav-burger { outline: 2px solid var(--blue); outline-offset: 2px }
  .nav-check:checked ~ .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0;
    position: absolute; right: 0; top: 100%; z-index: 40; min-width: 220px;
    background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px;
  }
  .nav-check:checked ~ .nav a { padding: 10px 12px }

  h1 { line-height: 1.15 }
  .meta-grid { grid-template-columns: minmax(0, 1fr) }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr) }
}

@media (max-width: 620px) {
  .shot-grid { grid-template-columns: minmax(0, 1fr) }
  .cols { grid-template-columns: minmax(0, 1fr); gap: 28px }
  .cols > * { padding: 0; border-left: 0 }
  .reveal > summary { padding: 18px 20px; font-size: 15px }
  .reveal-body { padding: 0 20px 22px }
  .checks th, .checks td { padding: 12px 14px; font-size: 14px }
  .brief { padding: 18px; font-size: 12.5px }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  * { transition: none !important }
}
