/* Palette, outlines and sticker shadows follow the game's overlay (src/ui/style.css in the game repo). */
:root {
  --ink: #2a2630;
  --ink-soft: #5b5361;
  --cream: #fbf5ea;
  --cream-2: #f4ead8;
  --cream-3: #e9dbc2;
  --line: #d9c9ad;
  --page: #efe7d9;
  --blue: #4f8cff;
  --yellow: #ffb020;
  --bw: 3px;
  --pop: 0 5px 0 var(--ink);
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; }
p { margin: 0; }
.wrap { padding-inline: var(--gutter); max-width: 1440px; margin-inline: auto; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 28px; }
.muted { color: var(--ink-soft); }

/* Buttons: the game's .btn, scaled up. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.7em 1.3em;
  min-height: 44px;
  border: var(--bw) solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  box-shadow: 0 5px 0 var(--ink);
  font: inherit; font-weight: 700; font-size: 18px;
  text-decoration: none; color: var(--ink);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms;
  white-space: nowrap;
}
.btn:hover { background: #fff8ec; transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--yellow); }
.btn.primary:hover { background: #ffc24d; }
.btn.big { font-size: clamp(19px, 2vw, 23px); padding: 0.75em 1.4em; border-width: 4px; box-shadow: 0 6px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Cards: the game's .card and .modal. */
.card {
  background: var(--cream);
  border: var(--bw) solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--pop);
  overflow: hidden;
}

/* Hero: the office fills the screen, the pitch sits in a game modal. */
.hero { position: relative; min-height: min(92vh, 900px); display: flex; align-items: flex-end; border-bottom: 4px solid var(--ink); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-nav { position: absolute; top: 20px; left: var(--gutter); right: var(--gutter); display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-nav .btn { font-size: 16px; padding: 0.5em 1em; box-shadow: 0 4px 0 var(--ink); }
.modal {
  position: relative;
  margin: 120px var(--gutter) clamp(24px, 6vh, 72px);
  width: min(620px, 100%);
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: 0 7px 0 var(--ink);
  overflow: hidden;
}
.mhead { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--yellow); border-bottom: 4px solid var(--ink); font-weight: 700; }
.mtag { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--ink); color: var(--cream); border-radius: 999px; padding: 3px 12px; }
.mbody { padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 20px; }
.mbody .logo { width: min(440px, 100%); }
.mbody .pitch { font-size: clamp(18px, 1.8vw, 21px); }
.mbody .tagline { margin: 0.2em 0 0.4em; font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; color: var(--ink); }
.cta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cta-note { font-size: 15px; color: var(--ink-soft); max-width: 16em; }

/* Trailer */
.trailer { background: var(--ink); color: var(--cream); }
.trailer h2 { color: var(--cream); text-align: center; }
.player { position: relative; max-width: 1120px; margin: 0 auto; border: 4px solid var(--cream); border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ink); }
.player img, .player video { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; left: 50%; top: 64%; transform: translate(-50%, -50%);
  width: clamp(72px, 9vw, 112px); aspect-ratio: 1; border-radius: 50%;
  background: var(--yellow); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.play-btn svg { width: 45%; height: 45%; margin-left: 6%; }
.play-btn:hover { background: #ffc24d; }
.play-btn:focus-visible { outline: 4px solid var(--blue); outline-offset: 4px; }
.trailer .line { text-align: center; margin-top: 24px; font-size: 19px; color: var(--cream-3); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.feature { display: flex; flex-direction: column; }
.feature img, .feature .ph { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-bottom: var(--bw) solid var(--ink); }
/* A still whose subject starts at its left edge keeps that edge when the card crops it. */
.feature img.pin-left { object-position: left center; }
.feature .text { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.feature h3 { font-size: 24px; }
.feature p { font-size: 17px; color: var(--ink-soft); }
/* Muted loops: a poster until on screen, then a small pause button in the corner. */
.loop-box { position: relative; }
.loop { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--cream-3); }
.feature .loop-box { border-bottom: var(--bw) solid var(--ink); }
.strip .loop-box .loop { aspect-ratio: 16 / 9; border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: var(--pop); }
.loop-toggle {
  position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--cream); box-shadow: 0 3px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.85;
}
.loop-toggle[hidden] { display: none; }
.hero-bg.loop { aspect-ratio: auto; height: 100%; }
.hero > .loop-toggle { right: var(--gutter); bottom: 20px; z-index: 1; }
.loop-toggle:hover { opacity: 1; }
.loop-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; opacity: 1; }
.loop-toggle svg { width: 20px; height: 20px; }
.ph { background: var(--cream-3); display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--ink-soft); font-size: 15px; }

