/* =====================================================================
   A Dream Love Website — Shared Design System
   Palette: Deep Rose · Blush Pink · Ivory · Gold
   Type: Pinyon Script (names) · Cormorant Garamond (display/body)
         Dancing Script (handwritten) · Marcellus (utility)
   ===================================================================== */

:root {
  /* ----- Color ----- */
  --wine-deep: #1c0309;
  --wine: #2f0a16;
  --wine-soft: #45121f;
  --deep-rose: #9d2235;
  --rose: #c1455c;
  --rose-light: #e08d9b;
  --blush: #f7c9d0;
  --blush-soft: #fbe3e7;
  --ivory: #fff7ef;
  --ivory-dim: #f4e7d8;
  --gold: #e7c873;
  --gold-deep: #c9a227;
  --gold-glow: #ffe9a8;
  --bg-deep: #190308;
  --bg-mid: #2c0813;
  --bg-rose: #4b0f20;

  /* ----- Type ----- */
  --f-script: "Pinyon Script", cursive;
  --f-hand: "Dancing Script", cursive;
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-util: "Marcellus", "Cormorant Garamond", serif;

  /* ----- Space ----- */
  --maxw: 1180px;
  --pad: clamp(1rem, 4.5vw, 4rem);
  --nav-h: 4.25rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* ----- Effects ----- */
  --glass: rgba(255, 247, 239, 0.08);
  --glass-pink: rgba(247, 201, 208, 0.10);
  --stroke: rgba(231, 200, 115, 0.28);
  --shadow-rose: 0 24px 60px -20px rgba(157, 34, 53, 0.55);

  /* ----- Surfaces (solid header / footer) ----- */
  --surface-header: var(--wine);
  --surface-footer: var(--wine-deep);
  --surface-menu: var(--wine-soft);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #190308;
  background-image: radial-gradient(140% 120% at 50% -10%, #4b0f20 0%, #2c0813 42%, #190308 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
}
body {
  font-family: var(--f-display);
  color: var(--ivory);
  background-color: #190308;
  background-image: radial-gradient(140% 120% at 50% -10%, #4b0f20 0%, #2c0813 42%, #190308 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: scroll;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: .2px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
::selection { background: rgba(231, 200, 115, 0.22); color: var(--ivory); }
img, video, canvas, svg {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}
@media (min-width: 1025px) {
  html, body { background-attachment: fixed; }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===================================================================
   3D / atmosphere canvas layers
   =================================================================== */
#three-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background-color: #190308;
  background-image: radial-gradient(140% 120% at 50% -10%, #4b0f20 0%, #2c0813 42%, #190308 100%);
  background-repeat: no-repeat;
  background-size: cover;
}
#three-bg canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  background-color: #190308 !important;
}

/* Index-only extra backdrop (desktop glass blur target) */
#page-bg-lock { display: none !important; }
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #190308;
  background-image: radial-gradient(140% 120% at 50% -10%, #4b0f20 0%, #2c0813 42%, #190308 100%);
  background-repeat: no-repeat;
  background-size: cover;
}
@media (max-width: 720px) {
  /* Mobile index: same bg stack as Timeline */
  body.page-index .site-bg { display: none !important; }

  /* Float btn blur off on Android; hero + cards use glass blur */
  body.page-index .float-btn {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  body.page-index .card {
    background: linear-gradient(
      150deg,
      rgba(255, 247, 239, 0.07) 0%,
      rgba(247, 201, 208, 0.11) 38%,
      rgba(47, 10, 22, 0.58) 100%
    );
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    backdrop-filter: blur(18px) saturate(1.25);
    border: 1px solid rgba(231, 200, 115, 0.26);
    box-shadow:
      0 20px 48px -18px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 247, 239, 0.1);
  }

  body.page-index .hero__heartbeat { z-index: 0; }
  body.page-index .hero__frame {
    position: relative;
    z-index: 1;
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
    backdrop-filter: blur(24px) saturate(1.35);
  }
}
@media (min-width: 721px) {
  body.page-index #three-bg { z-index: 1; }
  body.page-index .petal-layer,
  body.page-index .love-spread,
  body.page-index .silk-spread { z-index: 2; }
  body.page-index .page { z-index: 3; }
}
.petal-layer {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  contain: layout style paint;
}
.petal {
  position: absolute;
  top: -8vh;
  width: 16px; height: 16px;
  background: radial-gradient(circle at 30% 30%, var(--blush) 0%, var(--rose) 70%, var(--deep-rose) 100%);
  border-radius: 80% 0 80% 0;
  opacity: .75;
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

/* page content always above atmosphere */
.page { position: relative; z-index: 2; width: 100%; max-width: 100%; overflow-x: hidden; }
body.page-first-hello .love-spread { z-index: 0; opacity: 0.55; }
body.page-first-hello .petal-layer { opacity: 0.45; }
body.page-first-hello .section:has(.chat-panel) {
  position: relative;
  z-index: 3;
  isolation: isolate;
}

.hero-section-audio,
.site-audio {
  display: none !important;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ===================================================================
   Custom heart cursor
   =================================================================== */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .heart-cursor, .heart-trail { pointer-events: none; position: fixed; z-index: 9999; }
  .heart-cursor {
    width: 26px; height: 26px; left: 0; top: 0;
    transform: translate(-50%, -50%);
    transition: transform .12s ease;
  }
  .heart-cursor::before {
    content: "❤"; font-size: 22px; color: var(--rose);
    filter: drop-shadow(0 0 6px rgba(193,69,92,.9));
    display: block; line-height: 1;
  }
  .heart-cursor.tap { transform: translate(-50%, -50%) scale(1.5); }
  .heart-trail {
    font-size: 14px; color: var(--blush);
    transform: translate(-50%, -50%);
    animation: trailFade .7s forwards;
  }
}
@keyframes trailFade {
  to { opacity: 0; transform: translate(-50%, -120%) scale(.4); }
}

/* ===================================================================
   Top navigation
   =================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding:
    calc(.75rem + var(--safe-top))
    calc(var(--pad) + var(--safe-right))
    .75rem
    calc(var(--pad) + var(--safe-left));
  background: var(--surface-header);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.nav__brand {
  font-family: var(--f-script);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  color: var(--gold);
  text-shadow: 0 0 14px rgba(231,200,115,.4);
  line-height: 1;
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.45em;
}
.nav__amp {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.55em;
  color: var(--rose-light);
  flex-shrink: 0;
  padding: 0 0.12em;
  line-height: 1;
}
.nav__links { display: flex; gap: clamp(.45rem, 1.2vw, 1rem); align-items: center; flex-shrink: 0; }
.nav__links a {
  font-family: var(--f-util);
  font-size: clamp(.68rem, 1.1vw, .82rem);
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: .5rem clamp(.55rem, 1.2vw, .95rem); border-radius: 999px;
  color: var(--blush-soft);
  transition: color .25s, background .25s;
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a[aria-current="page"] {
  color: var(--wine-deep);
  background: linear-gradient(120deg, var(--gold), var(--gold-glow));
}
.nav__toggle {
  display: none;
  position: relative;
  z-index: 54;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  color: var(--gold);
  flex-shrink: 0;
}
.nav__backdrop,
.nav__panel-head,
.nav__close { display: none; }

@media (max-width: 1024px) {
  .nav__brand {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
    max-width: calc(100% - 3.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 51;
    background: rgba(12, 2, 5, 0.68);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
  }
  .nav__backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  body.nav-open .nav__toggle {
    visibility: hidden;
    pointer-events: none;
  }
  .nav__links {
    position: fixed;
    inset: 0 0 auto auto;
    top: 0;
    right: 0;
    z-index: 52;
    height: 100dvh;
    width: min(86vw, 320px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: .35rem;
    padding:
      0
      0
      calc(1.75rem + var(--safe-bottom))
      0;
    background: var(--surface-menu);
    border-left: none;
    border-radius: clamp(1.35rem, 5vw, 2rem) 0 0 clamp(1.35rem, 5vw, 2rem);
    box-shadow:
      -10px 0 36px -8px rgba(157, 34, 53, 0.55),
      inset 1px 0 0 rgba(231, 200, 115, 0.12);
    transform: translateX(105%);
    transition: transform .4s cubic-bezier(.7,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    isolation: isolate;
  }
  .nav__links::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: inherit;
    background: linear-gradient(
      180deg,
      transparent 0%,
      var(--gold-glow) 6%,
      var(--gold) 20%,
      var(--rose-light) 42%,
      var(--deep-rose) 50%,
      var(--rose-light) 58%,
      var(--gold) 80%,
      var(--gold-glow) 94%,
      transparent 100%
    );
    box-shadow:
      0 0 14px rgba(231, 200, 115, 0.5),
      2px 0 20px rgba(193, 69, 92, 0.35);
    pointer-events: none;
    z-index: 0;
  }
  .nav__links::after {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 7px;
    width: 1px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      transparent,
      rgba(255, 247, 239, 0.45) 30%,
      rgba(247, 201, 208, 0.55) 50%,
      rgba(255, 247, 239, 0.45) 70%,
      transparent
    );
    pointer-events: none;
    z-index: 0;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1;
    flex-shrink: 0;
    padding:
      calc(1.35rem + var(--safe-top))
      calc(1.25rem + var(--safe-right))
      1rem
      calc(1.35rem + var(--safe-left));
    border-bottom: 1px solid var(--stroke);
    background: var(--surface-header);
    border-radius: clamp(1.35rem, 5vw, 2rem) 0 0 0;
  }
  .nav__panel-title {
    font-family: var(--f-script);
    letter-spacing: 0.5px;
    text-transform: none;
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    color: var(--gold);
    line-height: 1;
    text-shadow: 0 0 16px rgba(231, 200, 115, 0.4);
  }
  .nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gold);
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--stroke);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .nav__links a {
    position: relative;
    z-index: 1;
    font-size: clamp(.88rem, 3.8vw, .95rem);
    width: auto;
    margin-inline: calc(1rem + var(--safe-left)) calc(1rem + var(--safe-right));
    padding: .85rem 1.1rem;
    border-radius: .5rem;
    white-space: normal;
  }
}

body.nav-open { overflow: hidden; }
body.nav-open .float-controls {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ===================================================================
   Generic section + headings
   =================================================================== */
.section { padding: clamp(3rem, 8vw, 8rem) var(--pad); }
.wrap { max-width: var(--maxw); margin: 0 auto; width: 100%; min-width: 0; }
.wrap--narrow { max-width: 780px; margin: 0 auto; width: 100%; min-width: 0; }

.page-hero {
  min-height: clamp(42vh, 52vh, 56vh);
  display: grid;
  place-items: center;
  text-align: center;
  padding:
    calc(var(--nav-h) + var(--safe-top) + 2.5rem)
    var(--pad)
    clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  font-family: var(--f-util);
  letter-spacing: 4px; text-transform: uppercase;
  font-size: .78rem; color: var(--gold);
  display: inline-flex; align-items: center; gap: .6rem;
  margin-bottom: 1rem;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 34px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-deep), transparent);
}

.h-script {
  font-family: var(--f-script);
  font-size: clamp(2.6rem, 7vw, 5rem);
  color: var(--gold);
  line-height: 1.05;
  text-shadow: 0 0 26px rgba(231,200,115,.35);
}
.h-display {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  color: var(--ivory);
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--blush-soft);
  font-weight: 400;
  max-width: 60ch;
}
.divider {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 2.2rem 0; color: var(--gold-deep);
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1; max-width: 160px;
  background: linear-gradient(to right, transparent, var(--gold-deep), transparent);
}
.divider span { font-size: 1.3rem; filter: drop-shadow(0 0 6px rgba(231,200,115,.5)); }

/* ===================================================================
   Glass cards
   =================================================================== */
.card {
  background: var(--glass-pink);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-rose);
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

/* Index hero frame — strong frosted glass (desktop + mobile) */
body.page-index .hero__frame {
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
  transform: translateZ(0);
}
body.page-index .hero__frame-glass {
  background: linear-gradient(
    155deg,
    rgba(255, 247, 239, 0.06) 0%,
    rgba(247, 201, 208, 0.1) 28%,
    rgba(75, 15, 32, 0.52) 55%,
    rgba(47, 10, 22, 0.72) 100%
  );
  border: 1px solid rgba(231, 200, 115, 0.32);
  box-shadow:
    0 28px 60px -22px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 247, 239, 0.14),
    inset 0 -1px 0 rgba(193, 69, 92, 0.1);
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--f-util); letter-spacing: 1.5px; text-transform: uppercase;
  font-size: clamp(.74rem, 2vw, .82rem);
  padding: clamp(.75rem, 2vw, .9rem) clamp(1.2rem, 3vw, 1.7rem); border-radius: 999px;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold), var(--gold-glow));
  color: var(--wine-deep);
  box-shadow: 0 10px 28px -10px rgba(231,200,115,.7);
  transition: transform .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px -10px rgba(231,200,115,.9); }
