/* ============================================================
   COLOR v1 — Lauren's palette. Type & spacing are still greybox.

   PALETTE (raw values — don't use these directly in components)
     --c-ink:    #292831   near-black  → page background
     --c-navy:   #333f58   deep navy   → floating surfaces / widgets
     --c-steel:  #4a7a96   steel blue  → secondary actions
     --c-rose:   #ee8695   rose        → primary actions
     --c-peach:  #fbbbad   peach       → all text (opacity sets hierarchy)

   ROLES (use these in components)
   ============================================================ */
:root {
  /* Palette */
  --c-ink:   #292831;
  --c-navy:  #333f58;
  --c-steel: #4a7a96;
  --c-rose:  #ee8695;
  --c-peach: #fbbbad;
  --c-header: #F3EFE0;   /* headers only: page titles + section headings. Swap this to try another color */

  /* Surfaces */
  --bg-page:        var(--c-ink);                 /* page background */
  --bg-subtle:      var(--c-navy);                /* widgets, cards, anything floating */
  --bg-thumb:       var(--c-navy);                /* image placeholders */
  --border:         rgba(251, 187, 173, 0.16);    /* peach @16% hairlines */

  /* Text — peach at different strengths */
  --text-primary:   var(--c-peach);               /* headings, emphasis — 100% */
  --text-secondary: rgba(251, 187, 173, 0.65);    /* body text — 65% */
  --text-muted:     rgba(251, 187, 173, 0.50);    /* labels, captions — 50% */

  /* Actions */
  --btn-primary-bg:       var(--c-rose);
  --btn-primary-fg:       var(--c-ink);           /* button text = page bg */
  --btn-secondary-border: var(--c-steel);
  --btn-secondary-fg:     var(--c-steel);
  --link-primary:         var(--c-rose);
  --link-secondary:       var(--c-steel);
  --focus:                var(--c-rose);

  /* Type scale (placeholder) */
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-eyebrow: 0.8125rem;
  --fs-h1: clamp(2.5rem, 7vw, 4.5rem);
  --fs-h2: clamp(1.5rem, 3vw, 2rem);
  --fs-body-lg: clamp(1.125rem, 2vw, 1.375rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  /* Layout */
  --max-w: 1440px;
  --gutter: clamp(16px, 3vw, 40px);
  --radius-card: 12px;
  --radius-pill: 999px;
  --grid-gap: clamp(20px, 3vw, 36px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg-page); color: var(--text-primary); line-height: 1.5; }
a { color: inherit; }
button, select { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Site nav ---------- */
.site-nav { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-page); z-index: 10; }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; text-decoration: none; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { text-decoration: none; font-size: var(--fs-small); color: var(--text-secondary); }
.nav-links a[aria-current="page"] { color: var(--text-primary); font-weight: 600; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; width: 40px; height: 40px; cursor: pointer; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-page); border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px; }
  .nav-links.open a { display: block; padding: 12px 0; font-size: var(--fs-body); }
  .nav-toggle { display: grid; place-items: center; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 10vw, 120px) 0 clamp(40px, 8vw, 96px); }
.eyebrow { font-size: var(--fs-eyebrow); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; }
.h1 { font-size: var(--fs-h1); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 20px; }
.body-lg { font-size: var(--fs-body-lg); color: var(--text-secondary); max-width: 40ch; margin-bottom: 32px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--radius-pill); font-size: var(--fs-body); font-weight: 600; text-decoration: none; border: 2px solid transparent; }
.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn--secondary { border-color: var(--btn-secondary-border); color: var(--btn-secondary-fg); }
.link { font-weight: 600; text-underline-offset: 3px; color: var(--link-primary); }
.link--secondary { color: var(--link-secondary); }

/* ---------- Work section (Dribbble-style) ---------- */
.work { padding-bottom: clamp(64px, 10vw, 120px); }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.2; }

.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(24px, 4vw, 40px); }
.toolbar-label { font-size: var(--fs-small); font-weight: 700; flex-shrink: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-page); border-radius: var(--radius-pill); padding: 8px 18px; font: inherit; font-size: var(--fs-small); cursor: pointer; color: var(--text-primary); }
.chip[aria-pressed="true"] { background: var(--bg-subtle); border-color: var(--text-primary); font-weight: 600; }
.sort { flex-shrink: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: var(--fs-small); background: var(--bg-page); }
@media (max-width: 720px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar-label { display: none; }
  .chips { order: 2; flex-basis: 100%; }
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); list-style: none; }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; gap: 12px; }
.card-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg-thumb); border-radius: var(--radius-card); overflow: hidden; text-decoration: none; display: grid; place-items: center; color: var(--text-muted); font-size: var(--fs-small); }
.card-x::before, .card-x::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--border) 50%, transparent calc(50% + 0.5px)); }
.card-x { position: absolute; inset: 0; }
.card-x::after { transform: scaleX(-1); }
.card-thumb > span:not(.card-x):not(.card-overlay):not(.reel):not(.type-thumb):not(.video-thumb):not(.split-thumb) { position: relative; z-index: 1; background: var(--bg-thumb); padding: 2px 8px; }
.card-overlay { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 16px 20px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-weight: 600; opacity: 0; transition: opacity .2s; }
.card-thumb:hover .card-overlay, .card-thumb:focus-visible .card-overlay { opacity: 1; }
@media (hover: none) { .card-overlay { display: none; } }
.card-meta { display: flex; flex-direction: column; gap: 4px; }
.card-title { font-size: var(--fs-body); font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.grid-empty { color: var(--text-secondary); padding: 48px 0; }
.card-sub { font-size: var(--fs-small); color: var(--text-secondary); }
.card-tag { font-size: 0.75rem; font-weight: 600; background: var(--bg-subtle); border-radius: 6px; padding: 4px 8px; color: var(--text-secondary); }

/* ---------- Section: shared ---------- */
.section { padding-bottom: clamp(64px, 10vw, 120px); }
.h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; margin: 0 0 16px; display: flex; align-items: baseline; gap: 8px; }
.h3 .count { font-size: var(--fs-small); font-weight: 400; color: var(--text-muted); }

