/* base.css — reset + body + typography defaults */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;1,600;1,700;1,800&family=Inter:wght@400;500;600;700;800&display=swap');

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

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: 400;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-lime); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: var(--lh-tight);
  margin: 0;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-sm); letter-spacing: 0.08em; }

p { margin: 0 0 var(--sp-4); }
small { font-size: var(--fs-sm); color: var(--c-muted); }

::selection { background: var(--c-lime); color: var(--c-bg); }

/* Scrollbar — dark UI. scrollbar-width/color are inherited props, so setting them
   on :root themes every scroll container (games rail, side rails) in Firefox; the
   ::-webkit-* rules do the same in Chromium/Safari. Keep per-element overrides
   COMPLETE (track + thumb) or Windows Chrome falls back to the native gray bar. */
:root { scrollbar-width: thin; scrollbar-color: var(--c-border) var(--c-bg-2); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg-2); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-border-2); }
::-webkit-scrollbar-corner { background: var(--c-bg-2); }

/* App wall — angled gradient composited over a seamless leather texture.
   This lives on .bg-grid (not body) because <body class="bg-grid"> means the
   class beats the bare `body` selector on specificity; anything set on body
   alone gets painted over. body{background:var(--c-bg)} stays as the fallback
   color underneath, for the first paint and for `url()` failure.

   Layer order: gradient FIRST (= on top, semi-transparent tint), opaque leather
   tile beneath it. The gradient's alpha is what lets the grain through; see the
   note in tokens.css before changing either value.

   Both layers are `fixed` so the texture tiles across the viewport rather than
   the document: no seam or drift when a long feed scrolls. */
.bg-grid {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(
      var(--c-bg-angle),
      var(--c-bg-a),
      var(--c-bg-b) 50%,
      var(--c-bg-c)
    ),
    var(--c-bg-texture);
  background-color: var(--c-bg);
  background-repeat: no-repeat, repeat;
  background-size: cover, var(--c-bg-texture-size) auto;
  background-position: center, top left;
  background-attachment: fixed, fixed;
}

/* Soft spotlight for depth — teal lift at top-left, vignette bottom-right.
   Fixed + z-index:-1 so it sits above the wall but below all page content. */
.bg-grid::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 10%, rgba(31, 145, 166, 0.20), transparent 34%),
    radial-gradient(circle at 84% 38%, rgba(7, 20, 31, 0.12), rgba(3, 10, 16, 0.72) 74%);
}

/* Purple orb decorative element (Brand Board) */
.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--c-purple) 0%, rgba(160, 32, 240, 0.5) 35%, transparent 70%);
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* Clickwrap consent block (includes/lib/legal_consent_ui.php): unchecked required
   checkbox, exact stored label, per-doc read links, inline document panels. */
.fp-consent{margin:12px 0;padding:12px 14px;border:1px solid var(--c-border);border-radius:12px;background:var(--c-surface);}
.fp-consent__row{display:flex;gap:10px;align-items:flex-start;cursor:pointer;color:var(--c-text);font-weight:600;line-height:1.5;}
.fp-consent__row input{margin-top:4px;flex:0 0 auto;accent-color:var(--c-lime);}
.fp-consent__read{margin:8px 0 0 26px;font-size:13px;color:var(--c-muted);}
.fp-consent__read a{color:var(--c-lime);text-decoration:underline;}
.fp-consent__doc{margin:8px 0 0 26px;border:1px solid var(--c-border-2);border-radius:10px;padding:6px 10px;}
.fp-consent__doc summary{cursor:pointer;font-size:13px;color:var(--c-text-2);}
.fp-consent__ver{color:var(--c-muted);font-size:12px;}
.fp-consent__body{max-height:320px;overflow:auto;padding:8px 2px 0;font-size:14px;color:var(--c-text-2);line-height:1.6;}
.fp-consent__body h3{color:var(--c-text);font-size:14px;margin-top:14px;}
.fp-consent--attest{border-color:var(--c-violet);}

/* Accessibility: skip link (WCAG 2.4.1) — visible only when focused. */
.fp-skip{position:absolute;left:8px;top:-48px;z-index:10000;background:var(--c-lime);color:var(--c-bg);padding:10px 14px;border-radius:0 0 10px 10px;font-weight:800;text-decoration:none;transition:top .12s;}
.fp-skip:focus{top:0;outline:3px solid var(--c-violet);}
/* Auto-renewal disclosure (includes/partials/renewal_disclosure.php) */
.fp-renew{border:1px solid var(--c-border);border-radius:12px;padding:12px 14px;margin:12px 0;background:var(--c-surface);}
.fp-renew__text{font-size:13px;color:var(--c-text-2);line-height:1.55;margin:0 0 8px;}
.fp-renew__text a{color:var(--c-lime);}
.fp-renew__row{display:flex;gap:10px;align-items:flex-start;font-weight:600;color:var(--c-text);cursor:pointer;font-size:14px;}
.fp-renew__row input{margin-top:3px;}
