/* Studio Dudin — site styles
   Ink and paper only. No hue anywhere: black, near-black, paper, white and
   neutral grays. Emphasis is typographic (italic), never a color.
   Logo = Valentin's own handwritten signature ("STUDIO" set in Syne above it),
   small mark = the first "D" of that signature. Both live in brand-assets/. */

:root {
  --black: #000000;       /* dark sections, primary buttons */
  --ink: #111111;         /* body text */
  --paper: #FAFAFA;       /* page ground */
  --white: #FFFFFF;
  --muted: #55585D;       /* secondary text — neutral gray, passes AA on paper */
  --gray: #8C8F94;        /* captions, dividers only (not for paragraphs) */
  --line: rgba(0, 0, 0, 0.14);
  --line-dark: rgba(255, 255, 255, 0.18);

  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 112px;

  --radius-sm: 3px;
  --radius-pill: 999px;
  --max-width: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 var(--space-md); }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
@media (max-width: 640px) { .wrap { padding: 0 var(--space-md); } }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); color: inherit; margin: 0 0 var(--space-md); text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.025em; }
h1.page-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 700; line-height: 1.3; }
h1 em, h2 em, h3 em, .lead-line em { font-style: italic; font-weight: 500; }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-md);
}
.lede { font-size: 1.2rem; line-height: 1.55; max-width: 620px; color: var(--muted); }
.lead-line { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; max-width: 880px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }
.measure { max-width: 700px; }
.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 250, 0.94);
  backdrop-filter: saturate(1) blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 48px; width: auto; }
nav.main { display: flex; gap: var(--space-lg); }
nav.main a {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
nav.main a:hover, nav.main a.active { color: var(--ink); border-bottom-color: var(--ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 14px; color: var(--ink); cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  nav.main {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--space-sm) var(--space-md) var(--space-md);
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  nav.main a:last-child { border-bottom: 0; }
  .logo img { height: 34px; }
}

/* ---------- Sections ---------- */
section { padding: var(--space-2xl) 0; position: relative; }
section.tight { padding: var(--space-xl) 0; }
.section-paper { background: var(--paper); }
.section-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-black { background: var(--black); color: var(--white); overflow: hidden; }
.section-black .eyebrow, .section-black .muted, .section-black .lede { color: rgba(255, 255, 255, 0.66); }
@media (max-width: 640px) { section { padding: var(--space-xl) 0; } }

/* Hero: headline left, the signature's own "D" bleeding off the right edge */
.hero { padding: var(--space-2xl) 0 var(--space-xl); overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 840px; }
.hero .lede { margin-top: var(--space-lg); }
.hero-d {
  position: absolute; z-index: 0; pointer-events: none;
  right: -150px; top: 56px; width: 470px;
}
.page-hero { padding: var(--space-xl) 0 var(--space-xl); }
.page-hero .hero-d { width: 300px; right: -70px; top: 36px; }
@media (max-width: 1100px) { .hero-d { width: 420px; right: -170px; opacity: 0.12; } .page-hero .hero-d { width: 260px; } }
@media (max-width: 640px) { .hero-d { display: none; } .hero { padding: var(--space-xl) 0; } }

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-lg); align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; line-height: 1;
  padding: 16px 26px; border-radius: var(--radius-pill); text-decoration: none; cursor: pointer;
  border: 1px solid var(--black); transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--white); color: var(--black); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.section-black .btn-primary { background: var(--white); color: var(--black); border-color: var(--white); }
.section-black .btn-primary:hover { background: transparent; color: var(--white); }
.section-black .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.section-black .btn-outline:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.reassure { font-size: 0.9rem; color: var(--muted); margin-top: var(--space-md); }
.text-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
.section-black a:focus-visible, .section-black button:focus-visible, footer.site a:focus-visible { outline-color: var(--white); }

