/* =====================================================================
   Милька — стили
   ===================================================================== */

:root {
  --bg: #07030c;
  --bg-2: #120718;
  --plum: #2a0f33;
  --rose: #ff6b9d;
  --rose-2: #ff9ec0;
  --rose-deep: #d63a73;
  --gold: #f6cf8a;
  --cream: #fbeef0;
  --muted: rgba(251, 238, 240, 0.62);
  --line: rgba(255, 158, 192, 0.18);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 190, 215, 0.14);

  --serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --script: "Great Vibes", "Brush Script MT", cursive;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --radius: 22px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }

::selection { background: var(--rose); color: var(--bg); }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

/* Hide native cursor on devices with fine pointer */
@media (hover: hover) and (pointer: fine) {
  body, button, a { cursor: none; }
}

/* =====================================================================
   PRELOADER
   ===================================================================== */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(ellipse at center, #1c0a24 0%, var(--bg) 70%);
  transition: opacity 1.1s var(--ease-in-out), visibility 1.1s, clip-path 1.3s var(--ease-in-out);
  clip-path: circle(150% at 50% 50%);
}
.preloader.is-done { clip-path: circle(0% at 50% 50%); opacity: 0; visibility: hidden; }

.preloader__heart { width: 74px; animation: beat 1.1s infinite; filter: drop-shadow(0 0 24px rgba(255, 107, 157, 0.75)); }
.preloader__heart svg { fill: var(--rose); width: 100%; }
.preloader__text { font-family: var(--serif); font-style: italic; font-size: 1.35rem; letter-spacing: 0.04em; color: var(--rose-2); }
.preloader__text .dots i { font-style: normal; animation: dot 1.4s infinite; opacity: 0; }
.preloader__text .dots i:nth-child(2) { animation-delay: 0.2s; }
.preloader__text .dots i:nth-child(3) { animation-delay: 0.4s; }
.preloader__bar { width: 180px; height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width 0.3s ease; }

.preloader__enter {
  margin-top: 4px; padding: 17px 44px; border-radius: 50px; color: #fff;
  background: linear-gradient(135deg, var(--rose-deep), #9b2a8a);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase;
  animation: enterIn 1s var(--ease-out) both, enterPulse 2.4s 1s ease-in-out infinite;
  transition: filter 0.3s;
}
.preloader__enter:hover { filter: brightness(1.12); }
.preloader.is-ready .preloader__bar { opacity: 0; transition: opacity 0.6s; }
.preloader.is-ready .preloader__text { animation: enterIn 1s var(--ease-out) both; }
@keyframes enterIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes enterPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.5), 0 15px 50px -10px rgba(214, 58, 115, 0.7); }
  50% { box-shadow: 0 0 0 16px rgba(255, 107, 157, 0), 0 15px 50px -10px rgba(214, 58, 115, 0.7); }
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(1); }
  45% { transform: scale(1.14); }
  60% { transform: scale(1); }
}
@keyframes dot { 0%, 100% { opacity: 0; } 40% { opacity: 1; } }

/* =====================================================================
   GLOBAL LAYERS
   ===================================================================== */
.layer-petals { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); }
  70% { transform: translate(9%, 4%); }
  90% { transform: translate(-1%, 7%); }
}

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 95; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--rose-deep), var(--rose), var(--gold));
  box-shadow: 0 0 12px var(--rose);
}