/* Screenshot strip: scrolls sideways inside itself, never the page. */
.strip { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; scrollbar-width: thin; }
.strip figure { margin: 0; flex: 0 0 min(520px, 82vw); scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: var(--pop); }
.strip figcaption { font-size: 16px; font-weight: 600; }
/* Strips with their own arrows, swipe and keys hide the native scrollbar. */
.strip[data-controlled] { scrollbar-width: none; }
.strip[data-controlled]::-webkit-scrollbar { display: none; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.gallery-controls[hidden] { display: none; }
.gallery-arrows { margin-left: auto; }
/* Read by screen readers, not shown: the arrows explain themselves on screen. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gallery-arrows { display: flex; gap: 12px; }
.gallery-arrow { width: 48px; height: 48px; padding: 0; font-size: 26px; }
.gallery-arrow[aria-disabled="true"] { opacity: 0.45; cursor: default; transform: none; box-shadow: var(--pop); background: var(--cream); }
.strip { overscroll-behavior-x: contain; }
.strip:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 4px; }

/* Eras */
.eras { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.era { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.era .emblem { width: 88px; height: 88px; border-radius: 50%; background: var(--cream-2); border: var(--bw) solid var(--ink); box-shadow: 0 4px 0 var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.era .emblem img { width: 54px; height: 54px; }
.era .when { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.era h3 { font-size: 21px; }
.era p { font-size: 15px; color: var(--ink-soft); }
.era-lead { max-width: 62ch; margin: 0 0 24px; font-size: 18px; color: var(--ink-soft); }
/* The early starts' offices, two to a row (one on a phone) and the wardrobe across both. */
.era-stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 36px; }
.era-stills figure { margin: 0; overflow: hidden; }
.era-stills img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.era-stills figcaption { padding: 12px 18px 16px; font-size: 16px; color: var(--ink-soft); }
.era-stills figcaption strong { color: var(--ink); }
.era-still-wide { grid-column: 1 / -1; }
.era-still-wide img { max-height: 520px; }
.era-sub { margin: 0 0 18px; font-size: 22px; }
@media (max-width: 700px) { .era-stills { grid-template-columns: 1fr; } .era-lead { font-size: 17px; } }
/* The growth timelapse above the eras, and the eras as a timeline under it. */
.era-hero { margin: 0 0 28px; overflow: hidden; }
/* The loop's headcount label sits in its top-left corner: crop mostly from the bottom. */
.era-hero .loop-box video, .era-hero .loop-box img { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 620px; object-fit: cover; object-position: 50% 8%; }
.era-hero figcaption { padding: 14px 22px 18px; font-size: 17px; color: var(--ink-soft); }
.eras.timeline { position: relative; }
.eras.timeline::before { content: ""; position: absolute; left: 66px; right: 66px; top: 66px; height: 6px; border-radius: 3px; background: var(--ink); opacity: 0.18; z-index: 0; }
.eras.timeline .era { position: relative; z-index: 1; }

/* Changelog: one section per day, one card per change. */
.cl-top { border-bottom: 4px solid var(--ink); background: var(--cream); }
.cl-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.cl-home img { width: 150px; }
.cl-bar nav { display: flex; gap: 10px; }
.cl-bar .btn { font-size: 16px; padding: 0.5em 1em; box-shadow: 0 4px 0 var(--ink); }
.cl-main { padding-block: clamp(32px, 5vw, 56px) 72px; max-width: 920px; }
.cl-main h1 { font-size: clamp(36px, 6vw, 56px); }
.cl-lede { margin-top: 10px; font-size: 20px; color: var(--ink-soft); }
.cl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.cl-chip { font: inherit; font-weight: 600; font-size: 15px; min-height: 40px; padding: 0.3em 1em; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); color: var(--ink); cursor: pointer; }
.cl-chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.cl-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.cl-day { margin-top: 44px; scroll-margin-top: 16px; }
.cl-dayhead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; border-bottom: 3px solid var(--line); padding-bottom: 12px; }
.cl-date { font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; }
.cl-date:hover { text-decoration: underline; }
.cl-dayhead h2 { font-size: clamp(24px, 3.4vw, 32px); text-wrap: balance; }
.cl-item { display: flex; flex-direction: column; margin-bottom: 22px; }
.cl-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.cl-body h3 { font-size: 22px; text-wrap: balance; }
.cl-body p { font-size: 17px; max-width: 65ch; }
.cl-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; }
.cl-body .cl-refs { font-size: 14px; color: var(--ink-soft); }
.cl-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 0 22px 22px; }
.cl-media { align-items: start; }
.cl-media figure { margin: 0; min-width: 0; }
.cl-media figure:only-child { max-width: 560px; }
.cl-media img, .cl-media video { width: 100%; display: block; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream-2); }
.cl-media img { cursor: zoom-in; }
.cl-media figcaption { font-size: 15px; color: var(--ink-soft); margin-top: 6px; }
.cl-zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.cl-zoom::backdrop { background: rgba(0, 0, 0, 0.8); }
.cl-zoom img { max-width: 96vw; max-height: 94vh; display: block; border-radius: 10px; }

