/* ==========================================================================
   OUR LITTLE WORLD — Romantic Couple Website
   Mobile-first. Sections:
   01 Tokens · 02 Base · 03 Utilities · 05 Navigation · 06 Hero
   07 Story · 08 Gallery · 09 Timeline · 10 Letter · 11 Music player
   12 Special moments · 13 Footer · 14 Floating UI · 15 Lightbox
   16 Cursor · 17 Reduced motion
   ========================================================================== */

/* ---------- 01. TOKENS (scoped to the embedded site, so nothing leaks into the gate) ---------- */
.couple-site {
  --cream: #FFF4F1;
  --blush: #F6D3D0;
  --rose: #C8202E;
  --burgundy: #6B0F1A;
  --brown: #3E1C1F;
  --white: #FFFFFF;

  --rose-deep: #A3121E;
  --rose-soft: rgba(200, 32, 46, .32);

  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-script: "Great Vibes", "Snell Roundhand", "Segoe Script", cursive;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --r-pill: 999px;

  --shadow-sm: 0 4px 14px rgba(107, 15, 26, .09);
  --shadow-md: 0 14px 36px rgba(107, 15, 26, .14);
  --shadow-lg: 0 26px 60px rgba(107, 15, 26, .20);

  --gutter: clamp(16px, 5vw, 40px);
  --container: 1180px;
  --nav-h: 64px;
  --mini-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --fs-body: clamp(.95rem, .9rem + .25vw, 1.05rem);

  --heart-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 21s-7.5-4.6-9.6-9.3C.9 8.2 3 4.5 6.6 4.5c2 0 3.6 1.1 5.4 3 1.8-1.9 3.4-3 5.4-3 3.6 0 5.7 3.7 4.2 7.2C19.5 16.4 12 21 12 21z'/></svg>");
}

/* ---------- 02. BASE ----------
   Page-level rules (html scroll behaviour, body overflow) live in ../style.css.
   Resets use :where() so they have ZERO specificity — they never override
   component classes (including the gate's own .close-gate-btn). */
.couple-site {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--brown);
  background: var(--cream);
  text-rendering: optimizeLegibility;
}
body.lb-open { overflow: hidden; }

:where(.couple-site) img, :where(.couple-site) svg { display: block; max-width: 100%; }
:where(.couple-site) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(.couple-site) a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:where(.couple-site) :is(h1, h2, h3, p, figure, blockquote, dl, dd, ol, ul) { margin: 0; padding: 0; }
:where(.couple-site) :is(ul, ol) { list-style: none; }
.couple-site ::selection { background: var(--blush); color: var(--burgundy); }
:where(.couple-site) :focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; border-radius: 6px; }

.icon {
  width: 1.1em; height: 1.1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; }

/* ---------- 03. UTILITIES ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--burgundy); color: #fff; font-weight: 600;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 12px; }

.script { font-family: var(--font-script); font-weight: 400; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { position: relative; padding-block: clamp(48px, 8vw, 104px); }
.section--tight { padding-block: clamp(32px, 6vw, 72px); }

.section-title {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  margin-bottom: clamp(22px, 4vw, 42px);
}
.section-title::before, .section-title::after {
  content: ""; flex: 1 1 0; max-width: 260px; min-width: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--rose));
}
.section-title::after { transform: scaleX(-1); }
.section-title h2 {
  flex: 0 1 auto; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-head); font-weight: 500; line-height: 1.15; text-align: center;
  font-size: clamp(1.55rem, 3.6vw + .6rem, 2.6rem);
  color: var(--burgundy);
}
.section-title h2 .icon { width: .6em; height: .6em; color: var(--rose); }
.section-sub { text-align: center; max-width: 52ch; margin: 0 auto 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .7em 1.6em;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em; line-height: 1.2;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s;
}
.btn .icon { transition: transform .3s var(--ease); }
.btn--primary { background: var(--burgundy); color: #fff; box-shadow: 0 10px 24px rgba(107, 15, 26, .28); }
.btn--small { min-height: 44px; padding: .55em 1.25em; font-size: .88rem; }
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-2px); background: #8A1624; box-shadow: 0 14px 30px rgba(107, 15, 26, .34); }
  .btn:hover .icon { transform: translateX(3px); }
  .btn--down:hover .icon { transform: translateY(3px); }
}

/* Image placeholder + wrapper (works even when a photo file is missing) */
.ph {
  display: block; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--blush) 0%, #F8E3DF 55%, #EDBDB8 100%);
}
.ph > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .6s var(--ease), transform .9s var(--ease);
}
.ph.is-missing > img { opacity: 0; visibility: hidden; }
.ph.is-missing::before {
  content: ""; position: absolute; left: 50%; top: 46%;
  width: clamp(18px, 24%, 34px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: var(--rose);
  -webkit-mask: var(--heart-mask) center / contain no-repeat;
          mask: var(--heart-mask) center / contain no-repeat;
  opacity: .8;
}
.ph.is-missing::after {
  content: attr(data-file); position: absolute; left: 0; right: 0; top: calc(46% + clamp(14px, 16%, 26px));
  text-align: center; font-size: .72rem; letter-spacing: .08em; color: var(--burgundy); opacity: .6;
}

/* Scroll reveal */
.couple-site.is-armed .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
}
.couple-site.is-armed .reveal.is-visible { opacity: 1; transform: none; }

