/* ============================================================================
 * landing.css — homepage-only styles for "The Hearth" (index.html).
 * Loaded after site.css; the /apps/ page never loads this file.
 * Palette: midnight sky + warm embers — deep navy-blue stage behind the
 * amber/gold ember field (site.css stays warm plum for /apps/).
 * Layers: ember canvas (z0) -> grain + vignette (z2) -> glowing tap/click
 * hint (z10, Round 16, legibility pass Round 17): a small slowly flashing
 * instruction at ~1/3 from the bottom, pointer-transparent, melting away on
 * the visitor's first interaction.
 * ==========================================================================*/

/* ============================================================================
 * Viewport lock — the homepage is a fixed, fullscreen ember stage: no
 * scrolling ever, and touch drags belong to the embers, not the browser.
 * landing.css loads ONLY on the homepage (/apps/ never includes it), so these
 * unscoped rules cannot leak into the apps page.
 * ==========================================================================*/
html { overflow: hidden; overscroll-behavior: none; }
body.landing-page {
  height: 100vh; height: 100dvh;               /* dvh after vh fallback */
  overflow: hidden; overscroll-behavior: none;
  touch-action: none;                           /* drags drive the embers, not the page */
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================================
 * Midnight sky — homepage-only background override (Round 14).
 * Scoped to body.landing-page so the /apps/ page keeps site.css's warm plum
 * radial composition untouched. Embers stay warm; only the sky goes blue.
 * ==========================================================================*/
body.landing-page {
  background:
    radial-gradient(1100px 560px at 18% -12%, rgba(84, 126, 220, 0.14), transparent 62%),
    radial-gradient(900px 500px at 88% 4%, rgba(62, 100, 200, 0.10), transparent 58%),
    radial-gradient(700px 700px at 50% 120%, rgba(18, 38, 88, 0.35), transparent 60%),
    #070d1d;
}

/* ---------- ember canvas ---------- */
#ember-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
body.ember-hidden #ember-canvas { display: none; }

/* ---------- grain + vignette overlays (texture over the ember stage) ---------- */
body.landing-page::before,
body.landing-page::after {
  content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none;
}
body.landing-page::before {
  background-image: radial-gradient(rgba(255, 217, 160, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
}
body.landing-page::after {
  background: radial-gradient(120% 95% at 50% 38%, transparent 55%, rgba(6, 11, 26, 0.55) 100%);
}

/* ---------- reduced motion: static midnight gradient only (landing-page bg) ---------- */
@media (prefers-reduced-motion: reduce) {
  #ember-canvas { display: none; }
}

/* ============================================================================
 * Glowing tap/click hint (Round 16) — a small, slowly flashing instruction at
 * ~1/3 from the bottom of the page: "swipe and tap anywhere" on touch devices,
 * "click anywhere" on fine pointers (pure CSS pointer:coarse switch, no JS
 * detection). Round 17: the
 * word is a faint luminous CORE — dim warm fill + tight 5px shape shadow with
 * 10/22px halo and a softening blur — so the letterforms resolve clearly
 * while the edges stay soft (no hard glyph edges). pointer-events: none means
 * taps pass straight through to the flint-strike burst. It fades in after the
 * page settles, pulses slowly forever, and melts away (opacity 0) on the
 * visitor's very first pointer interaction (landing.js adds .dismiss).
 * ==========================================================================*/
.tap-hint {
  position: fixed;
  bottom: 33%;                            /* ~1/3 up from the bottom edge */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;                   /* taps pass through to the ember stage */
  font-family: var(--font-display);       /* Fraunces serif (self-hosted) */
  font-style: italic;
  font-weight: 500;                       /* mid weight — thicker strokes resolve at small sizes */
  font-size: clamp(17px, 2.4vw, 19px);    /* slightly larger (was 15-16px) — still small */
  letter-spacing: 0.10em;                 /* tighter than 0.12em — keeps counters together */
  text-transform: lowercase;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 219, 166, 0.42);       /* luminous core — raised from 0.30 (crisper pass:
                                             higher fill alpha makes the letterforms read
                                             clearly through the glow instead of behind it) */
  text-shadow:                            /* tighter glow, crisp pass: 4px carries the shape,
                                             8/16px halo (was 5/10/22 — the wide outer halo
                                             was the main fuzz contributor) */
    0 0 4px rgba(255, 224, 170, 0.90),
    0 0 8px rgba(255, 190, 110, 0.55),
    0 0 16px rgba(255, 150, 90, 0.28);
  /* blur filter removed (crisp pass): the 0.8px blur was softening every glyph
     edge. Chromium no-ops blurs < 0.8px anyway, so removing it entirely costs
     nothing in Chromium and sharpens the text everywhere else. */
  /* the container owns the melt transition; the pulse lives on .hint-word so
     the 1 -> 0 dismiss transition actually runs (a property that is itself
     being animated cannot start a transition from its animated value) */
  transition: opacity 0.9s ease;
}

/* ============================================================================
 * Wordmark — across the top, centered: "Welcome / To / Bunkorbase / Studios"
 * in Cinzel (engraved inscriptional capitals, the free Copperplate Gothic
 * equivalent — chosen for legibility after the cursive read as too stylish).
 * All-caps with letterspacing (the Copperplate look). Same warm luminous-glow
 * recipe (raised core alpha, tight 4/8/16px halo, no blur).
 * ==========================================================================*/
.wordmark {
  position: fixed;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;                   /* taps pass through to the ember stage */
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Cinzel', var(--font-display);
  font-style: normal;
  font-weight: 500;                       /* mid: Copperplate's stem weight */
  font-size: clamp(16px, min(5vw, 4.6vh), 76px); /* caps read larger than cursive at
                                              equal size — scaled down; height-aware so
                                              the doubled name fits the top band */
  line-height: 1.18;                      /* caps need less headroom than script */
  letter-spacing: 0.14em;                 /* the Copperplate engraved-plate spacing */
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 219, 166, 0.78);       /* warm core, no glow (Wayne: remove the glow) */
}
.wm-line { display: block; white-space: nowrap; }
.wm-to {
  font-size: 0.62em;                      /* "To" a step down, per the design */
  line-height: 1.2;
  margin: 0.06em 0;
}
.wm-big {
  font-size: 2em;                         /* Bunkorbase Studios: double the base */
  line-height: 1.06;
}
/* The two path options: spread left-to-right across the width at 33% and 67%,
   vertically centered (same row), in a redder light than the heading (same
   glow geometry, hue shifted toward ember-red). */
.wm-choice {
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: none;                       /* <button> reset — now tappable */
  border: 0;
  padding: 0.4em 0.8em;                   /* generous hit area */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Cinzel', var(--font-display);  /* own layer: no inheritance */
  font-weight: 500;
  font-size: clamp(15px, 2.4vw, 54px);    /* -25% from the 3.2vw/72px pass (Wayne:
                                              the choices read too big on desktop) */
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 176, 152, 0.85);       /* redder tone, no glow */
  transition: color 0.3s ease;
}
.wm-choice:hover, .wm-choice:focus-visible {
  color: rgba(255, 224, 205, 0.95);       /* warm brighten on hover */
  outline: none;
}
.wm-choice:focus-visible {
  text-decoration: underline;             /* keyboard a11y */
  text-underline-offset: 0.2em;
}
.wm-choice-a { left: 33%; }               /* Recruiters: left-of-center */
.wm-choice-b { left: 67%; }               /* Players: right-of-center */