/* ---------- Art: justified rows (default) / masonry ---------- */
.art { --row-h: 320px; --art-gap: 12px; display: flex; flex-wrap: wrap; gap: var(--art-gap); list-style: none; }
@media (max-width: 1024px) { .art { --row-h: 240px; } }
@media (max-width: 640px)  { .art { --row-h: 150px; --art-gap: 8px; } }
.art::after { content: ""; flex-grow: 999999; }            /* keeps the last row from stretching */
.art-item { --r: 1; flex-grow: var(--r); flex-basis: calc(var(--row-h) * var(--r)); max-width: calc(var(--row-h) * var(--r) * 1.6); min-width: 0; }  /* cap stops a lonely tile from ballooning */
.art-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--bg-thumb); border-radius: 8px; overflow: hidden; cursor: zoom-in; color: var(--text-muted); font: inherit; font-size: var(--fs-small); }
.art-btn::before { content: ""; display: block; padding-top: calc(100% / var(--r)); }
.art-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.art-ph span:last-child { position: relative; background: var(--bg-thumb); padding: 2px 8px; }
.art-btn:hover .card-overlay, .art-btn:focus-visible .card-overlay { opacity: 1; }
.art-btn .card-overlay { text-align: left; font-size: var(--fs-small); padding: 12px 14px; }
.art.is-masonry { display: block; columns: 3; column-gap: var(--art-gap); }
.art.is-masonry::after { display: none; }
.art.is-masonry .art-item { break-inside: avoid; margin-bottom: var(--art-gap); }
/* Phones: justified rows get too small, so both modes use 2-column masonry */
@media (max-width: 640px) {
  .art, .art.is-masonry { display: block; columns: 2; column-gap: var(--art-gap); }
  .art::after { display: none; }
  .art .art-item { break-inside: avoid; margin-bottom: var(--art-gap); max-width: none; }
  .toolbar .seg, .toolbar .greybox-note { display: none; }
}

.seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--bg-page); padding: 8px 12px; font: inherit; font-size: var(--fs-small); cursor: pointer; color: var(--text-secondary); }
.seg button[aria-pressed="true"] { background: var(--bg-subtle); color: var(--text-primary); font-weight: 600; }
.greybox-note { font-size: 0.75rem; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: transparent; }
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lb { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 12px; padding: 16px var(--gutter); color: #fff; }
.lb-top { display: flex; justify-content: flex-end; }
.lb-stage { display: grid; place-items: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 6px; }
.lb-ph { background: #3a3a3a; max-height: calc(100vh - 160px); border-radius: 6px; display: grid; place-items: center; color: #aaa; max-width: 100%; max-height: 100%; }
.lb-bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.lb-cap { text-align: center; }
.lb-cap strong { display: block; }
.lb-cap span { font-size: var(--fs-small); color: #bbb; }
.lb-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 18px; cursor: pointer; }

/* ---------- Games: 2:3 cover grid, info overlay on hover / tap ---------- */
.shelf-group + .shelf-group { margin-top: 48px; }
.shelf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--grid-gap); list-style: none; }
@media (max-width: 1024px) { .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 480px)  { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.game { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--bg-thumb); cursor: pointer; }
.game:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.game-cover { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--text-muted); font-size: var(--fs-small); }
.game-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-cover .ph-title { position: relative; background: var(--bg-thumb); padding: 2px 6px; font-weight: 600; color: var(--text-secondary); }

.game-info { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 16px;
  background: linear-gradient(to top, rgba(41, 40, 49, 0.97) 0%, rgba(41, 40, 49, 0.93) 60%, rgba(41, 40, 49, 0.85) 100%);
  opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.game:hover .game-info, .game:focus-visible .game-info, .game:has(a:focus-visible) .game-info, .game.is-open .game-info { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .game:hover:not(.is-open) .game-info { opacity: 0; pointer-events: none; }
  /* touch screens can't hover, so hint that the card opens */
  .game::after { content: "i"; position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 Georgia, serif; font-style: italic; background: rgba(41, 40, 49, 0.8); color: var(--text-primary); pointer-events: none; transition: opacity .18s; }
  .game.is-open::after { opacity: 0; }
}
.game-title { font-weight: 700; line-height: 1.25; color: var(--text-primary); }
.game-sub { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.35; }
.game-role { font-size: 0.8125rem; color: var(--text-primary); line-height: 1.35; margin-top: 4px; }
.game-link { align-self: flex-start; margin-top: 10px; min-height: 36px; padding: 0 14px; font-size: var(--fs-small); }
@media (max-width: 480px) { .game-info { padding: 12px; } .game-link { min-height: 32px; padding: 0 10px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: var(--fs-small); color: var(--text-secondary); }
.site-footer ul { display: flex; gap: 24px; list-style: none; }

/* ---------- Annotation mode (greybox only) ---------- */
[data-token] { position: relative; }
body.annotate [data-token] { outline: 1px dashed #e0006c; outline-offset: 2px; }
body.annotate [data-token]::after { content: attr(data-token); position: absolute; top: -18px; left: 0; font: 600 10px/1 ui-monospace, monospace; background: #e0006c; color: #fff; padding: 3px 5px; border-radius: 3px; white-space: nowrap; z-index: 20; pointer-events: none; text-transform: none; letter-spacing: 0; }
body.annotate .card-sub::after { left: auto; right: 0; }
body.annotate .card-thumb { overflow: visible; }
.annotate-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 50; font: 600 12px/1 ui-monospace, monospace; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--text-primary); background: var(--bg-page); cursor: pointer; }

/* =============================================================
   CASE STUDY PAGE (case-study.html)
   ============================================================= */
.cs-label { font-size: var(--fs-eyebrow); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.cs-p { max-width: 65ch; color: var(--text-secondary); }
.cs-p + .cs-p, .cs-p + .field, .field + .field { margin-top: 20px; }

/* Writing prompts (greybox tooling — not part of the final design) */
.todo { display: block; background: #fff6d6; border: 1px dashed #b38f00; color: #5c4a00; padding: 8px 12px; border-radius: 6px; font-size: var(--fs-small); font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.todo::before { content: "✎ Your turn: "; font-weight: 700; }
body.hide-todos .has-todo { display: none !important; }
.tool-row { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; gap: 8px; }
.tool-row .annotate-toggle { position: static; }

/* 1 · Snapshot */
.cs-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 96px); align-items: start; padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
@media (max-width: 860px) { .cs-hero { grid-template-columns: 1fr; } }
.cs-title { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 24px; }
.cs-outcome { font-size: var(--fs-body-lg); max-width: 40ch; padding-left: 16px; border-left: 4px solid var(--text-primary); margin-bottom: 32px; }
.cs-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px 24px; }
.cs-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 600; }
.cs-meta dd { font-size: var(--fs-small); }
.showcase { margin: 0; }
.showcase-media { background: var(--bg-thumb); border-radius: var(--radius-card); overflow: hidden; display: grid; place-items: center; }
.showcase-media img { width: 100%; height: auto; display: block; }
.showcase-media.is-portrait { max-width: 360px; margin: 0 auto; }
.showcase figcaption { font-size: var(--fs-small); color: var(--text-secondary); margin-top: 12px; text-align: center; }

/* Process strip */
.cs-process { padding-bottom: clamp(40px, 6vw, 72px); }
.strip { display: flex; gap: 4px; }
.strip-step { flex: 1 1 0; background: var(--bg-subtle); border-top: 3px solid var(--text-primary); padding: 10px 12px; font-size: var(--fs-small); font-weight: 600; min-width: 0; }
.strip-step small { display: block; font-weight: 400; color: var(--text-muted); }
.strip-along { margin-top: 4px; background: var(--bg-subtle); border-top: 0; padding: 8px 12px; font-size: var(--fs-small); color: var(--text-secondary); }
@media (max-width: 640px) {
  .strip { flex-direction: column; }
  .strip-step { border-top: 0; border-left: 3px solid var(--text-primary); }
}

/* Section sub-nav (sticky, with scrollspy) */
.cs-subnav { position: sticky; top: 64px; z-index: 9; background: var(--bg-page); border-bottom: 1px solid var(--border); }
.cs-subnav ul { display: flex; gap: 28px; list-style: none; overflow-x: auto; scrollbar-width: none; height: 48px; align-items: center; }
.cs-subnav ul::-webkit-scrollbar { display: none; }
.cs-subnav a { text-decoration: none; font-size: var(--fs-small); color: var(--text-muted); white-space: nowrap; padding: 13px 0; border-bottom: 2px solid transparent; }
.cs-subnav a.is-active { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--text-primary); }
.cs-section { padding: clamp(56px, 8vw, 104px) 0 0; scroll-margin-top: 112px; }
.cs-section .h2 { margin-bottom: 28px; }