.btn--ghost {
  background: transparent; color: var(--gold);
  border: 1px solid var(--stroke);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(231,200,115,.12); transform: translateY(-3px); }
.btn--promise {
  background: linear-gradient(135deg, var(--wine-soft) 0%, var(--deep-rose) 42%, var(--rose) 100%);
  color: var(--gold-glow);
  border: 1px solid rgba(231, 200, 115, 0.45);
  box-shadow: 0 10px 28px -10px rgba(157, 34, 53, 0.55);
}
.btn--promise:hover {
  background: linear-gradient(135deg, var(--deep-rose) 0%, var(--rose) 50%, var(--rose-light) 100%);
  box-shadow: 0 16px 34px -10px rgba(193, 69, 92, 0.65);
  transform: translateY(-3px) scale(1.03);
}

/* ===================================================================
   Floral / flower divider between sections
   =================================================================== */
.flower-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.4rem, 3vw, 1.1rem);
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.4rem;
  color: var(--rose-light);
  opacity: .85;
  padding: 1rem 0;
}

/* Inline 3D rose / butterfly / teddy icons */
.icon-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 12vw, 72px);
  height: clamp(52px, 12vw, 72px);
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 14px rgba(193, 69, 92, 0.45));
}
.icon-3d--sm {
  width: 44px;
  height: 44px;
}
.icon-3d canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.love-symbols {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.8rem, 4vw, 2.2rem);
  margin-top: 1.4rem;
}

