/* =========================================================================
   TATER TOT GAMES — studio site
   Shared stylesheet. One system, three games.
   Identity: near-black charcoal base · single warm gold-amber accent ·
   strong typographic wordmark · generous whitespace.
   Each game carries its OWN accent inside its card/page (--game-* vars).
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Studio palette */
  --bg:            #0c0d11;   /* page base — near-black charcoal */
  --bg-2:          #101218;   /* alt section band */
  --surface:       #15171f;   /* cards */
  --surface-2:     #1c1f29;   /* elevated / hover */
  --line:          rgba(255, 255, 255, 0.08);
  --line-strong:   rgba(255, 255, 255, 0.14);

  --ink:           #f5f2ea;   /* warm white */
  --ink-soft:      #cbc7bd;
  --ink-mute:      #928d82;   /* captions, meta */

  /* The single studio accent — warm gold-amber */
  --gold:          #e8a63d;
  --gold-hi:       #f4c869;
  --gold-lo:       #c17d1c;
  --gold-grad:     linear-gradient(135deg, #f4c869 0%, #e8a63d 45%, #c17d1c 100%);
  --gold-glow:     rgba(232, 166, 61, 0.35);

  /* Per-game accents (default = studio gold; each page overrides) */
  --game:          var(--gold);
  --game-hi:       var(--gold-hi);
  --game-grad:     var(--gold-grad);
  --game-glow:     var(--gold-glow);

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --maxw:      1180px;
  --maxw-text: 720px;
  --radius:    16px;
  --radius-sm: 10px;
  --pad:       clamp(20px, 5vw, 40px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset-ish -------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
::selection { background: var(--gold); color: #16130a; }

/* ---- Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 11vw, 128px); position: relative; }
.section.band { background: var(--bg-2); border-block: 1px solid var(--line); }
.center { text-align: center; }
.narrow { max-width: var(--maxw-text); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--game);
  margin: 0 0 1rem;
}
.section-title { font-size: clamp(2rem, 5vw, 3.1rem); }
.lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  --_bg: var(--gold-grad);
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.6em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform;
}
.btn--primary { background: var(--game-grad); color: #17120a; box-shadow: 0 8px 30px -8px var(--game-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--game-glow); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--game); color: var(--game-hi); transform: translateY(-2px); }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.85rem; }

/* ---- Wordmark --------------------------------------------------------- */
.wordmark {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: -0.03em;
  display: inline-flex; align-items: center; gap: 0.5ch;
  line-height: 1;
}
.wordmark .tot { color: var(--ink); }
.wordmark .games { color: var(--ink-mute); font-weight: 500; }
.wordmark .dot { color: var(--gold); }

/* ---- Header / nav ----------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-head .wordmark { font-size: 1.25rem; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 30px); }
.nav a { font-size: 0.95rem; color: var(--ink-soft); transition: color 0.2s; }
.nav a:hover { color: var(--gold-hi); }
.nav .btn { color: #17120a; }
@media (max-width: 720px) {
  .nav a.navlink { display: none; }
}

/* ---- Hero (studio) ---------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(80px, 16vh, 160px); }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 620px at 70% -10%, rgba(232,166,61,0.16), transparent 60%),
    radial-gradient(800px 500px at 15% 110%, rgba(232,166,61,0.08), transparent 55%);
}
.hero__grain { position: absolute; inset: 0; z-index: 1; opacity: 0.5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  max-width: 16ch;
}
.hero h1 .accent { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { max-width: 42ch; margin-block: 1.4rem 2.4rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Games grid ------------------------------------------------------- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(18px, 3vw, 28px); margin-top: 3rem; }

.game-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  --game: var(--gold); --game-hi: var(--gold-hi); --game-grad: var(--gold-grad); --game-glow: var(--gold-glow);
}
.game-card:hover { transform: translateY(-6px); border-color: var(--game); box-shadow: 0 24px 60px -20px var(--game-glow); }
.game-card__art {
  aspect-ratio: 4 / 3; position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--game) 22%, var(--surface-2)) 0%, var(--surface-2) 70%);
  display: grid; place-items: center;
}
.game-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.game-card:hover .game-card__art img { transform: scale(1.05); }
.game-card__art[data-empty]::after {
  content: attr(data-empty); position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
  font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-mute); border: 1px dashed var(--line-strong); border-radius: inherit; margin: 12px;
}
.game-card__art img[src] ~ * , .game-card__art:has(img[src])::after { display: none; }
.game-card__body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.game-card__kicker { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--game); }
.game-card__title { font-size: 1.6rem; margin: 0; }
.game-card__desc { color: var(--ink-soft); font-size: 0.97rem; margin: 0.2rem 0 0.9rem; flex: 1; }
.game-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.badge {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.35em 0.8em; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-mute);
}
.badge--soon { color: var(--game); border-color: color-mix(in srgb, var(--game) 45%, transparent); }
.card-arrow { color: var(--game); font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; transition: gap 0.25s; display: inline-flex; gap: 0.4ch; }
.game-card:hover .card-arrow { gap: 0.9ch; }
.stretch-link { position: absolute; inset: 0; z-index: 3; }

/* ---- About ------------------------------------------------------------ */
.about-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(30px, 6vw, 72px); align-items: start; }
@media (max-width: 820px) { .about-cols { grid-template-columns: 1fr; } }
.pillars { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillars li { background: var(--surface); padding: 20px 22px; }
.pillars b { display: block; font-family: var(--font-display); color: var(--ink); margin-bottom: 0.15rem; }
.pillars span { color: var(--ink-mute); font-size: 0.95rem; }

/* ---- Contact / signup ------------------------------------------------- */
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 5vw, 52px); text-align: center;
  background-image: radial-gradient(600px 300px at 50% -20%, rgba(232,166,61,0.10), transparent 60%);
}
.signup { display: flex; gap: 10px; max-width: 460px; margin: 1.6rem auto 0.6rem; flex-wrap: wrap; }
.signup input {
  flex: 1; min-width: 200px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.85em 1.3em; color: var(--ink); font-family: var(--font-body); font-size: 0.98rem;
}
.signup input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.form-note { font-size: 0.82rem; color: var(--ink-mute); }
.mailto-big { font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--gold-hi); }