/* 2 · Problem */
.cs-quote { font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.35; font-weight: 600; max-width: 32ch; margin-bottom: 32px; }
.constraints { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; margin-top: 40px; }
@media (max-width: 1024px) { .constraints { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .constraints { grid-template-columns: 1fr; } }
.constraint { background: var(--bg-subtle); border-radius: 10px; padding: 20px; }
.constraint h3 { font-size: var(--fs-body); font-weight: 700; margin-bottom: 6px; }
.constraint p { font-size: var(--fs-small); color: var(--text-secondary); }

/* 3 · Decisions */
.decision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding: 40px 0; border-top: 1px solid var(--border); }
.decision:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 860px) { .decision { grid-template-columns: 1fr; } }
.fork { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.3; font-weight: 700; margin-bottom: 20px; }
.options { list-style: none; display: grid; gap: 8px; margin-bottom: 24px; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: var(--fs-small); }
.option .verdict { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; flex-shrink: 0; }
.option.is-rejected { color: var(--text-muted); }
.option.is-rejected:not(.has-todo) .name { text-decoration: line-through; text-decoration-color: var(--border); }
.option.is-chosen { border: 2px solid var(--text-primary); font-weight: 600; }
.receipts { display: grid; gap: 16px; align-content: start; }
.receipt { margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-page); }
.receipt-bar { font: 600 0.7rem/1 ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.receipt-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-thumb); display: grid; place-items: center; color: var(--text-muted); font-size: var(--fs-small); }
.receipt-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-subtle); }
.receipt-media > span:last-child { position: relative; background: var(--bg-thumb); padding: 2px 8px; }
.receipt figcaption { padding: 10px 12px; font-size: var(--fs-small); color: var(--text-secondary); }

/* 4 · Results */
.headline-stat { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
.signals { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 40px; margin-top: 40px; }
@media (max-width: 720px) { .signals { grid-template-columns: 1fr; } }
.signals li { display: flex; gap: 12px; font-size: var(--fs-body); }
.signals li::before { content: "✓"; font-weight: 700; flex-shrink: 0; }

/* Next case study */
.cs-next { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: clamp(64px, 10vw, 120px) 0; padding: 32px; border-radius: var(--radius-card); background: var(--bg-subtle); text-decoration: none; }
.cs-next strong { display: block; font-size: var(--fs-h2); line-height: 1.2; margin-top: 4px; }
.cs-next .arrow { font-size: 2rem; flex-shrink: 0; }
@media (max-width: 860px) { .showcase-media.is-portrait { max-width: 260px; } }

/* =============================================================
   ART PAGE (art.html)
   ============================================================= */
.page-head { padding: clamp(40px, 8vw, 88px) 0 clamp(24px, 4vw, 40px); }
.tabs { display: flex; gap: clamp(20px, 3vw, 36px); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin-top: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex-shrink: 0; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 12px 0; font: inherit; font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text-secondary); }
.tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--c-rose); }
.tabs .count { font-size: 0.75rem; font-weight: 400; vertical-align: super; color: var(--text-muted); }

/* Front-page art: one tidy row. Everything shrinks together so heights stay equal. */
.art--strip { flex-wrap: nowrap; }
.art--strip::after { display: none; }
.art--strip .art-item { max-width: none; }

/* Studio intro above the indie games */
.studio { margin-bottom: 24px; }
.studio .h3 { margin-bottom: 8px; }
.studio-name { text-decoration: none; }
.studio-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.studio-blurb { color: var(--text-secondary); max-width: 60ch; margin-bottom: 14px; }
.studio-hats { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }

/* =============================================================
   CASE STUDY THUMBNAILS — real images
   The frame speaks the site's palette; the work stays true-color.
   ============================================================= */
.card-thumb.has-media {
  background:
    radial-gradient(120% 90% at 50% 115%, rgba(238, 134, 149, 0.16) 0%, transparent 55%),   /* faint rose glow from below */
    linear-gradient(180deg, var(--c-navy) 0%, var(--c-ink) 100%);
  box-shadow: inset 0 0 0 1px rgba(251, 187, 173, 0.08);
}
.card-thumb .thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Reel: a row of phone screens drifting sideways, looping forever */
.reel { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
.reel-track { display: flex; height: 80%; width: max-content; will-change: transform; }
.reel-track img { height: 100%; width: auto; margin-right: 18px; border-radius: 14px;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(251, 187, 173, 0.10); }
.reel-track.is-running { animation: reel-slide var(--reel-dur, 40s) linear infinite; }
@keyframes reel-slide { to { transform: translateX(-50%); } }
.card-thumb:hover .reel-track, .card-thumb:focus-visible .reel-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .reel-track.is-running { animation: none; } }
@media (max-width: 640px) { .reel-track img { margin-right: 12px; border-radius: 10px; } }

