/* ============================================================
   UNI404 — THE LOST UNI
   Dark Web × Retro Internet × Glitch × Uniswap Purple
   ============================================================ */

:root {
  --bg: #050508;
  --bg-2: #0a0a12;
  --purple: #7c3aed;
  --purple-bright: #a855f7;
  --purple-glow: #c084fc;
  --pink: #e879f9;
  --red: #ff0040;
  --cyan: #00ffff;
  --text: #e8e0f0;
  --text-dim: #6b5f7a;
  --mono: "Share Tech Mono", "Courier New", monospace;
  --pixel: "VT323", "Share Tech Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: crosshair;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.booting {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.hidden {
  display: none !important;
}

/* ---------- CANVAS / OVERLAYS ---------- */

#glitch-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  mix-blend-mode: screen;
  opacity: 0.55;
}

#scan-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cyan) 20%,
    var(--purple-glow) 50%,
    var(--cyan) 80%,
    transparent
  );
  box-shadow: 0 0 12px var(--cyan), 0 0 40px var(--purple);
  z-index: 9500;
  pointer-events: none;
  top: -10px;
  opacity: 0;
  transition: opacity 0.2s;
}

#scan-line.active {
  opacity: 1;
  animation: scan-move 2.4s linear forwards;
}

@keyframes scan-move {
  from { top: -10px; }
  to { top: 100vh; }
}

#scan-label {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.35em;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  z-index: 9501;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

#scan-label.active {
  opacity: 1;
}

#scan-label.found {
  color: var(--pink);
  text-shadow: 0 0 14px var(--pink);
}

#random-404 {
  position: fixed;
  inset: 0;
  z-index: 9600;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
  background: rgba(5, 5, 8, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.08s;
}

#random-404.active {
  opacity: 1;
  visibility: visible;
}

#random-404 span {
  font-family: var(--pixel);
  font-size: clamp(3rem, 12vw, 8rem);
  color: var(--red);
  text-shadow:
    3px 0 var(--cyan),
    -3px 0 var(--purple-bright),
    0 0 20px var(--red);
  animation: 404-jitter 0.1s steps(2) infinite;
}

@keyframes 404-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(0, 0); }
}

#glitch-transition {
  position: fixed;
  inset: 0;
  z-index: 9700;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 0, 64, 0.03) 2px,
      rgba(255, 0, 64, 0.03) 4px
    ),
    linear-gradient(
      90deg,
      rgba(255, 0, 64, 0.15),
      rgba(0, 255, 255, 0.1),
      rgba(124, 58, 237, 0.2)
    );
  mix-blend-mode: hard-light;
}

#glitch-transition.active {
  animation: page-glitch 0.35s steps(4) forwards;
}

@keyframes page-glitch {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translate(0, 0);
  }
  20% {
    opacity: 1;
    clip-path: inset(10% 0 40% 0);
    transform: translate(-8px, 2px);
  }
  40% {
    opacity: 0.9;
    clip-path: inset(50% 0 10% 0);
    transform: translate(6px, -3px);
  }
  60% {
    opacity: 1;
    clip-path: inset(20% 0 30% 0);
    transform: translate(-4px, 0);
  }
  80% {
    opacity: 0.6;
    clip-path: inset(0 0 5% 0);
    transform: translate(3px, 1px);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
}

/* ---------- BOOT SEQUENCE (purple terminal landing) ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(124, 58, 237, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(232, 121, 249, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #0c0618 0%, #050508 55%, #0a0614 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
  overflow: hidden;
}

.boot-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
  opacity: 0.9;
}

.boot-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px
    ),
    radial-gradient(ellipse at center, transparent 40%, rgba(5, 5, 8, 0.75) 100%);
}

.boot.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-inner {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  padding: 1.75rem 1.75rem 1.5rem;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(10, 6, 20, 0.72);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.12),
    0 0 40px rgba(124, 58, 237, 0.2),
    inset 0 0 40px rgba(124, 58, 237, 0.06);
  backdrop-filter: blur(4px);
}

.boot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.25);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

.boot-brand {
  color: var(--purple-glow);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.boot-sys {
  color: var(--text-dim);
}

.boot-terminal {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2.5vw, 1.15rem);
  color: var(--purple-glow);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 8em;
  line-height: 1.7;
  letter-spacing: 0.05em;
}

.boot-terminal .err-line {
  color: var(--pink);
  text-shadow: 0 0 10px rgba(232, 121, 249, 0.55);
}

.boot-terminal .wait-line {
  color: var(--purple-bright);
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.55);
}

.boot-terminal .signal-line {
  color: var(--pink);
  text-shadow: 0 0 14px rgba(232, 121, 249, 0.7);
}

.boot-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.boot-bar {
  flex: 1;
  height: 3px;
  background: rgba(124, 58, 237, 0.2);
  overflow: hidden;
}

.boot-bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
  animation: boot-load 1.8s ease-in-out infinite;
}

@keyframes boot-load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

.cursor-blink {
  animation: blink 0.8s step-end infinite;
  color: var(--purple-glow);
}

@keyframes blink {
  50% { opacity: 0; }
}

.boot.glitching {
  animation: boot-glitch 0.5s steps(6);
}

@keyframes boot-glitch {
  0%, 100% { filter: none; transform: none; }
  10% { filter: hue-rotate(20deg) contrast(1.2); transform: translateX(-6px); }
  20% { filter: saturate(1.4); transform: translateX(8px); }
  30% { filter: contrast(1.3); transform: translateX(-4px) skewX(-2deg); }
  40% { filter: brightness(1.3); transform: translateX(10px); }
  50% { filter: hue-rotate(-15deg); transform: translateX(-8px); }
  60% { filter: none; transform: none; }
  70% { filter: saturate(1.5); transform: translateX(5px) skewX(1deg); }
  80% { filter: brightness(1.15); transform: none; }
}

/* ---------- SITE SHELL ---------- */

