/* ==========================================================================
   Trivall landing page — retro-futuristic theme matching the game
   ========================================================================== */

:root {
  --bg: #050814;
  --panel: #0a0f28;
  --cyan: #00ffdc;
  --blue: #00d4ff;
  --red: #ff2a5f;
  --mixed: #e066ff;
  --gold: #ffd700;
  --copper: #b86b2a;
  --copper-dim: #5a3a16;
  --cream: #f5e8c6;
  --glass: rgba(10, 15, 40, 0.55);
  --border: rgba(0, 255, 220, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  min-height: 100vh;
}

/* Radial glow behind hero */
.bg-gradient-radial {
  background:
    radial-gradient(ellipse 80% 60% at 50% 10%, rgba(0, 100, 180, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(184, 107, 42, 0.08) 0%, transparent 60%);
}

/* ==========================================================================
   Circuit-trace background (horizontal copper dashes, evokes the app icon)
   ========================================================================== */
.circuit-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, transparent 20%, rgba(0, 160, 180, 0.18) 22%, rgba(0, 160, 180, 0.18) 40%, transparent 42%),
    linear-gradient(90deg, transparent 55%, rgba(0, 160, 180, 0.12) 60%, rgba(0, 160, 180, 0.12) 82%, transparent 85%),
    linear-gradient(90deg, transparent 5%,  rgba(184, 107, 42, 0.12) 10%, rgba(184, 107, 42, 0.12) 28%, transparent 31%),
    linear-gradient(90deg, transparent 65%, rgba(184, 107, 42, 0.10) 68%, rgba(184, 107, 42, 0.10) 95%, transparent 97%),
    linear-gradient(90deg, transparent 30%, rgba(0, 160, 180, 0.10) 32%, rgba(0, 160, 180, 0.10) 52%, transparent 55%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position:
    0 8%,
    0 18%,
    0 32%,
    0 48%,
    0 62%;
  opacity: 0.55;
}
.circuit-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, transparent 10%, rgba(0, 160, 180, 0.14) 15%, rgba(0, 160, 180, 0.14) 38%, transparent 40%),
    linear-gradient(90deg, transparent 58%, rgba(184, 107, 42, 0.10) 62%, rgba(184, 107, 42, 0.10) 90%, transparent 93%),
    linear-gradient(90deg, transparent 25%, rgba(0, 160, 180, 0.10) 28%, rgba(0, 160, 180, 0.10) 44%, transparent 47%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position:
    0 75%,
    0 85%,
    0 92%;
  opacity: 0.55;
}

/* Very faint CRT scanlines for retro vibe. */
.scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.title-glow {
  text-shadow:
    0 0 10px rgba(245, 232, 198, 0.35),
    0 0 28px rgba(245, 232, 198, 0.2),
    0 2px 0 rgba(0, 0, 0, 0.6);
}

/* Trademark glyph — scaled down and lifted so it reads like a superscript. */
.tm {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 0.28em;
  line-height: 1;
  margin-left: 0.06em;
  vertical-align: super;
  color: rgba(0, 255, 220, 0.75);
  text-shadow: 0 0 6px rgba(0, 255, 220, 0.4);
  font-weight: 500;
}
.tm-nav {
  font-size: 0.55em;
}

/* ==========================================================================
   Glass panel (matches the in-game glass UI)
   ========================================================================== */
.glass-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 30%),
    var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.glass-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 255, 220, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 40px rgba(0, 255, 220, 0.12),
    0 0 22px rgba(0, 255, 220, 0.15);
}

.glass-wide {
  padding: 40px 32px;
}