/* Type-led thumbnail: a big claim + wireframes in the site palette */
.type-thumb { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4%; padding: 0 7%; }
.type-copy { display: flex; flex-direction: column; gap: 8px; }
.type-head { font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; color: var(--text-primary); }
.type-sub { font-size: clamp(0.8rem, 1.1vw, 1rem); font-weight: 600; color: var(--c-rose); white-space: nowrap; }
.type-art { position: relative; height: 80%; display: grid; place-items: center; }
.wf-svg { width: 100%; height: 100%; overflow: visible; }
.wf-frame { fill: var(--c-ink); stroke: rgba(251, 187, 173, 0.45); stroke-width: 1.5; }
.wf-block { fill: rgba(251, 187, 173, 0.16); }
.wf-line  { fill: none; stroke: rgba(251, 187, 173, 0.30); stroke-width: 1.2; stroke-dasharray: 3 3; }
.wf-accent { fill: var(--c-rose); }
/* Real wireframe images (grey on transparent) get tinted peach-on-navy */
.wf-img { max-width: 100%; max-height: 100%; filter: grayscale(1) invert(1) sepia(1) saturate(2.2) hue-rotate(-25deg) brightness(0.95); opacity: 0.8; }
@media (max-width: 640px) { .type-thumb { padding: 0 6%; } }

/* Type-led thumbnail with full-color art: headline top-left, art rising
   from the bottom-right and bleeding off the edges (a diagonal balance) */
.type-thumb--image { display: block; padding: 0; }
.type-thumb--image .type-copy { position: absolute; top: 8%; left: 7%; right: 7%; z-index: 2; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; }
.type-thumb--image .type-head { font-size: clamp(1.4rem, 2.4vw, 2rem); }
/* Art fills the card: centered, starting under the headline, running off the bottom */
.type-thumb--image .type-art { position: absolute; left: 50%; top: 22%; width: 104%; height: auto; display: block;
  transform: translateX(-50%); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.type-thumb--image .type-art::before { content: ""; position: absolute; inset: 10% 5% 0 10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(238, 134, 149, 0.28), transparent); filter: blur(10px); }
.cover-img { display: block; width: 100%; height: auto; }   /* shadow is baked into the image (Safari-safe) */
.card-thumb:hover .type-thumb--image .type-art { transform: translate(-50%, -3%); }
@media (prefers-reduced-motion: reduce) { .type-thumb--image .type-art { transition: none; } }

/* Video thumbnail: a framed 16:9 screen; plays a silent loop on hover */
.video-thumb { position: absolute; inset: 0; display: grid; place-items: center; }
.video-frame { position: relative; width: 90%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000;
  box-shadow: 0 18px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(251, 187, 173, 0.12);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.video-frame img, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame video { opacity: 0; transition: opacity .25s; }
.card-thumb.is-playing .video-frame video { opacity: 1; }
.card-thumb:hover .video-frame { transform: scale(1.03); }
.video-badge { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(41, 40, 49, 0.75); transition: opacity .2s; }
.video-badge svg { width: 12px; height: 12px; fill: var(--text-primary); margin-left: 2px; }
.card-thumb.is-playing .video-badge { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .video-frame { transition: none; } .card-thumb:hover .video-frame { transform: none; } }
.video-frame .anim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.card-thumb.is-playing .video-frame .anim { opacity: 1; }

/* Case study: wide (16:9) showcase — trailer or clip spans the full hero width */
.showcase--wide { grid-column: 1 / -1; }
.showcase-media.is-landscape { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.showcase-media.is-landscape iframe, .showcase-media.is-landscape video, .showcase-media.is-landscape img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.cs-hero:has(.showcase--wide) { grid-template-columns: minmax(0, 1fr); }
.cs-hero:has(.showcase--wide) .cs-meta { max-width: 960px; }
.receipt-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-subtle); }
.decision--solo { grid-template-columns: minmax(0, 1fr); }
.decision--solo > div:first-child { max-width: 760px; }
.receipts--grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .receipts--grid { grid-template-columns: 1fr; } }

/* Case study: team block */
.team-list { list-style: none; display: grid; gap: 10px; margin-top: 14px; max-width: 65ch; }
.team-list li { display: grid; grid-template-columns: 72px 1fr; gap: 12px; color: var(--text-secondary); }
.team-list strong { color: var(--text-primary); }
.cs-outcome { max-width: 52ch; }

/* Results: several big stats side by side, optional "What I learned" notes */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px 48px; }
.lesson { display: block; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--c-rose); font-size: var(--fs-small); color: var(--text-secondary); max-width: 60ch; }
.lesson > span:first-child { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-rose); margin-bottom: 2px; }

/* Results, tidier: equal stat columns with a rule on top, then one clean list */
.stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }
.stat { border-top: 3px solid var(--c-rose); padding-top: 16px; }
.stat .headline-stat { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 6px; }
.stat .cs-p { font-size: var(--fs-body); }
.stat-row + .signals { grid-template-columns: 1fr; max-width: 760px; gap: 14px; margin-top: 48px; }
.stat .headline-stat { font-size: clamp(2.25rem, 4.5vw, 3.5rem); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: var(--fs-eyebrow); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--c-rose); margin-bottom: 10px; }