.site {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.binary-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.07;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--purple-bright);
  line-height: 1.4;
  white-space: pre;
  user-select: none;
}

/* CRT scanlines over whole site */
.site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
}

.site::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8001;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* ---------- TOP BAR (CA + X) ---------- */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  background: rgba(8, 6, 16, 0.94);
  border-bottom: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.15);
  backdrop-filter: blur(10px);
}

.top-ca {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.top-ca-label {
  flex-shrink: 0;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--pink);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(232, 121, 249, 0.4);
}

.top-ca-value {
  min-width: 0;
  flex: 1;
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1.8vw, 0.82rem);
  color: var(--purple-glow);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.35rem 0.6rem;
  background: rgba(5, 5, 8, 0.75);
  border: 1px solid rgba(124, 58, 237, 0.35);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.top-ca-copy {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--purple);
  border: 1px solid var(--purple-bright);
  padding: 0.35rem 0.7rem;
  cursor: crosshair;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

.top-ca-copy:hover {
  background: var(--purple-bright);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

.top-ca-copy.copied {
  background: transparent;
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.3);
}

.btn-x {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: #000;
  border: 1px solid rgba(168, 85, 247, 0.55);
  padding: 0.4rem 0.75rem;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.25);
}

.btn-x:hover {
  border-color: var(--pink);
  color: var(--pink);
  box-shadow: 0 0 18px rgba(232, 121, 249, 0.35);
  transform: translateY(-1px);
}

.btn-x-icon {
  display: block;
}

/* ---------- NAV ---------- */

.nav {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(to bottom, rgba(5, 5, 8, 0.9), transparent);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

.nav-logo {
  color: var(--purple-glow);
  font-weight: 700;
  font-size: 1.1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 1.05rem;
  color: var(--text);
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(124, 58, 237, 0.12);
  transition: all 0.2s ease;
}

.nav-x:hover {
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(232, 121, 249, 0.3);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- GLITCH TEXT ---------- */

.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch-text:hover::before,
.section.in-view .glitch-text::before {
  opacity: 0.8;
  color: var(--cyan);
  animation: glitch-1 2.5s infinite linear alternate-reverse;
  clip-path: inset(0 0 60% 0);
}

.glitch-text:hover::after,
.section.in-view .glitch-text::after {
  opacity: 0.8;
  color: var(--red);
  animation: glitch-2 3s infinite linear alternate-reverse;
  clip-path: inset(40% 0 0 0);
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -1px); }
  40% { transform: translate(-3px, 1px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(-2px, -1px); }
  100% { transform: translate(0); }
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7.5rem 1.5rem 4rem;
  gap: 1.5rem;
}

.hero-mascot-wrap {
  position: relative;
  width: min(340px, 72vw);
  height: min(340px, 72vw);
  margin-bottom: 1rem;
}

.mascot {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.45));
  transition: opacity 0.8s, filter 0.5s, transform 0.5s;
}

.mascot-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation: mascot-appear 1.2s ease 0.3s forwards, mascot-float 4s ease-in-out 1.5s infinite, mascot-glitch-disappear 8s ease-in-out 3s infinite;
}

@keyframes mascot-appear {
  from {
    opacity: 0;
    transform: scale(0.9);
    filter: drop-shadow(0 0 0 transparent) blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.4)) blur(0);
  }
}