/* ===================================================================
   Footer
   =================================================================== */
.footer {
  position: relative; z-index: 2;
  text-align: center;
  padding:
    0.55rem
    calc(var(--pad) + var(--safe-right))
    calc(0.5rem + var(--safe-bottom))
    calc(var(--pad) + var(--safe-left));
  border-top: 1px solid var(--stroke);
  background: var(--surface-footer);
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.35);
}
.footer__gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 1.5vw, 0.55rem);
  margin: 0 auto 0.4rem;
  max-width: min(640px, 98%);
}
.footer__deco {
  flex: 0 0 auto;
  width: clamp(26px, 6vw, 34px);
  height: auto;
  opacity: 0.88;
  filter: drop-shadow(0 2px 8px rgba(157, 34, 53, 0.28));
  animation: footerDecoFloat 4.2s ease-in-out infinite;
}
.footer__deco--chocolate { animation-delay: -2.1s; }
@keyframes footerDecoFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}
.footer__gallery-track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(0.22rem, 1vw, 0.38rem);
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.footer__gallery-track::-webkit-scrollbar { display: none; }
.footer__thumb {
  margin: 0;
  flex: 0 0 auto;
  padding: 1px;
  border-radius: 6px;
  background: linear-gradient(140deg, rgba(231, 200, 115, 0.55), rgba(255, 107, 157, 0.38));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.footer__thumb:nth-child(odd) { transform: rotate(-3deg); }
.footer__thumb:nth-child(even) { transform: rotate(2deg); }
.footer__thumb:hover {
  transform: rotate(0) scale(1.1);
  box-shadow: 0 4px 14px rgba(157, 34, 53, 0.35);
  z-index: 1;
}
.footer__thumb img {
  display: block;
  width: clamp(28px, 7vw, 36px);
  height: clamp(28px, 7vw, 36px);
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
@media (max-width: 520px) {
  .footer__deco { display: none; }
  .footer__gallery { margin-bottom: 0.32rem; }
  .footer__thumb img { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .footer__deco { animation: none; }
}
.footer__hearts {
  --heart-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 72'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='40' y1='6' x2='40' y2='68' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23ff9ec4'/%3E%3Cstop offset='0.42' stop-color='%23ff6b9d'/%3E%3Cstop offset='0.58' stop-color='%23e04d73'/%3E%3Cstop offset='1' stop-color='%23a61e42'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M40 66C18 48 6 36 6 24C6 14 14 6 24 6C31 6 37 10 40 18C43 10 49 6 56 6C66 6 74 14 74 24C74 36 62 48 40 66Z'/%3E%3C/svg%3E");
  position: relative;
  width: min(280px, 80%);
  height: clamp(22px, 5vw, 28px);
  margin: 0 auto 0.1rem;
}
.footer-heart {
  position: absolute;
  width: var(--sz);
  height: var(--sz);
  background: var(--heart-art) center / contain no-repeat;
  transform: rotate(var(--rot));
  filter: drop-shadow(0 1px 4px rgba(157, 34, 53, 0.3));
  transition: transform .35s ease;
}
.footer-heart:hover { transform: rotate(var(--rot)) scale(1.08); }
.footer-heart:nth-child(1) { --sz: 9px;  --rot: -22deg; left:  4%; bottom: 12%; }
.footer-heart:nth-child(2) { --sz: 11px; --rot:  14deg; left: 17%; bottom: 28%; }
.footer-heart:nth-child(3) { --sz: 12px; --rot:  -8deg; left: 30%; bottom: 10%; }
.footer-heart:nth-child(4) { --sz: 12px; --rot:  18deg; left: 43%; bottom: 30%; }
.footer-heart:nth-child(5) { --sz: 13px; --rot: -12deg; left: 56%; bottom: 14%; }
.footer-heart:nth-child(6) { --sz: 14px; --rot:  20deg; left: 69%; bottom: 32%; }
.footer-heart:nth-child(7) { --sz: 15px; --rot:  -5deg; left: 82%; bottom: 16%; }
.footer__note { font-family: var(--f-script); font-size: 0.98rem; color: var(--gold); line-height: 1.15; }
.footer__music {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: .2rem auto 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(231, 200, 115, 0.35);
  background: rgba(231, 200, 115, 0.1);
  color: var(--gold);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.footer__music-icon {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
}
.footer__music-svg {
  grid-area: 1 / 1;
  display: block;
}
.footer__music-svg--play { opacity: 1; transform: scale(1); transition: opacity .25s ease, transform .25s ease; }
.footer__music-svg--pause { opacity: 0; transform: scale(.75); transition: opacity .25s ease, transform .25s ease; }
.footer__music-bars {
  position: absolute;
  bottom: .18rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: .55rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.footer__music-bars i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--gold-glow);
  transform-origin: bottom;
}
.footer__music--off .footer__music-icon {
  animation: footerMusicIconBlink 1.2s ease-in-out infinite;
}
.footer__music--on {
  background: rgba(231, 200, 115, 0.22);
  border-color: rgba(255, 233, 168, 0.55);
  box-shadow: 0 0 14px rgba(231, 200, 115, 0.35);
}
.footer__music--on .footer__music-icon { animation: none; }
.footer__music--on .footer__music-svg--play { opacity: 0; transform: scale(.75); }
.footer__music--on .footer__music-svg--pause { opacity: 1; transform: scale(1); }
.footer__music--on .footer__music-bars { opacity: 1; }
.footer__music--on .footer__music-bars i:nth-child(1) { animation: footerMusicBar 0.9s ease-in-out infinite; }
.footer__music--on .footer__music-bars i:nth-child(2) { animation: footerMusicBar 0.9s ease-in-out .15s infinite; }
.footer__music--on .footer__music-bars i:nth-child(3) { animation: footerMusicBar 0.9s ease-in-out .3s infinite; }
.footer__music:hover {
  transform: scale(1.08);
  background: rgba(231, 200, 115, 0.18);
  border-color: rgba(231, 200, 115, 0.55);
}
@keyframes footerMusicIconBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.88); }
}
@keyframes footerMusicBar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .footer__music--off .footer__music-icon,
  .footer__music--on .footer__music-bars i { animation: none; }
}
.footer small { display:block; margin-top:.12rem; font-size:.68rem; color: var(--blush-soft); opacity:.7; letter-spacing:1px; }