/* Process strip as chevrons: > > > */
.strip { gap: 0; }
.strip-step {
  --notch: 16px;
  border-top: 0;
  padding: 14px 12px 14px calc(var(--notch) + 14px);
  margin-left: calc(var(--notch) * -1 + 4px);   /* tuck each step into the previous point, leaving a thin gap */
  display: flex; flex-direction: column; justify-content: center;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%, var(--notch) 50%);
}
.strip-step:first-child { margin-left: 0; padding-left: 16px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%); }
.strip-step:nth-child(odd)  { background: var(--c-navy); }
.strip-step:nth-child(even) { background: #3a4866; }   /* a half-step lighter navy so neighbors read as separate */
@media (max-width: 640px) {
  .strip { gap: 4px; }
  .strip-step, .strip-step:first-child { clip-path: none; margin-left: 0; padding: 10px 12px; border-left: 3px solid var(--c-rose); }
}
.showcase-media video { width: 100%; height: auto; display: block; }
/* Grids of tall screenshots: keep each tile a sensible height, show the whole image */
.receipts--grid .receipt-media[style] { aspect-ratio: 3 / 4 !important; }
.receipts--grid .receipt-media[style] img, .receipts--grid .receipt-media[style] video { object-fit: contain; background: var(--bg-subtle); }

/* A featured receipt spans the whole receipts column (the hero image), others sit below it */
.receipts--grid .receipt--feature { grid-column: 1 / -1; }
.receipts--grid .receipt--feature .receipt-media[style] { aspect-ratio: auto !important; height: min(70vh, 620px); }
.receipt--feature .receipt-media img, .receipt--feature .receipt-media video { object-fit: contain; background: var(--bg-subtle); }


/* ---------- Icon cards (constraints + results) ---------- */
.icon-card { position: relative; background: var(--bg-subtle); border: 1px solid rgba(251,187,173,0.08); border-radius: 14px; padding: 24px; list-style: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.icon-card:hover { transform: translateY(-3px); border-color: rgba(238,134,149,0.45); box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(238,134,149,0.15); }
.icon-card h3 { font-size: var(--fs-body); font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.3; }
.icon-card p { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.55; }
.icon-tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  background: rgba(238,134,149,0.14); transition: background .2s ease; }
.icon-tile i { display: block; width: 22px; height: 22px; background: var(--c-rose);
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.icon-card:hover .icon-tile { background: rgba(238,134,149,0.24); }
.icon-tile.is-empty { background: transparent; border: 1.5px dashed rgba(238,134,149,0.45); }
@media (prefers-reduced-motion: reduce) { .icon-card, .icon-card:hover { transition: none; transform: none; } }

.result-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.result-cards + .result-cards { margin-top: 16px; }
.result-cards--metrics .result-card { background: linear-gradient(160deg, #3a4866 0%, var(--c-navy) 70%); border-color: rgba(238,134,149,0.22); }
.result-cards--metrics h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
.result-cards--metrics p { font-size: var(--fs-body); }
@media (max-width: 1024px) { .result-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .result-cards { grid-template-columns: 1fr; } }
.result-cards + .signals { grid-template-columns: 1fr; max-width: 760px; gap: 14px; margin-top: 48px; }

/* Icon + header on one line */
.icon-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.icon-card-head .icon-tile { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 0; flex-shrink: 0; }
.icon-card-head .icon-tile i { width: 20px; height: 20px; }
.icon-card-head h3 { margin-bottom: 0; }
.icon-card { padding: 20px 22px; }

/* ---------- Iteration strip (e.g. original → first pass → second pass) ---------- */
.iteration { margin-top: 72px; padding-top: 48px; border-top: 1px solid rgba(251,187,173,0.12); }
.iteration .cs-p { max-width: 62ch; margin-top: 12px; }
.iteration-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 32px; max-width: 920px; }
.iteration-step + .iteration-step::before { left: -34px; }
.iteration-step { position: relative; }
.iteration-step + .iteration-step::before { content: "→"; position: absolute; left: -30px; top: 50%; transform: translateY(-50%);
  color: var(--c-rose); font-size: 1.25rem; font-weight: 700; }
.iteration-step:last-child .receipt { border-color: rgba(238,134,149,0.55); box-shadow: 0 0 0 1px rgba(238,134,149,0.2); }
@media (max-width: 720px) {
  .iteration-steps { grid-template-columns: 1fr; gap: 44px; max-width: 360px; margin-inline: auto; }
  .iteration-step + .iteration-step::before { content: "↓"; left: 50%; top: -34px; transform: translateX(-50%); }
}
.results-note { margin-top: 28px; font-size: 0.75rem; color: var(--text-muted); }
.iteration--wide .iteration-steps { max-width: none; }
@media (max-width: 720px) { .iteration--wide .iteration-steps { max-width: none; } }
.receipts--row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 560px) { .receipts--row { grid-template-columns: 1fr; } }

/* Decision: list of challenges and what I worked on */
.challenge-list { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.challenge-list li { display: grid; gap: 2px; padding: 12px 14px; border-left: 2px solid var(--c-rose); background: rgba(51,63,88,0.45); border-radius: 0 8px 8px 0; }
.challenge-list strong { font-size: var(--fs-body); color: var(--text-primary); }
.challenge-list span { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.5; }

/* Card tags: first few shown, the rest behind a "+N" chip */
.card-tag--more { background: transparent; border: 1px dashed rgba(251,187,173,0.3); color: var(--text-muted); cursor: default; }

/* Split thumbnail: earlier work and the polished result, meeting on a diagonal */
.split-thumb { position: absolute; inset: 0; overflow: hidden; }
.split-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: clip-path .5s cubic-bezier(.2,.7,.2,1); }
.split-before { clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); filter: saturate(0.9); }
.split-after  { clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%); }
.split-line { position: absolute; inset: 0; background: var(--c-rose); clip-path: polygon(57.6% 0, 58.4% 0, 42.4% 100%, 41.6% 100%); transition: clip-path .5s cubic-bezier(.2,.7,.2,1); }
.split-label { position: absolute; bottom: 5%; padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(41,40,49,.82); color: var(--text-primary); }
.split-label--b { left: 4%; } .split-label--a { right: 4%; background: var(--c-rose); color: var(--c-ink); }
.card-thumb:hover .split-before { clip-path: polygon(0 0, 46% 0, 30% 100%, 0 100%); }
.card-thumb:hover .split-after  { clip-path: polygon(46% 0, 100% 0, 100% 100%, 30% 100%); }
.card-thumb:hover .split-line   { clip-path: polygon(45.6% 0, 46.4% 0, 30.4% 100%, 29.6% 100%); }
@media (prefers-reduced-motion: reduce) { .split-thumb img, .split-line { transition: none; } }

/* Showcase that is free-standing art (transparent PNG/WebP), not a framed screen */
.showcase-media.is-portrait.is-art { max-width: 560px; background: none; }
.showcase-media.is-art img { position: static; width: 100%; height: auto; object-fit: contain; }
@media (max-width: 860px) { .showcase-media.is-portrait.is-art { max-width: 420px; } }

/* ---------- Launch mode ---------- */
body:not(.dev) .annotate-toggle { display: none !important; }
body:not(.dev) .todo, body:not(.dev) .has-todo { display: none !important; }
@media (min-width: 1025px) { .grid.grid--two { grid-template-columns: repeat(2, 1fr); } }
img.is-pixel { image-rendering: pixelated; }
body:not(.dev) .greybox-note, body:not(.dev) select.sort { display: none !important; }

/* Gallery block (e.g. a campaign's art), tall images cropped from the top; click opens the full image */
.gallery-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 28px; }
.gallery-item { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.gallery-media { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; border: 1px solid rgba(251,187,173,0.12); background: var(--bg-subtle); }
.gallery-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.gallery-item:hover .gallery-media img { transform: scale(1.03); }
.gallery-item:hover .gallery-media { border-color: rgba(238,134,149,0.5); }
.gallery-title { font-size: var(--fs-small); color: var(--text-secondary); }
@media (prefers-reduced-motion: reduce) { .gallery-media img { transition: none; } }
@media (min-width: 1025px) { .constraints:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); } }

