/* =====================================================================
   ALBY ♥ RITHIKA — Our Forever
   A cinematic, audio-reactive love experience.
   ===================================================================== */

:root {
  --bg: #0a0812;
  --bg-2: #140e22;
  --bg-3: #1d1230;
  --rose: #ff7aa2;
  --rose-deep: #ff4d79;
  --rose-soft: #ffc2d4;
  --gold: #eccb8b;
  --gold-deep: #c9a24d;
  --champagne: #f8eed8;
  --text: #f5edf5;
  --muted: rgba(245, 237, 245, 0.66);
  --dim: rgba(245, 237, 245, 0.42);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  --serif: "Playfair Display", "Times New Roman", serif;
  --serif2: "Cormorant Garamond", Georgia, serif;
  --sans: "Poppins", system-ui, sans-serif;
  --script: "Great Vibes", cursive;
  --beat: 0;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(120, 60, 140, 0.35), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(180, 60, 100, 0.28), transparent 62%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(60, 30, 90, 0.55), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
}

a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--champagne);
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }

/* ----------------------------- background layers -------------------- */

#sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.6;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora .a1 {
  width: 46vmax; height: 46vmax; left: -8vmax; top: -6vmax;
  background: radial-gradient(circle, rgba(255, 90, 140, 0.5), transparent 68%);
  animation: drift1 24s ease-in-out infinite;
}
.aurora .a2 {
  width: 40vmax; height: 40vmax; right: -6vmax; top: 22%;
  background: radial-gradient(circle, rgba(236, 203, 139, 0.42), transparent 68%);
  animation: drift2 30s ease-in-out infinite;
}
.aurora .a3 {
  width: 50vmax; height: 50vmax; left: 30%; bottom: -18vmax;
  background: radial-gradient(circle, rgba(150, 90, 220, 0.42), transparent 68%);
  animation: drift3 27s ease-in-out infinite;
}
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vmax,6vmax) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-7vmax,5vmax) scale(1.1); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6vmax,-7vmax) scale(1.2); } }

.beat-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 60%, rgba(255, 90, 140, 0.28), transparent 62%);
  opacity: calc(0.12 + var(--beat) * 0.55);
  transform: scale(calc(1 + var(--beat) * 0.04));
  transition: opacity 0.12s linear, transform 0.12s linear;
}

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

/* ----------------------------- buttons ------------------------------ */

.btn {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #241203;
  background: linear-gradient(135deg, var(--gold), var(--champagne));
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(201, 162, 77, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.18s cubic-bezier(0.2, 1.3, 0.4, 1), box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 40px rgba(201, 162, 77, 0.45); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-big { font-size: 1.15rem; padding: 17px 38px; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }

.btn-gold { color: #241203; }

/* ----------------------------- GATE -------------------------------- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(120, 50, 110, 0.5), transparent 65%),
    linear-gradient(180deg, #0a0812, #140e22 60%, #1d1230);
  transition: opacity 1s ease, visibility 1s ease;
}
.gate.opening { opacity: 0; visibility: hidden; }

.gate-inner { max-width: 640px; animation: rise 1.2s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.emblem {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
}
.emblem-core {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--rose-soft), var(--gold), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 122, 162, 0.5));
}
.emblem-core b { color: var(--rose-deep); -webkit-text-fill-color: var(--rose-deep); font-size: 1.4rem; vertical-align: middle; }
.emblem-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(236, 203, 139, 0.5);
  animation: spin 22s linear infinite;
}
.emblem-ring.r1 { border-style: dashed; }
.emblem-ring.r2 { inset: -16px; border-color: rgba(255, 122, 162, 0.4); animation-direction: reverse; animation-duration: 34s; }
@keyframes spin { to { transform: rotate(360deg); } }

.gate-kicker, .kicker {
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.68rem;
  color: var(--gold);
  margin: 0 0 16px;
}
.gate-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 16px;
}
.gate-title em {
  font-family: var(--script);
  font-style: normal;
  font-size: 1.22em;
  background: linear-gradient(120deg, var(--rose-soft), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding: 0 0.1em;
}
.gate-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 30px; font-family: var(--serif2); font-size: 1.25rem; }
.gate-note { color: var(--dim); font-size: 0.82rem; margin: 22px 0 0; letter-spacing: 0.04em; }

/* ----------------------------- nav --------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(20px, 4vw);
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 8, 18, 0.72), rgba(10, 8, 18, 0));
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.nav.show { opacity: 1; transform: none; }
.nav-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}
.nav-brand span { color: var(--rose); margin: 0 2px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-music {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.nav-music:hover { transform: scale(1.08); background: rgba(255, 255, 255, 0.12); }
.nav-music.playing { background: var(--rose); color: #fff; border-color: transparent; }
.nav-music.playing { animation: spin 3s linear infinite; }

/* ----------------------------- layout ------------------------------ */

.site { position: relative; z-index: 1; }

section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 12vh, 150px) max(22px, 5vw);
  scroll-margin-top: 92px;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 7vh, 70px); }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 14px;
}
.section-note { color: var(--muted); font-size: 0.92rem; }

/* reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s cubic-bezier(0.2, 1, 0.3, 1), transform 0.9s cubic-bezier(0.2, 1, 0.3, 1);
}
[data-reveal].in { opacity: 1; transform: none; }

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

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 120px;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--gold);
  margin: 0 0 26px;
}
.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15em 0.35em;
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3rem, 13vw, 8.5rem);
  line-height: 0.95;
}
.hero-names .amp {
  font-family: var(--script);
  font-size: 0.62em;
  background: linear-gradient(120deg, var(--gold), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 0.05em;
}
.hero-names .n1 {
  background: linear-gradient(180deg, #fff 0%, var(--rose-soft) 55%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-names .n2 {
  background: linear-gradient(180deg, #fff 0%, var(--gold) 55%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
.hero-names .n2::after {
  content: "";
  position: absolute;
  inset: -20% -6%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.75) 50%, transparent 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer { 0% { background-position: 180% 0; } 55%, 100% { background-position: -80% 0; } }

.hero-tag {
  font-family: var(--serif2);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  color: var(--muted);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.hero-since {
  font-family: var(--serif2);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--dim);
  letter-spacing: 0.03em;
  margin: 0 0 46px;
}
.hero-since b { color: var(--gold); font-weight: 500; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: clamp(18px, 5vw, 54px);
  padding: 22px 34px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.6rem; color: var(--muted); margin-top: 8px; }
.stat-div { color: var(--rose); font-size: 1.4rem; }

.scroll-cue {
  margin-top: clamp(40px, 8vh, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.62rem;
}
.scroll-cue i {
  width: 22px; height: 36px; border: 1px solid var(--line); border-radius: 12px; position: relative;
}
.scroll-cue i::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 3px;
  background: var(--gold); transform: translateX(-50%); animation: cue 1.7s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* ----------------------------- TOGETHER ---------------------------- */

.countdown {
  text-align: center;
  padding: clamp(30px, 6vw, 54px) clamp(20px, 5vw, 50px);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.cd-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem; margin: 0 0 28px; }
.cd-label b { color: var(--gold); }
.cd-grid { display: flex; justify-content: center; gap: clamp(14px, 4vw, 44px); flex-wrap: wrap; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 74px; }
.cd-unit span {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff, var(--rose-soft));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.cd-unit small { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.6rem; color: var(--muted); margin-top: 10px; }

.pulse-line {
  margin-top: clamp(34px, 6vh, 60px);
  display: flex; align-items: center; gap: 16px;
  max-width: 620px; margin-left: auto; margin-right: auto;
  color: var(--muted); font-family: var(--serif2); font-size: 1.25rem; font-style: italic;
}
.pulse-line p { margin: 0; }
.pulse-dot {
  flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0 rgba(255, 77, 121, 0.6);
  animation: heartPulse 1.6s ease-out infinite;
}
@keyframes heartPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 121, 0.55); }
  70% { box-shadow: 0 0 0 18px rgba(255, 77, 121, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 121, 0); }
}

/* ----------------------------- STORY ------------------------------- */

