/* ==========================================================================
   OUR LITTLE CHRISTMAS WORLD — styles
   ========================================================================== */
:root {
  --night: #050a17;
  --midnight: #0a1530;
  --midnight-2: #13234a;
  --forest: #0f2e22;
  --forest-2: #1d4a35;
  --gold: #d8b673;
  --gold-hi: #f6e5b8;
  --gold-deep: #9c7737;
  --champagne: #ead7ad;
  --ivory: #f8f0e1;
  --ivory-2: #efe2c8;
  --snow: #f3f6fb;
  --red: #9e1b2c;
  --red-hi: #c8384c;
  --ink: #3b2a1e;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --script: 'Dancing Script', 'Snell Roundhand', cursive;
  --fancy: 'Pinyon Script', 'Dancing Script', cursive;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-flip: cubic-bezier(.45, .05, .2, 1);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0; min-height: 100vh; color: var(--snow); font-family: var(--sans); font-weight: 300;
  line-height: 1.6; background: var(--night); overflow-x: hidden; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ivory); color: var(--ink); padding: 8px 14px; border-radius: 99px; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: .01em; line-height: 1.08; margin: 0; }
.kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .32em; font-size: .72rem; color: var(--champagne); opacity: .8; margin: 0 0 .9rem; font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: .85em 1.6em; border-radius: 999px;
  font-family: var(--sans); font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 400;
  text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn--glow { color: #2a1d0c; background: linear-gradient(135deg, var(--gold-hi), var(--gold) 55%, #b78f4b); box-shadow: 0 0 0 1px #fff3 inset, 0 10px 40px -8px #e7c07a99; }
.btn--glow:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff5 inset, 0 16px 50px -8px #f0cf8acc; }
.btn--ghost { color: var(--champagne); border: 1px solid #ead7ad55; background: #0a153066; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--champagne); background: #ead7ad14; transform: translateY(-1px); }
.btn--ink { color: var(--ivory); background: var(--red); box-shadow: 0 8px 24px -8px #9e1b2caa; }
.btn--ink:hover { background: var(--red-hi); transform: translateY(-1px); }

/* ==========================================================================
   SKY, SNOW
   ========================================================================== */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 110%, #1b2f5a 0%, transparent 60%),
    radial-gradient(80% 60% at 80% 0%, #15285099 0%, transparent 70%),
    linear-gradient(180deg, #03060f 0%, #08132b 45%, #0d1c3c 100%);
}
.sky-stars, .sky-stars::after {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fffb 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff8 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 81% 26%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 6%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff7 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 36% 36%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 42%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 4%, #fffa 50%, transparent 51%);
  background-size: 100% 100%;
}
.sky-stars::after { content: ''; transform: translate(3%, 7%) scale(1.2); opacity: .6; animation: twinkle 6s ease-in-out infinite alternate; }
.sky-moon {
  position: absolute; top: 7vh; right: 9vw; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffaf0 0%, #f2e7cf 45%, #d9c9a8 100%);
  box-shadow: 0 0 60px 20px #f5e6c222, 0 0 160px 60px #f5e6c211; opacity: .85;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }
.snow-canvas { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.snow-canvas--front { z-index: 15; }

main { position: relative; z-index: 2; }

/* ==========================================================================
   INTRO
   ========================================================================== */
.intro {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; text-align: center;
  background: radial-gradient(80% 60% at 50% 70%, #0b1733aa 0%, #03060fee 70%);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.intro-tree {
  position: absolute; left: 50%; bottom: 8vh; width: min(130px, 26vw); transform: translateX(-50%) scale(.9);
  opacity: 0; filter: blur(1.5px) drop-shadow(0 0 30px #ffcf7d55); transition: opacity 2.4s var(--ease), transform 2.4s var(--ease), filter 2s;
}
.intro-tree::after { content: ''; position: absolute; inset: -40% -60%; background: radial-gradient(closest-side, #ffcf7d33, transparent); z-index: -1; }
.intro.is-lit .intro-tree { opacity: 1; transform: translateX(-50%) scale(1); }
.intro-text { position: relative; padding: 0 24px 18vh; max-width: 760px; }
.intro-line {
  font-family: var(--serif); font-size: clamp(1.4rem, 4.2vw, 2.4rem); font-style: italic; color: var(--ivory);
  margin: 0 0 .25em; opacity: 0; filter: blur(8px); transform: translateY(10px);
  transition: opacity 1.6s var(--ease), filter 1.6s var(--ease), transform 1.6s var(--ease);
}
.intro-name {
  font-family: var(--fancy); font-size: clamp(2.6rem, 9vw, 4.6rem); color: var(--gold-hi); margin: .5em 0 .6em;
  text-shadow: 0 0 30px #f6d79466; opacity: 0; filter: blur(10px); transition: opacity 2s var(--ease), filter 2s var(--ease);
}
.intro-enter { opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 1s var(--ease), transform 1s var(--ease), box-shadow .4s; }
.intro [data-step].is-shown { opacity: 1; filter: none; transform: none; pointer-events: auto; }
.intro-enter.is-shown { animation: breathe 3.2s ease-in-out 1s infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px #fff4 inset, 0 10px 60px -4px #f3cf86cc; } }
.intro-skip {
  position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + var(--safe-b));
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: #ead7adaa; padding: 10px 14px; border-radius: 99px;
}
.intro-skip:hover { color: var(--champagne); background: #ffffff0d; }
.intro.is-leaving { opacity: 0; pointer-events: none; }
.intro.is-leaving .intro-tree { transform: translateX(-50%) scale(5) translateY(-10%); opacity: 0; filter: blur(6px); transition-duration: 1.5s; }
.intro.is-leaving .intro-text { opacity: 0; transform: translateY(-20px); transition: all .9s var(--ease); }
.intro.is-leaving-fast { opacity: 0; pointer-events: none; transition-duration: .5s; }

body.is-intro main, body.is-intro .nav, body.is-intro .music-toggle { opacity: 0; visibility: hidden; }
body.is-intro { overflow: hidden; }
main, .nav, .music-toggle { transition: opacity 1.4s var(--ease) .2s, visibility 0s; }
body.is-entering .tree-stage { animation: tree-arrive 1.8s var(--ease) both; }
@keyframes tree-arrive { from { transform: scale(.86) translateY(4%); filter: blur(6px); opacity: 0; } to { transform: none; filter: none; opacity: 1; } }

/* ==========================================================================
   NAV & MUSIC
   ========================================================================== */
.nav {
  position: fixed; z-index: 20; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: #081227b8; border: 1px solid #ead7ad26; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px -12px #000a;
}
.nav a {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #ead7adbb; transition: color .3s, background .3s;
}
.nav a svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.nav a:hover { color: var(--ivory); }
.nav a.is-active { color: #23180a; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }

.music-toggle {
  position: fixed; z-index: 21; top: 16px; right: 16px; display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 999px; background: #081227b8; border: 1px solid #ead7ad26;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--champagne);
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
}
.music-bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.music-bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.music-toggle.is-on .music-bars i { animation: eq 1.1s ease-in-out infinite; }
.music-toggle.is-on .music-bars i:nth-child(2) { animation-delay: -.3s; }
.music-toggle.is-on .music-bars i:nth-child(3) { animation-delay: -.6s; }
.music-toggle.is-on .music-bars i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

@media (max-width: 860px) {
  .nav {
    top: auto; bottom: calc(10px + var(--safe-b)); left: 10px; right: 10px; transform: none; justify-content: space-between;
    border-radius: 22px; padding: 6px;
  }
  .nav a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px 6px; font-size: .56rem; letter-spacing: .06em; border-radius: 16px; text-align: center; }
  .nav a svg { width: 19px; height: 19px; }
  .music-toggle { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; padding: 9px 12px; }
  .music-label { display: none; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { position: relative; padding: clamp(90px, 14vh, 150px) clamp(18px, 5vw, 60px); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 6vh, 64px); }
.section-head h2 { font-size: clamp(2.3rem, 6.5vw, 4rem); color: var(--ivory); }
.section-head .lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: #ead7adcc; margin: .8rem 0 1.4rem; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   1. THE TREE SCENE
   ========================================================================== */
.scene--tree {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center;
  padding: 84px 12px 40px; overflow: hidden;
}
.tree-header { text-align: center; position: relative; z-index: 3; }
.tree-header h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); color: var(--ivory); text-shadow: 0 2px 30px #000a; }
.tree-header h1 em { font-family: var(--fancy); font-style: normal; font-weight: 400; color: var(--gold-hi); font-size: 1.15em; padding: 0 .05em; text-shadow: 0 0 24px #f0c97a55; }
.countdown { margin: .5rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: #ead7adcc; }
.countdown::before, .countdown::after { content: '✦'; font-style: normal; font-size: .6em; color: var(--gold); margin: 0 .8em; vertical-align: middle; }

.tree-stage {
  position: relative; z-index: 2; margin-top: 6px;
  width: min(94vw, calc((100svh - 318px) * 0.769), 700px);
}
@supports not (height: 100svh) { .tree-stage { width: min(94vw, calc((100vh - 318px) * 0.769), 700px); } }
.tree-glow {
  position: absolute; left: 50%; top: 55%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, #ffcb7a30, #ffb15a14 45%, transparent 72%); pointer-events: none;
  animation: glow-breathe 7s ease-in-out infinite;
}
@keyframes glow-breathe { 50% { opacity: .75; transform: translate(-50%, -50%) scale(1.04); } }
.tree { position: relative; width: 100%; aspect-ratio: 1000 / 1300; }
.tree-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 30px 40px #0008); }
.tree-presents { cursor: pointer; }
.tree-presents:hover g { filter: brightness(1.15); }

/* fairy lights */
.tree-lights { position: absolute; inset: 0; pointer-events: none; }
.light {
  position: absolute; width: 2%; aspect-ratio: 1; margin: -1% 0 0 -1%; border-radius: 50%;
  background: radial-gradient(circle, #fffef8 0 12%, #ffe7b0 20%, #ffc66b66 38%, #ffb44a1f 56%, transparent 70%);
  animation: flicker var(--t, 3s) ease-in-out var(--d, 0s) infinite; will-change: opacity, transform;
}
.light--big { width: 3.2%; margin: -1.6% 0 0 -1.6%; }
.light--rose { background: radial-gradient(circle, #fffaf8 0 12%, #ffc4c4 20%, #ff7d8a55 38%, #ff7d8a1a 56%, transparent 70%); }
@keyframes flicker { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .55; transform: scale(.82); } 60% { opacity: .95; transform: scale(1.05); } }
.mini-light { animation: mini-flicker 2.4s ease-in-out infinite; }
@keyframes mini-flicker { 50% { opacity: .35; } }

/* star */
.tree-star {
  position: absolute; left: 50%; top: 10.6%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 4; border-radius: 50%;
}
.star-body { position: absolute; inset: 8%; display: block; filter: drop-shadow(0 0 10px #ffe1a0cc) drop-shadow(0 0 30px #ffc96a88); transition: transform .6s var(--ease); }
.star-body svg { width: 100%; height: 100%; display: block; }
.star-halo { position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(closest-side, #ffe3a466, #ffcf7d22 45%, transparent 70%); animation: glow-breathe 4s ease-in-out infinite; }
.star-rays {
  position: absolute; inset: -55%; border-radius: 50%; opacity: .55;
  background: repeating-conic-gradient(from 0deg, #fff3d000 0deg 7deg, #fff3d055 8deg 9deg, #fff3d000 10deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 70%); mask: radial-gradient(closest-side, #000 20%, transparent 70%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tree-star:hover .star-body { transform: scale(1.1) rotate(8deg); }
.tree-star.is-burst .star-body { animation: star-burst .9s var(--ease); }
@keyframes star-burst { 30% { transform: scale(1.35) rotate(-12deg); filter: drop-shadow(0 0 30px #fff) drop-shadow(0 0 60px #ffd27a); } }
.tree-star.is-blessed .star-halo { background: radial-gradient(closest-side, #fff1c8aa, #ffcf7d44 45%, transparent 70%); }
.tree-star.is-blessed .star-rays { opacity: .9; }

/* ground */
.ground {
  position: absolute; left: -10%; right: -10%; bottom: 0; height: 30vh; z-index: 1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 50% 30%, #ffd59a33, transparent 70%),
    radial-gradient(70% 110% at 18% 100%, #c9d6ea 0 40%, transparent 41%),
    radial-gradient(80% 120% at 85% 105%, #b9c8e0 0 40%, transparent 41%),
    linear-gradient(180deg, transparent 35%, #dfe7f3 36%, #c7d3e6 60%, #a8b9d4 100%);
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 40%); mask: linear-gradient(180deg, transparent 0, #000 40%);
  opacity: .9;
}
.ground::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, #0a153055 100%);
}
.tree-footer { position: relative; z-index: 3; text-align: center; margin-top: 8px; color: #1d2b4a; }
.hint { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: #172443; }
.progress { margin: 2px 0 0; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: #3a4b6e; }
.scroll-cue { position: relative; z-index: 3; display: block; margin: 14px auto 0; width: 26px; height: 40px; border: 1.5px solid #23345888; border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #233458; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(10px); opacity: .3; } }

.hidden-heart {
  position: absolute; z-index: 5; left: 2%; bottom: -3%; width: 26px; height: 26px; padding: 4px; color: #ffb3bf; opacity: .55;
  filter: drop-shadow(0 0 6px #ff8fa3); animation: heart-pulse 2.6s ease-in-out infinite; transition: opacity .3s, transform .3s;
}
.hidden-heart svg { width: 100%; height: 100%; fill: currentColor; }
.hidden-heart:hover, .hidden-heart:focus-visible { opacity: 1; transform: scale(1.2); }
.hidden-heart.is-found { color: var(--red-hi); opacity: .9; }
@keyframes heart-pulse { 50% { transform: scale(1.18); opacity: .8; } }

/* ==========================================================================
   PHOTO ORNAMENTS
   ========================================================================== */
.ornaments { position: absolute; inset: 0; z-index: 3; }
.orn {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); padding-top: var(--len);
  transform: translateX(-50%); transform-origin: 50% 0; display: block;
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; border-radius: 0;
  animation: sway var(--sway-t) ease-in-out var(--sway-d) infinite;
}
@keyframes sway { 0%, 100% { transform: translateX(-50%) rotate(calc(-1 * var(--sway-a))); } 50% { transform: translateX(-50%) rotate(var(--sway-a)); } }
.orn-hang { display: block; position: relative; }
/* string + knot: padding-top % resolves against the ornament width, so ratio = len / width */
.orn-string {
  position: absolute; left: 50%; top: 0; width: 8px; margin-left: -4px; height: 0; padding-top: calc(var(--ratio) * 100%);
  background:
    radial-gradient(circle at 50% 3px, #fff2c9 0 1.6px, #c9a463 2.4px, transparent 3.2px),
    linear-gradient(90deg, transparent 3.4px, #e9cf8f 3.4px, #b99353 4.6px, transparent 4.6px);
  filter: drop-shadow(0 0 3px #f8e1a877);
}
.orn-cap {
  position: absolute; left: 50%; top: -7%; width: 22%; aspect-ratio: 2.2; transform: translate(-50%, 0); z-index: 2; border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #7c5c27, #f6e1a8 45%, #e0bf75 55%, #7c5c27);
  box-shadow: 0 1px 2px #0007;
}
.orn-cap::before {
  content: ''; position: absolute; left: 50%; bottom: 80%; width: 46%; aspect-ratio: 1; transform: translateX(-50%);
  border: 1.5px solid #e9cd8b; border-bottom-color: transparent; border-radius: 50%;
}
.orn-charm {
  position: absolute; right: -9%; bottom: -6%; width: 26%; aspect-ratio: 1; z-index: 3; color: var(--red-hi);
  filter: drop-shadow(0 1px 2px #0008) drop-shadow(0 0 5px #ff8fa3aa); transform: scale(0); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1) .3s;
}
.orn-charm svg { width: 100%; height: 100%; fill: currentColor; stroke: #ffd3d9; stroke-width: 1.2; }
.orn.is-read .orn-charm { transform: scale(1); }

.orn:hover, .orn:focus-visible { animation-duration: calc(var(--sway-t) * .55); }
.orn:hover .orn-card, .orn:focus-visible .orn-card { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px -8px #000c, 0 0 24px #ffd88a77; }
.orn.is-away { visibility: hidden; }
.orn.is-away { animation: none; }

/* --- the 3D card (shared by tree + lifted ornament) --- */
.orn-card {
  position: relative; display: block; width: 100%; aspect-ratio: var(--ar);
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transition: transform 1s var(--ease-flip), box-shadow .5s;
  border-radius: var(--radius, 10%);
  box-shadow: 0 10px 22px -8px #000d, 0 0 14px #ffd88a33;
}
.orn-card.shape--rounded { --radius: 12% / calc(12% * var(--ar)); }
.orn-card.is-landscape.shape--rounded { --radius: calc(12% / var(--ar)) / 12%; }
.orn-card.shape--arch { --radius: 50% 50% 9% 9% / 34% 34% 6% 6%; }
.orn-card.shape--oval { --radius: 50%; }
.orn-face {
  position: absolute; inset: 0; display: block; border-radius: var(--radius);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  container-type: inline-size;
}
.orn-front {
  padding: 6.5%;
  background:
    linear-gradient(135deg, #fff5d6 0%, #d8b26a 18%, #8e6a2c 34%, #f2d993 52%, #a27b37 70%, #f8e7b9 86%, #9b7535 100%);
  box-shadow: inset 0 0 0 1px #fff7, inset 0 0 0 3px #00000022, inset 0 0 8px #0006;
}
.frame--champagne .orn-front { background: linear-gradient(135deg, #fffaf0 0%, #e7d3ad 20%, #a99068 38%, #f5e8cc 55%, #b49a6f 72%, #fbf2de 88%, #a68c62 100%); }
.frame--rose .orn-front { background: linear-gradient(135deg, #fff0ea 0%, #e4b9a5 20%, #9d6c5a 38%, #f3d2c3 55%, #a87563 72%, #fbe6dc 88%, #9a6656 100%); }
.orn-photo { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--radius) * 1); background: #1a2238; box-shadow: inset 0 0 0 1px #0006; }
.shape--rounded .orn-photo { border-radius: 9% / calc(9% * var(--ar)); }
.is-landscape.shape--rounded .orn-photo { border-radius: calc(9% / var(--ar)) / 9%; }
.orn-photo img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.orn-photo.is-broken img { opacity: 0; }
.orn-photo.is-broken::after { content: '♥'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-size: 2rem; }
.orn-shine {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, #ffffff40 45%, transparent 55%);
  background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: soft-light;
  animation: shine 7s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { background-position: 120% 0; } 100% { background-position: -60% 0; } }

.orn-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(120% 80% at 50% 0%, #fffaf0 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, #f3e4c522 0 30%, transparent 31%),
    linear-gradient(160deg, #fbf4e6, #f2e3c5);
  box-shadow: inset 0 0 0 2px #d6b979, inset 0 0 0 5px #fbf4e6, inset 0 0 0 6px #d6b97999, inset 0 0 30px #c9a86a44;
  color: var(--ink);
}
.note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 12% 11%; gap: 3.5cqw;
}
.is-landscape .note { padding: 7% 12%; gap: 2cqw; }
.shape--oval .note { padding: 18% 16%; }
.shape--arch .note { padding-top: 24%; }
.note-deco { display: flex; gap: 2.5cqw; align-items: center; color: #c19a52; }
.note-deco svg { width: 6cqw; height: 6cqw; fill: currentColor; }
.note-deco svg:nth-child(2) { width: 8cqw; height: 8cqw; color: var(--red); fill: var(--red); }
.is-landscape .note-deco svg { width: 3.6cqw; height: 3.6cqw; }
.is-landscape .note-deco svg:nth-child(2) { width: 4.8cqw; height: 4.8cqw; }
.note-title { font-family: var(--sans); text-transform: uppercase; letter-spacing: .24em; font-size: max(9px, 3.3cqw); color: #9c7737; font-weight: 500; }
.is-landscape .note-title { font-size: max(9px, 2.2cqw); }
.note-msg { font-family: var(--script); font-size: clamp(14px, 7.4cqw, 30px); line-height: 1.28; color: #3b2516; font-weight: 500; text-wrap: balance; }
.is-landscape .note-msg { font-size: clamp(14px, 4.7cqw, 30px); }
.note-sprig { width: 28cqw; color: #a8854a; }
.is-landscape .note-sprig { width: 16cqw; }
.note-sprig svg { width: 100%; display: block; }
.note-sprig .berry { fill: var(--red); }
.note-sprig .leaf { fill: #2c5a3f; }

.orn-card.is-flipped { transform: rotateY(180deg); }

/* --- lifted ornament overlay --- */
.lift { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 16px calc(24px + var(--safe-b)); }
.lift-backdrop {
  position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, #10204aee, #040814f5);
  opacity: 0; transition: opacity .8s var(--ease); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.lift.is-open .lift-backdrop { opacity: 1; }
.lift-stage { position: relative; display: grid; place-items: center; perspective: 1600px; }
.lifted { position: relative; transition: none; }
.lifted.is-moving { transition: transform 1.05s var(--ease); }
.lifted-cap {
  position: absolute; left: 50%; bottom: 100%; width: 16%; max-width: 54px; aspect-ratio: 2.2; transform: translate(-50%, 35%); z-index: 3;
  border-radius: 4px; background: linear-gradient(90deg, #7c5c27, #f6e1a8 45%, #e0bf75 55%, #7c5c27); box-shadow: 0 2px 4px #0008;
}
.lifted-cap::before { content: ''; position: absolute; left: 50%; bottom: 85%; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border: 2px solid #e9cd8b; border-bottom-color: transparent; border-radius: 50%; }
.lifted-turn { display: block; width: 100%; height: 100%; border-radius: 12px; }
.lifted .orn-card { height: 100%; aspect-ratio: auto; box-shadow: 0 40px 80px -20px #000, 0 0 60px #ffd88a44; }
.lifted .orn-card.is-flipped { box-shadow: 0 40px 80px -20px #000, 0 0 70px #fff1d055; }
.lifted .orn-front { padding: 4.5%; }
.lift-ui { position: relative; text-align: center; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease) .4s, transform .6s var(--ease) .4s; }
.lift.is-open .lift-ui { opacity: 1; transform: none; }
.lift-title { font-family: var(--serif); font-size: 1.5rem; font-style: italic; margin: 0; color: var(--ivory); }
.lift-hint { margin: 2px 0 14px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #ead7ad99; }

/* ==========================================================================
   2. MEMORIES
   ========================================================================== */
.memories { columns: 4 250px; column-gap: clamp(16px, 2.4vw, 30px); max-width: 1240px; margin: 0 auto; }
.polaroid {
  position: relative; display: block; width: 100%; margin: 0 0 clamp(22px, 3vw, 36px); break-inside: avoid;
  padding: 10px 10px 0; background: linear-gradient(160deg, #fbf6ec, #efe4cf); border-radius: 3px; color: var(--ink);
  transform: rotate(var(--tilt)); box-shadow: 0 18px 38px -16px #000c, 0 2px 6px #0005;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease), opacity 1.1s var(--ease);
}
.polaroid.reveal { transform: rotate(var(--tilt)) translateY(26px); }
.polaroid.reveal.is-visible { transform: rotate(var(--tilt)); }
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0) translateY(-6px) scale(1.02); box-shadow: 0 30px 50px -18px #000, 0 0 40px #ffd88a33; z-index: 2; }
.polaroid-clip {
  position: absolute; top: -12px; left: 50%; width: 16px; height: 34px; transform: translateX(-50%) rotate(calc(var(--tilt) * -2));
  border-radius: 3px; background: linear-gradient(90deg, #8a6a33, #f4e0aa 45%, #caa65f 60%, #7d5e2a); box-shadow: 0 3px 5px #0006; z-index: 2;
}
.polaroid-photo { display: block; overflow: hidden; background: #1a2238; }
.polaroid-photo img { width: 100%; height: auto; opacity: 0; transform: scale(1.04); transition: opacity 1s var(--ease), transform 6s var(--ease); }
.polaroid-photo img.is-loaded { opacity: 1; transform: scale(1); }
.polaroid:hover .polaroid-photo img { transform: scale(1.05); }
.polaroid-caption { display: block; padding: 10px 6px 14px; font-family: var(--script); font-size: 1.15rem; line-height: 1.25; text-align: center; color: #4a3424; }

/* viewer */
.lightbox { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .5s var(--ease); }
.lightbox.is-open { opacity: 1; }
.lightbox-backdrop { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, #0d1b3ef7, #02040afc); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb-frame { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lb-card-wrap { perspective: 2000px; transition: opacity .26s, transform .26s var(--ease); touch-action: pan-y; }
.lb-card-wrap.is-changing { opacity: 0; transform: scale(.97); }
.lb-card { display: block; position: relative; border-radius: 6px; }
.lb-inner { position: absolute; inset: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 1s var(--ease-flip); }
.lb-card.is-flipped .lb-inner { transform: rotateY(180deg); }
.lb-face { position: absolute; inset: 0; overflow: hidden; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; container-type: inline-size; }
.lb-front { background: #000; box-shadow: 0 0 0 1px #ead7ad33, 0 40px 90px -20px #000; }
.lb-front img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1.06) translate(0.6%, 0.6%); } to { transform: scale(1); } }
.lb-back {
  transform: rotateY(180deg); color: var(--ink);
  background: radial-gradient(120% 80% at 50% 0%, #fffaf0, transparent 60%), linear-gradient(160deg, #fbf4e6, #efdfbf);
  box-shadow: inset 0 0 0 2px #d6b979, inset 0 0 0 8px #fbf4e6, inset 0 0 0 9px #d6b97999, 0 40px 90px -20px #000;
}
.lb-back .note { padding: 9% 12%; gap: 2.5cqw; }
.lb-back .note-msg { font-size: clamp(18px, 7.2cqw, 40px); }
.lb-back .note-title { font-size: max(10px, 2.4cqw); }
.lb-back .note-deco svg { width: 4.5cqw; height: 4.5cqw; }
.lb-back .note-sprig { width: 22cqw; }
.lb-meta { text-align: center; max-width: 560px; }
.lb-count { margin: 0; font-size: .68rem; letter-spacing: .3em; color: #ead7ad99; }
.lb-title { margin: 2px 0 0; font-family: var(--serif); font-size: 1.5rem; font-style: italic; color: var(--ivory); }
.lb-caption { margin: 0 0 12px; font-family: var(--script); font-size: 1.15rem; color: #ead7adcc; }
.lb-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lb-nav, .lb-close {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  color: var(--champagne); background: #0a1530aa; border: 1px solid #ead7ad33; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lb-nav svg { width: 22px; height: 22px; }
.lb-nav:hover, .lb-close:hover { background: #ead7ad22; }
.lb-prev { left: max(14px, 3vw); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(14px, 3vw); top: 50%; transform: translateY(-50%); }
.lb-close { top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; font-size: 1.1rem; }
.lightbox.is-film .lb-front img { animation-duration: 5.6s; }
@media (max-width: 700px) {
  .lb-nav { top: auto; bottom: calc(18px + var(--safe-b)); transform: none; width: 44px; height: 44px; }
  .lb-frame { padding-bottom: 40px; }
}

/* ==========================================================================
   3. PRESENTS
   ========================================================================== */
.section--presents::before {
  content: ''; position: absolute; inset: 20% 0 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 70%, #ffcb7a18, transparent 70%);
}
.gifts {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 80px 24px; max-width: 900px; margin: 0 auto; align-items: end;
  padding-top: 30px;
}
.gift {
  position: relative; justify-self: center; width: var(--gw); height: calc(var(--gh) + 70px); display: block; padding-top: 70px;
  --paper: #0f1f3d; --paper-2: #1a2f5a; --pattern: none;
  transform: scale(var(--gs, 1)); transform-origin: 50% 100%;
}
.paper--midnight { --paper: #0f1f3d; --paper-2: #1c3163; --pattern: radial-gradient(circle at 25% 25%, #e8c87a55 0 1.2px, transparent 1.6px) 0 0 / 14px 14px; }
.paper--ivory { --paper: #efe4cf; --paper-2: #fbf6ec; --pattern: repeating-linear-gradient(45deg, #c9a86a22 0 2px, transparent 2px 12px); }
.paper--forest { --paper: #0f3324; --paper-2: #1d4f39; --pattern: radial-gradient(circle at 50% 50%, #e6cf9f40 0 1.4px, transparent 1.8px) 0 0 / 18px 18px; }
.paper--crimson { --paper: #6e0f1d; --paper-2: #a3192d; --pattern: repeating-linear-gradient(-45deg, #ffffff12 0 3px, transparent 3px 10px); }
.paper--champagne { --paper: #c7a868; --paper-2: #f0dcaa; --pattern: radial-gradient(circle at 30% 30%, #fff8 0 1px, transparent 1.4px) 0 0 / 10px 10px; }
.paper--stripe { --paper: #efe4cf; --paper-2: #fbf6ec; --pattern: repeating-linear-gradient(90deg, #9e1b2c 0 6px, transparent 6px 22px); }
.gift-floor { position: absolute; left: -12%; right: -12%; bottom: -10px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, #000a, transparent); }
.gift-body {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--gh); border-radius: 4px; z-index: 2; overflow: hidden;
  background: var(--pattern), linear-gradient(100deg, var(--paper-2), var(--paper) 55%, color-mix(in srgb, var(--paper) 70%, #000));
  box-shadow: inset 0 -12px 20px -10px #0007, inset 0 1px 0 #fff3, 0 20px 30px -14px #000c;
}
.gift-lid {
  position: absolute; left: -6%; right: -6%; bottom: calc(var(--gh) - 6px); height: 26px; border-radius: 4px; z-index: 4;
  background: var(--pattern), linear-gradient(100deg, var(--paper-2), var(--paper) 60%, color-mix(in srgb, var(--paper) 70%, #000));
  box-shadow: 0 6px 10px -4px #0009, inset 0 1px 0 #fff4;
  transition: transform 1s cubic-bezier(.3, 1.4, .5, 1), opacity .6s .5s;
  transform-origin: 20% 100%;
}
.rib { position: absolute; background: linear-gradient(90deg, color-mix(in srgb, var(--rib) 60%, #000), var(--rib) 35%, color-mix(in srgb, var(--rib) 75%, #fff) 50%, var(--rib) 65%, color-mix(in srgb, var(--rib) 60%, #000)); }
.rib-v { left: 50%; top: 0; bottom: 0; width: 16%; max-width: 24px; transform: translateX(-50%); }
.rib-h { left: 0; right: 0; top: 46%; height: 16%; max-height: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--rib) 60%, #000), var(--rib) 35%, color-mix(in srgb, var(--rib) 75%, #fff) 50%, var(--rib) 65%, color-mix(in srgb, var(--rib) 60%, #000)); }
.gift-bow { position: absolute; left: 50%; bottom: 60%; width: 88px; transform: translateX(-50%); color: var(--rib); filter: drop-shadow(0 4px 4px #0007); }
.gift-bow svg { display: block; width: 100%; }
.gift-tag {
  position: absolute; z-index: 5; right: -14px; bottom: calc(var(--gh) * .3); transform: rotate(8deg); transform-origin: 0 0;
  background: var(--ivory); color: var(--ink); font-family: var(--script); font-size: 1rem; line-height: 1; padding: 6px 10px 6px 14px;
  border-radius: 3px 8px 8px 3px; box-shadow: 0 4px 10px -3px #0009; white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.gift-tag::before { content: ''; position: absolute; left: 6px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #0005; }
.gift-glow {
  position: absolute; left: 50%; bottom: calc(var(--gh) - 10px); width: 220%; aspect-ratio: 1; transform: translate(-50%, 50%) scale(.2); z-index: 1;
  background: radial-gradient(closest-side, #fff2cbcc, #ffcf7d55 40%, transparent 70%); opacity: 0; transition: opacity .8s .2s, transform 1.2s var(--ease) .2s; pointer-events: none;
}
.gift-note {
  position: absolute; left: 50%; bottom: 10px; width: 62%; aspect-ratio: 1.3; transform: translate(-50%, 0); z-index: 1;
  background: linear-gradient(160deg, #fffaf0, #efe0c2); border-radius: 3px; box-shadow: 0 6px 16px -6px #0009; display: grid; place-items: center;
  color: var(--red); transition: transform 1s var(--ease) .35s;
}
.gift-note svg { width: 30%; fill: currentColor; }
.gift-sparkles { position: absolute; left: 50%; bottom: var(--gh); z-index: 6; pointer-events: none; }
.gift-sparkles i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff3c9; box-shadow: 0 0 8px 2px #ffd88a; opacity: 0;
}
.gift:hover .gift-lid { transform: translateY(-5px) rotate(-1.5deg); }
.gift:hover .gift-body { filter: brightness(1.08); }
.gift:not(.is-open):hover { animation: wiggle .6s ease-in-out; }
@keyframes wiggle { 25% { transform: scale(var(--gs, 1)) rotate(-2deg); } 75% { transform: scale(var(--gs, 1)) rotate(2deg); } }
.gift.is-open .gift-lid { transform: translate(-30%, -120%) rotate(-24deg); opacity: 0; }
.gift.is-open .gift-glow { opacity: 1; transform: translate(-50%, 50%) scale(1); }
.gift.is-open .gift-note { transform: translate(-50%, calc(-1 * var(--gh) * .78)) rotate(-3deg); }
.gift.is-open .gift-sparkles i { animation: sparkle 1.1s var(--ease) var(--delay) forwards; }
@keyframes sparkle {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--dist))) scale(1); }
}
.gifts-progress { text-align: center; margin: 60px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #ead7adbb; }
@media (max-width: 760px) {
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 6px; padding-top: 0; }
  .gift { --gs: .8; }
}
@media (max-width: 380px) { .gift { --gs: .7; } }

/* ==========================================================================
   4. LETTER
   ========================================================================== */
.letter-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.envelope {
  position: relative; width: min(560px, 90vw); aspect-ratio: 1.55; display: block; margin-top: 60px;
  transition: transform .9s var(--ease), opacity .9s var(--ease); filter: drop-shadow(0 30px 40px #000b);
}
.envelope:hover:not(.is-opening) { transform: translateY(-4px) rotate(-.6deg); }
.env-back { position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(170deg, #d9c6a2, #c3ab80); z-index: 0; }
.env-paper {
  position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; z-index: 1; border-radius: 3px;
  background: linear-gradient(170deg, #fffaf0, #f3e7cf); box-shadow: 0 -2px 10px #0003;
  transition: transform 1.1s var(--ease); padding: 7% 8%; text-align: left;
}
.env-paper-text { display: block; font-family: var(--script); font-size: clamp(1rem, 3.6vw, 1.5rem); color: var(--ink); }
.env-paper-lines { display: block; margin-top: 4%; height: 50%; background: repeating-linear-gradient(180deg, transparent 0 14px, #c9a86a44 14px 15px); }
.env-front {
  position: absolute; inset: 0; z-index: 2; border-radius: 6px;
  background:
    linear-gradient(to top right, #e8d8b7 49.6%, transparent 50%) left bottom / 51% 100% no-repeat,
    linear-gradient(to top left, #e3d1ad 49.6%, transparent 50%) right bottom / 51% 100% no-repeat,
    linear-gradient(to top, #efe2c6 0%, #e6d4b0 100%) bottom / 100% 54% no-repeat;
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
}
.env-front::after { content: ''; position: absolute; inset: 0; clip-path: inherit; background: repeating-linear-gradient(35deg, #ffffff08 0 2px, transparent 2px 5px); }
.env-to { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; font-family: var(--fancy); font-size: clamp(1.6rem, 6vw, 2.4rem); color: #5a3e26; }
.env-to small { font-family: var(--serif); font-style: italic; font-size: .5em; color: #7a5b3c; }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 56%; z-index: 3; transform-origin: 50% 0;
  background: linear-gradient(180deg, #e2cfa9, #d4bd93);
  clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 6px 6px 0 0;
  transition: transform .8s var(--ease-flip); filter: drop-shadow(0 4px 6px #0004);
}
.env-seal { position: absolute; left: 50%; top: 56%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 4; transition: transform .6s var(--ease), opacity .5s; }
.seal-wax {
  position: absolute; inset: 0; border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 35% 30%, #d9475c, #9e1b2c 45%, #5d0c18 100%);
  box-shadow: 0 4px 10px #0008, inset 0 0 0 5px #8a1526, inset 0 0 0 6px #c23a4f88, inset 0 -6px 10px #0005;
}
.seal-wax::before { content: ''; position: absolute; inset: -6%; border-radius: 52% 48% 45% 55% / 50% 55% 45% 50%; background: inherit; z-index: -1; filter: brightness(.9); }
.seal-mark { position: absolute; inset: 30%; color: #f1b9c0; opacity: .9; filter: drop-shadow(0 1px 0 #5d0c18); }
.seal-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.envelope:hover .env-seal { transform: translate(-50%, -50%) scale(1.06); }
.letter-cue { margin: 26px 0 0; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: #ead7ad99; transition: opacity .4s; }
.letter-cue.is-hidden { opacity: 0; }

.envelope.is-opening .env-seal { transform: translate(-50%, -20%) scale(.7) rotate(18deg); opacity: 0; }
.envelope.flap-open .env-flap { transform: rotateX(180deg); }
.envelope.flap-behind .env-flap { z-index: 0; }
.envelope.paper-out .env-paper { transform: translateY(-58%); }
.letter-stage.is-reading .envelope { transform: translateY(40px) scale(.9); opacity: 0; pointer-events: none; position: absolute; }
.letter-stage.is-reading .letter-cue { display: none; }

.letter { width: min(720px, 100%); scroll-margin-top: 90px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.letter-paper {
  position: relative; width: 100%; padding: clamp(36px, 7vw, 72px) clamp(26px, 7vw, 80px) clamp(44px, 7vw, 70px);
  color: var(--ink); border-radius: 4px; outline: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 50% 0%, #fffcf4 0%, transparent 60%),
    radial-gradient(140% 100% at 50% 110%, #e7d3ad 0%, transparent 55%),
    linear-gradient(170deg, #fbf5e8, #f1e4c9);
  box-shadow: 0 40px 80px -30px #000, 0 0 0 1px #d6b97955, inset 0 0 80px #c9a86a33;
  transform-origin: 50% 0; opacity: 0; transform: perspective(1400px) rotateX(-22deg) translateY(-20px) scaleY(.85);
  transition: opacity 1s var(--ease), transform 1.3s var(--ease);
}
.letter.is-open .letter-paper { opacity: 1; transform: none; }
.letter-corner { position: absolute; top: 18px; right: 22px; width: 90px; color: #a8854a; transform: rotate(8deg); }
.letter-corner .berry { fill: var(--red); }
.letter-corner .leaf { fill: #2c5a3f; }
.letter-date { margin: 0 0 1.6em; font-family: var(--serif); font-style: italic; color: #8a6a44; }
.letter-greeting { font-family: var(--fancy); font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 .5em; color: #4a2f1c; line-height: 1.2; }
.letter-p { font-family: var(--script); font-size: clamp(1.25rem, 3.4vw, 1.55rem); line-height: 1.55; margin: 0 0 .9em; color: #3b2516; }
.letter-closing { font-family: var(--script); font-size: clamp(1.35rem, 3.6vw, 1.7rem); margin: 1.2em 0 .2em; color: var(--red); font-weight: 600; }
.letter-signoff { font-family: var(--script); font-size: clamp(1.2rem, 3.2vw, 1.45rem); margin: 1.2em 0 0; }
.letter-signature { font-family: var(--fancy); font-size: clamp(2rem, 6vw, 2.8rem); margin: 0; color: #4a2f1c; line-height: 1.3; }
.letter-ps { margin: 1.6em 0 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: #7a5b3c; }
.letter-heart { position: absolute; bottom: 22px; right: 28px; width: 26px; color: var(--red); }
.letter-heart svg { width: 100%; fill: currentColor; }

/* ==========================================================================
   5. LITTLE THINGS + SNOW GLOBE
   ========================================================================== */
.things {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1060px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px);
}
.thing {
  position: relative; overflow: hidden; padding: 28px 26px 30px; border-radius: 18px; min-height: 170px;
  background: linear-gradient(160deg, #13234acc, #0b1632cc); border: 1px solid #ead7ad22;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .6s var(--ease), border-color .6s, background .6s, opacity 1.1s var(--ease);
}
.thing:hover { transform: translateY(-4px); border-color: #ead7ad66; background: linear-gradient(160deg, #1a2d5acc, #0f1d40cc); }
.thing-no { font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--gold); }
.thing-text { margin: .5em 0 0; font-family: var(--script); font-size: 1.45rem; line-height: 1.35; color: var(--ivory); }
.thing-glint { position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, #ffd88a22, transparent); transition: transform .8s var(--ease); }
.thing:hover .thing-glint { transform: scale(1.6); }
@media (max-width: 900px) { .things { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .things { grid-template-columns: 1fr; } .thing { min-height: 0; padding: 22px 22px 24px; } }

.globe-wrap { margin: clamp(90px, 14vh, 140px) auto 0; text-align: center; max-width: 520px; }
.globe-copy h3 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); color: var(--ivory); font-style: italic; }
.globe-copy p { margin: .3em 0 30px; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: #ead7ad99; }
.globe { display: flex; justify-content: center; }
.globe-btn { position: relative; width: min(340px, 78vw); display: block; touch-action: none; }
.globe-btn.is-shaking { animation: shake .7s var(--ease); }
@keyframes shake { 15% { transform: rotate(-7deg) translateX(-6px); } 35% { transform: rotate(6deg) translateX(6px); } 55% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } }
.globe-glass {
  position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; z-index: 2;
  background: radial-gradient(circle at 50% 40%, #1b2f62, #0b1532 70%);
  box-shadow: inset 0 0 0 2px #ffffff30, inset 0 -20px 40px #0008, inset 0 10px 40px #9fc2ff22, 0 0 60px #ffd88a22;
}
.globe-scene { position: absolute; left: 22%; right: 22%; bottom: 13%; display: block; }
.globe-scene svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 16px #ffcf7d55); }
.globe-mound { position: absolute; left: -5%; right: -5%; bottom: -14%; height: 32%; border-radius: 50%; background: radial-gradient(60% 80% at 50% 0%, #f5f8fd, #c3d0e6 60%, #93a6c6); }
.globe-snow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.globe-shine {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(40% 30% at 30% 22%, #ffffff55, transparent 70%), radial-gradient(70% 70% at 70% 80%, transparent 60%, #ffffff18 70%, transparent 75%);
}
.globe-base {
  position: relative; display: grid; place-items: center; width: 74%; height: 64px; margin: -26px auto 0; z-index: 1;
  border-radius: 10px 10px 26px 26px / 10px 10px 40px 40px;
  background: linear-gradient(180deg, #e9cd8b, #9c7737 40%, #5b421c 100%);
  box-shadow: 0 20px 30px -10px #000c, inset 0 2px 0 #fff6;
}
.globe-base span { margin-top: 18px; font-family: var(--fancy); font-size: 1.25rem; color: #2a1c0b; text-shadow: 0 1px 0 #f6e3b155; }
.globe-message { min-height: 4.5em; margin: 26px auto 0; max-width: 420px; font-family: var(--script); font-size: 1.4rem; line-height: 1.4; color: var(--champagne); opacity: 0; transform: translateY(8px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.globe-message.is-shown { opacity: 1; transform: none; }

/* ==========================================================================
   6. WISH
   ========================================================================== */
.section--wish { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; padding-bottom: 140px; }
.wish-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wish-star { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 230px; width: min(320px, 90vw); color: var(--gold-hi); z-index: 2; transition: transform .8s var(--ease), opacity 1.2s var(--ease); }
.wish-star svg { width: 96px; height: 96px; fill: var(--gold-hi); filter: drop-shadow(0 0 16px #ffe1a0) drop-shadow(0 0 50px #ffc96a88); animation: glow-breathe-star 3s ease-in-out infinite; }
@keyframes glow-breathe-star { 50% { filter: drop-shadow(0 0 24px #fff1c8) drop-shadow(0 0 70px #ffc96acc); transform: scale(1.06); } }
.wish-star span { font-size: .76rem; letter-spacing: .28em; text-transform: uppercase; color: var(--champagne); }
.wish-star:hover svg { transform: scale(1.1) rotate(10deg); }
.wish-star.is-wished { pointer-events: none; }
.wish-star.is-wished svg, .wish-star.is-wished span { opacity: 0; transform: scale(.4); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.shooting-star { position: absolute; top: 18%; left: -10%; width: 160px; height: 2px; border-radius: 2px; opacity: 0; background: linear-gradient(90deg, transparent, #fff8e0); transform: rotate(-18deg); }
.shooting-star::after { content: ''; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 4px #ffe8b0; }
.shooting-star.is-flying { animation: shoot 1.6s ease-in forwards; }
@keyframes shoot { 0% { opacity: 0; transform: translate(0, 0) rotate(-18deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(120vw, 30vh) rotate(-18deg); } }
.wish-text { position: relative; z-index: 2; max-width: 640px; margin-top: 10px; }
.wish-line { margin: 0 0 .5em; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 3.6vw, 1.75rem); color: var(--ivory); opacity: 0; filter: blur(6px); transform: translateY(8px); transition: all 1.4s var(--ease); }
.wish-line:first-child { font-family: var(--sans); font-style: normal; font-size: .78rem; letter-spacing: .3em; text-transform: uppercase; color: var(--champagne); margin-bottom: 1.4em; }
.wish-final { margin: 1em 0 0; font-family: var(--fancy); font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1.2; color: var(--gold-hi); text-shadow: 0 0 30px #f6d79466; opacity: 0; filter: blur(8px); transition: all 2s var(--ease); }
.wish-line.is-shown, .wish-final.is-shown { opacity: 1; filter: none; transform: none; }
.wish-back { position: relative; z-index: 2; margin-top: 40px; opacity: 0; transition: opacity 1s; }
.wish-back.is-shown { opacity: 1; }

.footer { position: relative; z-index: 2; text-align: center; padding: 30px 20px calc(110px + var(--safe-b)); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: #ead7ad66; }
@media (min-width: 861px) { .footer { padding-bottom: 40px; } }

/* ==========================================================================
   MODAL (ivory note)
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: #030712cc; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .45s; }
.modal-card {
  position: relative; width: min(440px, 100%); padding: 44px 36px 32px; text-align: center; color: var(--ink); border-radius: 6px;
  opacity: 0; transform: translateY(30px) rotate(-1.5deg) scale(.94); transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.note-paper {
  background: radial-gradient(120% 80% at 50% 0%, #fffcf4, transparent 60%), linear-gradient(165deg, #fbf5e8, #efe0c2);
  box-shadow: 0 40px 80px -20px #000, inset 0 0 0 2px #d6b979, inset 0 0 0 8px #fbf5e8, inset 0 0 0 9px #d6b97999;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { opacity: 1; transform: none; }
.modal-kicker { margin: 0; font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: #9c7737; font-weight: 500; }
.modal-title { margin: .3em 0 .5em; font-family: var(--fancy); font-weight: 400; font-size: 2.3rem; color: #4a2f1c; line-height: 1.2; }
.modal-body p { margin: 0 0 .5em; font-family: var(--script); font-size: 1.45rem; line-height: 1.4; color: #3b2516; }
.note-flourish { color: #b39058; margin: 14px auto 20px; width: 160px; }
.note-flourish svg { width: 100%; display: block; }
.note-flourish path:last-child { fill: var(--red); }

.noscript { position: fixed; inset: auto 0 0; z-index: 99; padding: 16px; text-align: center; background: var(--ivory); color: var(--ink); }

/* ==========================================================================
   RESPONSIVE: phones
   ========================================================================== */
@media (max-width: 640px) {
  .scene--tree { padding: 50px 4px 112px; }
  .tree-stage { order: 2; width: clamp(300px, calc((100svh - 372px) * 0.769), 100vw); }
  .tree-footer { order: 1; margin: 6px 0 0; }
  .scroll-cue { order: 3; }
  .hint { font-size: .98rem; color: #ead7add9; }
  .progress { color: #ead7ad8c; font-size: .62rem; }
  .tree-header h1 { font-size: clamp(2rem, 9.4vw, 2.6rem); }
  .kicker { font-size: .62rem; letter-spacing: .26em; margin-bottom: .5rem; }
  .countdown { font-size: .98rem; margin-top: .25rem; }
  .orn { width: calc(var(--w) * 1.22); }
  .sky-moon { width: 40px; height: 40px; top: 18px; right: auto; left: 18px; }
  .section { padding-left: 16px; padding-right: 16px; }
  .memories { columns: 2; column-gap: 14px; }
  .polaroid { padding: 6px 6px 0; }
  .polaroid-caption { font-size: .98rem; padding: 8px 4px 10px; }
  .modal-card { padding: 38px 24px 26px; }
  .modal-body p { font-size: 1.3rem; }
  .lift { gap: 14px; }
  .lift-title { font-size: 1.25rem; }
  .letter-p { font-size: 1.22rem; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .tree-stage { width: min(60vh, 94vw); }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; transition-delay: 0s !important; }
  .orn, .light, .star-rays, .orn-shine, .lb-front img { animation: none !important; }
  .orn-card, .lb-inner { transition: none !important; }
  .lifted.is-moving { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* mini trees (intro + snow globe) need an intrinsic box for the absolutely-positioned svg */
.intro-tree, .globe-scene { aspect-ratio: 1000 / 1300; }

/* Bottom-nav screens (tablets + phones): hint sits under the title so it is never hidden by the nav */
@media (max-width: 860px) {
  .scene--tree { padding-bottom: 112px; }
  .tree-header { order: 0; }
  .tree-footer { order: 1; margin: 8px 0 0; }
  .tree-stage { order: 2; }
  .scroll-cue { order: 3; }
  .hint { color: #ead7add9; }
  .progress { color: #ead7ad8c; }
}