/* Custom cursor */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 1001; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--rose-2); box-shadow: 0 0 10px var(--rose); }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(255, 158, 192, 0.55);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), background 0.35s, border-color 0.35s;
}
.cursor.is-hover .cursor__ring { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(255, 107, 157, 0.12); border-color: var(--rose); }
.cursor.is-down .cursor__ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* Music button */
.music {
  position: fixed; right: 26px; bottom: 26px; z-index: 96;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 16px; border-radius: 40px;
  background: rgba(20, 8, 26, 0.55); border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.music:hover { color: var(--cream); border-color: var(--rose); box-shadow: 0 0 30px rgba(255, 107, 157, 0.25); }
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.music__bars i { width: 2px; height: 30%; background: var(--rose); border-radius: 2px; transition: height 0.3s; }
.music.is-playing .music__bars i { animation: bars 0.9s ease-in-out infinite; }
.music.is-playing .music__bars i:nth-child(2) { animation-delay: 0.15s; }
.music.is-playing .music__bars i:nth-child(3) { animation-delay: 0.3s; }
.music.is-playing .music__bars i:nth-child(4) { animation-delay: 0.45s; }
@keyframes bars { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* Side dot navigation */
.dots-nav { position: fixed; right: 30px; top: 50%; transform: translateY(-50%); z-index: 94; display: flex; flex-direction: column; gap: 16px; }
.dots-nav a { position: relative; display: block; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 190, 215, 0.25); transition: background 0.4s, transform 0.4s var(--ease-out); }
.dots-nav a::after {
  content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translate(8px, -50%);
  white-space: nowrap; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rose-2);
  opacity: 0; transition: opacity 0.35s, transform 0.35s var(--ease-out); pointer-events: none;
}
.dots-nav a:hover::after { opacity: 1; transform: translate(0, -50%); }
.dots-nav a.is-active { background: var(--rose); transform: scale(1.6); box-shadow: 0 0 12px var(--rose); }
@media (max-width: 800px) { .dots-nav { display: none; } }

/* =====================================================================
   REVEAL ANIMATIONS
   ===================================================================== */
.reveal-up { opacity: 0; transform: translateY(40px); filter: blur(8px); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out), filter 1.2s var(--ease-out); }
.reveal-up.is-in { opacity: 1; transform: none; filter: blur(0); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at 50% 120%, #3a0f35 0%, var(--bg) 60%);
}
.aurora { position: absolute; inset: 0; filter: blur(80px); opacity: 0.75; pointer-events: none; }
.aurora__blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora__blob.a1 { width: 55vw; height: 55vw; left: -10vw; top: -15vw; background: radial-gradient(circle, rgba(214, 58, 115, 0.55), transparent 65%); animation: float1 18s ease-in-out infinite; }
.aurora__blob.a2 { width: 45vw; height: 45vw; right: -12vw; top: 10vh; background: radial-gradient(circle, rgba(128, 40, 170, 0.5), transparent 65%); animation: float2 22s ease-in-out infinite; }
.aurora__blob.a3 { width: 40vw; height: 40vw; left: 30vw; bottom: -18vw; background: radial-gradient(circle, rgba(246, 170, 120, 0.35), transparent 65%); animation: float3 26s ease-in-out infinite; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(12vw, 8vh) scale(1.15); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10vw, 12vh) scale(0.9); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-8vw, -10vh) scale(1.2); } }

