/* ============================================================
   styles.css - Cinematic Scroll family, TRIBE Sky Beach Club theme.
   Brand tokens are painted from config (brand.palette) by main.js;
   the defaults here are TRIBE so a no-JS / first paint still reads
   on-brand. Warm aubergine off-black, hot neon red/pink, teal pool
   kicker, amber bar glow. Heavy exotic-luxe display (Clash Display).
   ============================================================ */

:root {
  --bg: #0C0A0D;       /* warm aubergine off-black */
  --ink: #F4EFEA;      /* warm bone off-white */
  --accent: #FF2D55;   /* TRIBE neon red/pink */
  --accent2: #19C6C0;  /* teal, pool / cyan uplight */
  --warm: #E8A33D;     /* amber bar glow */
  --muted: #8C7F88;    /* dusty mauve-grey */
  --font-display: "Clash Display", Georgia, serif;
  --font-ui: "Hanken Grotesk", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.32, 1);
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.has-cursor,
body.has-cursor a,
body.has-cursor button { cursor: none; }

a { color: inherit; text-decoration: none; }
.caption {
  font-size: clamp(11px, 0.8vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.section-eyebrow { color: var(--accent2); }
.section-title {
  margin: 8px 0 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 7vw, 116px); line-height: 0.94; letter-spacing: -0.01em;
}

/* ---- semantic / SEO layer: present in DOM, hidden from view ---- */
.sr-layer, .noscript {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
body.is-static .sr-layer {
  position: static; width: auto; height: auto; margin: 0;
  clip: auto; clip-path: none; overflow: visible; white-space: normal;
  max-width: 760px; padding: 12vh var(--gutter) 4vh;
}
body.is-static .sr-layer h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 8vw, 84px); line-height: 0.98; letter-spacing: -0.01em; }

/* ============================================================
   1. LOADER (Tier 1) - flaming TRIBE igniting, screen-blended.
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 9000;
  background: radial-gradient(120% 100% at 50% 42%, #15101a 0%, var(--bg) 72%);
  display: grid; place-items: center;
  clip-path: inset(0 0 0 0);
  will-change: clip-path;
}
.loader-flamewrap {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: min(720px, 86vw); aspect-ratio: 1284 / 716;
  pointer-events: none;
}
.loader-flame {
  width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: screen;   /* the black of the clip drops out over the off-black */
}
.loader-inner { position: relative; z-index: 2; text-align: center; width: min(520px, 82vw); margin-top: 30vh; }
.loader-sub { color: var(--accent2); }
.loader-bar {
  margin: 26px auto 10px;
  height: 2px; width: 100%;
  background: rgba(244, 239, 234, 0.14);
  overflow: hidden;
}
.loader-fill {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.6);
}
.loader-pct { color: var(--muted); }

/* ============================================================
   2. CUSTOM CURSOR (Tier 1, pointer:fine only) - quiet neon dot.
   A small bone core inside a soft neon halo, screen-blended so it
   glows against the off-black. Position drives .cursor (transform),
   swell drives .cursor-dot (transform + opacity).
   ============================================================ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9500;
  width: 26px; height: 26px;
  pointer-events: none; display: none;
  mix-blend-mode: screen;
  will-change: transform;
}
body.has-cursor .cursor { display: block; }
.cursor-dot {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(244, 239, 234, 0.95) 0%,
    rgba(255, 45, 85, 0.7) 36%,
    rgba(255, 45, 85, 0) 72%);
  filter: blur(0.4px);
  will-change: transform, opacity;
}

/* ============================================================
   FIXED CHROME
   ============================================================ */
.progress-rail { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 8000; background: transparent; }
.progress-fill { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 7000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  mix-blend-mode: difference;
}
.brandmark { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2vw, 30px); letter-spacing: 0.04em; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.top-link { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); }

.btn-book {
  display: inline-block;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.02em;
  color: var(--bg); background: var(--accent);
  padding: 10px 18px; border: 0; border-radius: 2px;
  will-change: transform;
}
.top-book { padding: 8px 16px; font-size: 13px; }
.btn-book--lg { padding: 14px 30px; font-size: 15px; }
.btn-book--xl { padding: 18px 48px; font-size: clamp(16px, 1.4vw, 19px); box-shadow: 0 0 36px rgba(255, 45, 85, 0.34); }

