/* =========================================================================
   TATER TOT GAMES - "INK & BONE"
   Studio design system v2. Light editorial gallery; the game art carries all
   colour. Monochrome architecture, hairline rules, heavy display type.
   Game pages invert the same tokens to stay immersive and dark.
   ========================================================================= */

:root {
  /* Surface ladder */
  --paper:    #F7F6F3;
  --paper-2:  #EFEDE7;
  --paper-3:  #E6E4DC;
  --card:     #FFFFFF;
  --ink:      #0E0E11;
  --ink-2:    #3B3B42;
  --ink-3:    #75757F;
  --rule:     rgba(14, 14, 17, 0.13);
  --rule-2:   rgba(14, 14, 17, 0.26);

  /* Action = ink. Brand warmth = the crown only. Games bring the chroma. */
  --action:      #0E0E11;
  --action-ink:  #F7F6F3;
  --brand:       #C08A2E;
  --live:        #197A45;
  --beta:        #1F5FA8;
  --dev:         #8A6A1F;

  /* Per-game accent (each game page overrides these) */
  --game: var(--brand);
  --game-hi: #D8A44C;
  --game-grad: linear-gradient(135deg, #D8A44C, #C08A2E);
  --game-glow: rgba(192, 138, 46, 0.28);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body:    "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1280px;
  --maxw-text: 68ch;
  --r: 6px;
  --r-lg: 10px;
  --pad: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 44px -22px rgba(14, 14, 17, 0.42);
  --ring: 0 0 0 3px rgba(14, 14, 17, 0.28);
}

/* Game pages: same components, inverted world */
.gpage {
  --paper: #0D0D10;
  --paper-2: #131318;
  --paper-3: #1A1A21;
  --card: #15151B;
  --ink: #F4F3EF;
  --ink-2: #BFBEB8;
  --ink-3: #8C8B87;
  --rule: rgba(255, 255, 255, 0.13);
  --rule-2: rgba(255, 255, 255, 0.28);
  --action: var(--game);
  --action-ink: #0D0D10;
  --ring: 0 0 0 3px color-mix(in srgb, var(--game) 55%, transparent);
  --shadow: 0 22px 50px -24px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 800; line-height: 0.98;
  letter-spacing: -0.035em; margin: 0 0 0.4em; text-wrap: balance;
}
::selection { background: var(--ink); color: var(--paper); }

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

.eyebrow {
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 1.1rem;
}
.section-title { font-size: clamp(2.1rem, 5vw, 4.2rem); }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.32rem); color: var(--ink-2); max-width: 62ch; }

/* ---- Buttons: architectural, not pills -------------------------------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--font-display); font-weight: 700; font-size: 0.97rem;
  letter-spacing: -0.01em; white-space: nowrap;
  padding: 0.92em 1.7em; border-radius: var(--r);
  border: 1.5px solid var(--action); cursor: pointer;
  transition: color 0.28s var(--ease), background 0.28s var(--ease),
              border-color 0.28s var(--ease), transform 0.18s var(--ease);
}
.btn--primary { background: var(--action); color: var(--action-ink); }
.btn--ghost   { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.36s var(--ease);
}
.btn--ghost:hover { color: var(--paper); border-color: var(--ink); }
.btn--ghost:hover::after { transform: scaleX(1); }
.btn--primary:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { padding: 0.62em 1.15em; font-size: 0.85rem; }
.gpage .btn--ghost:hover { color: var(--action-ink); }
.gpage .btn::after { background: var(--game); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: none; box-shadow: var(--ring); border-radius: var(--r);
}

/* ---- Wordmark & header ------------------------------------------------ */
.wordmark {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em;
  display: inline-flex; align-items: baseline; gap: 0.4ch; line-height: 1; font-size: 1.22rem;
}
.wordmark .tot { color: var(--ink); }
.wordmark .games { color: var(--ink-3); font-weight: 600; }
.wordmark .dot { color: var(--brand); }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.site-head.scrolled { border-bottom-color: var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
.navlink { font-size: 0.93rem; font-weight: 500; color: var(--ink-2); transition: color 0.2s; }
.navlink:hover { color: var(--ink); }
.navlink[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (max-width: 780px) { .nav a.navlink { display: none; } }

.skip-link {
  position: absolute; left: 50%; translate: -50% -140%; top: 8px; z-index: 100;
  background: var(--ink); color: var(--paper); font-weight: 600;
  padding: 0.7em 1.2em; border-radius: var(--r); transition: translate 0.25s var(--ease);
}
.skip-link:focus { translate: -50% 0; }

/* ---- Status chips ------------------------------------------------------ */
.meta-chip, .tagchip {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-body); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 0.42em 0.8em; border-radius: 3px;
  border: 1px solid var(--rule-2); color: var(--ink-2); background: transparent;
}
.game-card__status {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  display: inline-flex; align-items: center; gap: 0.55ch;
  font-family: var(--font-body); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.44em 0.8em; border-radius: 3px; color: #0E0E11;
  background: color-mix(in srgb, #F7F6F3 92%, transparent);
  backdrop-filter: blur(8px); border: 1px solid rgba(14, 14, 17, 0.16);
}
.game-card__status i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.status--live i { background: var(--live); }
.status--beta i { background: var(--beta); }
.status--dev  i { background: var(--dev); }

/* ---- Footer ----------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--rule); padding-block: clamp(40px, 6vw, 72px); background: var(--paper-2); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { font-size: 0.92rem; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); }
.foot-legal { margin: 2rem 0 0; font-size: 0.84rem; color: var(--ink-3); max-width: 74ch; }
.foot-social { display: flex; gap: 10px; }
.foot-social a { width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: var(--r); color: var(--ink-2); }
.foot-social svg { width: 16px; height: 16px; }
[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

/* ---- Long-form doc pages ---------------------------------------------- */
.doc { padding-block: clamp(48px, 7vw, 96px); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.doc h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-top: 2.4em; }
.doc h3 { font-size: 1.12rem; margin-top: 1.8em; }
.doc p, .doc li { color: var(--ink-2); max-width: 68ch; }
.doc a:not(.btn):not(.backlink) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }
.updated { color: var(--ink-3); font-size: 0.92rem; }
.backlink { display: inline-block; margin-bottom: 1.6rem; font-size: 0.92rem; color: var(--ink-3); }
.backlink:hover { color: var(--ink); }
.toc { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px 26px; margin: 2rem 0 2.6rem; background: var(--card); }
.toc h4 { margin: 0 0 0.7em; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 34px; }
.toc li { margin-bottom: 0.3em; }
.toc a { color: var(--ink-2); font-size: 0.94rem; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---- Forms ------------------------------------------------------------ */
.signup { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input {
  flex: 1 1 240px; padding: 0.92em 1.1em; font-family: var(--font-body); font-size: 1rem;
  color: var(--ink); background: var(--card);
  border: 1.5px solid var(--rule-2); border-radius: var(--r);
}
.signup input::placeholder { color: var(--ink-3); }
.signup input:focus { border-color: var(--ink); outline: none; }
.form-note { font-size: 0.86rem; color: var(--ink-3); margin-top: 0.8rem; }
.contact-card { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(26px, 4vw, 52px); background: var(--card); }

/* ---- Reveal ------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Scrollbar --------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 99px; border: 3px solid var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn::after { transition: none; }
  html { scroll-behavior: auto; }
}