.panel-index {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(0, 255, 220, 0.5);
  margin-bottom: 12px;
}
.panel-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: rgba(0, 255, 220, 0.06);
  border: 1px solid rgba(0, 255, 220, 0.25);
  position: relative;
  overflow: hidden;
}
.icon-wire::before {
  content: '';
  position: absolute;
  left: 6px; right: 6px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--cyan), #fff, var(--cyan), transparent);
  box-shadow: 0 0 10px var(--cyan);
  border-radius: 2px;
  animation: pulse-bright 2.2s ease-in-out infinite;
}
.icon-rocket::before {
  content: '';
  position: absolute;
  left: 50%; bottom: 6px;
  width: 10px; height: 30px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--cyan), rgba(0, 255, 220, 0.2));
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 0 12px rgba(0, 255, 220, 0.6);
}
.icon-rocket::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 3px;
  width: 5px; height: 5px;
  transform: translateX(-50%);
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--gold);
  animation: flicker 0.5s infinite alternate;
}
/* Overload gauge icon: a thin horizontal meter with a filled bar that
   pulses past the "danger" threshold from orange into red. */
.icon-overload::before {
  content: '';
  position: absolute;
  left: 6px; right: 6px;
  top: 50%;
  height: 10px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 255, 220, 0.35);
  border-radius: 3px;
}
.icon-overload::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 50%;
  width: 22px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, #ff8a1a, #ff2a5f);
  box-shadow: 0 0 10px rgba(255, 42, 95, 0.65);
  animation: pulse-bright 1.4s ease-in-out infinite;
}

/* Accessibility icons */
.icon-a11y-cb::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg,
      #00ffdc 0deg 120deg,
      #ffd700 120deg 240deg,
      #00d4ff 240deg 360deg);
  box-shadow: 0 0 12px rgba(0, 255, 220, 0.35);
}
.icon-a11y-cb::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #050814;
  border: 1px solid rgba(0, 255, 220, 0.5);
}
.icon-a11y-sound::before,
.icon-a11y-sound::after {
  content: '';
  position: absolute;
  border: 2px solid var(--cyan);
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0 50% 50% 0;
  left: 50%;
  top: 50%;
}
.icon-a11y-sound::before {
  width: 10px; height: 10px;
  transform: translate(-25%, -50%);
  opacity: 0.85;
  animation: pulse-bright 1.4s ease-in-out infinite;
}
.icon-a11y-sound::after {
  width: 18px; height: 18px;
  transform: translate(-15%, -50%);
  opacity: 0.4;
  animation: pulse-bright 1.4s ease-in-out infinite;
  animation-delay: 0.3s;
}
.icon-a11y-melody {
  background: linear-gradient(180deg, rgba(0, 255, 220, 0.06), rgba(0, 255, 220, 0.02));
}
.icon-a11y-melody::before {
  content: '';
  position: absolute;
  left: 6px; right: 6px; top: 50%;
  height: 20px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 15% 80%, var(--cyan) 0 3px, transparent 4px),
    radial-gradient(circle at 40% 30%, var(--gold) 0 3px, transparent 4px),
    radial-gradient(circle at 65% 60%, var(--cyan) 0 3px, transparent 4px),
    radial-gradient(circle at 90% 20%, var(--gold) 0 3px, transparent 4px);
  filter: drop-shadow(0 0 4px rgba(0, 255, 220, 0.5));
}
.icon-a11y-melody::after {
  content: '';
  position: absolute;
  left: 6px; right: 6px; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 220, 0.4), transparent);
}

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  margin-bottom: 10px;
}
.panel-body {
  color: rgba(203, 213, 225, 0.75);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ==========================================================================
   Call-to-action buttons
   ========================================================================== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.cta-sm { padding: 8px 18px; font-size: 0.7rem; letter-spacing: 0.18em; }

.cta-primary {
  background: linear-gradient(180deg, rgba(0, 255, 220, 0.22), rgba(0, 255, 220, 0.06));
  border-color: rgba(0, 255, 220, 0.55);
  color: var(--cyan);
  box-shadow: 0 0 0 rgba(0, 255, 220, 0), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.cta-primary:hover {
  background: linear-gradient(180deg, rgba(0, 255, 220, 0.35), rgba(0, 255, 220, 0.12));
  box-shadow: 0 0 28px rgba(0, 255, 220, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.cta-ghost {
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.45);
  color: var(--gold);
}
.cta-ghost:hover {
  background: rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.35);
  transform: translateY(-1px);
}

.header .cta-sm { /* reserved */ }

/* ==========================================================================
   Block demo (hero)
   ========================================================================== */
.block-demo {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  padding: 20px 0;
}

.socket-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 0;
}
.socket {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #2a1a08, #050203);
  border: 1.5px solid var(--copper);
  box-shadow:
    inset 0 0 4px rgba(0, 0, 0, 0.7),
    0 0 3px rgba(184, 107, 42, 0.5);
}
.socket-lit {
  background: radial-gradient(circle at 40% 40%, #fff2a8, var(--gold));
  border-color: #ffe67a;
  box-shadow:
    0 0 10px var(--gold),
    0 0 22px rgba(255, 215, 0, 0.6);
  animation: pulse-bright 1.8s ease-in-out infinite;
}

.grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), transparent);
  border-radius: 12px;
}
.row {
  display: flex;
  gap: 6px;
  position: relative;
}