@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Occasionally "disappear" from screen */
@keyframes mascot-glitch-disappear {
  0%, 88%, 100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.4));
  }
  90% {
    opacity: 0.15;
    transform: translateX(30px) skewX(8deg);
    filter: drop-shadow(4px 0 var(--red)) drop-shadow(-4px 0 var(--cyan));
  }
  92% {
    opacity: 0;
    transform: translateX(-40px);
  }
  94% {
    opacity: 0.3;
    transform: translateX(10px) skewX(-5deg);
  }
  96% {
    opacity: 1;
    transform: translateX(-5px);
  }
}

.mascot-missing {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px dashed var(--text-dim);
  background: rgba(10, 10, 18, 0.9);
  z-index: 2;
  transition: opacity 0.6s, visibility 0.6s;
}

.mascot-missing.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mascot-missing .missing-label,
.mascot-missing span {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.1em;
}

.mascot-missing .missing-code {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.mascot-missing.small {
  border-style: dashed;
  font-size: 0.7rem;
}

.binary-stream {
  position: absolute;
  inset: -20% -30%;
  z-index: -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--purple);
  opacity: 0.35;
  pointer-events: none;
  animation: binary-scroll 12s linear infinite;
  letter-spacing: 0.3em;
}

.binary-stream span {
  white-space: nowrap;
}

@keyframes binary-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-20%); }
}

.hero-title {
  font-family: var(--pixel);
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--purple-glow);
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.hero-tagline {
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  animation: scroll-pulse 2s ease-in-out infinite;
}

.scroll-arrow {
  font-size: 0.8rem;
  color: var(--purple-bright);
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

/* ---------- SECTIONS ---------- */

.section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 5rem 1.5rem;
  border-top: 1px solid rgba(124, 58, 237, 0.15);
}

.section-num {
  position: absolute;
  top: 2rem;
  left: 1.5rem;
  font-family: var(--pixel);
  font-size: clamp(4rem, 15vw, 10rem);
  color: rgba(124, 58, 237, 0.08);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.section-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(2.5rem, 10vw, 5rem);
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1;
}

.lore {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  max-width: 28em;
}

.lore p {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.in-view .lore p {
  opacity: 1;
  transform: translateY(0);
}

.section.in-view .lore p:nth-child(1) { transition-delay: 0.1s; }
.section.in-view .lore p:nth-child(2) { transition-delay: 0.22s; }
.section.in-view .lore p:nth-child(3) { transition-delay: 0.34s; }
.section.in-view .lore p:nth-child(4) { transition-delay: 0.46s; }
.section.in-view .lore p:nth-child(5) { transition-delay: 0.58s; }
.section.in-view .lore p:nth-child(6) { transition-delay: 0.7s; }
.section.in-view .lore p:nth-child(7) { transition-delay: 0.85s; }
.section.in-view .lore p:nth-child(8) { transition-delay: 1s; }

.err {
  color: var(--red);
  text-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
  font-weight: 700;
}

.error-line {
  color: var(--text) !important;
  font-size: 1.15em;
  margin-top: 0.5rem;
}

.symbol-line {
  margin-top: 1rem;
}

.uni-symbol {
  font-family: var(--pixel);
  font-size: 2em;
  color: var(--purple-glow);
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
  letter-spacing: 0.15em;
}

.section-visual {
  margin-top: 1rem;
}

.mascot-frame {
  position: relative;
  width: min(200px, 45vw);
  aspect-ratio: 1;
}

.mascot-frame.faded .mascot-faded {
  opacity: 0;
  filter: blur(6px) brightness(0.3);
  transition: opacity 1.2s ease 1.5s, filter 1.2s ease 1.5s;
}

.section.in-view .mascot-frame.faded .mascot-faded.revealed {
  opacity: 0.35;
  filter: blur(3px) brightness(0.4);
}

.mascot-frame.faded .mascot-missing {
  transition: opacity 0.8s ease 1.2s, visibility 0.8s ease 1.2s;
}

.mascot-frame.faded .mascot-missing.loaded {
  opacity: 0;
  visibility: hidden;
}

/* FOUND section — hero moment */
.section-found {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    var(--bg);
}

.found-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease 0.8s, transform 0.8s ease 0.8s;
}

.section.in-view .found-reveal {
  opacity: 1;
  transform: scale(1);
}

.hero-frame {
  width: min(260px, 55vw);
  position: relative;
}

.mascot-found {
  animation: mascot-float 4s ease-in-out infinite, found-glow 2s ease-in-out infinite;
  filter: drop-shadow(0 0 36px rgba(168, 85, 247, 0.75));
}

