/* ============================================================
   FIRST BIRTHDAY — SPACE THEME
   ============================================================ */

:root {
  --bg: #050308;
  --bg-soft: #0b0818;
  --ink: #f5f2fb;
  --ink-dim: #a89fc4;
  --cyan: #7fe9fb;
  --gold: #f3c67a;
  --magenta: #ff8fd6;
  --violet: #7a5cff;
  --glass: rgba(255,255,255,0.05);
  --glass-strong: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.12);
  --font-display: "Unbounded", sans-serif;
  --font-body: "Sora", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ================= INTRO SCREEN ================= */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000;
  overflow: hidden;
  transition: opacity .85s ease;
}
.intro-screen.exit { opacity: 0; pointer-events: none; }

.envelope-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  display: block;
}

.intro-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0,0,0,.5) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.6) 0%, transparent 22%, transparent 74%, rgba(0,0,0,.65) 100%);
}

.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 28px 20px;
  padding-top: max(28px, env(safe-area-inset-top));
  padding-bottom: max(36px, env(safe-area-inset-bottom));
  text-align: center;
}
.intro-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.hidden { opacity: 0 !important; transform: translateY(8px); pointer-events: none; transition: opacity .4s ease, transform .4s ease; }

.tap-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 999px;
  background: rgba(15,10,28,.45);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(14px);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .04em;
  animation: pulseGlow 2.6s ease-in-out infinite;
}
.tap-btn:active { transform: scale(.96); }
.tap-btn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px 2px var(--gold);
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122,92,255,.28); }
  50% { box-shadow: 0 0 0 14px rgba(122,92,255,0); }
}

.intro-caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(.85rem, 3.2vw, 1.05rem);
  letter-spacing: .015em;
  color: var(--ink);
  margin: 14px 0 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.85);
}

/* ================= MAIN SITE ================= */
.main-site {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease;
}
.main-site.visible { opacity: 1; }

section { position: relative; padding: 120px 24px; max-width: 1080px; margin: 0 auto; }

.chapter-tag {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  font-weight: 600;
}
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
  font-weight: 600;
}
.section-sub { color: var(--ink-dim); margin-top: 12px; font-size: 1rem; max-width: 480px; margin-inline: auto; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .34;
  mix-blend-mode: screen;
  filter: saturate(1.3);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,3,8,.2), var(--bg) 92%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 720px; }
.eyebrow {
  font-size: .8rem;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 600;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 7rem);
  line-height: 1.15;
  margin: 0 0 26px;
  max-width: 100%;
}
.hero-title .line { display: block; overflow: hidden; padding: 0.1em 0; width: 100%; }
.hero-title .mask {
  display: inline-block;
  max-width: 100%;
  transform: translateY(115%);
  transition: transform 1s cubic-bezier(.16,1,.3,1);
  background: linear-gradient(120deg, #fff 10%, var(--cyan) 45%, var(--magenta) 75%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-title.play .line:nth-child(2) .mask { transition-delay: .18s; }
.hero-title.play .mask { transform: translateY(0); }
.hero-sub { color: var(--ink-dim); font-size: 1.05rem; max-width: 460px; margin: 0 auto 40px; line-height: 1.6; }
.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim);
}
.scroll-cue span {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop { 0% { opacity: 0; transform: scaleY(.3); } 50% { opacity: 1; } 100% { opacity: 0; transform: scaleY(1); } }

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  background: var(--glass);
}
.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marqueeScroll 30s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  color: var(--ink-dim);
  letter-spacing: .02em;
}
.marquee-track span { padding-right: 4px; }
.marquee-track span:nth-child(3n+1) { color: var(--gold); }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- ONE-LINERS ---------- */
.one-liner { text-align: center; padding: 90px 24px; }
.one-liner-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 3.2vw, 2.1rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto;
}
.one-liner.small { padding: 60px 24px; }
.one-liner-text.small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  color: var(--gold);
  letter-spacing: .02em;
  max-width: 460px;
}