.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__content { position: relative; z-index: 2; padding: 0 20px; pointer-events: none; }
.hero__eyebrow {
  font-size: clamp(0.7rem, 1.4vw, 0.85rem); letter-spacing: 0.5em; text-transform: uppercase; color: var(--rose-2);
  margin-bottom: 1.5vh;
}
.hero__title {
  font-family: var(--script); font-weight: 400; line-height: 1.1;
  font-size: clamp(5.5rem, 21vw, 19rem);
  padding: 0 0.15em;
  perspective: 800px;
}
.hero__title .char {
  display: inline-block; opacity: 0;
  background: linear-gradient(120deg, #fff 0%, var(--rose-2) 30%, var(--gold) 50%, var(--rose-2) 70%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 107, 157, 0.45));
  transform: translateY(60%) rotateX(-80deg) scale(0.8);
  transform-origin: 50% 100%;
  animation: charIn 1.6s var(--ease-out) forwards, shimmer 6s linear infinite;
  padding: 0 0.02em;
}
@keyframes charIn { to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }

.hero__subtitle {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.15rem, 2.6vw, 1.9rem); color: var(--cream); min-height: 1.6em; margin-top: 1vh;
}
.hero__subtitle .caret { display: inline-block; width: 1px; height: 1em; background: var(--rose); margin-left: 4px; vertical-align: -0.12em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none;
  font-size: 0.65rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted);
  opacity: 0; animation: fadeIn 1.5s 2.4s forwards;
}
.scroll-hint__mouse { width: 22px; height: 36px; border: 1px solid var(--muted); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; }
.scroll-hint__mouse i { width: 2px; height: 7px; border-radius: 2px; background: var(--rose); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes fadeIn { to { opacity: 1; } }

/* =====================================================================
   MARQUEE
   ===================================================================== */
.marquee {
  position: relative; z-index: 2; overflow: hidden; padding: 26px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg), var(--bg-2), var(--bg));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__item {
  display: flex; align-items: center; gap: 36px; padding-right: 36px;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 4vw, 3rem); white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 158, 192, 0.55);
}
.marquee__item:nth-child(odd) { color: var(--rose-2); -webkit-text-stroke: 0; }
.marquee__item .sep { color: var(--gold); -webkit-text-stroke: 0; font-style: normal; font-size: 0.6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { position: relative; z-index: 2; padding: clamp(90px, 14vh, 160px) clamp(20px, 6vw, 80px); max-width: 1280px; margin: 0 auto; }
.section__head { text-align: center; margin-bottom: clamp(50px, 8vh, 90px); }
.section__num {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.4em; color: var(--rose);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 30px; margin-bottom: 22px;
}
.section__title {
  font-family: var(--serif); font-weight: 300; line-height: 1.05;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  background: linear-gradient(180deg, #fff 30%, var(--rose-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__lead { margin-top: 16px; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted); }

/* =====================================================================
   COUNTER
   ===================================================================== */
.counter { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 2vw, 24px); max-width: 1000px; margin: 0 auto; }
.counter__item {
  position: relative; padding: clamp(18px, 3vw, 34px) 8px; text-align: center; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--glass-border); overflow: hidden;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.counter__item::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, var(--rose) 85%, var(--gold) 95%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }
.counter__value {
  display: block; font-family: var(--serif); font-weight: 400; line-height: 1;
  font-size: clamp(2rem, 5.5vw, 4.4rem); font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, var(--rose-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.counter__value.tick { animation: tick 0.5s var(--ease-out); }
@keyframes tick { 0% { transform: translateY(-8px); opacity: 0.4; } 100% { transform: none; opacity: 1; } }
.counter__label { display: block; margin-top: 10px; font-size: clamp(0.6rem, 1.2vw, 0.78rem); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }

.together__note { text-align: center; margin-top: 50px; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--rose-2); }

.heartbeat { max-width: 700px; margin: 40px auto 0; height: 80px; }
.heartbeat svg { width: 100%; height: 100%; overflow: visible; }
.heartbeat path {
  fill: none; stroke: var(--rose); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--rose));
  stroke-dasharray: 900; stroke-dashoffset: 900; animation: ecg 3s linear infinite;
}
@keyframes ecg { 0% { stroke-dashoffset: 900; } 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -900; } }

@media (max-width: 700px) {
  .counter { grid-template-columns: repeat(3, 1fr); }
  .counter__item:nth-child(4), .counter__item:nth-child(5) { grid-column: span 1; }
}

/* =====================================================================
   REASONS (flip cards)
   ===================================================================== */
.reasons__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 28px); }
@media (max-width: 960px) { .reasons__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .reasons__grid { grid-template-columns: 1fr; } }