/* Equalizer visualizer */
.viz { display: flex; align-items: flex-end; gap: 3px; height: 30px; flex: none; }
.viz span {
  width: 3px; height: 100%; border-radius: 3px; background: var(--rose);
  transform-origin: bottom; transform: scaleY(.22);
  animation: viz 1s ease-in-out infinite alternate; animation-play-state: paused;
}
.viz span:nth-child(1) { animation-duration: .9s;  animation-delay: -.2s; }
.viz span:nth-child(2) { animation-duration: 1.2s; animation-delay: -.6s; }
.viz span:nth-child(3) { animation-duration: .8s;  animation-delay: -.1s; }
.viz span:nth-child(4) { animation-duration: 1.1s; animation-delay: -.8s; }
.viz span:nth-child(5) { animation-duration: .95s; animation-delay: -.4s; }
.viz span:nth-child(6) { animation-duration: 1.3s; animation-delay: -.3s; }
.viz span:nth-child(7) { animation-duration: .85s; animation-delay: -.7s; }
body.is-playing .viz span { animation-play-state: running; }
@keyframes viz { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

/* ---------- 05. NAVIGATION ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  transition: background-color .4s, box-shadow .4s;
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(255, 246, 242, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
          backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(107, 15, 26, .08);
}
.nav__inner {
  height: 100%; width: min(100% - var(--gutter) * 2, 1320px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-script); font-size: 1.75rem; line-height: 1; color: var(--burgundy);
}
.nav__brand .icon { width: 26px; height: 26px; color: var(--rose-deep); }

.nav__toggle {
  position: relative; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; color: var(--burgundy); background: rgba(255, 255, 255, .7);
  box-shadow: var(--shadow-sm);
}
.nav__toggle .icon { grid-area: 1 / 1; width: 22px; height: 22px; transition: transform .35s var(--ease), opacity .25s; }
.nav__toggle .icon--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.nav.is-open .icon--open { opacity: 0; transform: rotate(90deg) scale(.6); }
.nav.is-open .icon--close { opacity: 1; transform: none; }

.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 12px; right: 12px;
  padding: 10px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
.nav__link {
  display: flex; align-items: center; min-height: 50px; padding: 0 18px;
  border-radius: 14px; font-weight: 500; color: var(--brown);
  transition: background-color .25s, color .25s;
}
.nav__link:active { background: var(--blush); }
.nav__link[aria-current="true"] { background: var(--blush); color: var(--burgundy); }

.nav__music {
  display: none; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--r-pill); font-size: .85rem; font-weight: 500; color: var(--burgundy);
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(107, 15, 26, .12);
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), background-color .3s;
}
.nav__music:hover { background: #fff; transform: translateY(-1px); }
body.is-playing .nav__music .icon { animation: bob 1.2s ease-in-out infinite; }

@media (min-width: 1024px) {
  .nav__toggle { display: none; }
  .nav__music { display: inline-flex; }
  .nav__menu {
    position: static; padding: 0; background: none; box-shadow: none; border-radius: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    opacity: 1; visibility: visible; transform: none; margin-inline: auto;
  }
  .nav__menu ul { display: flex; gap: clamp(16px, 2.2vw, 34px); }
  .nav__link {
    position: relative; min-height: 40px; padding: 0; border-radius: 0; font-size: .9rem;
    background: none !important;
  }
  .nav__link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px;
    background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
  }
  .nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }
  .nav__link[aria-current="true"] { color: var(--burgundy); }
}

/* ---------- 06. HERO ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: 30px;
  padding: calc(var(--nav-h) + 28px) 0 72px;
  background:
    radial-gradient(120% 70% at 88% 0%, rgba(200, 32, 46, .35), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(246, 211, 208, .95), transparent 60%),
    linear-gradient(170deg, #FBE6E3 0%, var(--cream) 72%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--cream));
}
.hero__inner { position: relative; z-index: 2; width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.hero__content { display: flex; flex-direction: column; align-items: flex-start; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border-radius: var(--r-pill); border: 1px solid rgba(107, 15, 26, .25);
  background: rgba(255, 255, 255, .55);
  font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy);
}
.chip .icon { width: .95em; height: .95em; color: var(--rose-deep); }

.hero__title {
  margin: 18px 0 10px;
  font-family: var(--font-head); font-weight: 600; line-height: 1.04; letter-spacing: -.01em;
  font-size: clamp(2.5rem, 8.5vw + .4rem, 5.4rem);
  color: var(--burgundy);
}
.hero__title .script {
  display: inline-block; font-size: 1.2em; line-height: .9; letter-spacing: 0;
  color: var(--rose-deep);
}
.hero__names {
  font-family: var(--font-head); color: var(--burgundy);
  font-size: clamp(1.35rem, 3.6vw + .6rem, 2.2rem);
}
.hero__names .amp { font-family: var(--font-script); font-size: 1.25em; color: var(--rose); margin-inline: .25em; }
.hero__tagline { margin: 12px 0 28px; max-width: 34ch; font-size: clamp(.98rem, .9rem + .35vw, 1.12rem); }

.hero__media {
  position: relative; z-index: 0;
  width: min(100% - var(--gutter) * 2, 420px); margin-inline: auto;
  aspect-ratio: 4 / 5; border-radius: 160px 160px 28px 28px;
  box-shadow: var(--shadow-lg); border: 6px solid rgba(255, 255, 255, .7);
}
.hero__media > img { object-position: 50% 30%; }

.hero__deco { position: absolute; z-index: 1; color: var(--rose); stroke-width: 1.5; opacity: .75; animation: bob 6s ease-in-out infinite; pointer-events: none; }
.hero__deco--a { width: 30px; height: 30px; right: 12%; top: calc(var(--nav-h) + 10px); }
.hero__deco--b { width: 22px; height: 22px; left: 7%; bottom: 34%; animation-delay: -3s; }

/* Floating hearts */
.hearts { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.heart {
  position: absolute; left: var(--x); bottom: -48px;
  width: var(--s); height: var(--s); color: var(--rose); opacity: 0;
  will-change: transform, opacity;
  animation: rise var(--t) linear var(--delay) infinite;
}
.heart .icon { width: 100%; height: 100%; }
.hearts.is-paused .heart { animation-play-state: paused; }
@keyframes rise {
  0%   { transform: translate3d(0, 0, 0) rotate(-10deg) scale(.7); opacity: 0; }
  10%  { opacity: .75; }
  50%  { transform: translate3d(var(--dx), -55vh, 0) rotate(8deg) scale(1); }
  90%  { opacity: .5; }
  100% { transform: translate3d(calc(var(--dx) * -1), -115vh, 0) rotate(-6deg) scale(.9); opacity: 0; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (min-width: 960px) {
  .hero { flex-direction: row; align-items: center; justify-content: flex-start; padding: calc(var(--nav-h) + 40px) 0 110px; }
  .hero__inner { margin-inline: auto; }
  .hero__content { max-width: min(560px, 46vw); }
  .hero__media {
    position: absolute; top: 0; right: 0; bottom: 0; left: auto;
    width: min(60vw, 1000px); margin: 0; aspect-ratio: auto;
    border: 0; border-radius: 0; box-shadow: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36%);
            mask-image: linear-gradient(to right, transparent 0, #000 36%);
  }
  .hero__media > img { object-position: 62% 24%; }
  .hero__deco--a { right: auto; left: 44%; top: 21%; width: 38px; height: 38px; }
  .hero__deco--b { left: 3%; bottom: 20%; }
}

/* ---------- 07. OUR STORY ---------- */
.story {
  position: relative; overflow: hidden; display: grid; gap: 28px;
  padding: clamp(22px, 4.5vw, 52px);
  border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, .7);
  background:
    radial-gradient(60% 80% at 92% 100%, rgba(200, 32, 46, .38), transparent 70%),
    linear-gradient(135deg, #F8E3DF 0%, #FBEEEA 58%, #F9E8E4 100%);
  box-shadow: var(--shadow-md);
}
.story__photos { position: relative; width: 100%; max-width: 420px; margin-inline: auto; aspect-ratio: 1 / .95; }
.polaroid {
  position: absolute; width: 62%; padding: 2.6% 2.6% 8.5%;
  background: #fff; border-radius: 6px; box-shadow: var(--shadow-md);
  transition: transform .6s var(--ease);
}
.polaroid .ph { aspect-ratio: 1; border-radius: 3px; }
.polaroid--a { left: 0; top: 0; transform: rotate(-6deg); }
.polaroid--b { right: 0; bottom: 0; transform: rotate(5deg); z-index: 1; }
@media (hover: hover) {
  .story__photos:hover .polaroid--a { transform: rotate(-9deg) translate(-4px, -4px); }
  .story__photos:hover .polaroid--b { transform: rotate(8deg) translate(4px, 4px); }
}

.story__title {
  display: flex; align-items: center; gap: .4em;
  font-family: var(--font-head); font-weight: 600; line-height: 1.12;
  font-size: clamp(1.8rem, 3.2vw + .8rem, 2.6rem); color: var(--burgundy);
}
.story__title .icon { width: .6em; height: .6em; color: var(--rose-deep); }
.story__desc { margin-top: 12px; max-width: 46ch; }
.story__more { margin-top: 12px; max-width: 46ch; display: grid; gap: 10px; animation: coupleFadeUp .6s var(--ease); }
.story__more[hidden] { display: none; }
@keyframes coupleFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.facts { display: flex; flex-wrap: wrap; gap: 16px 30px; margin: 22px 0 24px; }
.fact { display: flex; align-items: center; gap: 12px; }
.fact .icon { width: 28px; height: 28px; color: var(--rose-deep); stroke-width: 1.6; }
.fact dt { font-size: .78rem; opacity: .85; line-height: 1.3; }
.fact dd { font-weight: 600; color: var(--burgundy); font-size: .95rem; line-height: 1.3; }

.story__quote { display: grid; place-items: center; text-align: center; padding: 12px 8px; }
.story__quote p {
  max-width: 13em; font-family: var(--font-script); line-height: 1.25;
  font-size: clamp(1.9rem, 2vw + 1.2rem, 2.8rem); color: var(--burgundy);
  transform: rotate(-4deg);
}

@media (min-width: 900px) {
  .story { grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr) minmax(0, .85fr); align-items: center; gap: clamp(24px, 3vw, 52px); }
}

/* ---------- 08. GALLERY ---------- */
.gallery { columns: 2; column-gap: 12px; }
.g-item { break-inside: avoid; margin: 0 0 12px; }
.g-btn {
  position: relative; display: block; width: 100%; overflow: hidden; text-align: left;
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.g-btn .ph { aspect-ratio: var(--ratio, 1 / 1); }
.g-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 11px;
  background: linear-gradient(to top, rgba(58, 8, 22, .66), transparent);
  color: #fff; font-family: var(--font-head); font-style: italic; font-size: .85rem; line-height: 1.3;
}
@media (hover: hover) {
  .g-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .g-btn:hover .ph > img { transform: scale(1.07); }
}
@media (min-width: 700px) { .gallery { columns: 3; column-gap: 16px; } .g-item { margin-bottom: 16px; } }
@media (min-width: 1024px) { .gallery { columns: 4; column-gap: 18px; } .g-item { margin-bottom: 18px; } .g-cap { font-size: .92rem; padding: 36px 14px 13px; } }

/* ---------- 09. TIMELINE ---------- */
.timeline { position: relative; display: grid; gap: 30px; max-width: 640px; margin-inline: auto; }
.timeline::before {
  content: ""; position: absolute; left: 34px; top: 34px; bottom: 34px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, rgba(200, 32, 46, .25), var(--rose) 20%, var(--rose) 80%, rgba(200, 32, 46, .25));
}
.tl-item { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 18px; align-items: center; }
.tl-photo {
  position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rose-soft), var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.tl-title { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; line-height: 1.25; color: var(--burgundy); }
.tl-date { margin-top: 2px; font-size: .8rem; font-weight: 600; letter-spacing: .05em; color: var(--rose-deep); }
.tl-desc { margin-top: 4px; font-size: .92rem; line-height: 1.55; }
@media (hover: hover) {
  .tl-photo:hover { transform: scale(1.12); box-shadow: 0 0 0 3px var(--rose), var(--shadow-md); }
}
@media (min-width: 700px) {
  .timeline::before { left: 44px; top: 44px; bottom: 44px; }
  .tl-item { grid-template-columns: 88px minmax(0, 1fr); gap: 26px; }
  .tl-photo { width: 88px; height: 88px; }
  .tl-title { font-size: 1.25rem; }
}
@media (min-width: 1024px) {
  .timeline { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); max-width: none; }
  .timeline::before {
    left: 10%; right: 10%; top: 44px; bottom: auto; width: auto; height: 2px;
    background: linear-gradient(to right, rgba(200, 32, 46, .25), var(--rose) 15%, var(--rose) 85%, rgba(200, 32, 46, .25));
  }
  .tl-item { grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; text-align: center; gap: 16px; }
  .tl-title { font-size: 1.1rem; }
}

/* ---------- 10. LOVE LETTER ---------- */
.duo__grid { display: grid; gap: clamp(20px, 3vw, 32px); }
@media (min-width: 1024px) { .duo__grid { grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: start; } }

.letter-card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, .7);
  background:
    radial-gradient(70% 60% at 0% 100%, rgba(200, 32, 46, .4), transparent 70%),
    linear-gradient(135deg, #F7DEDA, #FBEDE9);
  box-shadow: var(--shadow-md);
}
.letter-card__title {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--font-head); font-weight: 500; line-height: 1.2;
  font-size: clamp(1.5rem, 2.6vw + .7rem, 2.1rem); color: var(--burgundy);
}
.letter-card__title .icon { width: .6em; height: .6em; color: var(--rose-deep); }