/* ---------- Compare (left unclear / made clear) ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: var(--space-xl); border-top: 1px solid var(--line); }
.compare-col { padding: var(--space-lg) var(--space-lg) 0 0; }
.compare-col + .compare-col { padding: var(--space-lg) 0 0 var(--space-lg); border-left: 1px solid var(--line); }
.compare-col h3 { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.compare-col ul { list-style: none; padding: 0; margin: 0; }
.compare-col li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.compare-col li:last-child { border-bottom: 0; }
.compare-bad li { color: var(--muted); }
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
  .compare-col, .compare-col + .compare-col { padding: var(--space-lg) 0 0; border-left: 0; }
  .compare-col + .compare-col { border-top: 1px solid var(--line); margin-top: var(--space-lg); }
}

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-xl); align-items: start; }
.founder-mark { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.founder-mark img { width: 62%; }
.founder-text p { max-width: 680px; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; gap: var(--space-lg); } .founder-mark { width: 120px; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--space-xl); border-top: 1px solid var(--line); }
.stat { padding: var(--space-lg) var(--space-lg) 0 0; }
.stat + .stat { padding-left: var(--space-lg); border-left: 1px solid var(--line); }
.stat .num { display: block; font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin-bottom: var(--space-sm); }
.stat .label { font-size: 0.92rem; color: var(--muted); }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: var(--space-md) 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Service index ---------- */
.index-list { margin-top: var(--space-xl); border-top: 1px solid var(--ink); }
.index-row { display: grid; grid-template-columns: 64px 1fr 200px; gap: var(--space-lg); padding: var(--space-lg) 0; border-bottom: 1px solid var(--line); align-items: start; }
.index-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 6px; }
.index-timeline { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.index-title { font-size: 1.6rem; margin: 6px 0 var(--space-sm); }
.index-desc { color: var(--muted); max-width: 560px; margin: 0; }
.index-includes { list-style: none; padding: 0; margin: var(--space-md) 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.index-includes li { font-size: 0.85rem; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 12px; }
.index-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-md); }
.index-price { font-family: var(--font-mono); font-size: 1.35rem; font-weight: 500; }
.index-price small { font-size: 0.8rem; color: var(--muted); }
.index-flag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: var(--radius-pill); padding: 3px 10px; margin-left: 10px; vertical-align: middle; white-space: nowrap; }
.index-side .btn { padding: 12px 20px; font-size: 0.9rem; }
@media (max-width: 760px) {
  .index-row { grid-template-columns: 1fr; gap: var(--space-sm); }
  .index-num { padding-top: 0; }
  .index-side { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; margin-top: var(--space-sm); }
}

/* ---------- Self-serve products (Gumroad) ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--space-xl); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.product { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.product + .product { border-left: 1px solid var(--line); }
.product .price { font-family: var(--font-mono); font-size: 1.15rem; }
.product h3 { font-size: 1.1rem; margin: 0; }
.product p { font-size: 0.93rem; color: var(--muted); margin: 0; flex: 1; }
.product a { margin-top: var(--space-md); font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.products-note { margin-top: var(--space-lg); font-size: 0.95rem; color: var(--muted); max-width: 720px; }
@media (max-width: 960px) {
  .products { grid-template-columns: 1fr 1fr; }
  .product:nth-child(3) { border-left: 0; }
  .product:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .products { grid-template-columns: 1fr; }
  .product + .product { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Work cards ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-top: var(--space-xl); }
.work-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; border-top: 1px solid var(--ink); padding-top: var(--space-md); }
.work-thumb { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--white); background-size: cover; background-position: top left; margin-bottom: var(--space-md); filter: grayscale(1); transition: filter .4s var(--ease); }
.work-card:hover .work-thumb { filter: grayscale(0); }
.work-thumb.no-photo { display: flex; align-items: center; justify-content: center; filter: none; }
.work-thumb.no-photo img { width: 34%; }
.work-kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.work-card h3 { margin: var(--space-sm) 0; font-size: 1.4rem; }
.work-card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.work-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr; } .work-thumb { aspect-ratio: 16 / 9; } }

/* ---------- Principles ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-top: var(--space-xl); }
.grid-3 > div { border-top: 1px solid var(--ink); padding-top: var(--space-md); }
.grid-3 p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Process ---------- */
.steps { margin-top: var(--space-xl); border-top: 1px solid var(--ink); }
.step { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-lg); padding: var(--space-lg) 0; border-bottom: 1px solid var(--line); }
.step .n { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 4px; }
.step p { color: var(--muted); max-width: 680px; margin: 0; }
@media (max-width: 640px) { .step { grid-template-columns: 1fr; gap: var(--space-sm); } }