.block {
  width: 54px;
  height: 54px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.4);
}
.block-lg { width: 72px; height: 72px; border-radius: 6px; }

.half {
  height: 50%;
  width: 100%;
  position: relative;
}
.half::before {
  /* subtle top highlight per half — makes the halves look like separate tiles */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}
.half.red   { background: linear-gradient(180deg, #ff3a6e, #cc1a4a); }
.half.blue  { background: linear-gradient(180deg, #2ae3ff, #0068b0); }
/* Mixed halves: blue base with red diagonal stripes falling to the left
   (top-right → bottom-left), matching the in-game block_draw.gd rendering. */
.half.mixed {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 6px,
      #ff2a5f 6px 12px
    ),
    linear-gradient(180deg, #2ae3ff, #0068b0);
}
.half.metal {
  background: linear-gradient(180deg, #d0d4d9 0%, #8a8f96 45%, #5c6066 100%);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse-bright {
  0%, 100% { opacity: 0.55; filter: brightness(0.95); }
  50%      { opacity: 1;    filter: brightness(1.5); }
}
@keyframes flicker {
  0%   { opacity: 0.6; transform: translateX(-50%) scale(0.9); }
  100% { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}

/* ==========================================================================
   Mechanics section
   ========================================================================== */
.bullet {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(203, 213, 225, 0.88);
  font-size: 0.9rem;
}
.bullet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.bg-blue  { background: var(--blue);  box-shadow: 0 0 10px var(--blue); }
.bg-red   { background: var(--red);   box-shadow: 0 0 10px var(--red); }
.bg-mixed { background: var(--mixed); box-shadow: 0 0 10px var(--mixed); }
.bg-gold  { background: var(--gold);  box-shadow: 0 0 10px var(--gold); }
.bg-cyan  { background: var(--cyan);  box-shadow: 0 0 10px var(--cyan); }

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: center;
  max-width: 320px;
}
.legend-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--glass);
  width: 100%;
}
.legend-tile span {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: rgba(0, 255, 220, 0.8);
}

/* ==========================================================================
   Accessibility chapter
   ========================================================================== */
.a11y-section {
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(255, 215, 0, 0.06), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 85%, rgba(0, 255, 220, 0.06), transparent 70%);
}

.a11y-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px dashed rgba(0, 255, 220, 0.12);
}
.a11y-row:last-of-type {
  border-bottom: none;
}
.a11y-row.reverse .a11y-visual {
  order: 2;
}
.a11y-row.reverse .a11y-text {
  order: 1;
}
@media (max-width: 768px) {
  .a11y-row,
  .a11y-row.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0;
  }
  .a11y-row.reverse .a11y-visual,
  .a11y-row.reverse .a11y-text {
    order: unset;
  }
}

