@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --bg: #171f1c;
  --bg-soft: #202a25;
  --cream: #f2e9d9;
  --muted: #c4b9a7;
  --gold: #d4b982;
  --line: rgba(232, 216, 185, .18);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font-family: var(--sans); line-height: 1.7; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 15% 15%, rgba(153,117,70,.13), transparent 36%),
              radial-gradient(ellipse at 85% 60%, rgba(89,119,101,.10), transparent 38%);
}
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: .28;
  background-image: radial-gradient(rgba(255,245,220,.5) .7px, transparent .8px);
  background-size: 39px 39px; mask-image: linear-gradient(to bottom, black, transparent 75%);
}
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.flake { position: absolute; top: -12px; width: 3px; height: 3px; border-radius: 50%;
  background: #fff5e5; opacity: .55; animation: fall linear infinite; }
@keyframes fall { to { transform: translate3d(35px, 110vh, 0); } }

.hero {
  min-height: 100svh; position: relative; display: grid; place-items: center;
  padding: 90px 24px 70px; text-align: center; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13,22,19,.35), rgba(16,25,21,.70) 70%, var(--bg)),
    linear-gradient(90deg, rgba(19,29,24,.28), rgba(19,29,24,.08)),
    url('../assets/backgrounds/winter-hero.jpg') center/cover no-repeat,
    radial-gradient(ellipse at 50% 35%, #665a42, #26332b 58%, #17211d);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(245,218,166,.07) 50%, transparent 78%);
}
.hero__glow { position: absolute; width: min(75vw, 700px); aspect-ratio: 1;
  border-radius: 50%; background: rgba(214,169,103,.11); filter: blur(80px); }
.hero__content { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { color: var(--gold); letter-spacing: .22em; font-size: .68rem; font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(3.2rem, 8vw, 6.8rem); margin: 22px 0; }
h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); margin: 12px 0 20px; }
h1 em, h2 em { color: #dfc89d; font-weight: 400; }
.hero__subtitle, .lead { color: var(--muted); max-width: 590px; font-size: 1.05rem; }
.hero__subtitle { margin: 0 auto; }
.scroll-cue { display: inline-flex; flex-direction: column; gap: 7px; margin-top: 70px; color: var(--cream); text-decoration: none; font-size: .78rem; letter-spacing: .1em; }
.scroll-cue__arrow { color: var(--gold); font-size: 1.6rem; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(7px); } }
.hero__bottom-note { position: absolute; bottom: 25px; color: rgba(242,233,217,.48); font-size: .58rem; letter-spacing: .25em; }

.section-wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.intro { text-align: center; padding: 145px 0 105px; display: flex; flex-direction: column; align-items: center; }
.intro .lead { margin: 0 auto; }
.memory { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(35px, 8vw, 110px); align-items: center; padding: 65px 0 125px; }
.memory--reverse { grid-template-columns: 1.15fr .85fr; }
.memory--reverse .memory__copy { order: 2; }
.memory--reverse .photo-frame { order: 1; }
.memory__copy p:not(.eyebrow) { color: var(--muted); max-width: 430px; }
.memory__date { display: inline-block; margin-top: 20px; color: var(--gold); font-size: .7rem; letter-spacing: .13em; }
.photo-frame { margin: 0; }
.photo-frame figcaption { margin-top: 12px; color: rgba(242,233,217,.55); font-size: .75rem; }
.photo-placeholder {
  min-height: 360px; border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(145deg, rgba(207,174,121,.12), rgba(61,81,66,.25)),
              repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.018) 18px 19px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; padding: 25px; color: var(--cream);
}
.photo-placeholder__icon { color: var(--gold); font-size: 2rem; }
.photo-placeholder small { color: var(--muted); font-size: .7rem; }

.gift-section, .letter-section, .wish-section { text-align: center; padding: 115px 0; border-top: 1px solid var(--line); }
.gift-section .lead, .letter-section .lead, .wish-section .lead { margin: 0 auto 30px; }
.gift-box {
  position: relative; width: 160px; height: 130px; margin: 28px auto 18px; border: 0; cursor: pointer;
  background: #854a3d; border-radius: 4px; box-shadow: 0 18px 45px rgba(0,0,0,.25);
  transition: transform .3s ease;
}
.gift-box:hover { transform: translateY(-5px); }
.gift-box::before { content: ""; position: absolute; left: 68px; top: 0; width: 24px; height: 100%; background: #d7bb83; }
.gift-box__lid { position: absolute; left: -8px; top: -17px; width: 176px; height: 25px; border-radius: 4px; background: #9a5b49; transition: transform .5s; }
.gift-box__ribbon { position: absolute; left: 61px; top: -30px; width: 38px; height: 25px; border: 6px solid #d7bb83; border-radius: 50% 50% 0 50%; transform: rotate(-22deg); }
.gift-box__bow { position: absolute; top: -45px; left: 68px; color: #e4c990; font-size: 2.7rem; }
.gift-box__label { position: absolute; left: 0; right: 0; bottom: -43px; color: var(--cream); font: 500 .78rem var(--sans); }
.gift-box.is-open .gift-box__lid { transform: translateY(-28px) rotate(-9deg); }
.gift-result { max-width: 430px; margin: 62px auto 0; color: var(--gold); opacity: 0; transform: translateY(10px); transition: .5s; }
.gift-result.is-visible { opacity: 1; transform: translateY(0); }

.envelope { display: inline-flex; align-items: center; gap: 14px; padding: 18px 28px; color: var(--cream);
  background: rgba(212,185,130,.08); border: 1px solid var(--line); border-radius: 2px; cursor: pointer; font: 500 .9rem var(--sans); }
.envelope__seal { color: var(--gold); font-size: 1.3rem; }
.letter { max-width: 650px; margin: 35px auto 0; padding: clamp(25px, 5vw, 50px); text-align: left;
  background: #eee4d2; color: #40372c; font-family: var(--serif); font-size: 1.1rem; line-height: 1.9;
  box-shadow: 0 18px 55px rgba(0,0,0,.2); }
.letter[hidden] { display: none; }

.wish-form { max-width: 550px; margin: 35px auto 0; display: grid; gap: 15px; }
.wish-form textarea { width: 100%; resize: vertical; padding: 18px; color: var(--cream); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 3px; font: 400 .95rem var(--sans); outline: none; }
.wish-form textarea:focus { border-color: var(--gold); }
.button { justify-self: center; padding: 13px 25px; color: #20251f; background: var(--gold); border: 0; border-radius: 2px; cursor: pointer; font: 600 .8rem var(--sans); }
.wish-result { min-height: 28px; color: var(--gold); }
.footer { text-align: center; padding: 70px 20px 85px; border-top: 1px solid var(--line); color: var(--muted); }
.footer__star { color: var(--gold); font-size: 1.7rem; }
.footer p { font-family: var(--serif); font-size: 1.5rem; color: var(--cream); }
.footer small { font-size: .72rem; letter-spacing: .1em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) {
  .hero { min-height: 92svh; }
  .section-wrap { width: min(100% - 36px, 560px); }
  .intro { padding: 100px 0 65px; }
  .memory, .memory--reverse { grid-template-columns: 1fr; gap: 25px; padding: 45px 0 75px; }
  .memory--reverse .memory__copy, .memory--reverse .photo-frame { order: initial; }
  .photo-placeholder { min-height: 280px; }
  .gift-section, .letter-section, .wish-section { padding: 85px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