/* ---------- FAQ ---------- */
.faq { margin-top: var(--space-xl); border-top: 1px solid var(--ink); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-lg) 40px var(--space-lg) 0; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-weight: 400; font-size: 1.3rem; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); padding-bottom: var(--space-lg); margin: 0; max-width: 720px; }

/* ---------- Notes ---------- */
.notes { margin-top: var(--space-xl); border-top: 1px solid var(--ink); }
.note { padding: var(--space-lg) 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; gap: var(--space-lg); }
.note time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; padding-top: 6px; }
.note h3 { font-size: 1.35rem; }
.note p { color: var(--muted); max-width: 680px; }
@media (max-width: 760px) { .note { grid-template-columns: 1fr; gap: var(--space-sm); } }

/* ---------- Case studies ---------- */
.methodology-note { font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.6; color: var(--muted); max-width: 720px; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--line); }
.callout { border: 1px solid var(--ink); border-radius: var(--radius-sm); padding: var(--space-lg); max-width: 860px; background: var(--white); }
.callout h3 { font-size: 1.1rem; margin-bottom: var(--space-sm); }
.callout p { margin: 0; color: var(--muted); }
.scorecard { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--space-lg); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.scorecard-item { padding: var(--space-lg) var(--space-md); }
.scorecard-item + .scorecard-item { border-left: 1px solid var(--line); }
.scorecard-item h4 { font-size: 0.95rem; margin-bottom: var(--space-md); min-height: 2.6em; }
.scorecard-rating { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; border-radius: var(--radius-pill); padding: 4px 12px; display: inline-block; border: 1px solid var(--ink); }
.scorecard-rating.strong { background: var(--black); color: var(--white); }
.scorecard-rating.mixed { background: transparent; color: var(--ink); }
.scorecard-rating.weak { background: transparent; color: var(--muted); border-style: dashed; border-color: var(--muted); }
@media (max-width: 760px) {
  .scorecard { grid-template-columns: 1fr 1fr; }
  .scorecard-item:nth-child(3) { border-left: 0; }
  .scorecard-item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.evidence-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); margin: var(--space-lg) 0; }
