/* ════════════════════════════════════════════════════════════════
   XIXI — STYLESHEET
   ────────────────────────────────────────────────────────────────
   Vibe-coder map. Everything you'd ever want to tweak lives in the
   TOKENS block right below. Change a value there, the whole site
   follows. Nothing magic, nothing buried.

   SECTIONS (search these banners to jump):
     "TOKENS"          → all colors / sizes / timing in one place
     "BASE"            → reset + page defaults
     "HERO"            → the page: logo, tagline, "Coming Soon"
     "SHADER"          → the canvas background behind the hero
     "RESPONSIVE"      → phone / tablet adjustments
   ════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════
   TOKENS  ·  THE ONLY PLACE YOU NEED TO EDIT FOR GLOBAL CHANGES
   ════════════════════════════════════════════════════════════════ */
:root {

  /* ── BRAND ──────────────────────────────────────────────────── */
  --brand:        #7f24ee;          /* the purple. change once, done */
  --brand-soft:   #7f24ee1a;        /* same purple ~10% — soft glows */
  --brand-glow:   #7f24ee33;        /* same purple ~20% — stronger   */

  /* ── HERO (dark section) ───────────────────────────────────── */
  --hero-bg:      #07070b;
  --hero-ink:     #adadad;          /* main text on dark             */
  --hero-ink-dim: rgba(255,255,255,0.45);  /* muted text on dark    */

  /* ── PAGE BASE ──────────────────────────────────────────────── */
  --dark-bg:      #07070b;
  --dark-ink:     #ffffff;

  /* ── LOGO LOCKUP (hero) ─────────────────────────────────────── */
  --logo-size:    clamp(300px, 40vw, 900px); /* the big "XIXI"        */
  --logo-weight:  800;
  --logo-spacing: -0.04em;
  --tagline-size: clamp(12px, 1.3vw, 16px); /* "Coming Soon"         */
  --tagline-gap:  28px;                     /* space logo → tagline  */

  /* ── SHADER FEEL (subtle, minimalist) ───────────────────────────
     Hero stays full opacity — its subtlety is controlled by the
     `intensity` knob inside xixi.html (HERO.intensity). Lower that
     for an even fainter grey; this just gates the whole layer.      */
  --shader-opacity:      1;         /* hero (white) — 0..1           */

  /* ── TYPE ───────────────────────────────────────────────────── */
  --font:  'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ── MOTION (one curve, one duration — feels cohesive) ──────── */
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);  /* premium soft-landing  */
  --t:     0.7s;                    /* the signature transition time */
  --t-fast: 0.35s;
}


/* ════════════════════════════════════════════════════════════════
   BASE  ·  reset + page defaults
   ════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  background: var(--dark-bg);
  color: var(--dark-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ── page-load reveals ─────────────────────────────────────── */

/* generic rise (sections, scroll hint, columns) */
@keyframes xixi-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: xixi-rise 1.1s var(--ease) forwards;
}
.reveal.d1 { animation-delay: 0.15s; }
.reveal.d2 { animation-delay: 0.35s; }
.reveal.d3 { animation-delay: 0.55s; }

/* logo — fades up + un-blurs, starts immediately */
@keyframes xixi-logo-in {
  from { opacity: 0; transform: translateY(18px); filter: blur(14px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0px);  }
}
.reveal-logo {
  opacity: 0;
  animation: xixi-logo-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

/* tagline — same blur-rise but slower + delayed so it trails the logo */
@keyframes xixi-tag-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0px);  }
}
.reveal-tagline {
  opacity: 0;
  animation: xixi-tag-in 1.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-logo, .reveal-tagline { animation: none; opacity: 1; filter: none; }
  html { scroll-behavior: auto; }
}


/* ════════════════════════════════════════════════════════════════
   HERO  ·  SECTION 1  —  dark, logo + coming soon
   ════════════════════════════════════════════════════════════════ */

/* ── HERO GRADIENT KNOBS ────────────────────────────────────────
   Edit these to control the radial gradient background.

   --hero-grad-dark    base/outer color  (the black ring)
   --hero-grad-stop    where the black starts (40% = near center)
   --hero-grad-color   the glow color at center
   --hero-grad-size    125% 125% = how large the radial spreads
   --hero-grad-x       horizontal center of the glow (50% = middle)
   --hero-grad-y       vertical anchor of the glow   (10% = near top)
   ──────────────────────────────────────────────────────────────── */