/* Press */
.press { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.quote { margin: 0; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.quote cite { font-style: normal; font-weight: 700; font-size: 17px; }
.quote p { font-size: 18px; }

/* Closing call to action */
.closer { background: var(--blue); color: var(--cream); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); padding: clamp(28px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.closer h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); text-shadow: 0 3px 0 var(--ink); }

footer { border-top: 3px solid var(--line); padding-block: 32px 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; font-size: 16px; color: var(--ink-soft); }
footer strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
footer a { color: var(--ink); }

/* On wide screens the office sits right of the card. */
@media (min-width: 901px) {
  .hero-bg { transform-origin: left center; transform: scale(1.25); }
  /* A card alone on the last row spans it, media beside the text. */
  .features .feature:last-child:nth-child(3n+1) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
  .features .feature:last-child:nth-child(3n+1) > .loop-box,
  .features .feature:last-child:nth-child(3n+1) > img { border-bottom: 0; border-right: var(--bw) solid var(--ink); align-self: stretch; }
  .features .feature:last-child:nth-child(3n+1) .text { padding: 28px 32px; }
}
@media (max-width: 1100px) {
  .eras { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eras.timeline::before { display: none; }
}
@media (max-width: 900px) {
  .features, .press, footer { grid-template-columns: minmax(0, 1fr); }
  .eras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-bg { position: relative; height: 56vw; }
  .hero-bg.loop { height: 56vw; }
  .hero > .loop-toggle { top: 12px; bottom: auto; }
  .hero-nav { position: absolute; }
  .modal { margin: -40px var(--gutter) 28px; width: auto; }
}
@media (max-width: 520px) {
  .eras { grid-template-columns: minmax(0, 1fr); }
  .hero-nav { display: none; }
  .btn.big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
/* Bold Fredoka kerns the space before a V, W or Y almost to nothing ("The Vergence"). */
.quote cite { word-spacing: 0.14em; }