.evidence-figure { margin: var(--space-lg) 0; }
.evidence-row .evidence-figure { margin: 0; }
.evidence-figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); filter: grayscale(1); transition: filter .4s var(--ease); }
.evidence-figure:hover img { filter: grayscale(0); }
.evidence-figure figcaption { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-top: var(--space-sm); }
@media (max-width: 760px) { .evidence-row { grid-template-columns: 1fr; } }
.gap-diagram { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: stretch; margin: var(--space-lg) 0; }
.gap-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-lg); background: var(--white); }
.gap-box-right { border-color: var(--ink); }
.gap-box p { margin: 0; font-size: 0.98rem; color: var(--muted); }
.gap-arrow { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); color: var(--muted); }
@media (max-width: 760px) { .gap-diagram { grid-template-columns: 1fr; } .gap-arrow { transform: rotate(90deg); padding: var(--space-sm) 0; } }
.deliverables { margin-top: var(--space-lg); border-top: 1px solid var(--ink); }
.deliverable { display: grid; grid-template-columns: 64px 1fr; gap: var(--space-lg); padding: var(--space-lg) 0; border-bottom: 1px solid var(--line); }
.deliverable .n { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); padding-top: 4px; }
.deliverable p { max-width: 700px; }
.deliverable p:last-child { margin-bottom: 0; }
.deliverable .lead-line { font-size: 1.35rem; margin-bottom: var(--space-md); }
@media (max-width: 640px) { .deliverable { grid-template-columns: 1fr; gap: var(--space-sm); } }
.plain-list { padding-left: 1.1rem; margin: 0; max-width: 720px; }
.plain-list li { margin-bottom: 10px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-xl); align-items: start; }
.contact-form { display: grid; gap: var(--space-md); }
.field label { display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 160px; resize: vertical; }
.contact-side { border-top: 1px solid var(--ink); padding-top: var(--space-md); }
.contact-side p { color: var(--muted); }
.form-status { font-size: 0.92rem; color: var(--muted); min-height: 1.4em; margin: 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Closing CTA ---------- */
.closing { text-align: left; }
.closing h2 { max-width: 760px; }
.closing .closing-d { position: absolute; right: -80px; bottom: -90px; width: 420px; opacity: 0.1; pointer-events: none; }
@media (max-width: 760px) { .closing .closing-d { width: 260px; right: -80px; bottom: -60px; } }

/* ---------- Footer ---------- */
footer.site { background: var(--black); color: var(--white); padding: var(--space-xl) 0 var(--space-lg); }
footer.site .foot-top { display: flex; justify-content: space-between; gap: var(--space-xl); flex-wrap: wrap; padding-bottom: var(--space-lg); border-bottom: 1px solid var(--line-dark); }
footer.site .logo img { height: 56px; }
footer.site .foot-tagline { color: rgba(255, 255, 255, 0.66); max-width: 380px; margin-top: var(--space-md); font-size: 0.95rem; }
footer.site .foot-links { display: grid; gap: 8px; font-size: 0.95rem; }
footer.site .foot-links a { text-decoration: none; color: rgba(255, 255, 255, 0.8); }
footer.site .foot-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
footer.site .small-print { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.5); margin: var(--space-lg) 0 0; }

/* ---------- Reveal on scroll (only when JS adds body.js-reveal) ---------- */
body.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
body.js-reveal .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Audit tables & summary ---------- */
.table-wrap { overflow-x: auto; margin-top: var(--space-lg); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.scan-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 720px; }
.scan-table th, .scan-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.scan-table th { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.scan-table tr:last-child td { border-bottom: 0; }
.scan-table td:first-child { font-weight: 600; white-space: nowrap; }
.scan-table tr.is-subject td { background: var(--paper); }
.summary-box { border-left: 2px solid var(--ink); padding: var(--space-sm) 0 var(--space-sm) var(--space-lg); max-width: 860px; }
.summary-box .lead-line { margin-bottom: var(--space-md); }
.summary-box p:last-child { margin-bottom: 0; color: var(--muted); }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); margin-top: var(--space-lg); }
.tiers > div { border-top: 1px solid var(--ink); padding-top: var(--space-md); }
.tiers h4 { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tiers ul { padding-left: 1.1rem; margin: 0; }
.tiers li { margin-bottom: 10px; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } }
.evidence-figure.narrow img { max-width: 560px; }

/* Bilingual quotes: Italian original, translation right after */
.tr { color: var(--muted); font-style: normal; }
em[lang="it"] { font-style: italic; }

/* Empty "next case" card */
.work-card.is-next .work-thumb { border-style: dashed; border-color: var(--ink); background: transparent; }
.work-card.is-next .next-mark { font-family: var(--font-mono, "IBM Plex Mono", monospace); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.work-card.is-next h3 { font-style: italic; }

/* Contact form: spam honeypot (hidden from people) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Motion graphics (home) ----------
   Ink and paper only. Every animation is decoration: with JS off or
   reduced motion the graphics render in their finished state. */

/* Hero: copy left, animated positioning map right */
.hero-home { padding-bottom: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: var(--space-xl); align-items: center; padding-bottom: var(--space-xl); }
.hero-home h1 { font-size: clamp(2.3rem, 4.4vw, 3.7rem); max-width: none; }
.hero-home .lede { max-width: 560px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: var(--space-xl); } }

