/* ==========================================================================
   Ink Bounce — Website stylesheet
   Flat, dark, arcade. Neutral near-black panels with a single green action
   accent; cyan is reserved for the glowing-ink art/atmosphere only. No
   gradients or glows on UI. Values from the game's real in-product palette.
   Dark theme only.
   ========================================================================== */

/* ---------- Design tokens ------------------------------------------------- */
:root {
  /* Backgrounds (flat neutral dark) */
  --bg:          #080A0D;   /* near-black, main page bg */
  --surface:     #17191E;   /* section fill */
  --panel:       #0D0D0E;   /* card fill */
  --panel-alt:   #17191E;   /* alternating sections */
  --overlay:     #0B0C0E;   /* footer */
  --elevated:    #0E1013;   /* elevated/status cards */

  /* Accents */
  --green:        #29C76B;  /* primary action / links / CTAs */
  --green-bright: #38E080;  /* action hover/active */
  --cyan:         #08D7FF;  /* ink art / atmosphere ONLY — never buttons/links */
  --cyan-glow:    #22E6FF;  /* ink-art highlight variant */
  --gold:         #FFDB59;  /* rewards, coins, badges */
  --gold-deep:    #D4A820;  /* gold detail/borders */
  --danger:       #FF6B42;  /* warnings / hazard only */

  /* Text (neutral ramp) */
  --text:        #F5F7FA;   /* headings / key text */
  --text-muted:  #B8BFC7;   /* body */
  --text-dim:    #8C949E;   /* captions / muted glyphs */

  /* Hairline borders */
  --border:       #292D33;                 /* the one subtle 1px hairline */
  --border-soft:  rgba(255, 255, 255, 0.06);

  /* Radii (soft, consistent) */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-pill: 999px;   /* small tags/pills only, not buttons */

  /* Spacing scale */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 6.5rem;

  /* Layout */
  --container: 1120px;

  /* Fonts */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Rajdhani", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Effects (neutral dark depth only — no colored glows) */
  --glow-soft: 0 10px 26px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.45);

  /* Z layers */
  --z-nav: 100;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 1.125rem;      /* 18px */
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Subtle dark "fog" field: one faint cyan atmosphere glow + a neutral vignette.
   Rendered as a composited fixed layer (instead of background-attachment:fixed)
   to avoid repaint flicker on navigation and scroll. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 12% -6%, rgba(8, 215, 255, 0.05), transparent 55%),
    radial-gradient(1200px 900px at 50% 120%, rgba(0, 0, 0, 0.55), transparent 60%);
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--green-bright); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Keyboard focus */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Typography ---------------------------------------------------- */
h1, h2, h3, h4 { color: var(--text); margin: 0 0 0.5em; line-height: 1.05; }

.display,
h1.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1.5rem;
  color: var(--text);
}

p { margin: 0 0 1rem; }
strong { color: var(--text); font-weight: 600; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin: 0 0 0.75rem;
}

.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: var(--text-muted);
}

.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ---------- Layout helpers ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3.5rem, 8vw, var(--s-7)); }
.section--surface { background: var(--surface); }
.section--alt { background: var(--panel-alt); }
.section-head { max-width: 720px; margin: 0 auto clamp(2rem, 5vw, 3.5rem); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.8rem 1.9rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
  color: var(--text);
}
.btn--primary {
  background: var(--green);
  color: var(--text);
}
.btn--primary:hover {
  background: var(--green-bright);
  transform: translateY(-2px);
}
.btn--outline {
  background: #30363D;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  background: #3a4048;
  border-color: #3a4048;
  transform: translateY(-2px);
}

