:root {
  --bg: #09070f;
  --bg-2: #100b1b;
  --card: rgba(22, 16, 32, .74);
  --line: rgba(255, 255, 255, .14);
  --text: #fff;
  --muted: rgba(255,255,255,.70);
  --pink: #ff4edb;
  --pink-2: #ff7adf;
  --violet: #9c5cff;
  --purple: #6d31ff;
  --cyan: #43d9ff;
  --shadow: 0 22px 70px rgba(0,0,0,.36);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(113, 55, 255, .20), transparent 35%),
    linear-gradient(180deg, #09060f 0%, #0b0810 35%, #08070d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img, video { max-width: 100%; display: block; }

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .85;
}
.ambient {
  position: fixed;
  width: 42vw;
  height: 42vw;
  min-width: 320px;
  min-height: 320px;
  filter: blur(90px);
  border-radius: 50%;
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}
.ambient-a { background: #8b45ff; left: -18vw; top: 28vh; }
.ambient-b { background: #ff3fb4; right: -22vw; top: 62vh; }

main { position: relative; z-index: 1; }
.section {
  min-height: 100svh;
  padding: 90px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero {
  min-height: 100svh;
  flex-direction: column;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255,65,225,.19), transparent 68%);
  filter: blur(12px);
  animation: breathe 5s ease-in-out infinite;
}
.eyebrow, .mini-label {
  font-size: .72rem;
  letter-spacing: .24em;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}
.hero h1 {
  position: relative;
  margin: 14px 0 20px;
  font-size: clamp(3.15rem, 13vw, 7.5rem);
  line-height: .88;
  letter-spacing: -.06em;
  text-shadow: 0 0 45px rgba(191,88,255,.18);
}
.hero h1 span {
  display: inline-block;
  color: transparent;
  background: linear-gradient(100deg, #fff 5%, #ff9cf1 40%, #b46fff 72%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-copy {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2.7vw, 1.18rem);
  line-height: 1.7;
}
.scroll-cue {
  margin-top: 48px;
  color: #ff8bea;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 1.14rem;
  line-height: 1.35;
}
.scroll-cue i {
  width: 26px;
  height: 42px;
  display: block;
  margin: 18px auto 0;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
  position: relative;
}
.scroll-cue i:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 8px;
  background: #fff;
  border-radius: 999px;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  animation: scrollPulse 1.7s ease-in-out infinite;
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(42,28,58,.74), rgba(17,12,27,.76));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  border-radius: 32px;
}
.counter-section {
  background: linear-gradient(150deg, rgba(111,45,252,.35), rgba(255,55,221,.19) 46%, transparent 75%);
}
.counter-card {
  width: min(680px, 100%);
  text-align: center;
  padding: clamp(28px, 6vw, 52px) clamp(18px, 5vw, 42px);
  position: relative;
  overflow: hidden;
}
.counter-card:before {
  content: "";
  position: absolute;
  inset: -35%;
  background: conic-gradient(from 0deg, transparent, rgba(255,100,230,.10), transparent, rgba(83,213,255,.08), transparent);
  animation: rotate 15s linear infinite;
}
.counter-card > * { position: relative; z-index: 1; }
.counter-card h2, .music-copy h2, .moon-section h2, .finale-card h2, .story-intro h2 {
  margin: 12px 0 16px;
  font-size: clamp(2.05rem, 8vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.orbit {
  width: 255px;
  height: 255px;
  margin: 28px auto 30px;
  position: relative;
}
.sun {
  position: absolute;
  width: 76px;
  height: 76px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff0b5 0 8%, #ffc64a 33%, #ff8e39 70%);
  box-shadow: 0 0 30px rgba(255,185,66,.68), 0 0 70px rgba(255,113,50,.22);
}
.orbit-ring {
  position: absolute;
  inset: 25px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
}
.ring-two { inset: 2px; opacity: .45; }
.planet {
  position: absolute;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #82f5ff, #1ca7e8 55%, #5a55ff);
  top: 50%;
  left: 50%;
  margin: -14px;
  transform-origin: 14px 14px;
  animation: orbit 6.4s linear infinite;
  box-shadow: 0 0 20px rgba(70,213,255,.72);
}
.planet:before {
  content: "";
  position: absolute;
  width: 205px;
  height: 205px;
  top: -88px;
  left: -88px;
  border-radius: 50%;
}

.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.timer div { min-width: 0; }
.timer strong { display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.timer span { display: block; color: var(--muted); margin-top: 8px; font-size: .75rem; }
.timer-large strong { font-size: clamp(1.45rem, 5vw, 2.3rem); }
.soft-note { margin: 25px 0 0; color: rgba(255,255,255,.55); font-style: italic; }

.story-intro { flex-direction: column; text-align: center; }
.meeting-symbol { font-size: clamp(2rem, 8vw, 4rem); display: flex; gap: 22px; align-items: center; margin-bottom: 28px; }
.eye { filter: drop-shadow(0 0 18px rgba(255,255,255,.35)); }
.spark { color: #ff78da; animation: spark 1.6s ease-in-out infinite; }
.story-intro h2 em { color: #ff74de; font-style: normal; }
.story-copy { max-width: 720px; margin: 12px auto; color: var(--muted); line-height: 1.78; font-size: 1.1rem; }
.quote-card {
  margin: 30px auto 18px;
  max-width: 650px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  text-align: left;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
}
.quote-card span { font-family: Georgia, serif; font-size: 3.5rem; color: #ff74de; line-height: .8; }
.quote-card p { margin: 0; line-height: 1.65; }
.signature { font-weight: 800; color: #e9c8ff; }

.moon-section { text-align: center; background: radial-gradient(circle at 50% 48%, rgba(124,109,157,.16), transparent 35%); }
.moon-wrap { max-width: 720px; width: 100%; }
.moon-wrap > p:first-child { color: var(--muted); font-weight: 700; font-size: 1.08rem; }
.moon-section h2 { color: #fff; }
.moon {
  width: min(64vw, 330px);
  aspect-ratio: 1;
  margin: 30px auto;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.38) 0 2%, transparent 3%),
    radial-gradient(circle at 62% 42%, rgba(0,0,0,.14) 0 7%, transparent 8%),
    radial-gradient(circle at 42% 62%, rgba(0,0,0,.12) 0 9%, transparent 10%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.10) 0 5%, transparent 6%),
    radial-gradient(circle at 45% 45%, #f0eef1 0 58%, #c8c4ca 76%, #9d9aa2 100%);
  box-shadow: 0 0 25px rgba(245,242,255,.45), 0 0 95px rgba(211,197,255,.20);
  animation: moonFloat 5s ease-in-out infinite;
}
.moon-shadow {
  position: absolute;
  width: 96%;
  height: 106%;
  right: -30%;
  top: -3%;
  border-radius: 50%;
  background: rgba(7,7,10,.96);
  box-shadow: -16px 0 24px rgba(4,4,7,.42);
}
.moon-caption { max-width: 560px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

.chapters { padding: 80px 0; position: relative; }
.chapter {
  min-height: 92svh;
  padding: 70px 22px;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}
.chapter.reverse .media-card { order: 2; }
.chapter.reverse .chapter-copy { order: 1; }
.media-card {
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: var(--shadow);
  background: #121018;
  transform-style: preserve-3d;
  transition: transform .2s ease-out;
}
.portrait-card { aspect-ratio: 4 / 5; }
.landscape-card { aspect-ratio: 4 / 5; }
.media-card img, .media-card video { width: 100%; height: 100%; object-fit: cover; }
.landscape-card img { object-position: 55% 50%; }
.shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.10) 45%, transparent 68%);
  transform: translateX(-100%);
  animation: shine 7s ease-in-out infinite;
  pointer-events: none;
}
.chapter-copy span { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 800; }
.chapter-copy h3 {
  margin: 10px 0 18px;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  letter-spacing: -.035em;
  background: linear-gradient(90deg, #ff6cd8, #9a6cff 68%, #7ce7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.chapter-copy p { margin: 0; color: var(--muted); font-size: 1.06rem; line-height: 1.78; }
.video-card { aspect-ratio: 9/14; }
.video-toggle {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%,-50%);
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(8,7,13,.54);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.video-toggle:hover { transform: translate(-50%,-50%) scale(1.08); background: rgba(255,70,208,.38); }
.video-badge { position: absolute; top: 18px; left: 18px; padding: 8px 11px; border-radius: 999px; background: rgba(8,7,13,.55); border: 1px solid rgba(255,255,255,.14); font-size: .68rem; letter-spacing: .16em; font-weight: 800; }

.collage-chapter { grid-template-columns: 1fr; max-width: 880px; gap: 42px; }
.memory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  position: relative;
}
.memory {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 15px 45px rgba(0,0,0,.28);
}
.memory-a { object-position: center 25%; }
.memory-b { object-position: center 40%; }
.memory-c { object-position: 52% 50%; }
.memory-d { object-position: center 70%; }
.centered { max-width: 680px; text-align: center; margin: 0 auto; }

.music-section {
  flex-direction: column;
  gap: 36px;
  text-align: center;
  background: radial-gradient(circle at 50% 42%, rgba(255,69,217,.15), transparent 38%);
}
.vinyl {
  width: min(62vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    repeating-radial-gradient(circle, #17131e 0 3px, #0b090f 4px 7px),
    #0a0810;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 35px 70px rgba(0,0,0,.45), 0 0 70px rgba(255,57,206,.13);
  animation: spin 10s linear infinite;
}
.vinyl-label {
  width: 35%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #fff 0 3%, #ffb7f1 4% 7%, #ff54d7 8% 55%, #7d45ff 100%);
  color: #fff;
  font-weight: 900;
  letter-spacing: .06em;
  box-shadow: inset 0 0 25px rgba(255,255,255,.22);
}
.music-copy { max-width: 620px; }
.music-copy h2 { margin-bottom: 4px; }
.artist { color: #ff78de !important; font-weight: 900; letter-spacing: .05em; margin-top: 0 !important; }
.music-copy p { color: var(--muted); line-height: 1.7; }
.primary-btn, .love-btn, .share-btn {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #8a4dff, #ff43d3);
  box-shadow: 0 12px 40px rgba(224,56,255,.25);
}
.primary-btn:hover, .love-btn:hover, .share-btn:hover { transform: translateY(-2px) scale(1.015); filter: brightness(1.06); }
.youtube-wrap { width: min(760px, 100%); aspect-ratio: 16/9; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.14); }
.youtube-wrap iframe { width: 100%; height: 100%; border: 0; }

.final-photo { min-height: 92svh; }
.final-photo .portrait-card img { object-position: center 36%; }

.finale { min-height: 100svh; background: linear-gradient(150deg, rgba(117,55,255,.32), rgba(255,64,207,.21) 48%, transparent 75%); overflow: hidden; }
.finale-card { width: min(650px, 100%); text-align: center; padding: clamp(32px, 6vw, 58px) clamp(20px, 5vw, 44px); position: relative; z-index: 2; }
.finale-card p { color: var(--muted); line-height: 1.65; }
.finale-card h3 { margin: 28px 0 15px; }
.timer-small div { border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 14px 4px; background: rgba(255,255,255,.04); }
.timer-small strong { font-size: 1.05rem; }
.love-btn { width: min(300px, 100%); margin-top: 28px; color: #63234f; background: #fff; }
.share-btn { width: min(300px, 100%); margin-top: 12px; color: #fff; background: linear-gradient(90deg, #ff4ad5, #9f50ff); }
.end-note { font-size: .78rem; margin: 24px 0 0; opacity: .55; }
.heart-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.heart-particle { position: absolute; bottom: -40px; font-size: 20px; animation: flyHeart var(--dur, 4s) ease-in forwards; filter: drop-shadow(0 4px 10px rgba(255,30,162,.25)); }

.dots {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: grid;
  gap: 9px;
  padding: 12px 8px;
  border-radius: 999px;
  background: rgba(7,6,11,.26);
  backdrop-filter: blur(10px);
}
.dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: all .24s ease; }
.dot.active { height: 23px; border-radius: 999px; background: #fff; box-shadow: 0 0 15px rgba(255,255,255,.5); }

.reveal-section { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal-section.visible { opacity: 1; transform: translateY(0); }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 30; padding: 12px 16px; border-radius: 999px; color: #fff; background: rgba(17,12,26,.88); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@keyframes breathe { 50% { transform: scale(1.18); opacity: .7; } }
@keyframes scrollPulse { 0% { transform: translate(-50%,0); opacity: .2; } 50% { opacity: 1; } 100% { transform: translate(-50%,16px); opacity: 0; } }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes orbit { from { transform: rotate(0deg) translateX(103px) rotate(0deg); } to { transform: rotate(360deg) translateX(103px) rotate(-360deg); } }
@keyframes spark { 50% { transform: rotate(45deg) scale(1.4); text-shadow: 0 0 24px #ff71dc; } }
@keyframes moonFloat { 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes shine { 0%,70% { transform: translateX(-100%); } 88%,100% { transform: translateX(120%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flyHeart { 0% { transform: translate3d(0,0,0) rotate(0deg) scale(.7); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate3d(var(--drift, 0px), -115vh, 0) rotate(var(--rot, 180deg)) scale(1.45); opacity: 0; } }

@media (max-width: 760px) {
  .section { padding-left: 18px; padding-right: 18px; }
  .chapter { grid-template-columns: 1fr; min-height: auto; padding: 62px 20px; gap: 28px; }
  .chapter.reverse .media-card, .chapter.reverse .chapter-copy { order: initial; }
  .chapter-copy { text-align: center; }
  .media-card { max-width: 520px; width: 100%; margin: 0 auto; }
  .memory { height: 220px; }
  .dots { right: 6px; }
  .timer { gap: 7px; }
  .counter-card { border-radius: 26px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 3.65rem; }
  .hero-copy { font-size: .98rem; }
  .timer span { font-size: .65rem; }
  .timer-small div { padding: 12px 2px; }
  .memory { height: 180px; border-radius: 16px; }
  .quote-card { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