.a11y-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}
.a11y-text {
  max-width: 480px;
}
.a11y-tag {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.35em;
  color: rgba(0, 255, 220, 0.65);
  margin-bottom: 10px;
}
.a11y-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  color: var(--cream);
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(245, 232, 198, 0.15);
}
.a11y-text p {
  color: rgba(203, 213, 225, 0.82);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 14px;
}
.a11y-text strong {
  color: var(--cream);
}
.a11y-text em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 600;
}
.a11y-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.a11y-list li {
  position: relative;
  padding-left: 18px;
  color: rgba(203, 213, 225, 0.75);
  font-size: 0.88rem;
}
.a11y-list li::before {
  content: '▸';
  color: var(--cyan);
  position: absolute;
  left: 0;
}
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }

/* --- Palette compare visual ------------------------------------------- */
.palette-compare {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.palette-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
}
.palette-label {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(0, 255, 220, 0.75);
}
.palette-label-cb {
  color: var(--gold);
}
.palette-hex {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(203, 213, 225, 0.55);
}
.palette-arrow {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px;
  color: rgba(0, 255, 220, 0.6);
}

/* --- Sound chart ------------------------------------------------------- */
.sound-chart {
  width: 100%;
  max-width: 380px;
  padding: 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sound-row {
  display: grid;
  grid-template-columns: 18px 110px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 220, 0.12);
}
.sound-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
}
.sound-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--cream);
}
.sound-glyph {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(0, 255, 220, 0.75);
}
.sound-row-mute .sound-glyph { color: rgba(203, 213, 225, 0.55); }
.sound-row-drum .sound-glyph { color: rgba(232, 170, 80, 0.85); }

/* --- Melody demo (connection arpeggio) --------------------------------- */
.melody-demo {
  width: 100%;
  max-width: 360px;
  padding: 22px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}
.melody-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.melody-cell {
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--c, #00d4ff) 50%, #061021);
  border: 1px solid color-mix(in srgb, var(--c, #00d4ff) 70%, transparent);
  border-radius: 4px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--c, #00d4ff) 50%, transparent);
}
.melody-sweep {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 20%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent);
  mix-blend-mode: screen;
  animation: melody-sweep 2.6s ease-in-out infinite;
}
@keyframes melody-sweep {
  0%   { transform: translateX(-20%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(500%); opacity: 0; }
}
.melody-notes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 0 8px;
}
.melody-notes span {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 220, 0.7);
  text-align: center;
}
.melody-caption {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(203, 213, 225, 0.55);
  text-transform: uppercase;
  margin-top: 12px;
}

/* --- Countdown demo ---------------------------------------------------- */
.countdown-demo {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.countdown-ring {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    conic-gradient(rgba(255, 215, 0, 0.5) 0deg 30deg, rgba(0, 0, 0, 0.3) 30deg 360deg);
  border: 2px solid rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.15), inset 0 0 12px rgba(0, 0, 0, 0.5);
  position: relative;
}
.countdown-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #050814;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}
.countdown-value {
  position: relative;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.55);
}
.countdown-caption {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  color: rgba(203, 213, 225, 0.8);
}

/* ==========================================================================
   Pricing cards (free-to-play + IAP)
   ========================================================================== */
.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .pricing { grid-template-columns: 1fr; }
}
.pricing-card {
  position: relative;
  padding: 20px 22px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 30%),
    var(--glass);
  backdrop-filter: blur(6px);
}
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pricing-card li {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.85);
  padding-left: 18px;
  position: relative;
}
.pricing-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
}
.pricing-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  margin-bottom: 12px;
}
.pricing-free {
  border-color: rgba(0, 255, 220, 0.45);
  box-shadow: 0 0 22px rgba(0, 255, 220, 0.12);
}
.pricing-free .pricing-label { color: var(--cyan); }
.pricing-free li::before { color: var(--cyan); }
.pricing-paid {
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.1);
}
.pricing-paid .pricing-label { color: var(--gold); }
.pricing-paid li::before { color: var(--gold); }

