/* MIMV — Intro curtain + big wow moments */

/* ───────── Intro curtain ───────── */
.intro {
  position: fixed; inset: 0; z-index: 9000;
  background: #0A0A0A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
}
.intro.done { animation: intro-lift 1s cubic-bezier(.76,0,.24,1) forwards; }
@keyframes intro-lift {
  0% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(100% 0 0 0); }
}
.intro-inner {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 40px;
  transform: translateY(0);
}
.intro.done .intro-inner { animation: intro-slide 0.9s cubic-bezier(.76,0,.24,1) forwards; }
@keyframes intro-slide {
  to { transform: translateY(-30%); opacity: 0; }
}

.intro-logo {
  width: 140px; height: 140px;
  filter: invert(1);
  opacity: 0;
  animation: logo-pop 1.1s cubic-bezier(.34,1.56,.64,1) 0.1s forwards;
}
@keyframes logo-pop {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.intro-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
  display: flex; gap: 12px; align-items: center;
}
.intro-counter .num {
  color: #fff; font-weight: 500;
  width: 36px; text-align: right; font-variant-numeric: tabular-nums;
}
.intro-bar {
  width: 300px; height: 2px;
  background: rgba(255,255,255,0.15); overflow: hidden;
  position: relative;
}
.intro-bar::after {
  content: ''; position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: bar-fill 2.6s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes bar-fill { to { width: 100%; } }

.intro-ticker {
  overflow: hidden; white-space: nowrap;
  width: 500px; height: 28px;
  font-family: 'Fraunces', serif; font-style: italic; font-size: 22px;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.intro-ticker .track {
  display: flex; flex-direction: column;
  animation: ticker-scroll 2.6s steps(6) forwards;
}
.intro-ticker .track span { height: 28px; display: block; }
@keyframes ticker-scroll {
  to { transform: translateY(-140px); }
}

/* ───────── Header lock-up with real logo ───────── */
.nav-logo-img {
  width: 28px; height: 28px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.nav {
  /* override previous nav to be cleaner */
  animation: nav-drop 1s cubic-bezier(.2,.9,.2,1) 2.8s both;
}
@keyframes nav-drop {
  from { transform: translateX(-50%) translateY(-80px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ───────── Hero wow upgrades ───────── */
.hero {
  animation: hero-in 0.01s 2.6s both;
  opacity: 0;
}
@keyframes hero-in { to { opacity: 1; } }

.hero-title {
  position: relative;
}
.hero-title .char {
  animation-delay: calc(2.9s + var(--d, 0s)) !important;
}
.hero-title-stroke {
  position: absolute; inset: 0;
  pointer-events: none; z-index: -1;
  font-size: inherit; line-height: inherit; letter-spacing: inherit;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500;
  -webkit-text-stroke: 1.5px var(--line-strong);
  color: transparent;
  opacity: 0;
  animation: stroke-in 1.5s ease 3.2s forwards;
  transform: translate(12px, 12px);
}
@keyframes stroke-in {
  to { opacity: 0.4; transform: translate(20px, 20px); }
}

/* Orbit ring of app dots around hero */
.hero-orbit {
  position: absolute; top: 50%; left: 50%;
  width: 1400px; height: 1400px;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 1;
  animation: orbit-in 2s ease 3s both;
}
@keyframes orbit-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.hero-orbit-ring {
  position: absolute; inset: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: rotate-cw 120s linear infinite;
}
.hero-orbit-ring.inner {
  inset: 150px;
  animation: rotate-ccw 90s linear infinite;
}
@keyframes rotate-cw { to { transform: rotate(360deg); } }
@keyframes rotate-ccw { to { transform: rotate(-360deg); } }
.hero-orbit-dot {
  position: absolute; top: 50%; left: 50%;
  width: 64px; height: 64px; border-radius: 16px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
}
.hero-orbit-dot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Hero floating label */
.hero-chip-float {
  position: absolute; z-index: 3;
  padding: 10px 16px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--line);
  font-size: 12px; font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: float-bob 6s ease-in-out infinite;
}
.hero-chip-float .emoji {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--c, var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  font-family: 'Fraunces', serif;
}
.hero-chip-1 { top: 20%; right: 8%; animation-delay: 0s; }
.hero-chip-2 { bottom: 25%; left: 6%; animation-delay: 2s; }
.hero-chip-3 { top: 40%; right: 5%; animation-delay: 4s; }
@keyframes float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* Logo wordmark reveal in hero */
.hero-logo-lockup {
  display: inline-flex; align-items: center; gap: 16px;
  margin-top: 56px;
  animation: fade-up 1s ease 4s both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-logo-img {
  width: 48px; height: 48px; object-fit: contain;
}
.hero-logo-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.25em;
  color: var(--ink-mute);
  line-height: 1.4;
}

/* ───────── Magnetic cards with shine ───────── */
.latest-card::before {
  content: ''; position: absolute;
  top: var(--my, 50%); left: var(--mx, 50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity 0.3s;
}
.latest-card:hover::before { opacity: 1; }

.latest-card .content {
  transform: translateZ(0);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.latest-card:hover .content { transform: translateY(-6px); }

/* ───────── Marquee direction reverse variant ───────── */
.marquee-reverse .marquee-track {
  animation-direction: reverse;
}

/* ───────── Footer wordmark — massive reveal ───────── */
.footer-wordmark {
  position: relative;
}
.footer-wordmark .mimv-giant {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: clamp(100px, 22vw, 360px);
  font-weight: 400; font-style: italic;
  line-height: 0.8; letter-spacing: -0.06em;
  background: linear-gradient(120deg, var(--ink) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ───────── Story logo watermark ───────── */
.story-watermark {
  position: absolute; right: -60px; bottom: -60px;
  width: 400px; height: 400px; opacity: 0.06;
  filter: invert(1);
  pointer-events: none;
}

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

/* Remove theme toggle button (light-only now) */
.theme-toggle { display: none !important; }

/* ───────── Mobile: shrink orbit to inner ring only ───────── */
@media (max-width: 640px) {
  .hero-orbit {
    animation: none;
    transform: translate(-50%, -50%) scale(0.35);
    opacity: 1;
  }
  .hero-orbit-ring:not(.inner) { display: none; }
  .hero-orbit-dot {
    box-shadow: 0 6px 16px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
  }
}
