/* ================================================================
 *  FURST PLACE PRIDE — DESIGN SYSTEM
 *  ----------------------------------------------------------------
 *  Reusable tokens + components for any page in the site.
 *  Drop this into a page with:
 *
 *    <link rel="preconnect" href="https://fonts.googleapis.com" />
 *    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
 *    <link href="https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Space+Mono:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet" />
 *    <link rel="stylesheet" href="theme.css" />
 *    <script defer src="iso.js"></script>
 *
 *  Sections:
 *    1. Tokens (colors, type)
 *    2. Base reset
 *    3. Scene backdrop (.stars, .grid-floor, .grid-glow)
 *    4. Iso cube / tower decoration system (.cubes, .cube, .cube--*)
 *    5. The 3D extruded logo (.logo, .logo-row, .logo-row.pride)
 *    6. UI atoms (.badge, .subtle, .blink, .hud-top, .hud-pill)
 * ================================================================ */

/* --------------------------------------------------
 * 1. TOKENS
 * -------------------------------------------------- */
:root {
  /* core brand palette */
  --sky:        #00daf5;   /* primary brand cyan */
  --sky-deep:   #0099b8;   /* logo side-extrusion */
  --paper:      #eff5f6;   /* light text + UI */
  --ink:        #1f241d;   /* dark text + outlines + shadows */

  /* iso cube fills — restricted brand palette */
  --cube-1:     #4e99cc;   /* steel-blue */
  --cube-2:     #7ae97a;   /* lime */
  --cube-3:     #00daf5;   /* brand cyan */

  /* pride rainbow — for PRIDE letters + flag accents */
  --r1: #e63946;
  --r2: #f4842c;
  --r3: #ffce2e;
  --r4: #5fb84e;
  --r5: #3b96e6;
  --r6: #9b59c8;

  /* type */
  --font-display: "Rubik Mono One", system-ui, sans-serif;
  --font-mono:    "Space Mono", monospace;
  --font-body:    "DM Sans", system-ui, sans-serif;
}

/* --------------------------------------------------
 * 2. BASE RESET
 * -------------------------------------------------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--paper);
  font-family: var(--font-body);
  background: var(--ink);
}

/* Apply this on body when you want the full SM64-coded sky backdrop. */
.scene-bg {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,218,245,0.4) 0%, transparent 55%),
    linear-gradient(180deg, #00485a 0%, #001a24 60%, var(--ink) 100%);
  position: relative;
}

/* --------------------------------------------------
 * 3. SCENE BACKDROP
 *    Drop <div class="stars"></div><div class="grid-floor"></div><div class="grid-glow"></div>
 *    as the first siblings of the page content.
 * -------------------------------------------------- */
.stars {
  position: fixed; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(239,245,246,0.9), transparent 50%),
    radial-gradient(1.5px 1.5px at 24% 8%, rgba(239,245,246,0.7), transparent 50%),
    radial-gradient(2px 2px at 78% 12%, rgba(239,245,246,0.8), transparent 50%),
    radial-gradient(1.5px 1.5px at 90% 25%, rgba(239,245,246,0.6), transparent 50%),
    radial-gradient(2px 2px at 8% 36%, rgba(239,245,246,0.7), transparent 50%),
    radial-gradient(2px 2px at 86% 42%, rgba(239,245,246,0.8), transparent 50%),
    radial-gradient(1.5px 1.5px at 55% 6%, rgba(239,245,246,0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 40% 30%, rgba(239,245,246,0.4), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.grid-floor {
  position: fixed;
  left: -10%; right: -10%;
  bottom: 0;
  height: 65vh;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.65) 100%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(0,218,245,0.55) 60px 62px),
    repeating-linear-gradient(0deg,  transparent 0 40px, rgba(0,218,245,0.45) 40px 42px);
  transform: perspective(700px) rotateX(60deg);
  transform-origin: bottom;
}