/* Type-led thumbnails v2: headline on top, art fills the space left below it (no fixed offset) */
.type-thumb--image { display: flex; flex-direction: column; }
.type-thumb--image .type-copy { position: relative; top: auto; left: auto; right: auto; padding: 6% 7% 0; }
.type-thumb--image .type-art { position: relative; left: auto; top: auto; transform: none; width: 100%; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: flex-end; justify-content: center; margin-top: 3%; }
.type-thumb--image .cover-img { width: auto; height: auto; max-width: 104%; max-height: 100%; object-fit: contain; }
.card-thumb:hover .type-thumb--image .type-art { transform: translateY(-3%); }
.type-thumb--image .type-art { align-items: flex-start; }
.type-thumb--image .cover-img { width: 104%; max-width: none; max-height: none; flex-shrink: 0; }

/* Hero role line: bigger and in the heading color so it reads as a title, not a label */
.hero .eyebrow { font-size: clamp(1.05rem, 1.7vw, 1.4rem); color: var(--text-primary); letter-spacing: 0.08em; font-weight: 700; margin-bottom: 0.5rem; }

/* Filter chips wrap onto more rows instead of hiding off the edge */
.toolbar { align-items: flex-start; }
.toolbar-label { padding-top: 9px; }
.chips { flex-wrap: wrap; overflow: visible; row-gap: 10px; }
.chip { flex-shrink: 0; }
/* Icons are pre-tinted rose PNGs (works when opened from a folder, not just on a server) */
.icon-tile img { display: block; width: 20px; height: 20px; object-fit: contain; }

/* ---------- About page ---------- */
.about-hero { padding-block: clamp(48px, 9vw, 112px) clamp(40px, 6vw, 72px); }
.about-hero-grid { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-portrait { aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: var(--bg-subtle); border: 1px solid rgba(251,187,173,0.12); }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--text-primary); max-width: 60ch; margin-bottom: 14px; }
.about-intro .cs-p { max-width: 60ch; }
.about-btns { margin-top: 28px; }
.about-section { padding-bottom: clamp(48px, 7vw, 88px); }
.about-section .cs-label { margin-bottom: 20px; }
.about-principles { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-principles h3 { font-size: 1.1rem; margin-bottom: 8px; }
.about-proof { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.about-proof li { border-top: 3px solid var(--c-rose); padding-top: 14px; display: grid; gap: 6px; }
.about-proof strong { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1; color: var(--text-primary); letter-spacing: -0.01em; }
.about-proof span { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.5; }
.about-career { list-style: none; display: grid; max-width: 860px; }
.about-career li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(251,187,173,0.12); }
.about-years { font-size: var(--fs-small); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.about-studio { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.about-studio strong { color: var(--text-primary); font-size: 1.05rem; }
.about-studio span { color: var(--text-secondary); font-size: var(--fs-small); }
.about-cs { font-size: var(--fs-small); white-space: nowrap; }
.about-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-form { display: grid; gap: 8px; background: var(--bg-subtle); border-radius: 16px; padding: 24px; }
.contact-form label { font-size: var(--fs-small); color: var(--text-secondary); margin-top: 6px; }
.contact-form input, .contact-form textarea { font: inherit; color: var(--text-primary); background: var(--bg-page); border: 1px solid rgba(251,187,173,0.2); border-radius: 10px; padding: 10px 12px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--c-rose); outline-offset: 1px; }
.contact-form .btn { justify-self: start; margin-top: 12px; }
.contact-form .hp { position: absolute; left: -9999px; }
@media (max-width: 860px) {
  .about-hero-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 200px; }
  .about-principles { grid-template-columns: 1fr; }
  .about-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-contact { grid-template-columns: 1fr; }
  .about-career li { grid-template-columns: 1fr; gap: 4px; }
}

.about-personal li { border-top: 3px solid var(--c-rose); padding-top: 14px; }
.about-personal h3 { color: var(--text-primary); font-size: 1.1rem; margin-bottom: 6px; }
.about-personal p { color: var(--text-secondary); font-size: var(--fs-small); line-height: 1.55; }
body:not(.dev) .art-toolbar { display: none; }

/* Case study list: no tag filter bar (tags still show on cards and inside each case study) */
.cs-toolbar { display: none !important; }
.cs-tags { margin-bottom: 28px; }


/* ---------- Heist fixes: links, problem columns, capped tall receipts, phone galleries ---------- */
.cs-links { margin: -8px 0 32px; }
.problem-cols { display: grid; gap: 20px; }
.problem-cols .field + .field { margin-top: 0; }
@media (min-width: 1025px) {
  .problem-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: start; }
  .problem-cols .cs-p { max-width: none; }
}
/* Tall screenshots in a decision's receipts: cap the height so they never swamp the page */
.receipts:not(.receipts--grid):not(.receipts--row):not(.receipts--wide) .receipt-media[style] { max-height: min(60vh, 520px); }
/* Before/after row: text above in two columns, images below side by side at the SAME height
   (each image's width follows its own shape via --r, so a phone screen and a 16:9 line up) */
