:root {
  color-scheme: dark;
  --bg-gradient: radial-gradient(
    circle at top,
    #1b1237 0%,
    #090314 55%,
    #05020d 100%
  );
  --accent: #ff7af6;
  --accent-2: #5ef9ff;
  --accent-3: #ffd166;
  --text-primary: #f8f2ff;
  --text-muted: rgba(248, 242, 255, 0.72);
  --card-bg: rgba(17, 11, 34, 0.75);
  --card-border: rgba(255, 122, 246, 0.45);
  --glow: 0 0 25px rgba(94, 249, 255, 0.55);
  --pixel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6'%3E%3Crect width='3' height='3' fill='%235ef9ff'/%3E%3C/svg%3E");
  --shadow-md: 0 20px 40px rgba(5, 2, 13, 0.65);
  --font-display: "Press Start 2P", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-gradient);
  overflow-x: hidden;
}

canvas#pixelCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  filter: saturate(120%);
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.04) 50%,
    rgba(0, 0, 0, 0.05) 50%
  );
  background-size: 100% 3px;
  mix-blend-mode: overlay;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

main {
  padding: clamp(1.5rem, 2vw + 1rem, 4rem) clamp(1rem, 4vw, 5rem) 5rem;
  display: grid;
  gap: clamp(4rem, 8vw, 7rem);
}

.site-header,
.site-footer {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(14px) saturate(160%);
  background: rgba(9, 3, 20, 0.7);
  border-bottom: 1px solid rgba(94, 249, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
}

.site-footer {
  top: auto;
  bottom: 0;
  border-bottom: none;
  border-top: 1px solid rgba(94, 249, 255, 0.25);
  font-size: 0.95rem;
  justify-content: center;
}

.site-footer p {
  margin: 0.35rem 0;
  text-align: center;
  color: var(--text-muted);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 52px;
  width: auto;
  image-rendering: pixelated;
  border-radius: 8px;
  border: 2px solid rgba(255, 218, 115, 0.6);
  box-shadow: 0 0 0 3px rgba(9, 3, 20, 0.65), 0 0 22px rgba(255, 218, 115, 0.55);
}

.logo .title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo .chain {
  color: var(--accent-2);
  font-size: 0.6rem;
}

.social-nav {
  display: flex;
  gap: 1rem;
}

.social-nav a {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 122, 246, 0.4);
  border-radius: 6px;
  background: rgba(17, 11, 34, 0.6);
  box-shadow: inset 0 0 0 1px rgba(94, 249, 255, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-nav a:hover,
.social-nav a:focus {
  color: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(94, 249, 255, 0.35);
}

.audio-toggle {
  font-family: var(--font-display);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 218, 115, 0.55);
  background: rgba(24, 13, 44, 0.65);
  color: var(--accent-3);
  box-shadow: inset 0 0 0 1px rgba(94, 249, 255, 0.2),
    0 12px 24px rgba(5, 2, 13, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.audio-toggle .icon {
  font-size: 0.85rem;
}

.audio-toggle:hover,
.audio-toggle:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(255, 218, 115, 0.3);
}

.audio-toggle[aria-pressed="true"] {
  color: var(--accent-2);
  border-color: rgba(94, 249, 255, 0.6);
  box-shadow: 0 18px 36px rgba(94, 249, 255, 0.32);
  background: rgba(7, 4, 18, 0.75);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw + 1rem, 3.6rem);
  line-height: 1.25;
  margin-bottom: 1.2rem;
  text-shadow: var(--glow);
  letter-spacing: 0.08em;
}

.hero-content .tag {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent-3);
  margin-bottom: 1rem;
}

.hero-content .intro {
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0 2.5rem;
}

.cta {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.9rem 1.8rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 200ms ease, box-shadow 200ms ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0c0318;
  box-shadow: 0 15px 30px rgba(255, 122, 246, 0.35);
}

.cta.secondary {
  border-color: rgba(94, 249, 255, 0.4);
  color: var(--accent-2);
  background: rgba(14, 8, 30, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 246, 0.25);
}

.cta:hover,
.cta:focus {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 122, 246, 0.4);
}

.launch-card {
  border: 1px solid rgba(255, 218, 115, 0.4);
  background: rgba(22, 13, 38, 0.8);
  padding: 1.75rem;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.launch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 122, 246, 0.18),
    rgba(94, 249, 255, 0.12)
  );
  mix-blend-mode: screen;
  opacity: 0.8;
  pointer-events: none;
}

.launch-card h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-top: 0;
  margin-bottom: 1.1rem;
}

.launch-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.75rem;
}

.launch-card li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
}

.launch-card li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-3);
  opacity: 0.85;
}

.hero-art {
  display: grid;
  gap: 2rem;
  position: relative;
}

.pixel-frame {
  position: relative;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(12, 7, 24, 0.82);
  border: 2px solid rgba(255, 122, 246, 0.5);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pixel-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(94, 249, 255, 0.4);
  border-radius: 18px;
  pointer-events: none;
}

.pixel-frame img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
  border-radius: 12px;
  animation: pixelFloat 5.5s ease-in-out infinite;
  will-change: transform;
}

.pixel-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 30% 40%,
      rgba(94, 249, 255, 0.25),
      transparent 55%
    ),
    radial-gradient(
      circle at 70% 65%,
      rgba(255, 122, 246, 0.2),
      transparent 55%
    );
  mix-blend-mode: screen;
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.1;
  }
}