/* ---------- SCRATCH SECTION ---------- */
.scratch-section { text-align: center; overflow: hidden; }
.scratch-bg {
  position: absolute; inset: -10% -10%;
  background-size: cover; background-position: center;
  opacity: .22; mix-blend-mode: screen; filter: blur(2px) saturate(1.2);
}
.scratch-card {
  position: relative;
  width: min(92vw, 460px);
  height: 230px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1638, #0c0a1e);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.scratch-reveal-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px;
}
.reveal-label { font-size: .72rem; letter-spacing: .22em; color: var(--gold); font-weight: 600; }
.scratch-reveal-content h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2rem); margin: 4px 0 0; }
.scratch-reveal-content p { margin: 0; color: var(--ink-dim); font-size: 1rem; }
#scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.scratch-card.revealed {
  box-shadow: 0 0 0 1px rgba(243,198,122,.45), 0 25px 70px rgba(243,198,122,.16);
  transition: box-shadow .8s ease;
}
.scratch-card.revealed .scratch-reveal-content { animation: revealPop .7s cubic-bezier(.22,1,.36,1); }
@keyframes revealPop {
  from { opacity: .35; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- DETAILS ---------- */
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 48px; }
.detail-card {
  padding: 30px 24px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .35s ease, border-color .35s ease;
}
.detail-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.28); }
.detail-icon { font-size: 1.4rem; color: var(--cyan); }
.detail-label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.detail-value { font-family: var(--font-display); font-size: 1.15rem; }
.detail-sub { color: var(--ink-dim); font-size: .88rem; margin-top: -2px; }

.map-embed-wrap {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 32px;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  filter: saturate(1.1) contrast(1.05) invert(0.92) hue-rotate(180deg);
}
.map-embed { width: 100%; height: 100%; border: 0; display: block; }

.maps-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: 380px; margin: 0 auto;
  padding: 18px 30px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), #ffe1ad);
  color: #1a1120;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 12px 40px rgba(243,198,122,.18);
}
.maps-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 50px rgba(243,198,122,.3); }
.maps-btn i { font-style: normal; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 90px 24px 60px; }
.footer-kicker { color: var(--gold); letter-spacing: .3em; margin-bottom: 18px; }
.footer-line { color: var(--ink-dim); margin: 0; font-size: .95rem; }
.footer h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin: 8px 0 18px; }
.footer-small { color: var(--ink-dim); font-size: .82rem; opacity: .7; }

/* ---------- MUSIC TOGGLE ---------- */
.music-toggle {
  position: fixed;
  bottom: 26px; right: 26px;
  z-index: 50;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s ease, border-color .3s ease;
}
.music-toggle:hover { transform: scale(1.08); border-color: rgba(255,255,255,.35); }
.eq { display: flex; align-items: center; gap: 3px; height: 16px; }
.eq i { width: 3px; height: 6px; background: var(--cyan); border-radius: 2px; transition: height .2s ease; }
.music-toggle.playing .eq i { animation: eqBounce 0.9s ease-in-out infinite; }
.music-toggle.playing .eq i:nth-child(2) { animation-delay: .15s; }
.music-toggle.playing .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eqBounce { 0%, 100% { height: 5px; } 50% { height: 16px; } }

/* ================= RESPONSIVE ================= */
@media (max-width: 860px) {
  .details-grid { grid-template-columns: 1fr; }
  section { padding: 90px 20px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.9rem, 9.5vw, 3.4rem); }
  .scratch-card { height: 230px; }
  section { padding: 70px 18px; }
  .section-head { margin-bottom: 40px; }
  .section-head h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  .eyebrow { font-size: .7rem; letter-spacing: .18em; }
  .hero-sub { font-size: .95rem; padding: 0 8px; }
  .chapter-tag { font-size: .68rem; }
  .marquee-track { font-size: .85rem; }
  .map-embed-wrap { height: 240px; }
  .maps-btn { padding: 15px 22px; font-size: .88rem; }
  .footer { padding: 60px 18px 44px; }
}
@media (max-width: 360px) {
  .hero-title { font-size: clamp(1.7rem, 9vw, 3rem); }
}
