/* ============================================================
   ACADMI ONBOARDING — shared retro-arcade theme
   Used by all hero directions. Per-page <style> handles layout.
   ============================================================ */

:root {
  --bg:        #0B0E14;
  --bg-2:      #0D1118;
  --panel:     #11151D;
  --panel-2:   #171C26;
  --panel-3:   #0A0D13;
  --border:    #232A36;
  --border-2:  #2F3846;
  --ink-1:     #E8EEF5;
  --ink-2:     #A7B0BD;
  --ink-3:     #7D8796;
  --cyan:      #2dd4d4;
  --pink:      #FF6FAE;
  --green:     #A3EB74;
  --yellow:    #F5B942;
  --orange:    #F26B43;
  --red:       #FF5E7B;
  --glow:      0.9;
  --grid-size: 30px;
  --accent:    var(--cyan);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- backdrop: grid + radial glows ---- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%,  rgba(45,212,212,0.10), transparent 45%),
    radial-gradient(circle at 88% 18%, rgba(255,111,174,0.09), transparent 45%),
    radial-gradient(circle at 50% 108%, rgba(163,235,116,0.06), transparent 55%),
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
}
.bg-scan {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.0075) 0px,
    rgba(255,255,255,0.0075) 1px,
    transparent 1px,
    transparent 3px
  );
  /* Blend mode dropped, and the layer promoted instead. A fixed full-viewport
     overlay normally costs nothing to scroll past, but a blended one is defined
     in terms of the pixels beneath it, so scrolling invalidates it and the
     compositor re-blends the whole viewport every frame.
     The alpha drops with it: against a dark backdrop `overlay` reduces to a
     ~1.03x brightening, where normal compositing ADDS 0.028 instead and the
     lines come out several times too strong. 0.0075 holds the ratio measured
     on the board's copy of this overlay (0.03 -> 0.008). */
  transform: translateZ(0);
}

/* floating glyphs that drift in the bg */
.float-glyphs { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.gly {
  position: absolute;
  font-family: 'Press Start 2P', monospace;
  color: var(--cyan);
  opacity: 0.0;
  animation: gly-drift linear infinite;
  text-shadow: 0 0 10px currentColor;
  user-select: none;
}
@keyframes gly-drift {
  0%   { transform: translateY(40px) scale(0.9); opacity: 0; }
  12%  { opacity: 0.5; }
  88%  { opacity: 0.5; }
  100% { transform: translateY(-120px) scale(1.05); opacity: 0; }
}

/* ============================================================
   Pixel mascot (built by mascot.js)
   ============================================================ */
.mascot-wrap { position: relative; display: inline-block; line-height: 0; }
.mascot-wrap svg { display: block; image-rendering: pixelated; }

.hoot-glow { filter: drop-shadow(0 0 10px rgba(242,107,67,.5)) drop-shadow(0 0 22px rgba(242,107,67,.22)); }
@keyframes hoot-bob    { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-0.9px); } }
@keyframes hoot-blink  { 0%,90%,100% { transform: scaleY(1); }  93%,97% { transform: scaleY(.12); } }
@keyframes hoot-tassel { 0%,100% { transform: rotate(-10deg); }  50% { transform: rotate(14deg); } }
@keyframes hoot-shadow { 0%,100% { transform: scaleX(1); opacity:.45; } 50% { transform: scaleX(.86); opacity:.3; } }
@keyframes hoot-star   { 0%,100% { opacity: 0; transform: scale(.5);} 50% { opacity: 1; transform: scale(1);} }
.hoot-bob    { animation: hoot-bob 1.6s ease-in-out infinite; }
.hoot-eyes   { animation: hoot-blink 4.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hoot-tassel { animation: hoot-tassel 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 0 0; }
.hoot-shadow { animation: hoot-shadow 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hoot-star   { animation: hoot-star 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hoot-star.s2 { animation-delay: .75s; }
.hoot-star.s3 { animation-delay: 1.5s; }
.hoot-star.s4 { animation-delay: 2.25s; }

/* ============================================================
   Common UI atoms
   ============================================================ */
.pixel { font-family: 'Press Start 2P', monospace; font-weight: 400; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.neon {
  text-shadow:
    0 0 calc(8px * var(--glow))  currentColor,
    0 0 calc(22px * var(--glow)) currentColor;
}

/* primary CTA — arcade button */
.btn-coin {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #0B0E14;
  background: var(--accent);
  border: 0;
  padding: 20px 34px;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  box-shadow:
    0 0 0 2px color-mix(in oklab, var(--accent) 55%, white 0%),
    0 8px 0 0 color-mix(in oklab, var(--accent) 35%, black 55%),
    0 0 calc(26px * var(--glow)) color-mix(in oklab, var(--accent) 70%, transparent);
  transition: transform 90ms ease, box-shadow 90ms ease;
}
.btn-coin:hover { transform: translateY(-2px); }
.btn-coin:active {
  transform: translateY(6px);
  box-shadow:
    0 0 0 2px color-mix(in oklab, var(--accent) 55%, white 0%),
    0 2px 0 0 color-mix(in oklab, var(--accent) 35%, black 55%),
    0 0 calc(18px * var(--glow)) color-mix(in oklab, var(--accent) 70%, transparent);
}
.btn-coin .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-1);
  background: transparent;
  border: 1.5px solid var(--border-2);
  padding: 18px 26px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 140ms, color 140ms, background 140ms;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }

/* chips / pills */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  padding: 8px 14px;
  border-radius: 999px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.chip .dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .55; } }

/* panel */
.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-3) 100%);
  position: relative;
}
.panel-top-line::before {
  content: "";
  position: absolute;
  left: 16px; right: 16px; top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

/* XP bar */
.xp-track {
  position: relative;
  height: 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.xp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  box-shadow: 0 0 calc(8px * var(--glow)) rgba(245,185,66,0.6);
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(.2,1,.3,1);
  position: relative;
}
.xp-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  background-size: 90px 100%;
  background-repeat: no-repeat;
  animation: xp-shine 2.4s linear infinite;
}
@keyframes xp-shine { 0% { background-position: -90px 0; } 100% { background-position: 130% 0; } }

/* ============================================================
   Hoot — peeks from a corner, reacts on click
   ============================================================ */
.peeker {
  position: fixed;
  right: 22px;
  bottom: -6px;
  z-index: 80;
  width: 150px;
  cursor: pointer;
  transform: translateY(64px);
  transition: transform 420ms cubic-bezier(.2,1,.3,1.2);
  }
.peeker.up { transform: translateY(0); }
.peeker.poke { animation: peek-poke 520ms ease; }
@keyframes peek-poke {
  0% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-22px) rotate(-6deg); }
  55% { transform: translateY(-10px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0); }
}
.peeker .mascot-wrap, .peeker svg { width: 100%; height: auto; display: block; }

.speech {
  position: fixed;
  right: 180px;
  bottom: 70px;
  z-index: 81;
  max-width: 240px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-1);
  background: var(--panel-2);
  border: 1.5px solid var(--border-2);
  border-radius: 12px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 200ms, transform 200ms;
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.speech::after {
  content: "";
  position: absolute;
  right: -8px; bottom: 18px;
  border: 8px solid transparent;
  border-left-color: var(--border-2);
}
.speech.show { opacity: 1; transform: translateY(0) scale(1); }
.speech b { color: var(--cyan); }

@media (prefers-reduced-motion: reduce) {
  .hoot-bob,.hoot-eyes,.hoot-tassel,.hoot-shadow,.hoot-star,.gly,.xp-fill::after,.btn-coin .blink { animation: none !important; }
}