/* ---------- Badges / pills ------------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.85rem;
}
.pill--gold { color: var(--gold); border-color: rgba(212, 168, 32, 0.5); }
.pill--cyan { color: var(--text-muted); border-color: var(--border); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Store badges -------------------------------------------------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.store-badges img {
  height: 32px;
  width: auto;
  /* The official App Store badge ships on an opaque white background, so its
     rounded corners would show as white wedges here. Clipping at the badge's own
     corner radius (~10% of its height) hides them without altering the artwork. */
  border-radius: 4px;
  transition: transform 0.18s ease, filter 0.2s ease;
}
.store-badge { display: inline-block; }
.store-badge:hover img { transform: translateY(-2px); }
.download-specs {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.store-note {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Navbar -------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(8, 10, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.nav__brand:hover { color: var(--text); }
.nav__brand img { height: 30px; width: auto; border-radius: 7px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  position: relative;
  display: inline-block;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-sm);
  font-size: 1rem;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav__links a.is-active { color: var(--green); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}
.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 0;
  color: var(--text);
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin-inline: auto;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle span::before { transform: translateY(-6px); }
.nav__toggle span::after  { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1.5px); }

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .nav__links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8, 10, 13, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 0.8rem 0.6rem; border-radius: var(--r-sm); }
  .nav__links a.is-active::after { display: none; }
}

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 420px at 50% -10%, rgba(8, 215, 255, 0.06), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-title {
  font-size: clamp(3.2rem, 11vw, 6.5rem);
  margin: 0.2rem 0 0.6rem;
  color: var(--text);
}
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0.12em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero__pitch { max-width: 46ch; margin-bottom: 1.75rem; }
.hero__cta { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.hero__pills { margin-top: 1.6rem; }

/* Hero media — phone showcase */
.hero__media { display: flex; justify-content: center; }
.phone-frame {
  position: relative;
  width: min(520px, 90vw);
  /* Matches the 16:9 capture ratio of the in-game screenshots. */
  aspect-ratio: 16 / 9;
  background: #050506;
  border: 3px solid var(--border);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.phone-frame img,
.phone-frame video,
.phone-frame .phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- Hero trailer --------------------------------------------------- */
/* The video sits in the same 16:9 frame the screenshots use. Its own controls
   are always present (JS off: poster + native play); main.js reveals the big
   overlay button and drops it for good once playback starts, so it can never
   sit on top of the control bar. */
.trailer { margin: 0; }
.trailer__video { background: #050506; }

.trailer__play {
  position: absolute;
  inset: 8px;                 /* the frame's padding — covers the screen only */
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(8, 10, 13, 0.28);
  color: var(--text);
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s ease;
}
.trailer__play[hidden] { display: none; }
.trailer__play:hover { background: rgba(8, 10, 13, 0.14); }

.trailer__play-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: #06210F;
  transition: transform 0.18s ease, background 0.18s ease;
}
.trailer__play-icon svg { width: 34px; height: 34px; margin-left: 3px; }
.trailer__play:hover .trailer__play-icon { background: var(--green-bright); transform: scale(1.06); }
.trailer__play:active .trailer__play-icon { transform: scale(0.98); }

.trailer__play-label {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
  background: rgba(8, 10, 13, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
}
.trailer__play-time { color: var(--text-dim); }

@media (max-width: 560px) {
  .trailer__play-icon { width: 58px; height: 58px; }
  .trailer__play-icon svg { width: 27px; height: 27px; }
  .trailer__play-label { font-size: 0.8rem; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__pitch { margin-inline: auto; }
  .hero__cta { align-items: center; }
  .hero__pills .pill-row { justify-content: center; }
  .hero__media { order: -1; }
}

/* ---------- Cards / feature grid ----------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #3a3f47;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; font-size: 1rem; }
/* ---------- Store redirect page ------------------------------------------- */
/* Only shown when the redirect can't run: desktop, an unrecognised device, or
   JS off. Everyone else has already left for their store. */
.get {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(1rem, 6vw, 4rem);
}
.get__icon { margin: 0 auto 1.5rem; border-radius: 20px; }
.get__title { font-size: clamp(2.6rem, 8vw, 4rem); margin-bottom: 0.6rem; }
.get__lead { margin-bottom: 2rem; }
.get__badges { justify-content: center; }
.get__back { margin-top: 2.5rem; font-size: 0.95rem; }

/* ---------- Mechanic beats ------------------------------------------------ */
/* A screenshot and the text that explains it, alternating sides down the page.
   These replaced a six-card icon grid — the game reads better in its own frames
   than in glyphs, and the alternation breaks the stacked-slab rhythm. */
.beats { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.beats--after { margin-top: clamp(2.5rem, 6vw, 4rem); }

.beat {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: center;
}
.beat__media { order: 1; }
.beat__body { order: 2; }
/* Even beats put the art on the right instead. The column widths mirror along
   with the order, so the art keeps the wider column on every row. */
.beat:nth-child(even) { grid-template-columns: 0.85fr 1.15fr; }
.beat:nth-child(even) .beat__media { order: 2; }
.beat:nth-child(even) .beat__body { order: 1; }

/* Same physical frame as .phone-frame, without its 16:9 constraint — these are
   wide crops, cut above the marketing caption baked into the store shots. */
.beat__media {
  background: #050506;
  border: 3px solid var(--border);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.beat__media img { width: 100%; height: auto; border-radius: 12px; }

.beat__body h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-bottom: 0.6rem; }
.beat__body p { font-size: 1.05rem; margin-bottom: 0.9rem; }
.beat__body p:last-child { margin-bottom: 0; }
.beat__note {
  color: var(--text-dim);
  font-size: 0.95rem !important;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 860px) {
  /* Both selectors, or the even-row rule above (higher specificity) keeps its
     two columns and pushes the stacked text into the second one. */
  .beat,
  .beat:nth-child(even) { grid-template-columns: 1fr; gap: 1.25rem; }
  /* Art first on every beat once stacked — alternating order only reads as
     alternating when the columns are side by side. */
  .beat__media,
  .beat:nth-child(even) .beat__media { order: 1; }
  .beat__body,
  .beat:nth-child(even) .beat__body { order: 2; }
}

/* ---------- Gear list ----------------------------------------------------- */
/* One column of rows, name left and effect right — a spec sheet, not cards.
   Five items in a multi-column grid always left a ragged orphan row. */
.gear { margin: 0; max-width: 760px; }
.gear__row {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0 1.5rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--border);
}
.gear__row:last-child { border-bottom: 1px solid var(--border); }
.gear dt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}
.gear dd { margin: 0; font-size: 1rem; color: var(--text-dim); }

@media (max-width: 560px) {
  .gear__row { grid-template-columns: 1fr; gap: 0.15rem; }
}
.gear__note {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  max-width: 62ch;
  color: var(--text-muted);
}

/* ---------- Stats panel --------------------------------------------------- */
/* One hairline grid, not five rounded cards: the border shows through the 1px
   gaps, so the cells share edges the way the in-game panels do. */
.stats {
  display: grid;
  /* Explicit rather than auto-fit: five cells wrap into an empty sixth at most
     widths, and an empty cell in a hairline grid reads as a missing tile. */
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat { background: var(--panel); padding: 1.5rem 1rem; text-align: center; }
.stat__n {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat__l {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ---------- Worlds ------------------------------------------------------- */
/* Five square pieces of the game's own campaign art. A five-across grid where
   there is room; a snap rail below that, because 5 cards in a 2- or 3-column
   grid always leaves a hole in the last row. */
.worlds {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.world-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
/* Each world's own theme colour, straight from its campaign data. */
.world-card--1 { --world-accent: #5392FA; }
.world-card--2 { --world-accent: #5AFACD; }
.world-card--3 { --world-accent: #AACAFA; }
.world-card--4 { --world-accent: #FA4D59; }
.world-card--5 { --world-accent: #FAC363; }

/* The accent only ever appears as a hairline at the top of the card — colour
   as a label, never as a glow. */
.world-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  z-index: 2;
  background: var(--world-accent);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.world-card:hover { transform: translateY(-4px); border-color: #3a3f47; }
.world-card:hover::before { opacity: 1; }

.world-card__art {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.world-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.world-card:hover .world-card__art img { transform: scale(1.06); }
/* Art fades into the card body instead of stopping at a hard edge. */
.world-card__art::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(13, 13, 14, 0.85) 88%, var(--panel));
  pointer-events: none;
}

.world-card__body { padding: 0.9rem 1rem 1.1rem; margin-top: -2.2rem; position: relative; z-index: 1; }
.world-card__num {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--world-accent);
  opacity: 0.85;
}
.world-card__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
}
.world-card__blurb { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--text-dim); }

@media (max-width: 999px) {
  .worlds {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
  }
  .worlds::-webkit-scrollbar { display: none; }
  .world-card { flex: 0 0 min(260px, 68vw); scroll-snap-align: center; }
  /* Hover lift is a pointer affordance; on a rail it just fights the swipe. */
  .world-card:hover { transform: none; }
}

/* ---------- Screenshots rail --------------------------------------------- */
.shots-rail { position: relative; }
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(440px, 86vw);
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* No native scrollbar — the arrows and dots carry the affordance instead.
     (With "always show scrollbars" on macOS one would otherwise sit under the
     cards.) Swiping and snapping are untouched. */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Cards dissolve at whichever edge still has content past it. main.js sets
     these to 0 at the ends, so the first and last card are never dimmed; they
     stay 0 without JS. */
  --fade-start: 0px;
  --fade-end: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
}
.shots::-webkit-scrollbar { display: none; }
.shots:focus-visible { outline: 2px solid var(--green); outline-offset: 8px; }
.shots .phone-frame { width: 100%; scroll-snap-align: center; }

/* Round icon button — shared by the rail arrows and the lightbox controls. */
.circle-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(8, 10, 13, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.circle-btn:hover { background: var(--elevated); border-color: #3a3f47; }
.circle-btn:disabled { opacity: 0; pointer-events: none; }
.circle-btn svg { width: 20px; height: 20px; }

/* Arrows: pointer devices only — touch users swipe. */
.shots-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  margin-top: -23px;
}
@media (hover: hover) and (pointer: fine) {
  .shots-arrow { display: grid; }
}
.shots-arrow--prev { left: -10px; }
.shots-arrow--next { right: -10px; }

/* Clicking a card opens the lightbox. */
.shots .phone-frame { cursor: zoom-in; transition: transform 0.18s ease; }
.shots .phone-frame:hover { transform: translateY(-3px); }
.shots .phone-frame:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }

/* Dots: 8px mark inside a 26px tap target. */
.shots-dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 1rem; }
.shots-dot {
  width: 26px;
  height: 26px;
  padding: 9px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}
.shots-dot::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3f47;
  transition: background 0.2s ease, transform 0.2s ease;
}
.shots-dot:hover::before { background: #555c66; }
.shots-dot.is-active::before { background: var(--green); transform: scale(1.35); }

/* ---------- Screenshot lightbox ------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(4, 5, 7, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
/* The page behind must not scroll while the viewer is up. */
body.has-lightbox { overflow: hidden; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(0.9rem, 3vw, 1.6rem);
}
.lightbox__count {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
}

/* Clicking the padding around the image closes; clicking the image does not. */
.lightbox__stage {
  position: relative;
  /* Flex, not grid: the image's max-height needs a definite parent height to
     resolve against, and an auto-sized grid row does not provide one — the
     image would overflow onto the caption. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(0.75rem, 8vw, 5rem);
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #050506;
  cursor: default;
}
.lightbox__nav { position: absolute; top: 50%; margin-top: -23px; }
.lightbox__nav--prev { left: clamp(0.4rem, 2vw, 1.5rem); }
.lightbox__nav--next { right: clamp(0.4rem, 2vw, 1.5rem); }

.lightbox__caption {
  margin: 0;
  padding: 0.9rem clamp(0.9rem, 3vw, 1.6rem) 1.4rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dim);
}

@media (max-width: 640px) {
  /* A 16:9 shot in a portrait viewport is width-bound, so give it nearly the
     full width and let the chevrons sit over the image edges. */
  .lightbox__stage { padding: 0 0.5rem; }
  .lightbox__nav { width: 38px; height: 38px; margin-top: -19px; }
  .lightbox__caption { font-size: 0.85rem; }
}

/* ---------- Download banner ---------------------------------------------- */
.download-cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 6vw, 3.5rem);
}
.download-cta .store-badges { justify-content: center; margin-top: 1.5rem; }

/* ---------- FAQ / accordion ---------------------------------------------- */
.faq { display: grid; gap: 0.9rem; max-width: 820px; margin-inline: auto; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq details[open] { border-color: #3a3f47; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__body { padding: 0 1.3rem 1.2rem; }
.faq .faq__body p:last-child { margin-bottom: 0; }

/* ---------- Support extras ----------------------------------------------- */
.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
}
.contact-card__email {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  letter-spacing: 0.04em;
  color: var(--text);
}
.contact-card__email:hover { color: var(--green); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: "›";
  position: absolute;
  left: 0.4rem;
  color: var(--green);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* ---------- Legal pages --------------------------------------------------- */
.legal { max-width: 820px; margin-inline: auto; }
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.legal h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-top: 2.4rem;
  color: var(--text);
}
.legal h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal .updated {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.callout {
  background: rgba(255, 219, 89, 0.08);
  border: 1px solid rgba(212, 168, 32, 0.4);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.callout strong { color: var(--gold); }

/* ---------- Footer -------------------------------------------------------- */
.footer {
  background: var(--overlay);
  border-top: 1px solid var(--border-soft);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  margin-top: 2rem;
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer__brand { max-width: 320px; }
.footer__brand .nav__brand { margin-bottom: 0.6rem; }
.footer__col h4 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer__col a { color: var(--text-muted); font-weight: 500; }
.footer__col a:hover { color: var(--green); }
.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- 404 ----------------------------------------------------------- */
.notfound {
  min-height: 68vh;
  display: grid;
  place-items: center;
  text-align: center;
}
.notfound .code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 12rem);
  line-height: 0.9;
  color: var(--cyan);
}

/* ---------- Scroll reveal ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utilities ----------------------------------------------------- */
.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.page-head { padding-block: clamp(3rem, 8vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); text-align: center; }