.decision-head, .decision-body { display: contents; }
.decision--row { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1025px) {
  .decision--row .decision-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; align-items: start; }
  .decision--row .decision-head, .decision--row .decision-body { display: block; }
}
.receipts--row { display: flex; gap: 16px; align-items: flex-start; }
.receipts--row .receipt { flex: var(--r, 1) 1 0; min-width: 0; }
.receipts--row .receipt-media img { object-fit: contain; }
@media (max-width: 560px) {
  .receipts--row { flex-direction: column; }
  .receipts--row .receipt { flex: none; width: 100%; }
  .receipts--row .receipt-media[style] { max-height: 70vh; }
}
/* Phone screens gallery: whole screen visible, phone-shaped tiles */
.gallery-grid--phones { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery-grid--phones .gallery-media { aspect-ratio: 750 / 1624; }
.gallery-grid--phones .gallery-media img { object-fit: contain; }

/* Wide receipts: full width under the decision text. Small pieces in a 2x2, the featured screen tall on the right */
.receipts--wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; }
.receipts--wide .receipt-media[style] { aspect-ratio: 4 / 3 !important; }
.receipts--wide .receipt-media img { object-fit: contain; }
.receipts--wide .receipt--feature { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; }
.receipts--wide .receipt--feature .receipt-media[style] { aspect-ratio: auto !important; flex: 1; min-height: 320px; }
@media (max-width: 760px) {
  .receipts--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipts--wide .receipt--feature { grid-column: 1 / -1; grid-row: auto; }
  .receipts--wide .receipt--feature .receipt-media[style] { min-height: 0; height: 60vh; flex: none; }
}
/* Iteration strip: words on the left, the steps on the right (no empty right margin) */
@media (min-width: 1025px) {
  .iteration:not(.iteration--wide):not(.cs-gallery) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); grid-template-rows: auto auto auto 1fr; column-gap: 64px; }
  .iteration:not(.iteration--wide):not(.cs-gallery) > :not(.iteration-steps) { grid-column: 1; }
  .iteration:not(.iteration--wide):not(.cs-gallery) > .iteration-steps { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; max-width: none; }
}
/* Phone screens: 5 across on desktop */
@media (min-width: 1025px) { .gallery-grid--phones { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; } }
@media (max-width: 560px)  { .gallery-grid--phones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Decision spotlight: a video (or image) with its own little blurb, under the receipts */
.decision-spotlight { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 8px; }
@media (max-width: 860px) { .decision-spotlight { grid-template-columns: 1fr; gap: 20px; } }

/* Headers: the biggest text on the page (page titles + section headings) */
@font-face { font-family: "Bitter"; font-weight: 700; font-style: normal; font-display: swap; src: url("Resources/Fonts/bitter-700.woff2") format("woff2"); }
.h1, .cs-title, .h2 { color: var(--c-header); font-family: "Bitter", Georgia, serif; letter-spacing: -0.01em; }

/* ---------- Anatomy explorer (PENN: one slot game, tier by tier) ---------- */
.anat { margin-top: 72px; padding-top: 48px; border-top: 1px solid rgba(251,187,173,0.12); scroll-margin-top: 112px; }
.anat > .cs-p { max-width: 62ch; margin-top: 12px; }
.anat-explorer { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 40px; margin-top: 32px; align-items: start; }
.anat-stack { list-style: none; display: grid; gap: 8px; position: sticky; top: 132px; }
.anat-stack li { display: flex; justify-content: center; }
.anat-tier { width: var(--w); min-width: 150px; display: grid; gap: 2px; text-align: center; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: var(--bg-subtle); border: 2px solid transparent; color: var(--text-secondary); font: inherit; transition: background .15s, border-color .15s, transform .15s, color .15s; }
.anat-tier:hover { border-color: color-mix(in srgb, var(--tc) 50%, transparent); transform: translateY(-1px); }
.anat-tier[aria-selected="true"] { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 18%, var(--bg-subtle)); color: var(--text-primary); }
.anat-tier-n { font: 600 0.68rem/1 ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc); }
.anat-tier-name { font-weight: 700; font-size: 1rem; }
.anat-panel { border-left: 3px solid var(--tc); padding-left: 24px; animation: anatIn .25s ease; }
@keyframes anatIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.anat-panel-head { font-family: "Bitter", Georgia, serif; font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--c-header); }
.anat-panel-head span { font: 600 0.75rem/1 ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tc); vertical-align: middle; margin-right: 8px; }
.anat-panel-text { margin-top: 6px; color: var(--text-secondary); max-width: 62ch; }
.anat-items { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.anat-item { display: grid; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.anat-thumb { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #e9e9ee; border: 1px solid rgba(251,187,173,0.12); }
.anat-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; transition: transform .35s ease; }
.anat-thumb::after { content: "⤢"; position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(41,40,49,0.85); color: var(--c-peach); font-size: 15px; opacity: 0; transition: opacity .2s; }
.anat-item:hover .anat-thumb, .anat-item:focus-visible .anat-thumb { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc); }
.anat-item:hover .anat-thumb img { transform: scale(1.06); }
.anat-item:hover .anat-thumb::after, .anat-item:focus-visible .anat-thumb::after { opacity: 1; }
.anat-panel .anat-item { --tc: inherit; }
.anat-cap { font-size: var(--fs-small); color: var(--text-secondary); line-height: 1.4; }

.anat-map { margin: 56px 0 0; }
.anat-map-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.anat-map-head .cs-label { margin: 0; }
.anat-map-head .btn { min-height: 40px; padding: 0 18px; background: none; cursor: pointer; font: inherit; font-weight: 600; }
.anat-map-frame { position: relative; border-radius: 12px; overflow: hidden; background: #000; max-width: 1000px; }
.anat-map-frame img { display: block; width: 100%; height: auto; }
.anat-region { position: absolute; border: 2px solid var(--tc); border-radius: 6px; background: color-mix(in srgb, var(--tc) 8%, transparent);
  cursor: zoom-in; padding: 0; opacity: .55; transition: opacity .2s, background .2s, box-shadow .2s; }
.anat-region span { position: absolute; left: -2px; top: -2px; transform: translateY(-100%); background: var(--tc); color: #292831; font: 700 11px/1 system-ui, sans-serif;
  padding: 4px 6px; border-radius: 4px 4px 0 0; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.anat-region.is-lit { opacity: 1; background: color-mix(in srgb, var(--tc) 6%, transparent); }
.anat-region.is-hover, .anat-region:hover, .anat-region:focus-visible { opacity: 1; background: color-mix(in srgb, var(--tc) 24%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 35%, transparent); z-index: 2; }
.anat-region.is-lit span, .anat-region:hover span, .anat-region:focus-visible span { opacity: 1; }
.anat-map figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--text-muted); }

@media (max-width: 860px) {
  .anat-explorer { grid-template-columns: 1fr; gap: 20px; }
  .anat-stack { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; scrollbar-width: none; }
  .anat-stack li { flex: none; }
  .anat-tier { width: auto; min-width: 0; }
  .anat-panel { padding-left: 16px; }
  .anat-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .anat-region span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .anat-panel { animation: none; } .anat-thumb img, .anat-tier { transition: none; } }

/* ---------- Zoom viewer ---------- */
body.zv-open { overflow: hidden; }
.zv { position: fixed; inset: 0; z-index: 1000; background: #17161d; display: grid; grid-template-rows: auto 1fr auto auto; color: var(--c-peach); }
.zv[hidden] { display: none; }
.zv-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(251,187,173,0.12); font-size: var(--fs-small); }
.zv-label { font-weight: 700; color: var(--c-header); }
.zv-count { color: var(--text-muted); }
.zv-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.zv-tools button, .zv-prev, .zv-next { background: var(--c-navy); color: var(--c-peach); border: 0; border-radius: 8px; min-width: 40px; height: 40px; font: 600 1rem/1 system-ui, sans-serif; cursor: pointer; padding: 0 12px; }
.zv-tools button:hover, .zv-prev:hover, .zv-next:hover { background: #3f4d6b; }
.zv-close { background: var(--c-rose) !important; color: #292831 !important; }
.zv-pct { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.zv-stage { position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.zv-stage.is-drag { cursor: grabbing; }
.zv-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.zv-prev, .zv-next { position: absolute; top: 50%; transform: translateY(-50%); height: 56px; font-size: 1.6rem; z-index: 2; }
.zv-prev { left: 12px; } .zv-next { right: 12px; }
.zv-prev[hidden], .zv-next[hidden] { display: none; }
.zv-cap { text-align: center; padding: 10px 16px 2px; color: var(--text-primary); }
.zv-hint { text-align: center; padding: 0 16px 12px; font-size: 0.75rem; color: var(--text-muted); }
@media (max-width: 560px) { .zv-label { display: none; } .zv-fit { display: none; } }

/* ---------- The Problem: context line + downstream diagram ---------- */
.cs-context { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--bg-subtle); font-size: var(--fs-small); color: var(--text-secondary); }
.cs-context b { background: var(--c-rose); color: #292831; border-radius: 999px; padding: 3px 10px; font: 700 0.7rem/1.2 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.downstream { margin: 36px 0 48px; padding: clamp(18px, 3vw, 32px); border-radius: 16px; background: linear-gradient(180deg, rgba(51,63,88,0.55), rgba(51,63,88,0.2)); border: 1px solid rgba(251,187,173,0.10); }
.downstream > .cs-label { margin-bottom: 14px; }
.ds-frame { max-width: 1000px; }
.ds-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ds-svg--tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 700px) { .ds-svg--wide { display: none; } .ds-svg--tall { display: block; } }
.ds-line { fill: none; stroke: var(--c, var(--c-rose)); stroke-width: 2.5; stroke-opacity: .55; stroke-dasharray: 6 8; animation: dsFlow 1.6s linear infinite; }
.ds-line--me { stroke: var(--c-peach); stroke-opacity: .5; }
@keyframes dsFlow { to { stroke-dashoffset: -28; } }
.ds-dot { fill: var(--c-peach); filter: drop-shadow(0 0 4px rgba(251,187,173,.9)); }
.ds-node rect { fill: #2f3547; stroke: rgba(251,187,173,0.22); stroke-width: 1.5; }
.ds-node--src rect { fill: #3a2f3d; stroke: var(--c-rose); stroke-width: 2.5; filter: drop-shadow(0 0 18px rgba(238,134,149,.35)); }
.ds-node--out rect { stroke: color-mix(in srgb, var(--c) 55%, transparent); }
.ds-pip { fill: var(--c); }
.ds-node text { text-anchor: middle; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.ds-big { font-size: 21px; font-weight: 700; fill: var(--c-header); }
.ds-big--src { font-family: "Bitter", Georgia, serif !important; font-size: 23px; }
.ds-kicker { font: 600 12px ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; fill: var(--c-rose); }
.ds-small { font-size: 13.5px; fill: rgba(251,187,173,0.7); }
.ds-out { text-anchor: start !important; font-size: 16px; font-weight: 600; fill: var(--c-peach); }
.ds-ripple rect { fill: rgba(238,134,149,0.14); stroke: rgba(238,134,149,0.5); stroke-dasharray: 3 4; }
.ds-ripple text { text-anchor: middle; font: 600 12.5px system-ui, sans-serif; fill: var(--c-rose); }
.ds-games { margin-top: 28px; padding-top: 20px; border-top: 1px dashed rgba(251,187,173,0.18); }
.ds-games-head { font-size: var(--fs-small); color: var(--text-secondary); margin-bottom: 14px; }
.ds-genres { list-style: none; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.ds-genres li { display: grid; gap: 8px; justify-items: center; text-align: center; grid-template-rows: auto 1fr auto; align-items: start; }
.ds-chips { display: grid; grid-template-columns: repeat(3, 10px); gap: 4px; justify-content: center; }
.ds-chips i { width: 10px; height: 10px; border-radius: 3px; background: var(--c-rose); opacity: .35; animation: dsPing 4s ease-in-out infinite; animation-delay: calc(var(--d) * .3s); }
.ds-chips i:nth-child(2n) { animation-delay: calc(var(--d) * .3s + .5s); }
.ds-chips i:nth-child(3n) { animation-delay: calc(var(--d) * .3s + 1s); }
@keyframes dsPing { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }
.ds-genre { font-size: 0.72rem; line-height: 1.25; color: var(--text-muted); }
@media (max-width: 900px) { .ds-genres { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 16px; } }
.ds-text { margin-top: 24px; font-size: var(--fs-body-lg); color: var(--text-primary); max-width: 62ch; line-height: 1.5; padding-left: 16px; border-left: 3px solid var(--c-rose); }
@media (prefers-reduced-motion: reduce) { .ds-line, .ds-chips i { animation: none; } .ds-chips i { opacity: .7; } }

/* Genre icons over the game counts */
.ds-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(238,134,149,0.12); border: 1px solid rgba(238,134,149,0.28);
  animation: dsBob 4s ease-in-out infinite; animation-delay: calc(var(--d) * .3s); }
.ds-icon img { width: 30px; height: 30px; }
.ds-genres li:hover .ds-icon { background: rgba(238,134,149,0.24); border-color: var(--c-rose); }
.ds-genres .ds-chips { grid-template-columns: repeat(5, 6px); gap: 3px; }
.ds-genres .ds-chips i { width: 6px; height: 6px; border-radius: 2px; }
.ds-genre { color: var(--text-secondary); font-size: 0.75rem; }
@keyframes dsBob { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-3px); } }
@media (max-width: 900px) { .ds-icon { width: 44px; height: 44px; } .ds-icon img { width: 26px; height: 26px; } }
@media (prefers-reduced-motion: reduce) { .ds-icon { animation: none; } }

/* Ripple note under the source of truth: no dotted outline */
.ds-ripple rect { stroke: none; }

/* Gallery of landscape screens (wireframes, docs): show the whole image */
.gallery-grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery-grid--wide .gallery-media { aspect-ratio: 5 / 4; }
.gallery-grid--wide .gallery-media img { object-fit: contain; object-position: center; }

/* Gallery subsections */
.gallery-group { margin-top: 36px; }
.gallery-group:first-of-type { margin-top: 28px; }
.gallery-group-title { font-family: "Bitter", Georgia, serif; font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--c-header); }
.gallery-group .cs-p { margin-top: 6px; }
.gallery-group .gallery-grid { margin-top: 16px; }