/* Staggered entrance for hero copy */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise .9s var(--ease) backwards; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }
.viz-map { animation: rise 1s .25s var(--ease) backwards; }

/* Framed figure */
.viz { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.viz-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); padding: 12px var(--space-md); border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.viz-state { color: var(--ink); min-width: 9ch; text-align: right; }
.viz-state::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: 1px; }
.viz svg { display: block; width: 100%; height: auto; }
.viz-map svg { padding: var(--space-sm) var(--space-sm) var(--space-md); }

.map-grid line, .map-grid rect { stroke: var(--line); fill: none; stroke-width: 1; }
.map-axis { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--gray); }
.map-crowd-zone { fill: none; stroke: var(--gray); stroke-width: 1; stroke-dasharray: 3 5; }
.map-open { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0; }
.map-dot { fill: var(--gray); opacity: 0.55; }
.map-dot-you { fill: var(--ink); }
.map-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0; }
.map-trail { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 5; fill: none; }
.map-guide { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0; }
.map-tag, .map-you-label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--muted); }
.map-you-label { fill: var(--ink); font-weight: 500; }
.map-tag-you { fill: var(--ink); opacity: 0; }

/* Ticker */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; background: var(--paper); }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); padding: 18px 0; white-space: nowrap; }
.ticker span::after { content: "/"; color: var(--gray); margin: 0 var(--space-lg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Chart: recognition resets vs. compounds */
.viz-chart { margin-top: var(--space-xl); }
.viz-note { color: var(--gray); }
.viz-legend { list-style: none; margin: 0; padding: var(--space-md) var(--space-md) 0; display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); font-size: 0.92rem; color: var(--muted); }
.viz-legend li { display: flex; align-items: center; gap: 10px; }
.sw { display: inline-block; width: 28px; height: 0; border-top: 2px solid var(--gray); }
.sw-good { border-top: 3px solid var(--ink); }
.viz-chart svg { padding: var(--space-sm) var(--space-md) var(--space-md); }
.ch-grid line { stroke: var(--line); stroke-width: 1; }
.ch-marks line { stroke: var(--gray); stroke-width: 1; }
.ch-axis { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; fill: var(--gray); }
.ch-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.ch-bad { stroke: var(--gray); stroke-width: 2; }
.ch-good { stroke: var(--ink); stroke-width: 3; }
.ch-end { fill: var(--ink); }
html.viz-on .viz-chart .ch-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.viz-on .viz-chart .ch-end { opacity: 0; }
html.viz-on .viz-chart.is-play .ch-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease); }
html.viz-on .viz-chart.is-play .ch-good { transition-duration: 2.6s; transition-delay: .5s; }
html.viz-on .viz-chart.is-play .ch-end { opacity: 1; transition: opacity .4s 3s; }
@media (max-width: 640px) { .ch-axis { font-size: 24px; } .viz-chart svg { padding-left: var(--space-sm); padding-right: var(--space-sm); } .viz-note { display: none; } }

/* Stats: hairline draws across, number counts up */
.stat-bar { display: block; height: 2px; background: var(--ink); margin-bottom: var(--space-md); transform-origin: left; }
.stat .num { font-variant-numeric: tabular-nums; }
html.viz-on .stat-bar { transform: scaleX(0); }
html.viz-on .stats.is-play .stat-bar { transform: none; transition: transform 1.4s var(--ease); }
html.viz-on .stats.is-play .stat:nth-child(2) .stat-bar { transition-delay: .15s; }
html.viz-on .stats.is-play .stat:nth-child(3) .stat-bar { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .viz-map { animation: none !important; }
  .ticker-track { animation: none !important; }
  .ticker { overflow-x: auto; }
}