.reason { perspective: 1200px; height: clamp(260px, 30vw, 330px); }
.reason__inner {
  position: relative; width: 100%; height: 100%; transform-style: preserve-3d;
  transition: transform 1s var(--ease-out);
  transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg)));
}
.reason.is-flipped .reason__inner { --flip: 180deg; }
.reason__face {
  position: absolute; inset: 0; border-radius: var(--radius); padding: 34px 30px;
  display: flex; flex-direction: column; justify-content: space-between;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  border: 1px solid var(--glass-border);
}
.reason__front { background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.reason__front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 107, 157, 0.22), transparent 45%);
  opacity: 0; transition: opacity 0.4s;
}
.reason:hover .reason__front::after { opacity: 1; }
.reason__back {
  transform: rotateY(180deg); justify-content: center; text-align: center;
  background: linear-gradient(145deg, #b82c63 0%, #6d1b53 55%, #3a0f40 100%);
  box-shadow: inset 0 0 80px rgba(255, 200, 220, 0.2);
}
.reason__icon { font-size: 2.2rem; color: var(--gold); line-height: 1; text-shadow: 0 0 20px rgba(246, 207, 138, 0.6); }
.reason__num { position: absolute; top: 26px; right: 30px; font-family: var(--serif); font-size: 0.95rem; color: var(--muted); letter-spacing: 0.15em; }
.reason__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 2.8vw, 2.3rem); line-height: 1.1; }
.reason__hint { font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.reason__hint::before { content: ""; width: 24px; height: 1px; background: var(--rose); }
.reason__text { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.45; }
.reason__back .reason__icon { margin-bottom: 18px; }

/* =====================================================================
   TIMELINE
   ===================================================================== */
.timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.timeline__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); transform: translateX(-50%); }
.timeline__line span {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-origin: top; transform: scaleY(0);
  background: linear-gradient(180deg, var(--rose), var(--gold)); box-shadow: 0 0 12px var(--rose);
}
.tl-item { position: relative; width: 50%; padding: 0 60px 90px 0; text-align: right; }
.tl-item:nth-child(odd) { margin-left: 50%; padding: 0 0 90px 60px; text-align: left; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute; top: 8px; right: -9px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--rose); transition: background 0.6s, box-shadow 0.6s, transform 0.6s var(--ease-out);
}
.tl-item:nth-child(odd) .tl-item__dot { right: auto; left: -9px; }
.tl-item.is-in .tl-item__dot { background: var(--rose); box-shadow: 0 0 0 6px rgba(255, 107, 157, 0.15), 0 0 24px var(--rose); transform: scale(1.1); }
.tl-item__card {
  opacity: 0; transform: translateX(-50px); filter: blur(6px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
}
.tl-item:nth-child(odd) .tl-item__card { transform: translateX(50px); }
.tl-item.is-in .tl-item__card { opacity: 1; transform: none; filter: none; }
.tl-item__date { font-size: 0.72rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); }
.tl-item__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; margin: 10px 0 12px; }
.tl-item__text { color: var(--muted); font-size: 1rem; max-width: 420px; display: inline-block; }

@media (max-width: 760px) {
  .timeline__line { left: 8px; }
  .tl-item, .tl-item:nth-child(odd) { width: 100%; margin-left: 0; padding: 0 0 70px 44px; text-align: left; }
  .tl-item__dot, .tl-item:nth-child(odd) .tl-item__dot { left: -1px; right: auto; }
  .tl-item__card, .tl-item:nth-child(odd) .tl-item__card { transform: translateY(30px); }
}

/* =====================================================================
   GALLERY
   ===================================================================== */
/* Вертикальные фото с телефона: 4 колонки «лесенкой» (на телефоне — 2) */
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 28px); align-items: start; padding-bottom: 80px; }
.photo { position: relative; aspect-ratio: 2 / 3; perspective: 1000px; opacity: 0; transform: translateY(60px) scale(0.94); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out); }
.photo.is-in { opacity: 1; transform: none; }
.photo:nth-child(even) { margin-top: 80px; }
@media (max-width: 800px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 50px; }
  .photo:nth-child(even) { margin-top: 50px; }
}
.gallery__note {
  max-width: 660px; margin: 10px auto 0; text-align: center;
  font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1.5;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem); color: var(--rose-2);
}
.gallery__note:empty { display: none; }
/* Подписи к фото видны всегда, при наведении слегка приподнимаются */
.photo .photo__caption { transform: none; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.3; padding: 60px 18px 16px; transition: padding 0.6s var(--ease-out); }
.photo:hover .photo__caption { padding-bottom: 22px; }
.gallery__note::before { content: "✦"; display: block; margin-bottom: 16px; font-style: normal; font-size: 0.8rem; color: var(--gold); text-shadow: 0 0 14px rgba(246, 207, 138, 0.7); }
.lightbox figcaption:empty { display: none; }
.photo__inner {
  position: relative; width: 100%; height: 100%; border-radius: var(--radius); overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s; border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}