/* ---- Footer ----------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 54px 40px; background: var(--bg-2); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--ink-soft); font-size: 0.93rem; transition: color 0.2s; }
.foot-links a:hover { color: var(--gold-hi); }
.foot-legal { color: var(--ink-mute); font-size: 0.85rem; margin-top: 28px; }
.foot-legal a { color: var(--ink-mute); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Game page: hero -------------------------------------------------- */
.gpage { --game: var(--gold); }
.ghero { position: relative; overflow: hidden; padding-block: clamp(80px, 14vh, 150px); }
.ghero__bg { position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(1000px 600px at 30% -10%, color-mix(in srgb, var(--game) 22%, transparent), transparent 60%); }
.ghero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .ghero .wrap { grid-template-columns: 1fr; } }
.ghero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.ghero h1 .accent { background: var(--game-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ghero__logline { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--ink-soft); font-style: italic; max-width: 26ch; }
.ghero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.6rem 0; }
.meta-chip { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.06em; padding: 0.45em 0.9em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); }
.ghero__art {
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--game) 24%, var(--surface-2)), var(--surface-2));
  box-shadow: 0 30px 80px -30px var(--game-glow); display: grid; place-items: center;
}
.ghero__art img { width: 100%; height: 100%; object-fit: cover; }
.art-ph { text-align: center; color: var(--ink-mute); font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 2rem; }

/* ---- Game page: feature rows ----------------------------------------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 68px); align-items: center; }
.feature-row:nth-child(even) .feature-row__art { order: -1; }
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; } .feature-row:nth-child(even) .feature-row__art { order: 0; } }
.feature-row + .feature-row { margin-top: clamp(48px, 8vw, 96px); }
.feature-row__art { aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(150deg, color-mix(in srgb, var(--game) 18%, var(--surface-2)), var(--surface-2)); display: grid; place-items: center; }
.feature-row__art img { width: 100%; height: 100%; object-fit: cover; }
.feature-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.85rem; }
.feature-list li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--game-grad); }

.confirm { color: var(--gold); font-size: 0.7em; font-weight: 600; letter-spacing: 0.08em; vertical-align: super; opacity: 0.8; }

/* ---- Store badges (placeholder) -------------------------------------- */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: 0.7ch;
  padding: 0.7em 1.2em; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); font-family: var(--font-display); font-size: 0.9rem;
  transition: border-color 0.25s, transform 0.25s;
}
.store-badge:hover { border-color: var(--game); transform: translateY(-2px); color: var(--ink); }
.store-badge small { display: block; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }

.backlink { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--ink-mute); font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 1.5rem; transition: color 0.2s, gap 0.2s; }
.backlink:hover { color: var(--gold-hi); gap: 0.9ch; }

/* ---- Legal / doc pages ------------------------------------------------ */
.doc { padding-block: clamp(48px, 8vw, 90px); }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.3rem; }
.doc .updated { color: var(--ink-mute); font-size: 0.9rem; margin-bottom: 2.5rem; }
.doc h2 { font-size: 1.4rem; margin-top: 2.6rem; color: var(--gold-hi); }
.doc h3 { font-size: 1.1rem; margin-top: 1.8rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.5rem; }
.doc a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.doc .placeholder { background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 6px; padding: 0.05em 0.4em; color: var(--gold-hi); font-weight: 600; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; margin-bottom: 2.5rem; }
.toc h4 { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 0.8rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { color: var(--gold-hi); }
@media (max-width: 620px) { .toc ol { columns: 1; } }

/* ---- Scroll reveal ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Custom scrollbar (never ship the default) ------------------------ */
* { scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold-lo), var(--gold)); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
