/* Rance9 — site styles. Fonts are self-hosted; see assets/fonts for licences. */

@font-face {
  font-family: "Source Serif 4 Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/SourceSerif4Display-Semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SourceSerif4-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SourceCodePro-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2");
}

:root {
  --paper: #F7E2CA;
  --ink: #221A15;
  --ink-brown: #3E2D25;
  --rule-dark: #2B2D26;
  --teal: #1D6564;
  --teal-rule: #4A7A74;
  --card: #181D24;
  --card-text: #FFFFFF;
  --card-soft: #EEEFF1;
  --card-rule: rgba(255, 255, 255, 0.82);
  --studio-red: #D63B32;
  --label-bg: #F7E5D0;
  --focus: #1D6564;
  --glow: #FFF4D6;
  --tbm-gold: #F5A623;
  --he-silver: #C3C9D2;

  --serif-display: "Source Serif 4 Display", "Source Serif 4", Georgia, "Times New Roman", serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Source Code Pro", ui-monospace, Consolas, "Courier New", monospace;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --grotesk: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --georgia: Georgia, "Source Serif 4", "Times New Roman", serif;

  --max: 1120px;
  --gutter: clamp(16px, 5vw, 40px);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper) url("../images/paper.webp") repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -200px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 400;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; outline-color: var(--paper); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header ---------------------------------------------------------------- */

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.35rem;
  position: relative;
}
.header-inner::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  border-bottom: 2px solid var(--rule-dark);
}

.wordmark {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 1.6rem + 1.6vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink-brown);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(0.25rem, 1.2vw, 1rem);
  margin-right: -0.6rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.site-nav a:hover { text-decoration-line: underline; }

/* Intro ----------------------------------------------------------------- */

.intro {
  padding-top: clamp(1.75rem, 1rem + 2.5vw, 2.75rem);
  text-align: center;
}

.intro h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 1.15rem + 4.15vw, 4.375rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  color: var(--ink-brown);
  max-width: 11.4em;
  margin-inline: auto;
  text-wrap: pretty;
}

.lede {
  margin-top: clamp(0.75rem, 0.5rem + 0.8vw, 1.15rem);
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6875rem);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.hero {
  position: relative;
  margin-top: clamp(1.5rem, 1rem + 1.8vw, 2.25rem);
}
.hero img {
  width: 100%;
  height: auto;
}

/* Lights out: the lamp darkens the room; the TV keeps glowing and
   glow-in-the-dark stars (and a hint) appear on the wall. */