.chapters { position: relative; display: grid; gap: clamp(24px, 5vh, 46px); }
.chapters::before {
  content: "";
  position: absolute;
  left: clamp(20px, 4vw, 42px);
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.chapter {
  position: relative;
  display: flex;
  gap: clamp(20px, 4vw, 46px);
  padding-left: clamp(20px, 4vw, 42px);
}
.chapter-index {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: clamp(44px, 8vw, 64px);
  height: clamp(44px, 8vw, 64px);
  margin-left: -1px;
  transform: translateX(-50%);
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  background: #160f24;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(10, 8, 18, 0.6), 0 0 26px rgba(236, 203, 139, 0.25);
}
.chapter-body {
  flex: 1;
  padding: clamp(20px, 3vw, 34px);
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.chapter-body:hover { transform: translateY(-4px); border-color: rgba(236, 203, 139, 0.4); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35); }
.chapter-date { text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.64rem; color: var(--rose); margin: 0 0 10px; }
.chapter-body h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 3.4vw, 1.9rem); margin: 0 0 12px; }
.chapter-body p:last-child { margin: 0; color: var(--muted); font-family: var(--serif2); font-size: clamp(1.05rem, 2.4vw, 1.25rem); line-height: 1.6; }

/* ----------------------------- NAME ART ---------------------------- */

.nameart { text-align: center; padding-top: clamp(50px, 10vh, 120px); padding-bottom: clamp(50px, 10vh, 120px); }
.nameart-kicker { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.66rem; color: var(--gold); margin: 0 0 18px; }
.giant-name {
  font-family: var(--serif);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(4rem, 24vw, 18rem);
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 203, 139, 0.55);
  background: linear-gradient(100deg, var(--rose) 0%, var(--gold) 45%, var(--rose-soft) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-position 1.4s ease;
}
.giant-name.in {
  -webkit-text-stroke: 1px transparent;
  background-position: 100% 0;
}

/* ----------------------------- GALLERY ----------------------------- */

.polaroids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 4vw, 38px);
}
.polaroid {
  position: relative;
  background: #fff;
  padding: 12px 12px 54px;
  border-radius: 6px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  transform: rotate(var(--rot, -2deg));
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
}
.polaroid:hover { transform: rotate(0deg) translateY(-10px) scale(1.03); box-shadow: 0 34px 70px rgba(0, 0, 0, 0.55); z-index: 5; }
.polaroid-img {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a1836, #4a2440 45%, #7a3550);
  display: grid; place-items: center;
  position: relative;
}
.polaroid-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid-img .ph {
  font-family: var(--script);
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 10px;
}
.polaroid-cap {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-family: var(--script);
  font-size: 1.3rem;
  color: #3a2233;
}

/* ----------------------------- REASONS ----------------------------- */

.reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 3vw, 28px);
}
.reason-card {
  padding: clamp(24px, 3vw, 34px);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.reason-card:hover { transform: translateY(-8px); border-color: rgba(255, 122, 162, 0.45); box-shadow: 0 28px 55px rgba(0, 0, 0, 0.4); }
.rc-ico { font-size: 1.8rem; display: block; margin-bottom: 14px; }
.reason-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; margin: 0 0 10px; }
.reason-card p { margin: 0; color: var(--muted); font-family: var(--serif2); font-size: 1.1rem; line-height: 1.55; }

/* ----------------------------- SONG -------------------------------- */

.song-visual {
  position: relative;
  height: clamp(220px, 34vh, 320px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 77, 121, 0.35), transparent 60%), rgba(0, 0, 0, 0.25);
  box-shadow: var(--shadow);
}
#viz { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.song-eq {
  position: absolute;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
  pointer-events: none;
}
.song-eq i {
  display: block;
  width: 6px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--rose));
  transform-origin: bottom;
  transition: height 0.08s linear;
}
.song-line {
  text-align: center;
  font-family: var(--serif2);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--champagne);
  margin: clamp(24px, 5vh, 44px) 0 8px;
}

/* ----------------------------- LETTER ------------------------------ */

.letter-paper {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 60px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 122, 162, 0.14), transparent 45%),
    linear-gradient(160deg, #fbf5ea, #f3e7d6);
  color: #3a2b3a;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 162, 77, 0.4);
}
.letter-paper::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(201, 162, 77, 0.35);
  border-radius: 10px;
  pointer-events: none;
}
.letter-type {
  font-family: var(--serif2);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.85;
  white-space: pre-wrap;
  margin: 0 0 20px;
  min-height: 1.85em;
}
.letter-type .caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  background: var(--rose-deep);
  vertical-align: -0.15em;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.letter-sign {
  font-family: var(--script);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  text-align: right;
  color: #b5305e;
  margin: 0;
}