:root {
  --hero-grad-dark:  #030007b9;
  --hero-grad-stop:  40%;
  --hero-grad-color: #350075;
  /* RADIUS of the glow — a single length keeps it a perfect CIRCLE that
     does NOT distort on resize. Uses vmax (the larger viewport axis) so
     coverage stays roughly the same on any screen. ~92.5vmax ≈ the old
     185% on a square-ish window. Bump up/down to grow/shrink the glow. */
  --hero-grad-size:  92.5vmax;
  --hero-grad-x:     50%;
  --hero-grad-y:     20%;
  /* EDGE FEATHER — softness of the glow's outer edge. It's the distance
     the purple takes to fade in, measured from --hero-grad-stop outward.
     Bigger = softer / more gradual.  Smaller = harder / sharper edge.
     Range: 0% (hard line) → ~60% (very soft).  Default: 25%            */
  --hero-grad-feather: 100%;
}

@keyframes hero-grad-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--hero-grad-dark);   /* solid base so there's no flash */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

/* gradient fades in on top of the solid base */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle var(--hero-grad-size) at var(--hero-grad-x) var(--hero-grad-y),
    var(--hero-grad-dark)  var(--hero-grad-stop),
    var(--hero-grad-color) calc(var(--hero-grad-stop) + var(--hero-grad-feather)),
    var(--hero-grad-color) 100%
  );
  opacity: 0;
  /* FADE KNOBS — adjust here:
     duration  = how long the fade takes  (default 2.8s)
     delay     = pause before it starts   (default 0.2s)
     easing    = feel of the curve        (default ease-out) */
  animation: hero-grad-in 2.8s ease-out 0.2s forwards;
}

/* subtle dark vignette to keep the dot grid from competing with the logo */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    55% 55% at 50% 50%,
    transparent 30%,
    rgba(7,7,11,0.55) 100%
  );
}

/* ── HERO CORNER LABELS  (top-left / top-right) ──────────────────
   Edit font-size, padding, color, letter-spacing here.            */
.hero-corner {
  position: absolute;
  top: 28px;                          /* ← distance from top edge */
  z-index: 3;
  font-size: 11px;                    /* ← text size */
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hero-ink-dim);         /* ← color (dim white) */
}
.hero-corner--left  { left: 32px; }   /* ← left edge offset */
.hero-corner--right { right: 32px; }  /* ← right edge offset */

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  /* vertical nudge for the whole lockup (logo + tagline).
     Set --inner-y inline in xixi.html. Negative = up, positive = down. */
  transform: translateY(var(--inner-y, 0px));
}

/* ── XIXI LOGO ────────────────────────────────────────────────────
   Two ways to set it (use ONE):
     • <img class="hero-logo-img">  → controlled per-instance with
       inline vars:  --logo-w (width)  --logo-y (vertical nudge)
       Defaults below kick in if you don't set them inline.
     • <h1 class="hero-logo">TEXT</h1> → uses the --logo-size token. */
.hero-logo {
  font-size: var(--logo-size);
  font-weight: var(--logo-weight);
  letter-spacing: var(--logo-spacing);
  color: var(--hero-ink);
  line-height: 1;
  user-select: none;
}
.hero-logo-img {
  width: var(--logo-w, var(--logo-size));
  height: auto;
  transform: translateY(var(--logo-y, 0px));
  display: block;
}

/* ── RADIAL BLUR GLOW BEHIND LOGO ────────────────────────────────
   All knobs live on the element inline style in xixi.html.
   --glow-size   = circle diameter
   --glow-color  = fill colour (rgba for opacity control)
   --glow-blur   = blur radius (higher = softer + larger)
   --glow-y      = vertical nudge                                   */
.hero-glow {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width:  var(--glow-size, 520px);
  height: var(--glow-size, 520px);
  transform: translate(-50%, calc(-50% + var(--glow-y, -20px)));
  border-radius: 50%;
  background: var(--glow-color, rgba(127,36,238,0.22));
  filter: blur(var(--glow-blur, 90px));
  pointer-events: none;
}