/* ==========================================================================
   Border-wire animation (4 wires from lit sockets to page border)
   The SVG sits in normal page flow (absolute, anchored to the document top)
   so it scrolls together with the hero — wires stay visually attached to the
   lit sockets and disappear off-screen as the user scrolls past the hero.
   ========================================================================== */
#border-wires {
  position: absolute !important;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

/* Horizontal wires pinned to the viewport bottom — stay visible while the
   rest of the wires scroll away with the hero. Each is a dim golden bar with
   a brighter "chase" light sweeping inward toward the screen center. */
.bottom-wire {
  position: fixed;
  bottom: 0;
  height: 2px;
  width: 50%;
  pointer-events: none;
  z-index: 1;
  background: rgba(255, 215, 0, 0.22);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
  overflow: visible;
}
.bottom-wire-left  { left: 0; }
.bottom-wire-right { right: 0; }

.bottom-wire::before {
  content: '';
  position: absolute;
  top: -2px;
  height: 6px;
  width: 22%;
  background: linear-gradient(
    90deg,
    rgba(255, 215, 0, 0)   0%,
    rgba(255, 215, 0, 0.7) 35%,
    rgba(255, 246, 192, 1) 50%,
    rgba(255, 215, 0, 0.7) 65%,
    rgba(255, 215, 0, 0)   100%
  );
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
  border-radius: 50%;
}
.bottom-wire-left::before  { animation: bottom-chase-right 3.4s linear infinite; }
.bottom-wire-right::before { animation: bottom-chase-left  3.6s linear infinite; }

@keyframes bottom-chase-right {
  from { left: -25%; }
  to   { left: 100%; }
}
@keyframes bottom-chase-left {
  from { right: -25%; }
  to   { right: 100%; }
}
.border-wire-base {
  fill: none;
  stroke: rgba(255, 215, 0, 0.18);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.border-wire-glow {
  fill: none;
  stroke: url(#wire-gradient);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#wire-glow);
}
.border-wire-chase {
  fill: none;
  stroke: #fff6c0;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#wire-glow);
}

/* ==========================================================================
   Multiplayer chips
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(0, 255, 220, 0.3);
  border-radius: 999px;
  background: rgba(0, 255, 220, 0.05);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
}

/* ==========================================================================
   Legal pages (terms, privacy)
   ========================================================================== */
.legal section {
  margin-bottom: 28px;
}
.legal h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 255, 220, 0.15);
}
.legal p,
.legal ul {
  color: rgba(203, 213, 225, 0.85);
  font-size: 0.92rem;
  line-height: 1.75;
  margin: 0 0 10px;
}
.legal ul {
  padding-left: 20px;
}
.legal ul li {
  margin-bottom: 4px;
  list-style: none;
  position: relative;
}
.legal ul li::before {
  content: '▸';
  color: var(--cyan);
  position: absolute;
  left: -16px;
  top: 0;
}
.legal a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 220, 0.4);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal a:hover {
  color: var(--cream);
  border-bottom-color: var(--cream);
}
.legal strong {
  color: var(--cream);
  font-weight: 600;
}

/* ==========================================================================
   Responsive tuning
   ========================================================================== */
@media (max-width: 640px) {
  .block { width: 42px; height: 42px; }
  .block-lg { width: 60px; height: 60px; }
  .socket { width: 11px; height: 11px; }
  .block-demo { gap: 10px; }
}

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */

/* Visually-hidden, screen-reader-only text. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link: invisible until focused via keyboard. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--cream);
  color: var(--bg);
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 6px;
  transform: translateY(-200%);
  transition: transform 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Visible focus ring for all keyboard-focused interactive elements. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Respect prefers-reduced-motion: silence non-essential animation. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