/* ----------------------------- FINALE ------------------------------ */

.finale { text-align: center; }
.finale-inner, .finale-done { max-width: 760px; margin: 0 auto; }
.finale-q {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.18;
  margin: 0 0 40px;
}
.finale-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.finale-hint { font-family: var(--serif2); font-size: 1.3rem; color: var(--rose-soft); min-height: 1.6em; margin: 26px 0 0; }

.btn-no {
  position: relative;
  transition: top 0.4s cubic-bezier(0.3, 1.4, 0.4, 1), left 0.4s cubic-bezier(0.3, 1.4, 0.4, 1);
}
.btn-no.turned { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; border-color: transparent; }
.btn-no.running { position: fixed; z-index: 80; }

.finale-yay {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 34px;
  background: linear-gradient(120deg, var(--rose-soft), var(--gold), var(--rose));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: beatIn 1s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes beatIn { 0% { transform: scale(0.7); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }

.cert {
  padding: clamp(26px, 4vw, 44px);
  border-radius: 16px;
  border: 1px double rgba(236, 203, 139, 0.6);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(10px);
  margin: 0 0 34px;
}
.cert-top { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.66rem; color: var(--gold); margin: 0 0 16px; }
.cert-body { font-family: var(--serif2); font-size: clamp(1.1rem, 2.8vw, 1.5rem); line-height: 1.6; margin: 0 0 14px; }
.cert-body b { color: var(--rose-soft); font-weight: 600; }
.cert-date { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.66rem; color: var(--muted); margin: 0; }

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

.footer { text-align: center; padding: 70px 22px 120px; }
.footer-mono { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.1em; }
.footer-mono span { color: var(--rose); }
.footer p { color: var(--muted); font-family: var(--serif2); font-size: 1.15rem; margin: 12px 0 0; }
.footer-small { font-size: 0.86rem !important; color: var(--dim) !important; }

/* ----------------------------- PLAYER ------------------------------ */

.player {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  background: rgba(16, 11, 26, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.player.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.player.missing { opacity: 0.85; }
.player.missing .player-title { color: var(--gold); }
.player-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--champagne));
  color: #241203; font-size: 0.85rem;
  display: grid; place-items: center;
  transition: transform 0.2s ease;
}
.player-btn:hover { transform: scale(1.08); }
.player .pi-pause { display: none; }
.player.playing .pi-play { display: none; }
.player.playing .pi-pause { display: inline; }
.player-meta { display: flex; flex-direction: column; line-height: 1.15; max-width: 160px; }
.player-title { font-size: 0.86rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { font-size: 0.68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-viz { width: 90px; height: 30px; }
.player-film {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}
.player-film:hover { background: rgba(255, 255, 255, 0.12); transform: scale(1.04); }
.player-film.on { background: var(--gold); color: #241203; border-color: transparent; }

#fireworks {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.heart-rain {
  position: fixed;
  top: -6vh;
  z-index: 46;
  pointer-events: none;
  animation: heartFall linear forwards;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
@keyframes heartFall {
  to { transform: translateY(112vh) rotate(340deg); opacity: 0; }
}

/* ----------------------------- toast ------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(20px);
  z-index: 70;
  background: rgba(16, 11, 26, 0.9);
  border: 1px solid var(--line);
  color: var(--champagne);
  font-family: var(--serif2);
  font-size: 1.05rem;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ----------------------------- progress + sparkles ------------------ */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 90;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--rose-soft));
  box-shadow: 0 0 14px rgba(255, 122, 162, 0.75);
}

#sparkles {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ----------------------------- hero canvas ------------------------- */

.hero { max-width: none; position: relative; overflow: hidden; }
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-halo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 46% 42% at 50% 48%, rgba(255, 90, 140, 0.22), transparent 70%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ----------------------------- divider ----------------------------- */

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 22px;
}
.divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.divider b {
  color: var(--rose);
  font-size: 0.9rem;
  animation: heartbeat 2.6s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.3); }
  40% { transform: scale(1); }
  60% { transform: scale(1.18); }
}