/* ── LOGO + TAGLINE LOCKUP ─────────────────────────────────────────
   Shrinks to the logo's exact rendered width, so the tagline can be
   justified to span precisely the same width. Centered as one unit. */
.hero-lockup {
  width: fit-content;
  margin-inline: auto;
}
.hero-retail-tagline {
  display: block;
  width: 100%;
  margin-top: 12px;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: clamp(12px, 1.9vw, 28px);
  font-weight: 500;
  text-transform: capitalize;
  color: var(--hero-ink);
  /* ONE line, edges pinned to the logo width:
     - nowrap stops it ever breaking onto two lines
     - the natural text is narrower than the logo, so justify stretches
       it out to span the full logo width edge-to-edge
     - letter-spacing soaks up some width so the word-gaps stay tight */
  white-space: nowrap;
  text-align: justify;
  text-align-last: justify;
  letter-spacing: 0.12em;
  /* CSS appends letter-spacing AFTER the last glyph, leaving the right
     edge 0.12em short — pull the box back by exactly that so the final
     letter sits flush with the logo's right edge. */
  margin-right: -0.12em;
}

/* ── COMING SOON ──────────────────────────────────────────────────
   Pinned to the bottom of the hero / page. A quiet, centered label.
   Edit knobs here:
     bottom          → distance from the bottom edge (responsive clamp)
     font-size       → text size (responsive clamp)
     letter-spacing  → spread
     color           → text color (dim white)                        */
.hero-coming-soon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(24px, 5vh, 52px);
  z-index: 3;
  text-align: center;
  font-size: clamp(11px, 1.3vw, 15px);
  font-weight: 600;
  letter-spacing: 0.36em;
  text-indent: 0.36em;                 /* offset trailing letter-spacing → optically centered */
  text-transform: uppercase;
  color: var(--hero-ink-dim);
  pointer-events: none;
}


/* ════════════════════════════════════════════════════════════════
   SHADER  ·  the minimalist canvas behind the hero
   Drawn in JS (xixi.html). This just places + fades it.
   ════════════════════════════════════════════════════════════════ */
.hero-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: var(--shader-opacity);
  pointer-events: none;
}
.hero-shader canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}


/* ════════════════════════════════════════════════════════════════
   RESPONSIVE  ·  phone / tablet
   The hero is the whole page now. These rules keep the logo, tagline,
   corner labels, and "Coming Soon" comfortable on every screen size.
   ════════════════════════════════════════════════════════════════ */

/* desktop: ignore the inline --inner-y nudge so the logo + tagline sit
   in the true vertical center of the page (mobile keeps its nudge below) */
@media (min-width: 769px) {
  .hero-inner { transform: none; }
}

/* use the small-viewport unit where supported so mobile browser chrome
   (address bar) doesn't crop the hero or push the footer off-screen */
@supports (height: 100svh) {
  .hero { min-height: 100svh; height: 100svh; }
}

/* fallback: set a JS-driven --vh on body so 100vh matches the real visible height */
.hero { min-height: calc(var(--vh, 1vh) * 100); height: calc(var(--vh, 1vh) * 100); }

/* tablet / large phone */
@media (max-width: 768px) {
  .hero-corner        { top: 20px; font-size: 10px; letter-spacing: 0.2em; }
  .hero-corner--left  { left: 20px; }
  .hero-corner--right { right: 20px; }
}

/* phone */
@media (max-width: 520px) {
  .hero-inner { padding: 0 20px; }

  /* on a narrow logo width, ease the letter-spacing so justify still
     pins the edges without stretching the word-gaps too far */
  .hero-retail-tagline {
    text-align: justify;
    text-align-last: justify;
    letter-spacing: 0.06em;
  }

  .hero-corner        { top: 16px; }
  .hero-corner--left  { left: 16px; }
  .hero-corner--right { right: 16px; }

  .hero-coming-soon { letter-spacing: 0.3em; text-indent: 0.3em; }
}

/* short / landscape phones — pull the footer in so it never overlaps
   the logo on very short viewports */
@media (max-height: 520px) {
  .hero-coming-soon { bottom: 16px; }
}