/* Per-choice interaction hints, sitting directly beneath each option. Small
   Sora UI text (hierarchy: copperplate display > choices > hints), same glow
   geometry as the tap-hint. Recruiters gets the practical invitation; Players
   gets 'FAFO' — the mystery is the message. */
.wm-hint {
  position: fixed;
  top: calc(50% + 2.6em);                 /* below the choices' center line */
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: clamp(11px, 1.2vw, 15px);
  letter-spacing: 0.22em;                 /* tracked small-caps feel */
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 190, 170, 0.52);
}
.wm-hint-a { left: 33%; }
.wm-hint-b { left: 67%; color: rgba(255, 150, 130, 0.62); }  /* FAFO runs a touch hotter */

/* Ripple-wash state: the wave dissolves text layers as it crosses them
   (landing.js adds .washed in distance order from the tap point). */
.washed {
  opacity: 0 !important;
  transition: opacity 0.35s ease !important;
}

/* Profile view (revealed by the Recruiters wash): a quiet card in the same
   engraved language, floating over the live ember field. */
.profile {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;                          /* [hidden] attr is overridden by this —
                                             see .profile[hidden] below */
  place-items: center;
}
.profile[hidden] { display: none; }       /* the hidden attribute must actually hide */
.profile-return[hidden] { display: none; }  /* inline-flex overrides [hidden] otherwise */
.profile-return {
  position: fixed;
  top: 3.5vh;
  left: 3vw;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: none;
  border: 1px solid rgba(255, 190, 110, 0.25);
  border-radius: 999px;
  padding: 0.55em 1.1em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 219, 166, 0.75);
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.profile-return:hover, .profile-return:focus-visible {
  color: rgba(255, 235, 200, 0.95);
  border-color: rgba(255, 190, 110, 0.55);
  box-shadow: 0 0 18px -4px rgba(255, 180, 94, 0.45);
  outline: none;
}
.pr-arrow { font-size: 1.25em; line-height: 1; }
.profile-card {
  max-width: 560px;
  width: min(86vw, 560px);
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(160deg, rgba(10, 14, 34, 0.82), rgba(7, 10, 26, 0.88));
  border: 1px solid rgba(255, 190, 110, 0.20);
  border-radius: 14px;
  box-shadow:
    0 30px 90px -30px rgba(0, 0, 0, 0.8),
    0 0 60px -18px rgba(255, 180, 94, 0.18);
  text-align: left;
}
.profile-name {
  margin: 0 0 0.3em;
  font-family: 'Cinzel', var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 224, 178, 0.92);
  text-shadow:
    0 0 6px rgba(255, 224, 170, 0.8),
    0 0 18px rgba(255, 170, 90, 0.35);
}
.profile-role {
  margin: 0 0 1.1em;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 176, 152, 0.66);
}
.profile-body {
  margin: 0 0 1.2em;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  color: rgba(246, 234, 217, 0.82);
}
.profile-facts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-facts li {
  display: flex;
  gap: 1em;
  padding: 0.55em 0;
  border-top: 1px solid rgba(255, 190, 110, 0.12);
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(246, 234, 217, 0.75);
}
.profile-facts li span {
  flex: 0 0 6.5em;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 176, 152, 0.6);
  padding-top: 0.2em;
}