.photo:hover .photo__inner { box-shadow: 0 30px 70px -20px rgba(214, 58, 115, 0.55); }
.photo__img { position: absolute; inset: -4%; background-size: cover; background-position: center; transition: transform 1.2s var(--ease-out); }
.photo:hover .photo__img { transform: scale(1.08); }
.photo__img.is-placeholder {
  background: radial-gradient(circle at 30% 20%, rgba(255, 158, 192, 0.35), transparent 50%),
              radial-gradient(circle at 80% 90%, rgba(128, 40, 170, 0.45), transparent 55%),
              linear-gradient(135deg, #3a1040, #150619);
}
.photo__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255, 220, 232, 0.55); font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; text-align: center; padding: 10px; }
.photo__placeholder svg { width: 38px; fill: rgba(255, 158, 192, 0.5); animation: beat 2.4s infinite; }
.photo__caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px;
  background: linear-gradient(0deg, rgba(7, 3, 12, 0.9), transparent);
  font-family: var(--serif); font-style: italic; font-size: 1.2rem;
  transform: translateY(100%); transition: transform 0.6s var(--ease-out);
}
.photo:hover .photo__caption, .photo:focus-visible .photo__caption { transform: none; }
@media (hover: none) { .photo__caption { transform: none; } }
.photo__shine {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.35), transparent 40%);
  opacity: 0; transition: opacity 0.4s;
}
.photo:hover .photo__shine { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 40px;
  background: rgba(7, 3, 12, 0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__figure { max-width: min(1000px, 80vw); width: 100%; transform: scale(0.9); transition: transform 0.6s var(--ease-out); }
.lightbox.is-open .lightbox__figure { transform: none; }
.lightbox__img { width: 100%; height: 72vh; border-radius: var(--radius); background-size: contain; background-position: center; background-repeat: no-repeat; }
.lightbox__img.is-placeholder { background-size: cover; }
.lightbox figcaption { text-align: center; margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--rose-2); }
.lightbox__close { position: absolute; top: 24px; right: 30px; font-size: 1.4rem; color: var(--muted); transition: color 0.3s, transform 0.4s var(--ease-out); }
.lightbox__close:hover { color: var(--cream); transform: rotate(90deg); }
.lightbox__nav { font-family: var(--serif); font-size: 3.5rem; color: var(--muted); padding: 10px; transition: color 0.3s, transform 0.3s; }
.lightbox__nav:hover { color: var(--rose); transform: scale(1.15); }
@media (max-width: 700px) { .lightbox { padding: 16px; gap: 4px; } .lightbox__figure { max-width: 100%; } .lightbox__img { height: 60vh; } .lightbox__nav { font-size: 2.4rem; } }

/* =====================================================================
   LETTER
   ===================================================================== */
.letter__paper {
  position: relative; max-width: 820px; margin: 0 auto; padding: clamp(50px, 7vw, 90px) clamp(26px, 7vw, 90px);
  border-radius: 6px; background: linear-gradient(170deg, rgba(255, 240, 245, 0.07), rgba(255, 240, 245, 0.02));
  border: 1px solid var(--glass-border); box-shadow: 0 40px 120px -40px rgba(214, 58, 115, 0.4);
}
.letter__paper::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(246, 207, 138, 0.15); border-radius: 3px; pointer-events: none;
}
.letter__seal {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #e24a82, #8f1c4b); box-shadow: 0 8px 30px rgba(214, 58, 115, 0.6), inset 0 -4px 10px rgba(0, 0, 0, 0.3);
}
.letter__seal svg { width: 28px; fill: rgba(255, 220, 232, 0.9); }
.letter__greeting { font-family: var(--script); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--rose-2); margin-bottom: 30px; }
.letter__body p { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.7; margin-bottom: 1.2em; }
.letter__body .w { opacity: 0.12; transition: opacity 0.5s, color 0.5s, text-shadow 0.5s; }
.letter__body .w.lit { opacity: 1; }
.letter__body .w.lit.glow { color: #fff; text-shadow: 0 0 18px rgba(255, 158, 192, 0.8); }
.letter__sign { white-space: pre-line; line-height: 1.15; font-family: var(--script); font-size: clamp(2rem, 4.5vw, 3rem); color: var(--gold); text-align: right; margin-top: 20px; opacity: 0; transform: translateY(20px); transition: opacity 1.2s, transform 1.2s var(--ease-out); }
.letter__sign.is-in { opacity: 1; transform: none; }

/* =====================================================================
   STARS
   ===================================================================== */
.stars { position: relative; z-index: 2; min-height: 110vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, #0a0620 40%, #0a0620 60%, var(--bg) 100%); }
.stars canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars__content { position: relative; z-index: 2; padding: 0 20px; pointer-events: none; }
.stars__small { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 3vw, 2.2rem); color: var(--muted); }
.stars__big {
  font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 10vw, 8.5rem); line-height: 1; margin: 16px 0;
  background: linear-gradient(180deg, #fff, #b9b3ff 60%, var(--rose-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px rgba(170, 160, 255, 0.35));
}
.stars__wish { margin-top: 60px; font-size: 0.72rem; letter-spacing: 0.35em; text-transform: uppercase; color: rgba(200, 195, 255, 0.55); }

/* =====================================================================
   FINALE
   ===================================================================== */
.finale { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 100px 20px 0; }
.finale__glow { position: absolute; left: 50%; top: 45%; width: 90vmin; height: 90vmin; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(214, 58, 115, 0.35), transparent 60%); filter: blur(40px); animation: pulseGlow 4s ease-in-out infinite; pointer-events: none; }
@keyframes pulseGlow { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; } 50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } }
.finale__content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.finale__pre { font-size: 0.75rem; letter-spacing: 0.5em; text-transform: uppercase; color: var(--rose-2); margin-bottom: 20px; }
.finale__title { font-family: var(--serif); font-weight: 300; font-size: clamp(3.2rem, 11vw, 9.5rem); line-height: 1; }
.finale__title .char { display: inline-block; opacity: 0; transform: translateY(0.6em) scale(0.6); filter: blur(12px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s var(--ease-out); }
.finale__title.is-in .char { opacity: 1; transform: none; filter: none; }
.finale__name {
  font-family: var(--script); font-size: clamp(4rem, 13vw, 11rem); line-height: 1.1; margin-top: -0.1em;
  background: linear-gradient(120deg, var(--rose-2), var(--gold), var(--rose)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite;
  filter: drop-shadow(0 0 40px rgba(255, 107, 157, 0.5)); padding: 0 0.2em;
}
.finale__btn {
  position: relative; margin-top: 50px; display: inline-flex; align-items: center; gap: 14px; padding: 20px 36px; border-radius: 60px; overflow: hidden;
  background: linear-gradient(135deg, var(--rose-deep), #9b2a8a); color: #fff;
  font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  box-shadow: 0 15px 50px -10px rgba(214, 58, 115, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: box-shadow 0.4s, filter 0.4s;
}
.finale__btn::before { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); animation: sweep 3.5s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { left: -120%; } 100% { left: 160%; } }
.finale__btn:hover { box-shadow: 0 20px 70px -10px rgba(255, 107, 157, 0.95); filter: brightness(1.1); }
.finale__btn svg { width: 18px; fill: #fff; animation: beat 1.3s infinite; }
.finale__btn span, .finale__btn svg { position: relative; pointer-events: none; }
.finale__answer { margin-top: 30px; min-height: 2em; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--gold); opacity: 0; transform: translateY(20px) scale(0.95); transition: opacity 1s, transform 1s var(--ease-out); }
.finale__answer.is-in { opacity: 1; transform: none; }

.footer { position: relative; z-index: 2; padding: 40px 0 30px; font-size: 0.72rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(251, 238, 240, 0.35); }

/* Burst hearts */
.burst-heart { position: fixed; z-index: 300; pointer-events: none; width: 22px; height: 22px; will-change: transform, opacity; }
.burst-heart svg { width: 100%; height: 100%; }

/* Magnetic (uses the independent `translate` property so it never fights reveal transforms) */
.magnetic { will-change: translate; }
.burst-heart svg { filter: drop-shadow(0 0 6px rgba(255, 107, 157, 0.7)); }

/* Hero title stays hidden until it is split into letters */
.hero__title:not(.is-split) { opacity: 0; }

/* =====================================================================
   LESSONS — «Что я понял»
   ===================================================================== */
.lessons__list { list-style: none; max-width: 980px; margin: 0 auto; counter-reset: lesson; }
.lesson {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 60px); align-items: start;
  padding: clamp(34px, 5vw, 56px) 0; border-top: 1px solid var(--line);
}
.lesson:last-child { border-bottom: 1px solid var(--line); }
.lesson::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--rose), var(--gold), transparent); transition: transform 1.6s var(--ease-out);
}
.lesson.is-in::before { transform: scaleX(1); }
.lesson__num {
  font-family: var(--serif); font-weight: 300; line-height: 0.8; font-size: clamp(4.5rem, 11vw, 9rem);
  color: transparent; -webkit-text-stroke: 1px rgba(255, 158, 192, 0.45);
  transition: color 1.2s var(--ease-out), -webkit-text-stroke-color 1.2s, text-shadow 1.2s;
}
.lesson:hover .lesson__num { color: rgba(255, 107, 157, 0.18); -webkit-text-stroke-color: var(--rose); text-shadow: 0 0 40px rgba(255, 107, 157, 0.5); }
.lesson__body { padding-top: clamp(6px, 1.2vw, 16px); }
.lesson__title, .lesson__text { clip-path: inset(0 0 100% 0); transform: translateY(24px); transition: clip-path 1.2s var(--ease-out), transform 1.2s var(--ease-out); }
.lesson__text { transition-delay: 0.15s; }
.lesson.is-in .lesson__title, .lesson.is-in .lesson__text { clip-path: inset(0 0 -10% 0); transform: none; }
.lesson__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.1; margin-bottom: 14px; }
.lesson__text { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 620px; }
.lesson__num { opacity: 0; transform: translateX(-30px); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out), color 1.2s, text-shadow 1.2s; }
.lesson.is-in .lesson__num { opacity: 1; transform: none; }
@media (max-width: 560px) { .lesson { grid-template-columns: 1fr; gap: 6px; } }