.floating-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  background: rgba(8, 5, 18, 0.9);
  border: 1px solid rgba(94, 249, 255, 0.4);
  color: var(--accent-2);
  text-transform: uppercase;
  box-shadow: 0 12px 25px rgba(94, 249, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(94, 249, 255, 0.3) 50%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: badgeSweep 5s linear infinite;
}

@keyframes badgeSweep {
  0% {
    transform: translateX(-120%);
  }
  55% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes pixelFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.02) rotate(0.4deg);
  }
}

@keyframes pixelBob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-6px) scale(1.03);
  }
  70% {
    transform: translateY(3px) scale(0.99);
  }
}

@keyframes pixelWiggle {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  45% {
    transform: rotate(-2.5deg) translateY(-4px);
  }
  75% {
    transform: rotate(2deg) translateY(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-frame img,
  .card img,
  .cta-tile img {
    animation: none !important;
    transform: none !important;
  }
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-head p {
  color: var(--text-muted);
}

.story .grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 2.5vw, 3rem);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 2rem 1.75rem;
  display: grid;
  gap: 1.3rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 200ms ease, border 200ms ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 249, 255, 0.6);
}

.card img {
  width: 88px;
  margin-inline: auto;
  display: block;
  image-rendering: pixelated;
  animation: pixelBob 6s ease-in-out infinite;
  will-change: transform;
}

.story .card:nth-child(2) img {
  animation-delay: 1.4s;
}

.story .card:nth-child(3) img {
  animation-delay: 2.4s;
}

.card h3 {
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.card p {
  text-align: center;
  color: var(--text-muted);
}

.countdown {
  text-align: center;
  position: relative;
  padding: 3.5rem clamp(1.5rem, 3vw, 3rem);
  border-radius: 28px;
  background: rgba(16, 10, 28, 0.82);
  border: 1px solid rgba(94, 249, 255, 0.4);
  box-shadow: 0 30px 60px rgba(3, 2, 10, 0.8);
  overflow: hidden;
}

.countdown::before {
  content: "";
  position: absolute;
  inset: -60% -40% auto;
  height: 120%;
  background: conic-gradient(
    from 0deg,
    rgba(94, 249, 255, 0.35),
    rgba(255, 122, 246, 0.35),
    rgba(255, 218, 115, 0.2),
    transparent
  );
  filter: blur(52px);
  opacity: 0.8;
}

.timer {
  margin: 2.5rem auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1.5rem;
  max-width: 640px;
}

.time-segment {
  border: 1px solid rgba(255, 122, 246, 0.4);
  border-radius: 18px;
  padding: 1.6rem 1.2rem;
  background: rgba(7, 4, 18, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(94, 249, 255, 0.14);
  position: relative;
}

.time-segment::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255, 122, 246, 0.3);
  border-radius: 14px;
}

.value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-note {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-muted);
}

.roadmap .timeline {
  margin-top: 3rem;
  border-left: 2px dashed rgba(94, 249, 255, 0.35);
  padding-left: 2rem;
  display: grid;
  gap: 2.5rem;
}

.timeline-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  border-radius: 18px;
  background: rgba(14, 8, 28, 0.75);
  border: 1px solid rgba(255, 218, 115, 0.25);
  box-shadow: var(--shadow-md);
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-top: 0;
}

.timeline-card p {
  margin: 0;
  color: var(--text-muted);
}

.timeline-card .marker {
  position: absolute;
  left: -2.65rem;
  top: 1.8rem;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid #090314;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(94, 249, 255, 0.22);
}

.community .cta-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.cta-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.8rem;
  border-radius: 22px;
  text-decoration: none;
  background: rgba(11, 6, 24, 0.82);
  border: 1px solid rgba(94, 249, 255, 0.38);
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.cta-tile:hover,
.cta-tile:focus {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 25px 45px rgba(94, 249, 255, 0.28);
}

.cta-tile img {
  width: 88px;
  image-rendering: pixelated;
  animation: pixelWiggle 4.8s ease-in-out infinite;
  will-change: transform;
}

.community .cta-grid .cta-tile:nth-child(2) img {
  animation-delay: 1.6s;
}

.cta-tile h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}

.cta-tile p {
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    position: static;
  }

  main {
    padding-top: 3rem;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }

  .social-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .cta-group {
    flex-direction: column;
  }

  .community .cta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 0.95rem;
  }

  .cta {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    grid-template-columns: 1fr;
  }

  .audio-toggle {
    justify-content: center;
  }

  .time-segment {
    padding: 1.2rem 0.9rem;
  }

  .timeline-card {
    padding: 1.25rem 1.25rem 1.25rem 1.8rem;
  }

  .timeline-card .marker {
    left: -2.4rem;
  }

  .cta-tile {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

body.konami-mode {
  --bg-gradient: radial-gradient(
    circle at top,
    #31175d 0%,
    #14072c 55%,
    #080220 100%
  );
  animation: neonPulse 2.4s ease-in-out infinite alternate;
}

body.konami-mode .pixel-frame {
  box-shadow: 0 0 0 3px rgba(255, 122, 246, 0.55),
    0 0 40px rgba(255, 218, 115, 0.6);
}

body.konami-mode .badge {
  color: var(--accent-3);
  border-color: rgba(255, 218, 115, 0.55);
  box-shadow: 0 18px 42px rgba(255, 218, 115, 0.35);
}

@keyframes neonPulse {
  from {
    filter: saturate(100%) hue-rotate(0deg);
  }
  to {
    filter: saturate(140%) hue-rotate(12deg);
  }
}