.letter { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 22px; }

.envelope {
  position: relative; width: min(100%, 340px); aspect-ratio: 3 / 2;
  perspective: 900px; filter: drop-shadow(0 14px 22px rgba(107, 15, 26, .2));
  transition: margin-top .8s var(--ease);
}
.envelope > * { position: absolute; }
.envelope__back { inset: 0; border-radius: 10px; background: linear-gradient(160deg, #E3A29C, #D3827D); }
.envelope__front {
  inset: 0; z-index: 2; border-radius: 10px;
  background: linear-gradient(160deg, #FAE6E1 0%, #F1CBC4 100%);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.envelope__flap {
  left: 0; top: 0; width: 100%; height: 56%; z-index: 3;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(180deg, #E6A09A, #EDB8B2);
  transition: transform .8s var(--ease), z-index 0s .4s;
}
.envelope__seal {
  left: 50%; top: 56%; z-index: 4; width: 15%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); display: grid; place-items: center; color: #F7D6D2;
  background: radial-gradient(circle at 35% 30%, #C8202E, var(--burgundy));
  box-shadow: 0 4px 10px rgba(107, 15, 26, .4);
  transition: opacity .4s, transform .6s var(--ease);
}
.envelope__seal .icon { width: 48%; height: 48%; }

.letter.is-open .envelope { margin-top: calc(min(100%, 340px) * .373); }
.letter.is-open .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.letter.is-open .envelope__seal { opacity: 0; transform: translate(-50%, -50%) scale(.4); }

.letter__wrap {
  display: grid; grid-template-rows: 0fr; width: 100%; visibility: hidden;
  transition: grid-template-rows .9s var(--ease), visibility 0s .9s;
}
.letter.is-open .letter__wrap { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .9s var(--ease) .25s, visibility 0s .25s; }
.letter__clip { min-height: 0; overflow: hidden; }

.paper {
  position: relative; width: calc(100% - 16px); max-width: 560px; margin: 8px auto 26px;
  padding: clamp(24px, 5vw, 40px); text-align: left;
  background: linear-gradient(180deg, #FFFEFC, #FCEFEB);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(107, 15, 26, .16), 0 0 0 1px rgba(200, 32, 46, .22);
  font-family: var(--font-head); color: var(--brown);
  opacity: 0; transform: translateY(26px) rotate(-1.2deg);
  transition: opacity .8s var(--ease) .45s, transform .9s var(--ease) .45s;
}
.letter.is-open .paper { opacity: 1; transform: none; }
.paper__greeting { font-size: 1.12rem; font-style: italic; color: var(--burgundy); margin-bottom: 14px; }
.paper__body { display: grid; gap: 12px; font-size: clamp(.96rem, .9rem + .3vw, 1.05rem); line-height: 1.85; }
.paper__closing { margin-top: 16px; font-style: italic; color: var(--burgundy); }
.paper__sign { margin-top: 12px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.paper__sign .script { font-size: 1.9rem; color: var(--rose-deep); }
.paper__from { font-size: 1.5rem; font-family: var(--font-script); color: var(--burgundy); }
.paper__deco { position: absolute; color: var(--rose); opacity: .5; }
.paper__deco--a { width: 16px; height: 16px; top: 14px; right: 16px; }
.paper__deco--b { width: 11px; height: 11px; top: 36px; right: 40px; opacity: .35; }

/* ---------- 11. MUSIC PLAYER ---------- */
.player {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, .85);
  background: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(247, 214, 210, .82));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}
.player__top { display: flex; align-items: center; gap: 16px; }
.player__art { flex: none; width: clamp(72px, 20vw, 92px); aspect-ratio: 1; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.player__meta { flex: 1; min-width: 0; }
.player__title { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.15rem, 1.6vw + .7rem, 1.45rem); line-height: 1.2; color: var(--burgundy); overflow-wrap: anywhere; }
.player__artist { font-size: .9rem; opacity: .85; }
.player__progress { margin-top: 20px; }
.player__times { display: flex; justify-content: space-between; font-size: .78rem; font-variant-numeric: tabular-nums; opacity: .85; }

.player__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; margin-top: 10px; }
.play-btn {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  color: #fff; background: var(--burgundy); box-shadow: 0 10px 24px rgba(107, 15, 26, .32);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.play-btn .icon { grid-area: 1 / 1; width: 24px; height: 24px; }
.play-btn:active { transform: scale(.94); }
@media (hover: hover) { .play-btn:hover { transform: scale(1.06); box-shadow: 0 14px 30px rgba(107, 15, 26, .4); } }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--burgundy); transition: background-color .25s, color .25s;
}
.icon-btn:hover { background: rgba(200, 32, 46, .22); }
.icon-btn[aria-pressed="true"] { background: var(--burgundy); color: #fff; }
.icon-btn .icon { width: 20px; height: 20px; grid-area: 1 / 1; }
#btn-mute .icon--off { display: none; }
#btn-mute.is-muted .icon--on { display: none; }
#btn-mute.is-muted .icon--off { display: block; }
#btn-mute[aria-pressed="true"] { background: none; color: var(--burgundy); }

.volume { display: flex; align-items: center; gap: 4px; flex: 1 1 100%; max-width: 220px; }

/* Play/pause icon swap — shared by every toggle button */
[data-music-toggle] .icon--pause { display: none; }
body.is-playing [data-music-toggle] .icon--play { display: none; }
body.is-playing [data-music-toggle] .icon--pause { display: block; }
body.music-off .play-btn, body.music-off .mini__btn { opacity: .5; }

.player__note { margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: rgba(200, 32, 46, .2); font-size: .85rem; text-align: center; color: var(--burgundy); }
.player__note[hidden] { display: none; }
.player__note.is-flash { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

@media (min-width: 480px) {
  .player__controls { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
  .player__controls > .icon-btn { justify-self: start; }
  .volume { flex: none; justify-self: end; width: 100%; max-width: 150px; }
}

/* Range sliders (seek + volume) */
.range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer; --p: 0%;
}
.range:focus-visible { outline-offset: 0; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--burgundy) var(--p), rgba(107, 15, 26, .16) var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; border: 2px solid var(--burgundy); box-shadow: 0 2px 6px rgba(107, 15, 26, .3); }
.range::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(107, 15, 26, .16); }
.range::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--burgundy); }
.range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--burgundy); box-shadow: 0 2px 6px rgba(107, 15, 26, .3); }

