:root {
  --wine: #260914;
  --wine-2: #4a1225;
  --rose: #e7a5ae;
  --rose-deep: #b4516a;
  --red: #a82d49;
  --paper: #f4eee5;
  --cream: #fbf7ef;
  --ink: #2b1c20;
  --muted: #74606a;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 28S3 20.5 3 11.5C3 5 11 3.5 16 9.5 21 3.5 29 5 29 11.5 29 20.5 16 28 16 28Z' fill='%23f0b4bd'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: var(--wine); font-family: "Manrope", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
img { display: block; width: 100%; }

.grain { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .14; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E"); }
.experience, .intro, .story { width: 100%; height: 100%; }

/* Floating hearts */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.petals i { position: absolute; left: var(--x); bottom: -40px; width: var(--size); aspect-ratio: 1; opacity: 0; background: var(--heart) center / contain no-repeat; animation: rise var(--dur) linear var(--delay) infinite; }
@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-18deg); }
  12% { opacity: var(--o); }
  80% { opacity: var(--o); }
  100% { opacity: 0; transform: translate3d(var(--drift), -112vh, 0) rotate(24deg); }
}

/* Intro */
.intro { position: relative; display: grid; place-content: center; justify-items: center; padding: 40px 20px 24px; overflow: hidden; color: var(--cream); text-align: center; background: radial-gradient(ellipse at 50% 38%, #6f2540 0, #3a0e20 42%, #19050d 100%); transition: opacity 1s ease, transform 1.2s var(--ease); }
.intro::before, .intro::after { content: ""; position: absolute; border: 1px solid rgba(255,220,226,.1); border-radius: 50%; }
.intro::before { width: 70vw; aspect-ratio: 1; top: -48vw; }
.intro::after { width: 45vw; aspect-ratio: 1; right: -30vw; bottom: -28vw; }
.intro-glow { position: absolute; width: min(620px, 92vw); aspect-ratio: 1; border-radius: 50%; background: rgba(255,170,185,.11); filter: blur(90px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .7; } }
.intro .petals { z-index: 0; }
.intro-kicker { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 18px; text-transform: uppercase; letter-spacing: .3em; font-size: 10px; font-weight: 500; color: rgba(255,232,236,.68); animation: intro-in 1s .2s both; }
.intro-kicker::before, .intro-kicker::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(231,165,174,.75)); }
.intro-kicker::after { transform: scaleX(-1); }
.intro h1 { position: relative; z-index: 1; margin: 0 0 clamp(22px, 4vh, 40px); font: 500 clamp(52px, 7.4vw, 100px)/.84 "Cormorant Garamond", serif; letter-spacing: -.045em; text-shadow: 0 10px 40px rgba(20,2,9,.45); animation: intro-in 1.1s .35s both; }
.intro h1 em { color: var(--rose); font-weight: 400; }
@keyframes intro-in { from { opacity: 0; transform: translateY(24px); } }