/* Timeline — future chapter */
.tl-item--future .tl-item__dot { border-style: dashed; border-color: var(--gold); animation: futurePulse 2.4s ease-in-out infinite; }
.tl-item--future.is-in .tl-item__dot { background: transparent; box-shadow: 0 0 0 6px rgba(246, 207, 138, 0.12), 0 0 24px rgba(246, 207, 138, 0.7); }
.tl-item--future .tl-item__title {
  background: linear-gradient(120deg, var(--gold), var(--rose-2), var(--gold)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite;
}
@keyframes futurePulse { 0%, 100% { scale: 1; } 50% { scale: 1.35; } }

/* Finale — question & two choices */
.finale__question { margin-top: 34px; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--cream); }
.finale__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }
.finale__actions .finale__btn { margin-top: 0; transition: box-shadow 0.4s, filter 0.4s, translate 0.5s var(--ease-out), opacity 0.6s; }
.finale__btn--ghost { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border); box-shadow: none; color: var(--cream); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.finale__btn--ghost::before { display: none; }
.finale__btn--ghost:hover { box-shadow: 0 10px 40px -10px rgba(255, 158, 192, 0.4); border-color: var(--rose-2); }
.finale__actions.is-answered .finale__btn:not(.is-chosen) { opacity: 0.35; }
.music { transition: color 0.3s, border-color 0.3s, box-shadow 0.3s, translate 0.5s var(--ease-out); }

/* Counter: hide empty «years» cleanly */
.counter { display: flex; flex-wrap: wrap; justify-content: center; }
.counter__item { flex: 1 1 150px; max-width: 190px; }
@media (max-width: 700px) { .counter__item { flex-basis: 90px; } }
.counter__item[hidden] { display: none; }

/* Lightbox placeholder */
.lightbox__img.is-placeholder {
  position: relative;
  background: radial-gradient(circle at 30% 20%, rgba(255, 158, 192, 0.35), transparent 50%),
              radial-gradient(circle at 80% 90%, rgba(128, 40, 170, 0.45), transparent 55%),
              linear-gradient(135deg, #3a1040, #150619);
}
.lightbox__img.is-placeholder::after {
  content: "здесь будет наше фото"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 220, 232, 0.55);
}

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