/* Narrow screens: letterspaced caps are wide — the doubled name clips and the
   two 10-character choices cannot share a 390px row. The name drops tracking;
   the choices stack vertically (38%/58%), centered. */
@media (max-width: 600px) {
  .wordmark {
    letter-spacing: 0.08em;
  }
  .wm-choice {
    font-size: clamp(18px, 6vw, 26px);
    letter-spacing: 0.08em;
  }
  .wm-choice-a { top: 41%; left: 50%; }   /* nudged down: the wordmark crowds it at 38% */
  .wm-choice-b { top: 58%; left: 50%; }
  .wm-hint { top: calc(50% + 2.6em); }      /* default sits mid-screen: wrong here */
  .wm-hint-a { top: calc(41% + 2.2em); left: 50%; }   /* under stacked RECRUITERS */
  .wm-hint-b { top: calc(58% + 2.2em); left: 50%; }   /* under stacked PLAYERS */
}

/* device-aware phrase: fine pointers get "click anywhere", coarse get
   "swipe and tap anywhere". The pulse lives here (on the phrase), not on
   the container — see .tap-hint above for why: the container must stay
   animation-free so its dismiss transition (1 -> 0 melt) runs. */

/* Ripple wash overlay: above everything, below the profile card; only paints
   during a transition. */
#ripple {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
  pointer-events: none;
}

@media (max-width: 600px) {
  .profile-return { left: 5vw; top: 2.5vh; }
  .profile-facts li span { flex-basis: 5.2em; }
}
.hint-word {
  display: none;
  animation: hintIn 1s ease-out 0.8s both,
             hintPulse 3.4s ease-in-out 1.6s infinite;
}
.hint-click { display: inline; }
@media (pointer: coarse) {
  .hint-click { display: none; }
  .hint-tap { display: inline; }
}

@keyframes hintIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; }
}

/* first interaction: the hint melts away (landing.js adds .dismiss).
   The container has no animation of its own, so opacity 1 -> 0 runs as a
   real 0.9s transition — the word fades out smoothly. */
.tap-hint.dismiss {
  opacity: 0;
}

/* reduced motion: static soft glow, no flash */
@media (prefers-reduced-motion: reduce) {
  .hint-word { animation: none; }
  .tap-hint { opacity: 0.55; }
}

}