.envelope { position: relative; z-index: 2; display: grid; justify-items: center; width: min(390px, 86vw); height: min(310px, 38vh); padding: 0; border: 0; color: var(--cream); background: none; cursor: pointer; perspective: 1000px; animation: intro-in 1.1s .55s both; }
.envelope:focus-visible { outline: 0; }
.envelope:focus-visible .envelope-body { outline: 2px solid var(--rose); outline-offset: 8px; }
.envelope-shadow { position: absolute; left: 12%; right: 12%; bottom: 35px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(14px); transition: .8s var(--ease); }
.envelope-body { position: absolute; left: 0; right: 0; bottom: 58px; aspect-ratio: 1.58; filter: drop-shadow(0 26px 30px rgba(0,0,0,.34)); transition: transform .8s var(--ease); }
.envelope-back, .envelope-front, .envelope-flap { position: absolute; inset: 0; border-radius: 5px; }
.envelope-back { background: #c9a597; }
.envelope-front { z-index: 4; clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); background: linear-gradient(150deg, #f2ddd2 0%, #e3c3b6 55%, #d2ad9f 100%); }
.envelope-front::before { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(127,30,56,.14); border-radius: 3px; }
.envelope-front::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 3%, 50% 59%, 0 3%); background: rgba(92,42,53,.2); }
.envelope-flap { z-index: 5; height: 57%; transform-origin: top; transform-style: preserve-3d; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(170deg, #f6e3d9, #d6b3a5); transition: transform .85s var(--ease), z-index 0s .3s; }
.letter { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 7%; height: 84%; display: grid; place-content: center; gap: 12px; border-radius: 3px; color: #6d2438; background: linear-gradient(180deg, #fffaf1, #f8eee0); box-shadow: 0 5px 20px rgba(42,10,20,.2); font: 27px/1.05 "Marck Script", cursive; transition: transform 1s .35s var(--ease); }
.letter i { font-style: normal; }
.letter b { font: 18px/1 "Manrope"; color: var(--red); }
.seal { position: absolute; z-index: 7; left: 50%; top: 42%; display: flex; align-items: center; justify-content: center; gap: 4px; width: 62px; height: 62px; transform: translate(-50%, -50%); border-radius: 50%; color: #f8d7dd; background: radial-gradient(circle at 34% 28%, #c04462 0, #8c2441 46%, #5c1027 100%); box-shadow: inset 0 0 0 4px rgba(255,255,255,.07), inset 0 -5px 9px rgba(0,0,0,.28), 0 6px 14px rgba(42,8,17,.42); font: 600 16px/1 "Cormorant Garamond", serif; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0,0,0,.25); transition: opacity .3s .15s, transform .5s var(--ease); }
.seal i { font-size: 10px; font-style: normal; color: #ffc2cc; }
.seal::after { content: ""; position: absolute; inset: -7px; border: 1px solid rgba(255,205,214,.6); border-radius: 50%; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.88); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.open-label { position: absolute; bottom: 4px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .24em; font-size: 10px; font-weight: 500; color: rgba(255,232,236,.75); transition: opacity .3s; animation: nudge 2.4s ease-in-out infinite; }
.open-label::before { content: ""; width: 11px; aspect-ratio: 1; background: var(--heart) center / contain no-repeat; animation: beat 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.3); } 40% { transform: scale(.95); } }
.envelope:hover .envelope-body { transform: translateY(-6px) rotate(-1deg); }
.envelope:hover .envelope-shadow { transform: scale(.88); opacity: .75; }
.envelope.is-opening { pointer-events: none; }
.envelope.is-opening .seal { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-24deg); }
.envelope.is-opening .envelope-flap { z-index: 2; transform: rotateX(180deg); }
.envelope.is-opening .letter { transform: translateY(-58%); }
.envelope.is-opening .open-label { opacity: 0; }
.intro.is-leaving { opacity: 0; transform: scale(1.08); pointer-events: none; }

/* Story chrome */
.story { position: absolute; inset: 0; color: white; background: var(--wine); opacity: 0; transition: opacity 1s ease; }
.story.is-ready { opacity: 1; }
.story-header { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: max(0px, env(safe-area-inset-top)) 4vw 0; color: #fff; transition: color .6s ease; }
.story-header::after { content: ""; position: absolute; left: 4vw; right: 4vw; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, currentColor 18%, currentColor 82%, transparent); opacity: .22; }
.brand, .pause { color: inherit; background: none; border: 0; cursor: pointer; }
.brand { justify-self: start; display: flex; align-items: center; gap: 6px; padding: 6px 0; font: 500 20px/1 "Cormorant Garamond", serif; letter-spacing: .08em; }
.brand i { color: var(--rose); font-size: 10px; font-style: normal; transition: color .6s; }
.counter { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .22em; font-variant-numeric: tabular-nums; }
.counter i { padding: 0 3px; font-style: normal; opacity: .4; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 26px; }
.music { display: flex; align-items: center; gap: 9px; padding: 8px 0; border: 0; color: inherit; background: none; cursor: pointer; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; }
.music b { font-weight: 500; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 30%; background: currentColor; transition: height .3s; }
.music[aria-pressed="true"] .eq i { animation: eq 1s ease-in-out infinite; }
.music[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.music[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
.music[aria-pressed="true"] .eq i:nth-child(4) { animation-delay: -.15s; }
.music[aria-pressed="false"] { opacity: .55; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.pause { display: flex; align-items: center; gap: 4px; padding: 8px 0; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; }
.pause span { display: block; width: 2px; height: 11px; background: currentColor; }
.pause b { margin-left: 6px; font-weight: 500; }
.pause[aria-pressed="true"] span:first-child { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; background: transparent; }
.pause[aria-pressed="true"] span:nth-child(2) { display: none; }
.story.light-ui .story-header { color: var(--wine); }
.story.light-ui .brand i { color: var(--rose-deep); }
.story.light-ui .arrow { color: var(--wine); border-color: rgba(38,9,20,.28); background: rgba(255,255,255,.4); }
.story.light-ui .arrow:hover { color: #fff; background: var(--wine); }
.story.light-ui .tab { background: rgba(38,9,20,.14); }
.story.light-ui .tab i { background: linear-gradient(90deg, var(--rose-deep), var(--wine)); }
.story.light-ui .swipe-hint { color: rgba(38,9,20,.45); }

.track { height: 100%; display: flex; transition: transform 1.15s var(--ease); will-change: transform; }
.scene { position: relative; flex: 0 0 100vw; height: 100%; overflow: hidden; }
.scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.04); transition: transform 8s ease; }
.scene.is-active .scene-bg { transform: scale(1.12); }
.scene-copy { position: relative; z-index: 3; }
.scene-copy > * { opacity: 0; transform: translateY(28px); transition: opacity .8s, transform .9s var(--ease); }
.scene.is-active .scene-copy > * { opacity: 1; transform: none; }
.scene.is-active .scene-copy > *:nth-child(2) { transition-delay: .12s; }
.scene.is-active .scene-copy > *:nth-child(3) { transition-delay: .25s; }
.scene.is-active .scene-copy > *:nth-child(4) { transition-delay: .4s; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--rose); text-transform: uppercase; letter-spacing: .28em; font-size: 10px; font-weight: 600; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.scene h2 { margin: 0; font: 500 clamp(58px, 7.6vw, 122px)/.86 "Cormorant Garamond", serif; letter-spacing: -.05em; }
.scene h2 em { color: var(--rose); font-weight: 400; }
.handwriting { margin: 30px 0 0; color: var(--red); font: 36px/1 "Marck Script", cursive; }

/* Scene 1 — arched portrait */
.hero-blur { filter: blur(40px) saturate(.7) brightness(.42); transform: scale(1.14); }
.scene.is-active .hero-blur { transform: scale(1.2); }
.scene-hero .scene-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(24,3,11,.94) 0%, rgba(24,3,11,.74) 40%, rgba(24,3,11,.36) 70%, rgba(24,3,11,.58) 100%); }
.hero-frame { position: absolute; z-index: 2; top: 50%; right: clamp(40px, 9vw, 170px); width: min(34vw, 50vh, 500px); aspect-ratio: 3 / 4; transform: translateY(-44%) scale(.97); opacity: .4; transition: transform 1.4s var(--ease), opacity 1.2s ease; }
.scene-hero.is-active .hero-frame { transform: translateY(-44%); opacity: 1; }
.hero-frame::before { content: ""; position: absolute; inset: -16px; border: 1px solid rgba(231,165,174,.42); border-radius: 999px 999px 24px 24px; }
.hero-portrait { position: absolute; inset: 0; margin: 0; overflow: hidden; border-radius: 50% 50% 14px 14px / 37.5% 37.5% 14px 14px; box-shadow: 0 50px 100px rgba(0,0,0,.5); }
.hero-portrait img { height: 100%; object-fit: cover; object-position: center 35%; filter: saturate(.9) contrast(1.03); transform: scale(1.02); transition: transform 8s ease; }
.scene-hero.is-active .hero-portrait img { transform: scale(1.08); }
.hero-badge { position: absolute; z-index: 3; left: -58px; bottom: 7%; width: 124px; overflow: visible; }
.badge-bg { fill: rgba(38,9,20,.82); stroke: rgba(231,165,174,.35); }
.badge-ring { transform-origin: 60px 60px; animation: spin 26s linear infinite; }
.badge-ring text { fill: var(--rose); font: 600 9.5px "Manrope", sans-serif; text-transform: uppercase; }
.badge-heart { fill: var(--rose); transform-origin: 60px 61px; animation: beat 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { width: 50%; height: 100%; display: grid; place-content: center; text-align: left; padding: 90px 2vw 110px 7vw; }
.center > p:last-child { margin: 38px 0 0; color: rgba(255,240,243,.86); font: 400 clamp(17px, 1.75vw, 24px)/1.45 "Cormorant Garamond", serif; }

/* Scene 2 — the letter */
.scene-letter { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; padding: 72px 0 96px; color: var(--ink); background: radial-gradient(circle at 18% 22%, #fdf9f2 0, transparent 48%), radial-gradient(circle at 88% 88%, #ead6ca 0, transparent 46%), var(--paper); }
.letter-print { position: relative; justify-self: center; margin: 0; padding: 14px 14px 58px; background: #fffbf5; box-shadow: 0 34px 70px rgba(60,22,34,.2), 0 2px 6px rgba(60,22,34,.08); opacity: 0; transform: rotate(-9deg) translateY(40px); transition: transform 1.2s var(--ease), opacity .9s ease; }
.scene-letter.is-active .letter-print { opacity: 1; transform: rotate(-3deg); }
.letter-print::before { content: ""; position: absolute; z-index: 1; top: -15px; left: 50%; width: 118px; height: 32px; transform: translateX(-50%) rotate(2deg); background: rgba(232,208,192,.72); box-shadow: 0 1px 3px rgba(60,22,34,.08); }
.letter-print img { width: auto; height: min(58vh, 560px); aspect-ratio: 2 / 3; object-fit: cover; filter: sepia(.1) saturate(.85); }
.letter-print figcaption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: var(--wine-2); font: 28px/1 "Marck Script", cursive; }
.paper { padding: 0 clamp(40px, 7vw, 120px) 0 clamp(16px, 2vw, 40px); }
.paper .eyebrow { color: var(--rose-deep); }
.paper h2 { font-size: clamp(54px, 6vw, 96px); }
.scene-letter h2 em { color: var(--rose-deep); }
.letter-text { max-width: 560px; margin: 34px 0 0; color: var(--muted); font: 400 clamp(17px, 1.6vw, 22px)/1.6 "Cormorant Garamond", serif; }

/* Scene 3 — moments */
.scene-moments { color: var(--ink); background: radial-gradient(circle at 75% 45%, #f7efe6 0, transparent 55%), #efe4d8; }
.scene-moments .eyebrow { color: var(--rose-deep); }
.scene-moments h2 em { color: var(--rose-deep); }
.moment-title { position: absolute; z-index: 6; top: 15%; left: 7vw; max-width: 650px; }
.moment-title h2 { font-size: clamp(48px, 6vw, 88px); }
.moment-note { max-width: 300px; margin: 26px 0 0; color: var(--muted); font: italic 400 clamp(17px, 1.6vw, 22px)/1.45 "Cormorant Garamond", serif; }
.photo-deck { position: absolute; inset: 0 4vw 0 33%; display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.4vw, 22px); perspective: 1200px; }
.photo-deck figure { position: relative; width: min(15vw, 228px); margin: 0; padding: 9px 9px 20px; background: #fffbf5; box-shadow: 0 28px 70px rgba(48,18,29,.18), 0 2px 5px rgba(48,18,29,.06); opacity: 0; transform: translateX(120px) rotate(8deg) scale(.8); transition: 1s var(--ease); }
.photo-deck figure::before { content: ""; position: absolute; z-index: 1; top: -11px; left: 50%; width: 64px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(232,208,192,.7); }
.photo-deck figure:nth-child(even)::before { transform: translateX(-50%) rotate(4deg); }
.photo-deck figure:nth-child(1) { margin-top: 230px; }
.photo-deck figure:nth-child(2) { margin-top: -125px; }
.photo-deck figure:nth-child(3) { margin-top: 175px; }
.photo-deck figure:nth-child(4) { margin-top: -80px; }
.scene-moments.is-active .photo-deck figure { opacity: 1; transform: rotate(-4deg) scale(1); }
.scene-moments.is-active .photo-deck figure:nth-child(2) { transform: rotate(3deg) scale(1); transition-delay: .15s; }
.scene-moments.is-active .photo-deck figure:nth-child(3) { transform: rotate(-2deg) scale(1); transition-delay: .3s; }
.scene-moments.is-active .photo-deck figure:nth-child(4) { transform: rotate(4deg) scale(1); transition-delay: .45s; }
.scene-moments.is-active .photo-deck figure:hover { z-index: 2; transform: rotate(0) scale(1.06); transition: .5s var(--ease); transition-delay: 0s; }
.photo-deck img { aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.85); }
.photo-deck figcaption { margin-top: 14px; text-align: center; color: var(--wine-2); font: 23px/1 "Marck Script", cursive; white-space: nowrap; }

/* Video scenes — one quote per scene */
.scene-clip { background: #14050c; }
.clip-blur { filter: blur(48px) saturate(.8) brightness(.38); transform: scale(1.2); }
.scene.is-active .clip-blur { transform: scale(1.28); }
.clip-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(24,3,11,.9) 0%, rgba(24,3,11,.55) 55%, rgba(24,3,11,.72) 100%); }
.clip-mirror .clip-shade { background: linear-gradient(270deg, rgba(24,3,11,.9) 0%, rgba(24,3,11,.55) 55%, rgba(24,3,11,.72) 100%); }
.clip-frame { position: absolute; z-index: 2; top: 50%; right: clamp(40px, 10vw, 190px); height: min(72vh, 720px); max-width: 40vw; aspect-ratio: var(--ratio, 9 / 16); border-radius: 26px; outline: 1px solid rgba(231,165,174,.38); outline-offset: 14px; box-shadow: 0 50px 110px rgba(0,0,0,.55); opacity: .35; transform: translateY(-46%) scale(.95); transition: transform 1.3s var(--ease), opacity 1s ease, outline-color .6s; }
.clip-square .clip-frame { height: min(60vh, 580px); }
.clip-mirror .clip-frame { right: auto; left: clamp(40px, 10vw, 190px); }
.scene-clip.is-active .clip-frame { opacity: 1; transform: translateY(-46%); }
.scene-clip.is-playing .clip-frame { outline-color: rgba(231,165,174,.7); }
.clip-video { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; background: #000; cursor: pointer; }
.clip-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; place-items: center; width: 88px; height: 88px; padding: 0; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.6); border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); cursor: pointer; transition: opacity .35s, transform .3s, background .3s; }
.clip-play::before { content: ""; position: absolute; inset: -1px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; animation: pulse 2.4s ease-out infinite; }
.clip-play::after { content: "смотреть со звуком"; position: absolute; top: calc(100% + 14px); white-space: nowrap; text-transform: uppercase; letter-spacing: .2em; font-size: 9px; font-weight: 600; }
.clip-play:hover { transform: translate(-50%, -50%) scale(1.07); background: rgba(255,255,255,.2); }
.scene-clip.is-playing .clip-play { opacity: 0; pointer-events: none; }
.play-icon { width: 0; height: 0; margin-left: 5px; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #fff; }
.clip-progress { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; height: 2px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.22); }
.clip-progress i { display: block; width: var(--p, 0%); height: 100%; background: linear-gradient(90deg, var(--rose), #fff); transition: width .3s linear; }
.clip-copy { position: absolute; left: 7vw; top: 50%; width: min(44vw, 640px); transform: translateY(-50%); }
.clip-mirror .clip-copy { left: auto; right: 7vw; }
.clip-square .clip-copy { width: min(38vw, 560px); }
.clip-num { margin: 0 0 18px; color: transparent; -webkit-text-stroke: 1px rgba(231,165,174,.6); font: 400 clamp(84px, 10vw, 160px)/.8 "Cormorant Garamond", serif; font-variant-numeric: lining-nums; letter-spacing: -.02em; }
.clip-copy h2 { font-size: clamp(46px, 5.4vw, 88px); }
.clip-quote { max-width: 460px; margin: 32px 0 0; padding-left: 22px; border-left: 1px solid rgba(231,165,174,.6); color: rgba(255,240,243,.84); font: italic 400 clamp(18px, 1.7vw, 24px)/1.5 "Cormorant Garamond", serif; }

/* Finale — our video */
.scene-finale { background: #13050b; }
.finale-blur { filter: blur(44px) saturate(.75) brightness(.4); transform: scale(1.2); }
.scene.is-active .finale-blur { transform: scale(1.28); }
.finale-tint { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(22,3,10,.9) 0%, rgba(22,3,10,.55) 55%, rgba(22,3,10,.7) 100%); }
.finale-frame { position: absolute; z-index: 2; top: 50%; right: clamp(40px, 9vw, 170px); width: min(30vw, 41vh, 420px); aspect-ratio: 9 / 16; overflow: hidden; border-radius: 26px; outline: 1px solid rgba(231,165,174,.45); outline-offset: 14px; box-shadow: 0 50px 110px rgba(0,0,0,.55); opacity: .35; transform: translateY(-46%) scale(.95); transition: transform 1.3s var(--ease), opacity 1s ease; }
.scene-finale.is-active .finale-frame { opacity: 1; transform: translateY(-46%); }
.finale-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-finale .petals { z-index: 3; }
.scene-finale:not(.is-active) .petals i { animation-play-state: paused; }
.finale-copy { position: absolute; z-index: 4; left: 7vw; top: 50%; max-width: 56vw; transform: translateY(-50%); }
.finale-copy h2 { font-size: clamp(48px, 6vw, 98px); }
.finale-copy .handwriting { color: var(--rose); font-size: clamp(30px, 2.6vw, 40px); }
.replay { display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; padding: 14px 24px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); text-transform: uppercase; letter-spacing: .18em; font-size: 10px; font-weight: 500; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.replay svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.replay:hover { color: var(--wine); background: #fff; border-color: #fff; }

/* Navigation */
.story-nav { position: fixed; z-index: 20; left: 50%; bottom: max(30px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 18px; transform: translateX(-50%); }
.arrow { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: white; background: rgba(20,3,10,.18); backdrop-filter: blur(8px); cursor: pointer; transition: .25s; }
.arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.arrow:hover { color: var(--wine); background: white; }
.progress-tabs { display: flex; align-items: center; gap: 7px; }
.tab { position: relative; width: 46px; height: 3px; padding: 0; border: 0; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.26); cursor: pointer; }
.tab i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rose), #fff); }
.tab.is-complete i { width: 100%; }
.tab.is-active i { animation: progress 6.8s linear forwards; }
.story.is-paused .tab.is-active i { animation-play-state: paused; }
.tab.is-clip.is-active i { animation: none; width: var(--p, 0%); transition: width .3s linear; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
.swipe-hint { position: fixed; z-index: 20; bottom: max(9px, env(safe-area-inset-bottom)); left: 50%; width: 100%; margin: 0; transform: translateX(-50%); color: rgba(255,255,255,.5); text-align: center; text-transform: uppercase; letter-spacing: .18em; font-size: 9px; transition: color .6s; }

@media (max-width: 1100px) and (min-width: 761px) {
  .center { width: 54%; }
  .hero-badge { left: -40px; width: 104px; }
}

@media (max-width: 760px) {
  .story-header { height: 60px; padding-left: 20px; padding-right: 20px; }
  .story-header::after { left: 20px; right: 20px; }
  .pause b, .music b { display: none; }
  .header-actions { gap: 20px; }
  .intro-kicker { gap: 10px; letter-spacing: .2em; font-size: 9px; white-space: nowrap; }
  .intro-kicker::before, .intro-kicker::after { width: 18px; }

  .hero-blur { display: none; }
  .hero-frame, .scene-hero.is-active .hero-frame { inset: 0; width: 100%; aspect-ratio: auto; z-index: 1; transform: none; opacity: 1; }
  .hero-frame::before { display: none; }
  .hero-portrait { border-radius: 0; box-shadow: none; }
  .hero-portrait img { object-position: center center; }
  .scene-hero.is-active .hero-portrait img { transform: scale(1.05); }
  .scene-hero .scene-shade { z-index: 2; background: linear-gradient(180deg, rgba(24,3,11,.3) 0%, rgba(24,3,11,.02) 38%, rgba(24,3,11,.5) 62%, rgba(24,3,11,.94) 100%); }
  .hero-badge { left: auto; right: 16px; top: 76px; bottom: auto; width: 84px; }
  .center { position: absolute; inset: auto 0 10%; width: 100%; height: auto; display: block; padding: 22px 24px 86px; text-align: center; }
  .center .eyebrow { justify-content: center; margin-bottom: 14px; }
  .eyebrow::before { display: none; }
  .center h2 { font-size: clamp(54px, 17vw, 80px); }
  .center > p:last-child { margin-top: 18px; font-size: 18px; }

  .scene-letter { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 72px 24px 104px; }
  .letter-print { padding: 9px 9px 42px; }
  .letter-print::before { width: 90px; height: 26px; top: -12px; }
  .letter-print img { height: min(32vh, 300px); height: min(32svh, 300px); aspect-ratio: 4 / 5; }
  .letter-print figcaption { bottom: 10px; font-size: 21px; }
  .paper { padding: 0; text-align: center; }
  .paper .eyebrow { justify-content: center; margin-bottom: 14px; }
  .paper h2 { font-size: clamp(42px, 12.4vw, 56px); }
  .letter-text { margin-top: 14px; font-size: 17px; line-height: 1.45; }
  .handwriting { margin-top: 14px; font-size: 30px; }

  .moment-title { top: 11%; left: 24px; right: 24px; text-align: center; }
  .moment-title .eyebrow { justify-content: center; margin-bottom: 14px; }
  .moment-title h2 { font-size: clamp(40px, 11.5vw, 54px); }
  .moment-note { display: none; }
  .photo-deck { inset: 31% 4% 13%; display: grid; grid-template-columns: repeat(2, auto); justify-content: center; align-content: center; gap: 22px 14px; }
  .photo-deck figure { width: min(40vw, 21vh); width: min(40vw, 21svh); padding: 6px 6px 11px; }
  .photo-deck figure::before { width: 46px; height: 16px; top: -8px; }
  .photo-deck figure:nth-child(n) { margin: 0; }
  .scene-moments.is-active .photo-deck figure:nth-child(2) { transform: rotate(3deg) translateY(14px); }
  .scene-moments.is-active .photo-deck figure:nth-child(4) { transform: rotate(4deg) translateY(14px); }
  .photo-deck img { aspect-ratio: 1; }
  .photo-deck figcaption { margin-top: 9px; font-size: 16px; }

  .clip-shade, .clip-mirror .clip-shade { background: linear-gradient(180deg, rgba(24,3,11,.82) 0%, rgba(24,3,11,.5) 40%, rgba(24,3,11,.78) 100%); }
  .clip-frame, .clip-mirror .clip-frame, .scene-clip.is-active .clip-frame { top: auto; right: auto; left: 50%; bottom: 108px; height: min(54vh, 470px); height: min(54svh, 470px); max-width: 84vw; border-radius: 20px; outline-offset: 9px; transform: translateX(-50%); }
  .clip-square .clip-frame, .scene-clip.clip-square.is-active .clip-frame { height: auto; width: min(84vw, 46vh); width: min(84vw, 46svh); }
  .scene-clip:not(.is-active) .clip-frame { transform: translateX(-50%) scale(.95); }
  .clip-play { width: 76px; height: 76px; }
  .clip-copy, .clip-mirror .clip-copy, .clip-square .clip-copy { top: 76px; left: 22px; right: 22px; width: auto; transform: none; text-align: center; }
  .clip-num { display: none; }
  .clip-copy .eyebrow { justify-content: center; margin-bottom: 12px; }
  .clip-copy h2 { font-size: clamp(36px, 10.4vw, 46px); }
  .clip-quote { max-width: none; margin-top: 12px; padding: 0; border: 0; font-size: 16px; line-height: 1.4; }
  .clip-square .clip-quote { margin-top: 16px; font-size: 18px; }

  .finale-frame, .scene-finale.is-active .finale-frame { inset: 0 0 auto; z-index: 2; width: 100%; height: 62vh; height: 62svh; aspect-ratio: auto; border-radius: 0; outline: 0; box-shadow: none; opacity: 1; transform: none; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 72%, transparent 100%); }
  .finale-tint { background: linear-gradient(180deg, rgba(22,3,10,.5) 0%, rgba(22,3,10,.7) 55%, rgba(22,3,10,.92) 100%); }
  .finale-copy { top: auto; bottom: 96px; left: 22px; right: 22px; max-width: none; transform: none; text-align: center; }
  .finale-copy .eyebrow { justify-content: center; margin-bottom: 10px; }
  .finale-copy h2 { font-size: clamp(40px, 11.5vw, 56px); }
  .finale-copy .handwriting { margin-top: 12px; font-size: 26px; }
  .replay { margin-top: 18px; padding: 12px 20px; }

  .story-nav { bottom: max(28px, env(safe-area-inset-bottom)); }
  .progress-tabs { gap: 5px; }
  .tab { width: 22px; }
  .swipe-hint { display: none; }
}

@media (max-height: 680px) {
  .intro h1 { margin-bottom: 6px; }
  .envelope { transform: scale(.82); margin-top: -18px; }
  .letter-text { margin-top: 12px; }
  .handwriting { margin-top: 12px; }
}

@media (max-width: 760px) and (max-height: 760px) {
  .scene-clip:not(.clip-square) .clip-quote { display: none; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .scene-letter { gap: 20px; padding-bottom: 92px; }
  .letter-print img { height: 26vh; height: 26svh; }
  .letter-text { font-size: 16px; }
  .center > p:last-child { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .petals { display: none; }
}