@keyframes found-glow {
  0%, 100% { filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.55)); }
  50% { filter: drop-shadow(0 0 48px rgba(232, 121, 249, 0.85)) drop-shadow(0 0 70px rgba(124, 58, 237, 0.45)); }
}

.found-burst {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  animation: burst-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes burst-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
}

.found-line {
  font-family: var(--pixel);
  font-size: clamp(1.5rem, 5vw, 2.8rem);
  letter-spacing: 0.08em;
  color: var(--text);
  text-align: center;
}

.tagline-sub {
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-align: center;
}

/* NOW section */
.section-now {
  background:
    radial-gradient(ellipse at 70% 40%, rgba(255, 0, 64, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 70%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    var(--bg);
}

.now-line {
  color: var(--purple-glow) !important;
  font-size: 1.15em;
  margin-top: 0.5rem;
}

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 1rem;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--purple);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2), inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.token-symbol {
  font-family: var(--pixel);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--pink);
  letter-spacing: 0.1em;
  text-shadow: 0 0 15px rgba(232, 121, 249, 0.5);
}

/* ---------- CONTRACT ADDRESS ---------- */

.ca-block {
  width: 100%;
  max-width: 480px;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(10, 6, 20, 0.6)),
    rgba(10, 10, 18, 0.8);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.15), inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.ca-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-bottom: 0.7rem;
}

.ca-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 8px var(--purple-bright);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.ca-value {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 2.2vw, 0.9rem);
  color: var(--purple-glow);
  letter-spacing: 0.04em;
  word-break: break-all;
  padding: 0.55rem 0.75rem;
  background: rgba(5, 5, 8, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.25);
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.ca-copy {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--purple);
  border: 1px solid var(--purple-bright);
  padding: 0.55rem 0.9rem;
  cursor: crosshair;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.35);
}

.ca-copy:hover {
  background: var(--purple-bright);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}

.ca-copy.copied {
  background: transparent;
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 14px rgba(232, 121, 249, 0.35);
}

.ca-hint {
  margin-top: 0.65rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  opacity: 0.85;
}

.ca-hint.ok {
  color: var(--pink);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  font-family: var(--mono);
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.12em;
  border: 1px solid;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--purple);
  border-color: var(--purple-bright);
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  background: var(--purple-bright);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--text-dim);
  color: var(--text-dim);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.final-tagline {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.mascot-final-wrap {
  width: min(180px, 40vw);
  margin-top: 2rem;
  opacity: 0.7;
}

.mascot-final {
  animation: mascot-float 5s ease-in-out infinite, mascot-glitch-disappear 10s ease-in-out infinite;
}

/* Section noise texture */
.section-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

/* ---------- FOOTER ---------- */

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  background: linear-gradient(to top, #000, var(--bg));
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.footer-glitch {
  font-family: var(--pixel);
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer-ca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 520px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
}

.footer-ca-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.footer-ca-value {
  flex: 1;
  min-width: 120px;
  font-family: var(--mono);
  font-size: clamp(0.65rem, 2vw, 0.8rem);
  color: var(--purple-glow);
  word-break: break-all;
  text-align: left;
}

.footer-ca-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--purple-glow);
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.45);
  padding: 0.35rem 0.7rem;
  cursor: crosshair;
  transition: all 0.2s ease;
}

.footer-ca-copy:hover,
.footer-ca-copy.copied {
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.25);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer-link {
  color: var(--purple-glow);
  transition: color 0.2s, text-shadow 0.2s;
}

.footer-link:hover {
  color: var(--pink);
  text-shadow: 0 0 10px rgba(232, 121, 249, 0.5);
}

.sep {
  opacity: 0.3;
}

.footer-sub {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: rgba(107, 95, 122, 0.6);
  margin-top: 1rem;
}

/* ---------- RESPONSIVE ---------- */

@media (min-width: 768px) {
  .section-content {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .section-title {
    grid-column: 1 / -1;
  }

  .section-found .section-content,
  .section-now .section-content {
    grid-template-columns: 1fr;
  }

  .section-found .found-reveal {
    grid-column: 1 / -1;
  }

  .top-bar {
    padding: 0.6rem 1.5rem;
  }

  .nav {
    padding: 1.25rem 2.5rem;
  }

  .section {
    padding: 6rem 3rem;
  }

  .section-num {
    left: 2.5rem;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 0.5rem 0.65rem;
    gap: 0.45rem;
  }

  .btn-x span {
    display: none;
  }

  .btn-x {
    padding: 0.4rem 0.55rem;
  }

  .top-ca-copy {
    padding: 0.35rem 0.5rem;
    font-size: 0.6rem;
  }

  .nav-status span:not(.status-dot) {
    display: none;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