.grid-glow {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 30vh;
  background: linear-gradient(0deg, var(--ink) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* --------------------------------------------------
 * 4. ISO CUBE / TOWER DECORATION SYSTEM
 *    Add <div class="cubes" id="cubes"></div> to the page,
 *    then let iso.js fill it with prisms.
 * -------------------------------------------------- */
.cubes {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.cube {
  position: absolute;
  width: 80px; height: 80px;
}
.cube svg {
  width: 100%; height: 100%;
  display: block;
  filter: drop-shadow(0 12px 0 rgba(0,0,0,0.35));
}

/* The eight scattered ambient cubes used on the landing page.
 * Reuse on other pages by giving the cubes container these classes,
 * or define your own positions following the same pattern. */
.cube--r1     { top: 16%;  left: 8%;   width: 90px;  height: 90px; }
.cube--r2     { top: 9%;   left: 18%;  width: 64px;  height: 64px; }
.cube--r3     { top: 28%;  left: 5%;   width: 56px;  height: 56px; }
.cube--r4     { top: 12%;  right: 10%; width: 78px;  height: 78px; }
.cube--r5     { top: 24%;  right: 6%;  width: 60px;  height: 60px; }
.cube--r6     { top: 38%;  right: 16%; width: 50px;  height: 50px; }
.cube--side-l { top: 56%;  left: 4%;   width: 100px; height: 100px; }
.cube--side-r { top: 60%;  right: 4%;  width: 110px; height: 110px; }

/* The three center-stage towers. Aspect ratios MUST match the SVG
 * viewBox aspect (see iso.js isoPrism). height: auto is required
 * so aspect-ratio actually computes the height. */
.cube--tower-c {
  left: 50%; top: 50vh;
  transform: translateX(-50%);
  width: clamp(180px, 19vw, 260px);
  height: auto; aspect-ratio: 100 / 300;
  z-index: 3;
}
.cube--tower-l {
  left: 34%; bottom: -26vh;
  width: clamp(120px, 13vw, 170px);
  height: auto; aspect-ratio: 100 / 220;
  z-index: 4;
}
.cube--tower-r {
  right: 34%; bottom: -26vh;
  width: clamp(120px, 13vw, 170px);
  height: auto; aspect-ratio: 100 / 220;
  z-index: 4;
}

/* --------------------------------------------------
 * 5. THE 3D EXTRUDED LOGO
 *    Use:
 *      <h1 class="logo">
 *        <span class="logo-row"><span>F</span><span>U</span>…</span>
 *        <span class="logo-row"><span>P</span><span>L</span>…</span>
 *        <span class="logo-row pride"><span>P</span><span>R</span>…</span>
 *      </h1>
 *    Each letter must be its own <span> so PRIDE can recolor per-letter.
 * -------------------------------------------------- */
.logo {
  position: relative;
  z-index: 10;
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: 1px;
  margin: 0;
}
.logo-row {
  display: block;
  font-size: clamp(56px, 11vw, 168px);
}
.logo-row.pride {
  font-size: clamp(34px, 6.6vw, 100px);
  margin-top: clamp(8px, 1vw, 14px);
}
.logo span {
  color: var(--paper);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    /* outline ring */
    4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 4px 0 var(--ink), 0 -4px 0 var(--ink),
    3px 3px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink),
    /* extrusion side */
    5px 5px 0 var(--sky-deep), 7px 7px 0 var(--sky-deep), 9px 9px 0 var(--sky-deep),
    11px 11px 0 var(--sky-deep), 13px 13px 0 var(--sky-deep), 15px 15px 0 var(--sky-deep),
    17px 17px 0 var(--sky-deep), 19px 19px 0 var(--sky-deep), 21px 21px 0 var(--sky-deep),
    23px 23px 0 var(--sky-deep), 25px 25px 0 var(--sky-deep),
    /* back silhouette */
    28px 28px 0 var(--ink);
}
.logo .pride span {
  -webkit-text-stroke: 2px var(--ink);
  text-shadow:
    3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink),
    5px 5px 0 var(--ink), 7px 7px 0 var(--ink), 9px 9px 0 var(--ink),
    11px 11px 0 var(--ink), 13px 13px 0 var(--ink), 15px 15px 0 var(--ink),
    17px 17px 0 var(--ink);
}
.logo .pride span:nth-child(1) { color: var(--r1); }
.logo .pride span:nth-child(2) { color: var(--r2); }
.logo .pride span:nth-child(3) { color: var(--r3); }
.logo .pride span:nth-child(4) { color: var(--r4); }
.logo .pride span:nth-child(5) { color: var(--r5); }

/* --------------------------------------------------
 * 6. UI ATOMS
 * -------------------------------------------------- */

/* Pill badge — use above the logo for status labels like "★ COMING SOON ★". */
.badge {
  display: inline-block;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 4px;
  padding: 8px 22px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

/* Quiet caption text with ink halo — readable over sky OR cyan towers. */
.subtle {
  position: relative;
  z-index: 10;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.9;
  text-shadow:
    0 0 6px var(--ink),
    0 0 12px var(--ink),
    0 2px 0 var(--ink),
    0 -1px 0 var(--ink),
    1px 0 0 var(--ink),
    -1px 0 0 var(--ink);
}
.blink { animation: fpp-blink 1.8s ease-in-out infinite; }
@keyframes fpp-blink { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.2; } }

/* Top HUD strip — useful for breadcrumbs / page labels on later pages. */
.hud-top {
  position: fixed;
  left: 0; right: 0; top: 0;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--paper);
  z-index: 20;
  pointer-events: none;
}
.hud-pill {
  background: var(--paper); color: var(--ink);
  padding: 6px 12px;
  border: 2px solid var(--paper);
}
.hud-pill--cyan {
  background: transparent; color: var(--sky);
  border-color: var(--sky);
}

/* Mobile: hide the smaller ambient cubes and the side towers so the
 * center stage stays clean on phones. */
@media (max-width: 720px) {
  .cube--r2, .cube--r3, .cube--r6 { display: none; }
  .cube--tower-c { width: 130px; bottom: -20vh; }
  .cube--tower-l { width: 90px; left: calc(50% - 65px - 90px); bottom: -3vh; }
  .cube--tower-r { width: 90px; right: calc(50% - 65px - 90px); bottom: -3vh; }
  .hud-top { font-size: 10px; padding: 14px 18px; }

  .logo-row      { font-size: clamp(40px, 13vw, 80px); }
  .logo-row.pride { font-size: clamp(24px, 8vw, 50px); margin-top: 6px; }

  .logo span {
    text-shadow:
      /* outline ring */
      4px 0 0 var(--ink), -4px 0 0 var(--ink), 0 4px 0 var(--ink), 0 -4px 0 var(--ink),
      3px 3px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink),
      /* extrusion side — trimmed for mobile */
      5px 5px 0 var(--sky-deep), 7px 7px 0 var(--sky-deep), 9px 9px 0 var(--sky-deep),
      11px 11px 0 var(--sky-deep), 13px 13px 0 var(--sky-deep),
      /* back silhouette */
      15px 15px 0 var(--ink);
  }
  .logo .pride span {
    text-shadow:
      3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
      2px 2px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink),
      5px 5px 0 var(--ink), 7px 7px 0 var(--ink), 9px 9px 0 var(--ink);
  }
}