/* ---------- 12. SPECIAL MOMENTS ---------- */
.moments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.moment {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; text-align: left;
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.moment .ph { position: absolute; inset: 0; }
.moment__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(58, 8, 22, .6), transparent 58%); }
.moment__cap { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.moment__pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 12px;
  border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; line-height: 1.25; color: var(--burgundy);
  background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.moment__pill .icon { width: .95em; height: .95em; color: var(--rose-deep); }
.moment__text { max-height: 0; opacity: 0; overflow: hidden; color: #fff; font-size: .86rem; line-height: 1.45; transition: max-height .5s var(--ease), opacity .4s; }
@media (hover: hover) {
  .moment:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
  .moment:hover .ph > img { transform: scale(1.08); }
  .moment:hover .moment__text, .moment:focus-visible .moment__text { max-height: 7em; opacity: 1; }
}
@media (min-width: 900px) {
  .moments { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .moments > li:nth-child(even) { margin-top: 36px; }
  .moment__cap { left: 14px; right: 14px; bottom: 14px; }
  .moment__pill { font-size: .85rem; }
}

/* ---------- 13. FOOTER ---------- */
.footer {
  margin-top: clamp(32px, 6vw, 72px);
  padding: 40px 0 calc(var(--mini-h) + 56px + var(--safe-b));
  background: linear-gradient(135deg, var(--burgundy), #3A0810); color: #F9E8E4;
}
.footer__inner { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; display: grid; gap: 18px; text-align: center; justify-items: center; }
.footer__names { display: inline-flex; align-items: center; gap: .55em; font-family: var(--font-head); font-size: clamp(1.4rem, 2vw + .9rem, 1.9rem); color: #fff; }
.footer__names .icon, .footer__copy .icon { width: .8em; height: .8em; color: var(--rose); }
.footer__copy .icon { display: inline-block; vertical-align: -.1em; }
.footer__quote { font-family: var(--font-head); font-style: italic; font-size: clamp(1rem, .9rem + .4vw, 1.15rem); max-width: 42ch; }
.footer__copy { margin-top: 6px; font-size: .8rem; opacity: .8; }
.footer__gate {
  width: 100%; display: flex; justify-content: center;
  margin-top: 10px; padding-top: 26px;
  border-top: 1px solid rgba(247, 214, 210, .16);
}
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1.4fr 1fr; text-align: left; justify-items: stretch; align-items: center; }
  .footer__center { grid-column: 2; text-align: center; }
  .footer__names { grid-column: 1; grid-row: 1; justify-self: start; }
  .footer__gate { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- 14. FLOATING UI (mini player + back to top) ---------- */
.mini {
  position: fixed; z-index: 40; left: 16px; right: 80px; bottom: calc(16px + var(--safe-b));
  height: var(--mini-h); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px;
  border-radius: var(--r-pill); overflow: hidden;
  background: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: var(--shadow-md);
  transition: transform .5s var(--ease), opacity .4s, visibility .5s;
}
.mini.is-hidden { transform: translateY(150%); opacity: 0; visibility: hidden; pointer-events: none; }
.mini__info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.mini__art { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-sm); animation: spin 9s linear infinite; animation-play-state: paused; }
body.is-playing .mini__art { animation-play-state: running; }
.mini__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mini__title, .mini__artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__title { font-size: .88rem; font-weight: 600; color: var(--burgundy); }
.mini__artist { font-size: .74rem; opacity: .8; }
.viz--mini { height: 20px; }
.viz--mini span { width: 2.5px; }
.mini__btn { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; background: var(--burgundy); transition: transform .25s var(--ease); }
.mini__btn .icon { grid-area: 1 / 1; width: 18px; height: 18px; }
.mini__btn:active { transform: scale(.92); }
.mini__bar { position: absolute; left: 22px; right: 22px; bottom: 3px; height: 3px; border-radius: 3px; background: rgba(107, 15, 26, .12); overflow: hidden; }
.mini__bar > span { display: block; width: 0; height: 100%; background: var(--rose-deep); border-radius: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 359px) { .viz--mini { display: none; } }
@media (min-width: 700px) { .mini { right: auto; width: 330px; left: 24px; bottom: calc(24px + var(--safe-b)); } }

.to-top {
  position: fixed; z-index: 40; right: 16px; bottom: calc(24px + var(--safe-b));
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  color: #fff; background: linear-gradient(135deg, var(--rose), var(--burgundy));
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s, visibility .35s, transform .35s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top .icon { width: 20px; height: 20px; }
@media (hover: hover) { .to-top:hover { transform: translateY(-4px); } }
@media (min-width: 700px) { .to-top { right: 24px; } }

/* ---------- 15. LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; align-items: center;
  padding: 64px 12px calc(20px + var(--safe-b));
  background: rgba(44, 8, 18, .92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-figure { grid-column: 1 / -1; grid-row: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lb-frame { position: relative; max-width: 100%; display: grid; place-items: center; }
.lb-frame img {
  max-width: 100%; max-height: calc(100vh - 230px); max-height: calc(100svh - 230px); width: auto; height: auto; object-fit: contain;
  border-radius: var(--r-md); box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  transition: opacity .3s, transform .45s var(--ease);
}
.lb-figure.is-loading .lb-frame img { opacity: 0; transform: scale(.97); }
.lb-missing {
  display: none; width: min(84vw, 440px); aspect-ratio: 4 / 3; place-content: center; justify-items: center; gap: 10px;
  border-radius: var(--r-md); color: var(--burgundy); font-size: .9rem;
  background: linear-gradient(135deg, var(--blush), #F8E3DF);
}
.lb-missing .icon { width: 34px; height: 34px; color: var(--rose); }
.lb-figure.is-missing .lb-frame img { display: none; }
.lb-figure.is-missing .lb-missing { display: grid; }
.lb-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; max-width: 90%; text-align: center; color: #fff; font-family: var(--font-head); font-style: italic; font-size: 1.05rem; line-height: 1.35; }
.lb-count { font-family: var(--font-body); font-style: normal; font-size: .78rem; letter-spacing: .1em; opacity: .7; }

.lb-btn {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
  transition: background-color .3s, transform .3s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-btn:active { transform: scale(.92); }
.lb-btn .icon { width: 22px; height: 22px; }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; z-index: 2; }
.lb-prev { grid-column: 1; grid-row: 2; justify-self: end; margin-right: 12px; margin-top: 16px; }
.lb-next { grid-column: 2; grid-row: 2; justify-self: start; margin-left: 12px; margin-top: 16px; }
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next { display: none; }

@media (min-width: 720px) {
  .lightbox { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); gap: 24px; padding: 72px 28px 36px; }
  .lb-figure { grid-column: 2; grid-row: 1; }
  .lb-prev { grid-column: 1; grid-row: 1; margin: 0; justify-self: auto; }
  .lb-next { grid-column: 3; grid-row: 1; margin: 0; justify-self: auto; }
  .lb-btn { width: 56px; height: 56px; }
  .lb-close { right: 24px; }
  .lb-frame img { max-height: calc(100vh - 190px); max-height: calc(100svh - 190px); }
}

/* ---------- 16. CUSTOM CURSOR (desktop, fine pointer only) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(107, 15, 26, .45); border-radius: 50%; pointer-events: none;
  opacity: 0; will-change: transform;
  transition: opacity .3s, width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background-color .25s, border-color .25s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(200, 32, 46, .22); border-color: var(--rose); }

/* ---------- 17. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .couple-site.is-armed .reveal { opacity: 1; transform: none; }
  .hearts, .cursor, .hero__deco { display: none; }
  .viz span { transform: scaleY(.6); }
}


/* ---------- FX LAYER (js/couple-fx.js: GSAP · Lenis · SplitType) ---------- */
/* GSAP mengatur reveal, jadi transisi CSS dimatikan agar tidak bentrok. */
.couple-site.fx.is-armed .reveal { transition: none; }

/* Lenis: matikan smooth-scroll native supaya tidak dobel */
html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis.lenis-stopped { overflow: hidden; }

/* SplitType pada judul hero */
.hero__title .char { display: inline-block; will-change: transform; }
.hero__title .word { display: inline-block; white-space: nowrap; }

/* Progress scroll */
.fx-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 200;
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
  background: linear-gradient(90deg, var(--rose), var(--rose-deep), var(--burgundy));
}
@media (prefers-reduced-motion: reduce) { .fx-progress { display: none; } }
