/* ============================================================
   THE RENDERED CLUB — BASE
   Reset · Design tokens · Typography · Layout primitives
   ============================================================ */

/* ---------- Fonts (Fontshare + Google) ---------- */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;700&family=Playfair+Display:ital@1&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Design tokens ---------- */
:root {
  /* Cinema palette */
  --black:      #060A11;   /* true cinema black */
  --navy-900:   #0A1320;
  --navy:       #0D1B2A;   /* brand primary */
  --navy-700:   #122438;
  --navy-600:   #18324c;
  --off-white:  #F8F6F0;
  --platinum:   #E8E4DC;
  --charcoal:   #2C2C2C;
  --gold:       #F5A623;   /* brand accent */
  --gold-soft:  #FFC664;
  --gold-deep:  #C97E12;
  --raw:        #5B6B7A;   /* desaturated "raw footage" cool */
  --raw-dim:    #3a4754;
  --teal:       #4FD1C5;   /* graded highlight */
  --success:    #2ECC71;
  --alert:      #E74C3C;

  /* Semantic */
  --bg:         var(--black);
  --ink:        var(--off-white);
  --ink-dim:    rgba(248,246,240,0.56);
  --ink-faint:  rgba(248,246,240,0.30);
  --line:       rgba(248,246,240,0.12);
  --line-soft:  rgba(248,246,240,0.07);

  /* Type */
  --f-display: 'Clash Display', 'Inter', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
  --f-serif:   'Playfair Display', Georgia, serif;

  /* Fluid type scale */
  --t-mega:  clamp(3.2rem, 12vw, 11rem);
  --t-h1:    clamp(2.6rem, 7vw, 6rem);
  --t-h2:    clamp(2rem, 4.6vw, 3.8rem);
  --t-h3:    clamp(1.4rem, 2.4vw, 2.1rem);
  --t-lead:  clamp(1.05rem, 1.5vw, 1.35rem);
  --t-body:  clamp(1rem, 1.1vw, 1.075rem);
  --t-small: 0.82rem;
  --t-micro: 0.7rem;

  /* Space + layout */
  --pad-x: clamp(1.25rem, 5vw, 6rem);
  --maxw: 1400px;
  --r: 14px;
  --r-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0.05, 0.36, 1);
  --slow: 1.1s;

  --hud-h: 38px;  /* edit-suite chrome height */
}

/* ---------- Base ---------- */
html { scroll-behavior: auto; }
body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  letter-spacing: 0.005em;
}
body.is-loading { overflow: hidden; }

/* When Lenis is active it manages scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Hide native cursor on capable pointers */
@media (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}

/* ---------- Type helpers ---------- */
.display { font-family: var(--f-display); font-weight: 600; line-height: 0.98; letter-spacing: -0.02em; }
.mono { font-family: var(--f-mono); }
.serif-it { font-family: var(--f-serif); font-style: italic; }

h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-small);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.eyebrow.no-rule::before { display: none; }

.lead { font-size: var(--t-lead); color: var(--ink-dim); line-height: 1.55; font-weight: 300; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
.section { position: relative; padding-block: clamp(5rem, 11vh, 11rem); }
.section--tight { padding-block: clamp(3.5rem, 7vh, 6rem); }

.grid { display: grid; gap: clamp(1rem, 2vw, 2rem); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}

/* Light section (editorial inversion) */
.panel-light { background: var(--off-white); color: var(--charcoal); }
.panel-light .lead { color: rgba(44,44,44,0.62); }
.panel-light .eyebrow { color: var(--gold-deep); }
.panel-light .eyebrow::before { background: var(--gold-deep); }

/* Film-grain + vignette overlays applied via body::after in components.css */

/* Utility */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.nowrap { white-space: nowrap; }
.text-gold { color: var(--gold); }
.center { text-align: center; }
.stack > * + * { margin-top: 1.2rem; }

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