.room-dark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.hero.is-dark .room-dark { opacity: 1; }
.room-dark .rd-glow { fill: #DDFFB8; }

/* The glow-in-the-dark hint under the picture: the keyboard code on
   computers, the swipe version on touch screens. HTML (not SVG) so it never
   shrinks below a readable size on phones. */
.rd-hint {
  position: absolute;
  left: 48%;
  top: 28%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: clamp(9px, 1.05vw, 13px);
  line-height: 1.2;
  letter-spacing: 0.12em;
  color: #DDFFB8;
  text-shadow: 0 0 4px rgba(190, 255, 150, 0.9), 0 0 10px rgba(160, 255, 120, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.hero.is-dark .rd-hint { opacity: 1; }

/* In the dark, the lamp's switch glows so it is obvious how to turn the
   lights back on (the whole lamp stays clickable). Socket at (303, 258). */
.rd-switch {
  position: absolute;
  left: 23.672%;
  top: 35.833%;
  width: clamp(7px, 0.9%, 12px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #FFE7A3;
  box-shadow: 0 0 4px 2px rgba(255, 214, 120, 0.95), 0 0 14px 6px rgba(255, 196, 80, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.hero.is-dark .rd-switch {
  opacity: 1;
  animation: rd-switch-pulse 2.4s ease-in-out infinite;
}
@keyframes rd-switch-pulse {
  50% { box-shadow: 0 0 6px 3px rgba(255, 214, 120, 1), 0 0 24px 11px rgba(255, 196, 80, 0.6); }
}
.rd-hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .rd-hint-keys { display: none; }
  .rd-hint-touch { display: inline; }
  /* With the lights out, swipes on the picture enter the code instead of scrolling. */
  .hero.is-dark { touch-action: none; }
}

/* Cartridge Catch: the TV screen zooms up into a small game. Position and
   size are set by the script (custom properties) so the screen grows out of
   the TV and stays on the page. */
.tv-game {
  position: absolute;
  z-index: 5;
  left: var(--game-x, 62.656%);
  top: var(--game-y, 17.917%);
  width: var(--game-w, 13.359%);
  height: var(--game-h, 19.306%);
  border-radius: 6% / 7.5%;
  overflow: hidden;
  background: #181D24;
  box-shadow: 0 0 0 3px #2B2D26, 0 12px 32px rgba(0, 0, 0, 0.45);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease;
}
.tv-game:focus { outline: none; }
.hero.is-dark .tv-game { box-shadow: 0 0 0 3px #2B2D26, 0 0 48px rgba(143, 184, 255, 0.45); }
.tv-game-screen {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: pointer;
}
/* Keep the mouse pointer visible while playing (the console follows it). */
.tv-game[data-state="play"] .tv-game-screen { cursor: default; }
.tv-game-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: rgba(24, 29, 36, 0.85);
  color: var(--paper);
  font: 700 1.25rem/1 var(--sans);
  cursor: pointer;
}
.tv-game-close:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }

/* Behind the game screen and the hunt's cards: the rest of the page is
   blurred and dimmed so they stand apart from the project cards below. */
.play-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: rgba(34, 26, 21, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: default;
}

/* Dust Bunny Hunt (secret): the whole picture is the playfield. */
.bunny-hunt {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.bunny-hunt:focus { outline: none; }
.hunt-hud {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.25em;
  margin: 0;
  padding: 0.6em 1em;
  border-radius: 8px;
  background: rgba(24, 29, 36, 0.88);
  color: var(--paper);
  font: 8px/1 var(--pixel);
  white-space: nowrap;
}
.hunt-hud b { color: var(--tbm-gold); font-weight: 400; }
@media (min-width: 560px) { .hunt-hud { font-size: 16px; } }
.hunt-field { position: absolute; inset: 0; }
.hunt-bunny {
  position: absolute;
  width: clamp(30px, 4.4%, 56px);
  padding: 10px; /* a 44 px+ tap target even when the bunny is small */
  box-sizing: content-box;
  border: 0;
  border-radius: 8px;
  background: none;
  transform: translate(-50%, calc(-100% + 10px));
  cursor: pointer;
}
.hunt-bunny svg {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 100%;
  animation: hunt-pop 0.18s ease-out, hunt-wiggle 0.5s ease-in-out 0.18s infinite alternate;
}
.hunt-bunny.is-leaving svg { animation: hunt-hide 0.15s ease-in forwards; }
.hunt-bunny:focus-visible { outline: 3px solid var(--paper); outline-offset: 0; }
.hunt-poof {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.hunt-poof i {
  position: absolute;
  left: -2px;
  top: -2px;
  width: 4px;
  height: 4px;
  background: #A49F99;
  animation: hunt-puff 0.5s ease-out forwards;
}
.hunt-poof b {
  position: absolute;
  left: 0;
  top: -1.5em;
  transform: translateX(-50%);
  color: var(--tbm-gold);
  font: 400 16px/1 var(--pixel);
  text-shadow: 0 2px 0 #181D24;
  animation: hunt-rise 0.6s ease-out forwards;
}
.hunt-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(26rem, calc(100vw - 32px));
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: 14px;
  background: var(--card);
  color: var(--card-text);
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}
.hunt-kicker { font: 8px/1.5 var(--pixel); letter-spacing: 0.1em; color: var(--tbm-gold); }
.hunt-title { margin-top: 0.6rem; font: 16px/1.4 var(--pixel); color: var(--paper); }
.hunt-text { margin-top: 0.75rem; font-size: 1.0625rem; line-height: 1.45; color: var(--card-soft); }
.hunt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1rem;
  padding: 0.3rem 2.2rem;
  border: 2px solid var(--card-text);
  border-radius: 999px;
  background: transparent;
  color: var(--card-text);
  font: 400 1.1875rem/1.2 var(--sans);
  cursor: pointer;
}
.hunt-button:hover { background: var(--card-text); color: var(--card); }
.hunt-button:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
@keyframes hunt-pop { from { transform: scale(0.2, 0); } to { transform: none; } }
@keyframes hunt-wiggle { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes hunt-hide { to { transform: scale(0.2, 0); } }
@keyframes hunt-puff { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes hunt-rise { to { transform: translate(-50%, -1.2em); opacity: 0; } }

/* Memory Lane (the book on the middle shelf): an open book of cards. */
.memory {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(30rem, calc(100vw - 32px));
  transform: translate(-50%, -50%);
}
.memory:focus { outline: none; }
.memory-book {
  position: relative;
  padding: 0.9rem 1rem 1.1rem;
  border-radius: 10px;
  background: #FBF1E3;
  color: var(--ink);
  box-shadow: 0 0 0 4px #3E2D25, 0 18px 48px rgba(0, 0, 0, 0.4);
}
.memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 2.5rem 0.8rem 0;
  font: 8px/1.4 var(--pixel);
  color: var(--ink-brown);
}
.memory-title { font-size: 16px; }
.memory-moves b { color: var(--teal); font-weight: 400; }
@media (max-width: 419px) { .memory-title { font-size: 8px; } }
.memory-pages {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.memory-pages::before { /* The book's spine. */
  content: "";
  position: absolute;
  top: -0.3rem;
  bottom: -0.3rem;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #D9C4A8;
  box-shadow: 0 0 10px 4px rgba(120, 90, 60, 0.18);
}
.memory-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.memory-card {
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  perspective: 600px;
  cursor: pointer;
}
.memory-card.is-matched { cursor: default; }
.memory-card-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}
.memory-card.is-up .memory-card-inner,
.memory-card.is-matched .memory-card-inner { transform: rotateY(180deg); }
.memory-card-back,
.memory-card-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.memory-card-back {
  background: #2B6E69 repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 6px, rgba(255, 255, 255, 0) 6px 12px);
  box-shadow: inset 0 0 0 3px #1D4F4B;
}
.memory-card-face {
  transform: rotateY(180deg);
  background: #FFFFFF;
  box-shadow: inset 0 0 0 2px #2B2D26;
}
.memory-card-face svg { display: block; width: 64%; height: auto; }
.memory-card.is-matched .memory-card-face { box-shadow: inset 0 0 0 3px var(--tbm-gold); }
.memory-card:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.memory-done {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: 10px;
  background: rgba(24, 29, 36, 0.92);
  color: var(--card-text);
  text-align: center;
}
.memory .tv-game-close { top: 8px; right: 8px; }

/* Product pop-up from the yearbook and the console: the product's own look,
   a short blurb, its release, and a pill that opens the site in a new tab. */
.product-modal {
  border: 0;
  padding: 0;
  border-radius: 16px;
  width: min(25rem, calc(100vw - 2 * var(--gutter)));
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.product-modal::backdrop {
  background: rgba(34, 26, 21, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: default;
}
.product-modal-body {
  position: relative;
  padding: 2.25rem 1.5rem 1.6rem;
  text-align: center;
}
.product-modal .product-name { font-size: 24px; }
.product-modal .product-name--he {
  font-family: var(--georgia);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0.06em;
}
.product-modal .product-tagline { margin-top: 0.75rem; }
.product-modal-blurb { margin-top: 0.6rem; font-size: 1.125rem; line-height: 1.45; color: var(--card-soft); }
.product-modal .product-release { margin-top: 0.9rem; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: 0.55rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
}
.pill::after { content: "↗"; font-family: var(--sans); font-size: 1.1em; }
.pill:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.product-modal .pill { display: flex; width: fit-content; margin-inline: auto; }
.product-modal[data-theme="ccs"] .pill {
  background: var(--studio-red);
  color: #FFFFFF;
  font: 400 16px/1 var(--pixel);
  box-shadow: 0 4px 0 #8E1F19;
}
.product-modal[data-theme="ccs"] .pill:active { transform: translateY(2px); box-shadow: 0 2px 0 #8E1F19; }
.product-modal[data-theme="he"] .pill {
  background: var(--he-silver);
  color: #0B0D10;
  font: 700 1.1875rem/1 var(--georgia);
  letter-spacing: 0.04em;
}
.product-modal .pill:hover { filter: brightness(1.08); }
.product-modal .tv-game-close { top: 10px; right: 10px; }

/* A quiet hint, caption-style, that the picture is worth exploring. */
.hero-caption {
  margin-top: 0.7rem;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #5B4A3F;
  text-wrap: balance;
}
.hero-caption-icon {
  display: inline-block;
  margin-right: 0.45em;
  vertical-align: -0.02em;
  color: var(--teal);
}

/* Illustration hotspots: clickable objects drawn over the hero image in the
   image's own 1280 x 720 coordinate space, so they scale with it. */
.hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}
.hotspot { cursor: pointer; }
.hotspot:focus-visible { outline: none; }
.hotspot use {
  fill: var(--glow);
  fill-opacity: 0;
  stroke: none;
}
.hotspot .hs-shape { pointer-events: fill; }
.hotspot .hs-halo { fill: none; pointer-events: none; }
/* A wider, invisible tap area for thin objects such as a book spine. */
.hotspot .hs-hit { pointer-events: fill; }

@media (hover: hover) {
  /* Overlay blending warms the object up like a light coming on while keeping its detail. */
  .hotspot:hover .hs-shape {
    fill-opacity: 0.55;
    mix-blend-mode: overlay;
    stroke: var(--glow);
    stroke-opacity: 0.9;
    stroke-width: 1.5px;
    filter: url(#hotspot-glow);
    animation: hotspot-flicker 0.6s linear;
  }
}

/* Keyboard focus: a dark ring inside a light ring, visible on any part of the picture. */
.hotspot:focus-visible .hs-halo { stroke: var(--glow); stroke-width: 7px; }
.hotspot:focus-visible .hs-shape {
  fill-opacity: 0.22;
  mix-blend-mode: normal;
  filter: none;
  stroke: var(--ink);
  stroke-opacity: 1;
  stroke-width: 3px;
}

/* TV "commercial": shown on the screen for a few seconds after the TV is
   chosen. The box matches the screen glass at (802, 129)-(973, 268). */
.tv-ad {
  position: absolute;
  left: 62.656%;
  top: 17.917%;
  width: 13.359%;
  height: 19.306%;
  border-radius: 8.2% / 10.1%;
  overflow: hidden;
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #F1F5F9;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
    radial-gradient(ellipse at 50% 45%, #1E2235 0%, #0A0C12 75%);
  box-shadow: inset 0 0 clamp(3px, 1vw, 14px) rgba(0, 0, 0, 0.75);
  pointer-events: none;
  transform-origin: 50% 50%;
  animation: tv-ad 4.5s linear both;
}
/* On smaller screens the TV is tiny, so the commercial zooms out from it
   (staying inside the picture) to keep the text readable. */
@media (max-width: 1023px) { .tv-ad { transform: scale(1.6); } }
@media (max-width: 559px) { .tv-ad { transform: scale(2.6); } }
/* Sizes are relative to the screen box (container query units). */
.tv-ad-title {
  max-width: 90%;
  font-family: var(--grotesk);
  font-weight: 700;
  font-size: 12cqw;
  line-height: 1.05;
  color: var(--tbm-gold);
  text-shadow: 0 0 0.35em rgba(245, 166, 35, 0.45);
}
.tv-ad-release {
  max-width: 90%;
  margin-top: 5cqh;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 9cqw;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
/* Switch on with a flash, hold, then fade back to the picture. */
@keyframes tv-ad {
  0% { opacity: 0; filter: brightness(3); }
  4% { opacity: 1; filter: brightness(2.2); }
  8% { filter: brightness(1); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* A brief flicker, like an old bulb or tube warming up. */
@keyframes hotspot-flicker {
  0% { opacity: 0; }
  15% { opacity: 1; }
  25% { opacity: 0.25; }
  40% { opacity: 0.9; }
  55% { opacity: 0.45; }
  100% { opacity: 1; }
}

/* Sections -------------------------------------------------------------- */

.section {
  border-top: 2px solid var(--teal-rule);
  padding-top: 1.35rem;
  padding-bottom: 2.25rem;
}
.intro + .section {
  margin-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.25rem);
}

.section-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.2;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 1rem;
}

.body-copy {
  font-size: 1.25rem;
  line-height: 1.6;
}

.contact-line { font-size: 1.375rem; line-height: 1.3; }
.email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: rgba(29, 101, 100, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration-color: currentColor; }

/* Product card ---------------------------------------------------------- */

.product-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: var(--card);
  color: var(--card-text);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 0.25rem;
}
.product-card + .product-card { margin-top: 1.25rem; }

.product-id {
  text-align: center;
  padding-right: 2rem;
}

.product-name {
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 32px; /* Press Start 2P is drawn on an 8 px grid: keep multiples of 8. */
  line-height: 1.15;
  letter-spacing: 0;
}
.product-name span { display: block; }
.product-name-top { color: var(--card-text); }
.product-name-bottom {
  color: var(--studio-red);
  margin-top: 0.1em;
  /* One font pixel (1/8 em) of tracking keeps the grid crisp; the negative
     margin cancels the trailing space so the word stays centred. */
  letter-spacing: 0.125em;
  margin-right: -0.125em;
}

/* Each product name follows its own brand: The Big Move (Space Grotesk, gold),
   Hallway Echoes (Georgia, silver). */
.product-card .product-name--tbm {
  font-family: var(--grotesk);
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: 0;
}
.product-name--tbm .product-name-bottom {
  color: var(--tbm-gold);
  letter-spacing: 0;
  margin-right: 0;
}
.product-card .product-name--he {
  font-family: var(--georgia);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: 0.06em;
}
.product-name--he span { margin-right: -0.06em; }
.product-name--he .product-name-bottom {
  color: var(--he-silver);
  letter-spacing: 0.06em;
}

.product-tagline {
  margin-top: 0.6rem;
  font-size: 1.3125rem;
  line-height: 1.3;
  color: var(--card-text);
}

.product-release {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.3rem 1.6rem;
  background: var(--label-bg);
  color: #111111;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.product-info {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-left: 1px solid var(--card-rule);
  padding: 0.5rem 0 0.5rem 2.5rem;
}

.product-description {
  font-size: 1.3125rem;
  line-height: 1.45;
  color: var(--card-soft);
  max-width: 20em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.25rem;
  padding: 0.3rem 2.4rem;
  border: 2px solid var(--card-text);
  border-radius: 7px;
  color: var(--card-text);
  font-size: 1.3125rem;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover {
  background: var(--card-text);
  color: var(--card);
}
.product-card :focus-visible { outline-color: var(--paper); }

/* Footer ---------------------------------------------------------------- */

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  padding-top: 0.6rem;
  padding-bottom: 2rem;
  position: relative;
}
.footer-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 2px solid var(--teal-rule);
}

.copyright { font-size: 1.125rem; }

.stamp-wrap { position: relative; }
.stamp {
  width: 4.25rem;
  height: 4.25rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  line-height: 1.1;
}

.footer-link { justify-self: end; font-size: 1.125rem; }
.footer-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.25rem;
  margin-right: -0.25rem;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Privacy page ---------------------------------------------------------- */

.page-title {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink-brown);
}
.privacy {
  padding-top: clamp(1.75rem, 1rem + 2.5vw, 2.75rem);
  padding-bottom: 2.25rem;
  max-width: 44rem;
}
.privacy .updated {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #4A3F38;
}
.privacy h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.privacy p { font-size: 1.1875rem; line-height: 1.6; }
.privacy p + p { margin-top: 0.85rem; }
.privacy a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
.privacy .home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1023px) {
  .product-name { font-size: 24px; }
  .product-card .product-name--tbm { font-size: 2.25rem; }
  .product-card .product-name--he { font-size: 2rem; }
  .product-id { padding-right: 1.5rem; }
  .product-info { padding-left: 1.75rem; }
  .product-card { padding: 1.5rem; }
}

@media (max-width: 679px) {
  .product-card {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem 1.75rem;
  }
  .product-id { padding-right: 0; }
  .product-info {
    align-items: center;
    text-align: center;
    border-left: 0;
    border-top: 1px solid var(--card-rule);
    margin-top: 1.4rem;
    padding: 1.4rem 0 0;
  }
  .product-description { font-size: 1.1875rem; }
  .product-release { padding-inline: 1rem; font-size: 1rem; }
  .button { margin-top: 1.1rem; }
  .body-copy { font-size: 1.1875rem; }
}

@media (max-width: 559px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.6rem;
    padding-bottom: 0.25rem;
  }
  .site-nav ul { margin-left: -0.6rem; margin-right: 0; }
  .site-nav a { font-size: 1.1875rem; }

  .footer-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "stamp stamp"
      "copy link";
    row-gap: 0.5rem;
    padding-top: 1.1rem;
  }
  .stamp-wrap { grid-area: stamp; justify-self: center; }
  .copyright { grid-area: copy; }
  .footer-link { grid-area: link; }
}

@media (max-width: 379px) {
  .product-card { padding-inline: 0.75rem; }
}

@media (max-width: 359px) {
  .copyright, .footer-link { font-size: 1rem; }
  /* "CLASSIC CART" needs 12 x 24 px; step down one 8 px grid size to stay on one line. */
  .product-name { font-size: 16px; }
  .product-card .product-name--tbm { font-size: 2rem; }
  .product-card .product-name--he { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