.skip-push {
  position: fixed; z-index: 7200;
  left: 50%; bottom: 30px; transform: translateX(-50%) translateY(12px);
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); background: rgba(12, 10, 13, 0.5);
  border: 1px solid rgba(244, 239, 234, 0.22);
  padding: 9px 18px; border-radius: 100px;
  opacity: 0; pointer-events: none;
  backdrop-filter: blur(4px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.skip-push.is-visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

/* ============================================================
   2 + 3. THE CINEMA STAGE - ONE pinned stage, TWO scenes stacked
   absolutely. Scene 1 (hero) holds then RECEDES; Scene 2 (the pool
   transformation) reveals UP via clip-path over it. No hard cover.
   ============================================================ */
.cinema { position: relative; height: 100vh; overflow: hidden; }
.cinema-stage { position: relative; height: 100%; width: 100%; overflow: hidden; background: var(--bg); }
/* the two scenes are stacked, Scene 2 painted above Scene 1 and clipped
   away until the handoff wipes it down over the receding hero. */
.scene { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.scene--hero { z-index: 1; background: var(--bg); will-change: transform, opacity, filter; }
.scene--transform { z-index: 2; background: var(--bg); clip-path: inset(100% 0% 0% 0%); will-change: clip-path; }

.fly-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fly-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.ember-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; mix-blend-mode: screen; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 8%, transparent 40%, rgba(12,10,13,0.55) 100%),
    linear-gradient(to top, rgba(12,10,13,0.86) 0%, rgba(12,10,13,0.16) 46%, transparent 74%);
}
/* flaming TRIBE wordmark, screen-blended in/out over the walk */
.hero-flame {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%);
  width: min(620px, 64vw); aspect-ratio: 1284 / 716;
  opacity: 0; pointer-events: none; mix-blend-mode: screen;
  will-change: opacity, transform;
}
.hero-flame-vid { width: 100%; height: 100%; object-fit: contain; }

.hero-lockup {
  position: absolute; left: 0; right: 0; bottom: clamp(72px, 11vh, 124px);
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  will-change: transform, opacity;
}
.hero-eyebrow { color: var(--accent2); opacity: 0.95; }
.hero-head {
  margin: 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(54px, 10.5vw, 152px);
  line-height: 0.92; letter-spacing: -0.015em;
  white-space: normal;       /* rule 6: wrap responsively (rise masked per-char in JS) */
  padding-bottom: 0.12em;
  text-shadow: 0 0 60px rgba(12,10,13,0.6);
}
.hero-head .char { display: inline-block; will-change: transform; }
.hero-clarity {
  margin: 2px 0 0; max-width: 30ch;
  font-family: var(--font-ui); font-weight: 500;
  font-size: clamp(16px, 1.9vw, 25px); letter-spacing: 0.005em; color: var(--ink);
}
.hero-cta { display: flex; align-items: center; gap: 22px; margin-top: 16px; }
.hero-zones-link { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }

/* sample badge so stand-in assets read as drafts, not finished art */
.stub-badge {
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  font-family: var(--font-ui); font-weight: 700;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: rgba(255, 45, 85, 0.85);
  padding: 4px 7px; border-radius: 2px;
}
.stub-badge--corner { left: auto; right: 0; bottom: auto; top: 0; position: static; display: inline-block; margin-top: 14px; }

/* ---- SCENE 2 content (the pool day->night transformation) ---- */
.pool-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pool-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.transform-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 20%, transparent 44%, rgba(12,10,13,0.5) 100%),
    linear-gradient(to top, rgba(12,10,13,0.82) 0%, rgba(12,10,13,0.1) 50%, transparent 78%);
}
.transform-copy {
  position: absolute; left: 0; right: 0; bottom: clamp(64px, 11vh, 128px);
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.transform-line {
  margin: 4px 0 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 7vw, 118px); line-height: 0.96; letter-spacing: -0.01em;
  display: flex; flex-wrap: wrap; gap: 0 0.4ch;
}
.t-day { color: var(--ink); will-change: opacity, transform; }
.t-night { color: var(--accent); opacity: 0; will-change: opacity, transform; text-shadow: 0 0 30px rgba(255,45,85,0.45); }
.transform-note { margin: 12px 0 0; max-width: 38ch; color: var(--muted); font-size: clamp(14px, 1.3vw, 17px); }

/* ============================================================
   4. THE ZONES - clip-path reveal cards
   ============================================================ */
.zones { position: relative; padding: clamp(80px, 14vh, 180px) 0 clamp(64px, 10vh, 130px); background: var(--bg); overflow: hidden; }
.zones-head { padding: 0 var(--gutter); margin-bottom: clamp(32px, 5vh, 60px); }
.zones-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.8vw, 30px); padding: 0 var(--gutter); align-items: stretch;
}
.zone-card {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px;
  background: #131017;
  clip-path: inset(0 0 100% 0);   /* revealed via clip-path on scroll (dusk ease) */
  will-change: clip-path;
}
body.is-static .zone-card { clip-path: none !important; }
.zone-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; transition: transform 0.7s var(--ease-out); }
.zone-card:hover .zone-card__img { transform: scale(1.05); }
.zone-card__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(9,7,11,0.92) 0%, rgba(9,7,11,0.1) 52%, transparent 78%); }
.zone-card__meta { position: absolute; left: 20px; right: 20px; bottom: 22px; }
.zone-card__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 2.3vw, 40px); line-height: 1; letter-spacing: -0.01em; }
.zone-card__note { margin-top: 8px; color: var(--ink); opacity: 0.78; font-size: clamp(13px, 1vw, 15px); max-width: 26ch; }
.zone-card__rule { position: absolute; left: 20px; bottom: 70px; width: 40px; height: 2px; background: var(--accent); box-shadow: 0 0 10px rgba(255,45,85,0.6); }
.zone-card[data-tint="teal"] .zone-card__rule { background: var(--accent2); box-shadow: 0 0 10px rgba(25,198,192,0.6); }