/* ----------------------------- constellation ----------------------- */

.constellation { max-width: 760px; margin: 0 auto; }
.constellation svg { width: 100%; height: auto; overflow: visible; }
.c-lines { opacity: 0.55; }
.c-lines polyline, .c-lines line {
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
}
.constellation.in .c-lines polyline,
.constellation.in .c-lines line { animation: cdraw 2.8s ease forwards; }
@keyframes cdraw { to { stroke-dashoffset: 0; } }
.c-stars circle {
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.85));
  animation: twinkle 3.2s ease-in-out infinite;
}
.c-stars circle:nth-child(3n) { animation-delay: 0.7s; }
.c-stars circle:nth-child(3n + 1) { animation-delay: 1.4s; }
@keyframes twinkle { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.constellation-cap {
  text-align: center;
  font-family: var(--script);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--gold);
  margin: 10px 0 0;
  letter-spacing: 0.1em;
}

/* ----------------------------- wax seal ---------------------------- */

.wax {
  position: absolute;
  top: -20px;
  right: 34px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffe6ee;
  background: radial-gradient(circle at 34% 28%, #ff8fae, #b81d49 68%);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4), inset 0 -5px 12px rgba(0, 0, 0, 0.3), inset 0 3px 6px rgba(255, 255, 255, 0.25);
  transform: rotate(-9deg);
  z-index: 3;
  letter-spacing: 0.02em;
}
.wax::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

/* ----------------------------- countdown pop ----------------------- */

.cd-unit span { transition: transform 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); }
.cd-unit span.pop { animation: digitPop 0.4s ease; }
@keyframes digitPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); filter: drop-shadow(0 0 12px rgba(255, 122, 162, 0.9)); }
  100% { transform: scale(1); }
}

/* ----------------------------- responsive -------------------------- */

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 96px; }
  .hero-stats { flex-direction: column; gap: 18px; padding: 20px 26px; }
  .stat-div { transform: rotate(0); }
  .chapter { gap: 16px; }
  .player-meta, .player-viz { display: none; }
  .cd-unit { min-width: 60px; }
  .section-note { padding: 0 8px; }
}

@media (max-width: 560px) {
  section { padding: 62px 18px; scroll-margin-top: 74px; }
  .hero { padding-top: 92px; }
  .hero-names { font-size: clamp(2.7rem, 16vw, 4.6rem); gap: 0.04em 0.18em; }
  .hero-names .amp { font-size: 0.72em; }
  .hero-eyebrow { letter-spacing: 0.22em; font-size: 0.6rem; }
  .hero-stats { width: 100%; }
  .stat-num { font-size: 2.5rem; }
  .gate-title { font-size: 2rem; }
  .emblem { width: 118px; height: 118px; }
  .emblem-core { font-size: 2rem; }
  .cd-grid { gap: 14px; }
  .cd-unit { min-width: 56px; }
  .cd-unit span { font-size: 2.6rem; }
  .chapters::before { left: 16px; }
  .chapter { padding-left: 16px; gap: 12px; }
  .chapter-index { width: 40px; height: 40px; font-size: 0.82rem; }
  .giant-name { font-size: 27vw; -webkit-text-stroke-width: 1px; }
  .polaroids { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .polaroid { padding: 8px 8px 40px; }
  .polaroid-cap { font-size: 1.05rem; bottom: 10px; }
  .section-note { font-size: 0.84rem; }
  .wax { width: 56px; height: 56px; font-size: 0.82rem; top: -14px; right: 16px; }
  .letter-paper { padding: 28px 20px; }
  .letter-type { font-size: 1.1rem; line-height: 1.8; }
  .player { bottom: 12px; padding: 8px 12px 8px 8px; gap: 10px; max-width: calc(100vw - 24px); }
  .player-film { padding: 7px 11px; font-size: 0.72rem; }
  .toast { bottom: 104px; font-size: 0.98rem; max-width: calc(100vw - 32px); }
  .finale-q { font-size: 1.55rem; }
  .reason-card { padding: 22px; }
  .footer { padding-bottom: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.05s !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