/* ===================================================================
   Reveal animation base (GSAP also drives some)
   =================================================================== */
.reveal { opacity: 0; transform: translateY(34px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }

/* ===================================================================
   Music + scroll-cue floating controls
   =================================================================== */
.float-controls {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  right: calc(1rem + var(--safe-right));
  z-index: 60;
  display: flex;
  gap: .6rem;
}
.float-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--glass-pink); border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  color: var(--gold);
  transition: transform .2s, background .2s;
}
.float-btn:hover { transform: scale(1.1); background: rgba(231,200,115,.18); }
.float-btn.playing { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================================
   Butterflies carrying “I love you …” hearts
   =================================================================== */
.love-spread {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.love-spread__flyer {
  position: absolute;
  top: var(--top, 30%);
  left: -8rem;
  will-change: left;
  animation: love-spread-drift var(--dur, 55s) linear var(--delay, 0s) infinite;
}
.love-spread__flyer--rev {
  animation-name: love-spread-drift-rev;
}
.love-spread__carry {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: love-spread-bob 5.5s ease-in-out infinite;
}
.love-spread__butterfly {
  width: clamp(2.1rem, 5.2vw, 2.85rem);
  height: clamp(2.1rem, 5.2vw, 2.85rem);
  flex-shrink: 0;
  background: url("../assets/butterfly.png") center / contain no-repeat;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
  animation: butterfly-flap 0.38s ease-in-out infinite alternate;
  transform-origin: center center;
}
.love-spread__flyer--rev .love-spread__butterfly {
  animation-name: butterfly-flap-rev;
}
.love-spread__pill {
  --heart-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath fill='white' d='M50 78 C24 56 8 42 8 28 C8 16 18 8 28 8 C36 8 43 13 50 22 C57 13 64 8 72 8 C82 8 92 16 92 28 C92 42 76 56 50 78 Z'/%3E%3C/svg%3E");
  position: relative;
  box-sizing: border-box;
  width: clamp(4rem, 10vw, 5rem);
  height: clamp(3.6rem, 9vw, 4.5rem);
  margin-top: 0.12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.28rem 0.58rem;
  background: transparent;
  font-family: var(--f-script);
  font-size: clamp(.62rem, 1.45vw, .78rem);
  color: var(--ivory);
  text-align: center;
  line-height: 1.02;
  animation: love-blink 1.3s ease-in-out var(--blink, 0s) infinite;
}
.love-spread__pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(165deg, var(--deep-rose) 0%, var(--rose) 45%, var(--rose-light) 100%);
  -webkit-mask: var(--heart-mask) center / 100% 100% no-repeat;
  mask: var(--heart-mask) center / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 8px rgba(157, 34, 53, 0.38));
}
.love-spread__pill::after {
  content: "";
  position: absolute;
  top: -0.42rem;
  left: 50%;
  width: 1px;
  height: 0.42rem;
  background: linear-gradient(to bottom, rgba(231, 200, 115, 0.65), rgba(231, 200, 115, 0.15));
  transform: translateX(-50%);
  z-index: 0;
}
.love-spread__line,
.love-spread__name {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 92%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.love-spread__name {
  font-size: 1.12em;
  margin-top: .04rem;
}
@keyframes love-spread-drift {
  from { left: -8rem; }
  to { left: calc(100% + 2rem); }
}
@keyframes love-spread-drift-rev {
  from { left: calc(100% + 2rem); }
  to { left: -8rem; }
}
@keyframes love-spread-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes butterfly-flap {
  from { transform: rotate(-6deg) scale(1); }
  to { transform: rotate(6deg) scale(0.94); }
}
@keyframes butterfly-flap-rev {
  from { transform: scale(-1, 1) rotate(-6deg); }
  to { transform: scale(-0.94, 0.94) rotate(6deg); }
}
@keyframes love-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ===================================================================
   Floating Silk chocolate bars
   =================================================================== */
.silk-spread {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.silk-spread__flyer {
  position: absolute;
  top: var(--top, 40%);
  left: -6rem;
  will-change: left;
  animation: love-spread-drift var(--dur, 60s) linear var(--delay, 0s) infinite;
}
.silk-spread__flyer--rev {
  animation-name: love-spread-drift-rev;
}
.silk-spread__bar {
  display: block;
  width: clamp(2.4rem, 6vw, 3.6rem);
  height: clamp(5.6rem, 14vw, 8.4rem);
  background: url("../assets/silk-chocolate.png") center / contain no-repeat;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
  animation: silk-sway 4s ease-in-out infinite;
  transform-origin: center center;
}
.silk-spread__flyer--rev .silk-spread__bar {
  animation-name: silk-sway-rev;
}
@keyframes silk-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes silk-sway-rev {
  0%, 100% { transform: scaleX(-1) rotate(-4deg); }
  50% { transform: scaleX(-1) rotate(4deg); }
}

/* ===================================================================
   Utility
   =================================================================== */
.center { text-align: center; }
.stack > * + * { margin-top: 1.1rem; }
.gold { color: var(--gold); }
.rose { color: var(--rose-light); }
.muted { color: var(--blush-soft); opacity: .85; }

/* ===================================================================
   Reduced motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .petal-layer, #three-bg, .love-spread, .silk-spread { display: none; }
}

/* visible keyboard focus */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ===================================================================
   Responsive — all devices
   =================================================================== */
.page { min-width: 0; }

@media (max-width: 720px) {
  :root { --nav-h: 3.85rem; }

  body:not(.page-index) .eyebrow {
    letter-spacing: 2px;
    font-size: .72rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  body:not(.page-index) .eyebrow::before,
  body:not(.page-index) .eyebrow::after { width: 22px; }

  body:not(.page-index) .h-script { font-size: clamp(2.2rem, 10vw, 3.6rem); }
  body:not(.page-index) .h-display { font-size: clamp(1.75rem, 7vw, 2.6rem); }
  body:not(.page-index) .lede { font-size: clamp(1rem, 3.8vw, 1.15rem); }

  .divider { gap: .6rem; margin: 1.6rem 0; }
  .divider::before, .divider::after { max-width: 72px; }

  .card { border-radius: 18px; padding: clamp(1.15rem, 4vw, 1.8rem); }

  body:not(.page-index) .btn { width: 100%; max-width: 320px; }
  body:not(.page-index) .btn-row,
  body:not(.page-index) .hero__cta,
  .propose .answer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
  }

  .float-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .flower-divider {
    letter-spacing: 0.15rem;
    font-size: 1.15rem;
    gap: .35rem;
  }

  .love-symbols { gap: .75rem; margin-top: 1rem; }

  .footer__note { font-size: 1rem; }
  .footer__hearts { width: min(280px, 92%); }
}

@media (max-width: 480px) {
  .nav__links { width: min(92vw, 300px); }
  .nav__panel-head {
    padding-top: calc(1.15rem + var(--safe-top));
    padding-inline: calc(1rem + var(--safe-right)) calc(1rem + var(--safe-left));
  }
  .nav__links a {
    margin-inline: calc(.85rem + var(--safe-left)) calc(.85rem + var(--safe-right));
    padding: .8rem 1rem;
  }

  .h-script { word-break: break-word; hyphens: auto; }
}

@media (max-width: 380px) {
  .nav__brand { font-size: 1.2rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .page-hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + var(--safe-top) + 1rem);
    padding-bottom: 1rem;
  }
}

/* Index — stats & gateway (keep 4-col stats on index via .page-index override) */
@media (max-width: 620px) {
  body:not(.page-index) .stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
}
@media (max-width: 420px) {
  body:not(.page-index) .stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
  body:not(.page-index) .stat b { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}
.gates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(.85rem, 3vw, 1.2rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* Gallery */
.gallery {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: clamp(.65rem, 2vw, 1rem);
}
@media (hover: none) {
  .shot__meta { transform: none; }
}
.featured { border-radius: clamp(14px, 3vw, 24px); }
.kb-caption { padding: 1rem; }
.kb-caption h3 { font-size: clamp(1.35rem, 5vw, 2.2rem); }

/* Timeline */
@media (max-width: 720px) {
  .milestone__title { font-size: clamp(1.15rem, 4.5vw, 1.35rem); }
  .milestone__body { font-size: .95rem; }
  .milestone__card { width: 100%; }
}

/* Marriage */
.countdown { gap: clamp(.5rem, 2vw, 1rem); }
@media (max-width: 480px) {
  .cd { min-width: 68px; }
  .cd b { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}
.board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.vow h3 { font-size: clamp(1.8rem, 6vw, 2.4rem); }

/* Letters */
.envelopes {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1rem, 3vw, 1.6rem);
}
.letter__to { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.surprise {
  width: min(92vw, 320px);
  padding: 1.1rem 1.25rem;
}

/* First hello — chat */
.chat .bubble {
  max-width: min(88%, 520px);
  font-size: clamp(.95rem, 3.5vw, 1.05rem);
  padding: .75rem 1rem;
}
.type-line { font-size: clamp(1.15rem, 4.5vw, 2rem); }

/* Modals / lightbox */
.lightbox, .letter-modal {
  padding:
    calc(var(--pad) + var(--safe-top))
    calc(var(--pad) + var(--safe-right))
    calc(var(--pad) + var(--safe-bottom))
    calc(var(--pad) + var(--safe-left));
}
.lightbox__close, .letter__close {
  top: calc(.8rem + var(--safe-top));
  right: calc(1rem + var(--safe-right));
}

/* ===================================================================
   Premium source protection overlay
   =================================================================== */
.site-shield {
  overflow: hidden;
}
.site-shield__veil {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(25, 3, 8, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  pointer-events: all;
}
.site-shield__veil.show { display: flex; }
.site-shield__veil p {
  font-family: var(--f-script);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  color: var(--gold);
  line-height: 1.35;
  max-width: 18ch;
}
.site-shield__veil small {
  display: block;
  margin-top: 1rem;
  font-family: var(--f-util);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blush-soft);
  opacity: 0.75;
}