/* ============================================================
   5. TASTE - placeholder food + drink menu (rendered from config.taste)
   ============================================================ */
.taste { position: relative; padding: clamp(72px, 12vh, 150px) 0 clamp(80px, 14vh, 180px); background: var(--bg); overflow: hidden; }
.taste-head { padding: 0 var(--gutter); margin-bottom: clamp(28px, 4.5vh, 54px); }
.taste-note { margin-top: 10px; color: var(--muted); opacity: 0.7; }
.menu-grid {
  list-style: none; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 2.4vw, 40px); padding: 0 var(--gutter); align-items: stretch;
}
.menu-card {
  position: relative; display: flex; flex-direction: column;
  clip-path: inset(0 0 100% 0);   /* revealed via clip-path on scroll (dusk ease) */
  will-change: clip-path;
}
body.is-static .menu-card { clip-path: none !important; }
.menu-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; background: #131017; }
.menu-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; transition: transform 0.7s var(--ease-out); }
.menu-card:hover .menu-card__img { transform: scale(1.05); }
.menu-card__flag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: rgba(9,7,11,0.66); border: 1px solid rgba(255,255,255,0.18);
  padding: 4px 8px; border-radius: 2px;
}
.menu-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 16px; }
.menu-card__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 1.7vw, 28px); line-height: 1.05; letter-spacing: -0.01em; }
.menu-card__price { font-family: var(--font-ui); font-weight: 600; font-size: clamp(14px, 1.1vw, 17px); color: var(--accent2); white-space: nowrap; }
.menu-card__note { margin-top: 6px; color: var(--ink); opacity: 0.74; font-size: clamp(13px, 1vw, 15px); max-width: 40ch; }

/* ============================================================
   6. RESERVE - brand lock + magnetic CTA
   ============================================================ */
.reserve { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--bg); padding: 14vh 0; overflow: hidden; }
/* flaming TRIBE brand-lock: screen-blended (black drops out) and offset
   UP above the headline + held low so the flames glow over the close
   without muddying the white "Find your table" type. */
.reserve-flame {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  width: min(840px, 88vw); aspect-ratio: 1284 / 716;
  opacity: 0.4; pointer-events: none; mix-blend-mode: screen; will-change: opacity, transform;
}
.reserve-flame-vid { width: 100%; height: 100%; object-fit: contain; }
.reserve-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 var(--gutter); }
.reserve-head { font-family: var(--font-display); font-weight: 600; font-size: clamp(56px, 11vw, 176px); line-height: 0.9; margin: 6px 0 8px; letter-spacing: -0.02em; }
.reserve-cta-row { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); flex-wrap: wrap; justify-content: center; }
.reserve-tickets { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid var(--accent2); padding-bottom: 3px; }
.reserve-meta { margin-top: 8px; color: var(--muted); font-size: 15px; display: flex; gap: 12px; align-items: center; }
.reserve-meta a { color: var(--ink); }
.dotsep { color: var(--accent); }
.reserve-foot { margin-top: 14px; }

/* ============================================================
   MOBILE FALLBACK - narrow viewports bypass the frame-scrubs:
   autoplay loops, native scroll, no pins, no cursor, no particles.
   ============================================================ */
body.is-mobile .fly-canvas, body.is-mobile .pool-canvas { display: none; }
body.is-mobile .fly-loop, body.is-mobile .pool-loop { display: block; }
body.is-mobile .ember-canvas { display: none; }
/* the two scenes un-stack and flow as full-height blocks on mobile */
body.is-mobile .cinema, body.is-mobile .cinema-stage { height: auto; }
body.is-mobile .scene { position: relative; height: 100svh; }
body.is-mobile .scene--transform { clip-path: none !important; }
body.is-mobile .hero-head { white-space: normal; }
body.is-mobile .skip-push { display: none; }
body.is-mobile .zone-card { clip-path: none !important; }
body.is-mobile .zones-grid { grid-template-columns: 1fr; }
body.is-mobile .menu-card { clip-path: none !important; }
body.is-mobile .menu-grid { grid-template-columns: 1fr; }

/* ============================================================
   REDUCED MOTION - static, legible, no pins/cursor/loader/particles
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .cursor { display: none; }
  .skip-push { display: none; }
  .fly-canvas, .pool-canvas { display: none; }
  .ember-canvas { display: none; }
  .fly-loop, .pool-loop { display: block; }
  /* un-stack the cinema scenes into two static, legible blocks */
  .cinema, .cinema-stage { height: auto; }
  .scene { position: relative; height: auto; min-height: 78vh; }
  .scene--transform { clip-path: none !important; }
  .hero-head { white-space: normal; }
  .hero-flame { opacity: 0.42; }
  .t-night { opacity: 1; }
  .zone-card { clip-path: none !important; }
  .menu-card { clip-path: none !important; }
  .reserve-flame { opacity: 0.36; }
}
