/* Dee & Steve: the page after the envelope, in Dee's wine-and-gold look (deck v3): velvet wine ground, crimson and
   blush roses with gilded leaves, glossy foil gold, her double arch, gold-framed panels, script names. */
:root {
  --wine: #4E0810; --velvet: #270306; --glow: #8E1018; --rose: #B3121E; --blush: #F2C4B5;
  --cream: #F6EAD7; --soft: #E9CFC0; --gold: #E8A629; --gold-2: #D9A441; --gold-lt: #FFE6A0;
  --foil: linear-gradient(100deg, #8D5E34 0%, #C98A2E 18%, #E8A629 34%, #FFE6A0 50%, #E8A629 64%, #B07A2E 82%, #8D5E34 100%);
  /* brighter gold for lettering, so names stay glossy from end to end (matches the printed cards) */
  --gloss: linear-gradient(104deg, #D6A045 0%, #F5D27A 18%, #FFF4C8 34%, #F7D27C 50%, #D6A045 66%, #F6D685 82%, #FFF1BE 100%);
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
  --capsf: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  /* type scale: labels in capitals, small and body text in Cormorant */
  --t-label: 13px; --t-small: 17px; --t-body: clamp(19px, 1.4vw, 22px); --track: .18em;
  --pad: clamp(18px, 5vw, 72px);
  --nav-h: 64px;
  --bg: #2A0408; --fg: var(--cream); --accent: var(--gold); --muted: rgba(233, 207, 192, .7); --line: rgba(232, 166, 41, .35);
}
* { box-sizing: border-box; }
html { background: var(--velvet); color: var(--cream); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--velvet); color: var(--cream); font-family: var(--serif); font-size: var(--t-body); font-weight: 500; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-variant-numeric: lining-nums;
}
/* the velvet sits on its own fixed layer: background-attachment: fixed judders on phones */
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url(images/velvet.webp) center / 1400px auto, radial-gradient(ellipse 90% 70% at 50% 30%, #6E0C16 0%, #44070F 45%, #1C0206 100%);
  background-blend-mode: soft-light, normal; }
h1, h2, h3, .script, .send { text-wrap: balance; }
p, dd { text-wrap: pretty; }
body.locked { overflow: hidden; height: 100svh; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--velvet); }
main { position: relative; z-index: 1; overflow: hidden; }

/* ---------- type ---------- */
.caps { font-family: var(--capsf); text-transform: uppercase; letter-spacing: var(--track); font-size: var(--t-label); font-weight: 500; color: #EBCF96; }
.script { font-family: var(--script); font-weight: 400; line-height: 1.1; }
.foil { background: var(--gloss); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(40, 0, 6, .5)) drop-shadow(0 0 12px rgba(232, 166, 41, .22)); padding: .14em .3em; margin: -.14em -.3em; }
.kicker { margin: 0 0 4px; }
.sec-head { text-align: center; margin: 0 auto clamp(30px, 6vh, 60px); }
.sec-head h2 { font-size: clamp(52px, 7vw, 92px); margin: 0; display: inline-block; line-height: 1.05; }
.sec-head .flourish { margin-top: 4px; }
.sec-head .sub { margin: 6px 0 0; color: var(--soft); font-style: italic; font-size: var(--t-body); }

/* ---------- ornament ---------- */
.flourish { display: block; width: min(260px, 70vw); height: 28px; margin: 10px auto 0; filter: drop-shadow(0 0 4px rgba(232, 166, 41, .45)); }
.dust { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.dust i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; opacity: var(--o);
  background: radial-gradient(circle, #FFF1C8 0%, rgba(232, 166, 41, .6) 45%, rgba(232, 166, 41, 0) 72%); animation: float var(--d) ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(0, 0) } 33% { transform: translate(6px, -14px) } 66% { transform: translate(-5px, -26px) } }
.shimmer .foil { background-size: 220% 100%; animation: sheen 7s ease-in-out infinite; }
@keyframes sheen { 0%, 100% { background-position: 0% 0 } 50% { background-position: 100% 0 } }

/* ---------- gold frames ---------- */
.panel { position: relative; background: radial-gradient(ellipse 120% 90% at 30% 0%, #5E0B15 0%, #3A060D 55%, #26030A 100%) padding-box, var(--foil) border-box;
  border: 2px solid transparent; box-shadow: 0 24px 60px rgba(10, 0, 2, .55); }
.panel::after { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(232, 166, 41, .55); pointer-events: none; }
.roses { position: absolute; pointer-events: none; filter: drop-shadow(0 14px 20px rgba(20, 0, 4, .6)); z-index: 3; }
.roses-br { transform: rotate(180deg); }
.star { position: absolute; width: 26px; height: 26px; fill: #FFE9B0; filter: drop-shadow(0 0 6px rgba(255, 214, 140, .8)); animation: twinkle 4s ease-in-out infinite; pointer-events: none; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8) } 50% { opacity: 1; transform: scale(1) } }

/* ---------- reveals ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.1,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); background: linear-gradient(rgba(28, 2, 6, .92), rgba(28, 2, 6, .72)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232, 166, 41, .45); opacity: 0; transform: translateY(-100%); transition: opacity .8s ease .3s, transform .8s ease .3s; }
.opened .nav { opacity: 1; transform: none; }
.nav .mono { font-size: 34px; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 36px); }
.nav nav a { text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--cream); padding-block: 12px; }
.nav nav a:not(.pill):hover { color: var(--gold-lt); }
.pill { font-family: var(--capsf) !important; font-size: var(--t-label) !important; letter-spacing: var(--track); border: 1.5px solid var(--gold-2); padding: 8px 18px 7px !important; }
.pill:hover { background: var(--gold); color: var(--velvet) !important; }
.music[hidden] { display: none; }
.music { background: none; border: 0; display: flex; gap: 2px; align-items: flex-end; height: 16px; padding: 0; cursor: pointer; }
.music span { width: 2px; height: 5px; background: var(--gold); transition: height .3s; }
.music.on span { animation: eq 1s ease-in-out infinite; }
.music.on span:nth-child(2) { animation-delay: .2s; } .music.on span:nth-child(3) { animation-delay: .45s; }
@keyframes eq { 0%,100% { height: 4px } 50% { height: 15px } }
@media (max-width: 640px) { .nav nav a:not(.pill) { display: none; } }

section { position: relative; padding: clamp(56px, 9vh, 104px) var(--pad); }

/* ---------- hero: her arch ---------- */
#hero { min-height: 100svh; display: grid; place-items: center; padding-top: calc(var(--nav-h) + 44px); padding-bottom: 76px;
  background: radial-gradient(ellipse 55% 60% at 50% 52%, rgba(160, 18, 26, .55), rgba(160, 18, 26, 0) 70%); }
.arch-wrap { position: relative; z-index: 2; width: min(620px, 88vw); aspect-ratio: 600 / 900; max-height: calc(100svh - var(--nav-h) - 120px); }
.arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(232, 166, 41, .55)); }
.crest { position: absolute; left: 50%; top: 0; transform: translate(-50%, -42%); width: 74px; height: 88px; border-radius: 37px 37px 2px 2px;
  background: linear-gradient(var(--wine), var(--wine)) padding-box, var(--foil) border-box; border: 2px solid transparent;
  display: grid; place-items: center; z-index: 4; box-shadow: 0 0 18px rgba(232, 166, 41, .35); }
.crest span { font-size: 25px; margin-top: 18px; white-space: nowrap; }
.hero-in { position: absolute; inset: 19% 9% 5%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; z-index: 2; }
.eyebrow { margin: 0 0 8px; }
.names { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; }
.names span { font-size: clamp(38px, 4.4vw, 60px); line-height: 1.12; white-space: nowrap; }
.names i { font-family: var(--script); font-style: normal; font-size: clamp(30px, 3vw, 40px); color: var(--cream); line-height: .85; }
.couple-gold { height: clamp(72px, 10vh, 104px); margin: 8px auto 0; filter: brightness(1.4) saturate(.9) drop-shadow(0 0 6px rgba(255, 205, 120, .4)); }
.rule .flourish { width: 190px; height: 24px; margin: 4px auto 6px; }
.hero-date { margin: 0; letter-spacing: .14em; color: var(--cream); }
.hero-date i { font-style: normal; color: var(--gold); }
.hero-place { margin: 2px 0 0; color: var(--soft); font-size: clamp(18px, 1.35vw, 20px); }
.invite-line { margin: 4px 0 0; font-style: italic; color: var(--gold-lt); font-size: clamp(18px, 1.35vw, 20px); }
.countdown { display: flex; align-items: flex-start; gap: clamp(14px, 2.4vw, 26px); margin-top: clamp(10px, 1.8vh, 18px); }
.countdown em { font-style: normal; font-size: 9px; color: var(--gold); margin-top: 18px; opacity: .8; }
.countdown div { display: flex; flex-direction: column; align-items: center; }
.countdown b { font-family: var(--capsf); font-weight: 500; font-size: clamp(34px, 3.4vw, 46px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-size: 12px; letter-spacing: .14em; margin-top: 6px; color: var(--soft); }
#hero .roses-tl { width: 66%; left: -26%; top: -9%; }
#hero .roses-br { width: 56%; right: -24%; bottom: -10%; }
#hero .s1 { left: 12%; top: 26%; } #hero .s2 { right: 13%; top: 20%; animation-delay: 1.3s; } #hero .s3 { right: 18%; bottom: 22%; animation-delay: 2.4s; width: 18px; }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--gold-lt); }
.scroll-cue span { font-size: 26px; }
.scroll-cue i { width: 1px; height: 26px; background: linear-gradient(var(--gold), transparent); animation: drip 2s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top } 50% { transform: scaleY(1); transform-origin: top } 51% { transform-origin: bottom } 100% { transform: scaleY(0); transform-origin: bottom } }
@media (max-width: 560px) {
  .arch-wrap { width: 92vw; aspect-ratio: auto; max-height: none; height: min(152vw, calc(100svh - var(--nav-h) - 96px)); }
  .hero-in { inset: 19% 5% 6%; }
  .names span { font-size: 9vw; }
  .names i { font-size: 7.4vw; }
  .couple-gold { height: 70px; }
  .hero-date { font-size: 12.5px; letter-spacing: .1em; }
  .countdown { margin-top: 8px; }
  #hero .roses-tl { width: 64%; left: -20%; top: -8%; }
  #hero .roses-br { width: 50%; right: -14%; bottom: -13%; }
}

/* ---------- the letter ---------- */
.letter-wrap { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.couple { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; }
.window { position: relative; width: min(100%, 420px); aspect-ratio: 600 / 900; display: grid; place-items: end center; padding: 0 10% 9%; border-radius: 50% 50% 0 0 / 33.4% 33.4% 0 0;
  background: radial-gradient(ellipse 70% 60% at 50% 58%, rgba(255, 214, 140, .22), rgba(232, 166, 41, 0) 70%), linear-gradient(#4A0811, #2A040A); }
.window .arch { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(232, 166, 41, .5)); }
.window .couple-line { position: absolute; left: 50%; top: 56%; width: 88%; height: auto; max-height: none; margin: 0; transform: translate(-50%, -50%); filter: brightness(1.3) saturate(.92) drop-shadow(0 0 10px rgba(255, 214, 140, .45)); }
.couple .roses-br { width: 40%; right: -9%; bottom: 3%; }
.couple figcaption { margin-top: 18px; }
.letter { padding: clamp(36px, 5vw, 72px) clamp(28px, 4.6vw, 70px); }
.letter h2 { font-size: clamp(46px, 5vw, 70px); line-height: 1.1; margin: 0 0 18px; display: inline-block; }
.letter p { margin: 0 0 16px; color: var(--cream); }
.letter .sign { margin-top: 22px; display: flex; flex-direction: column; }
.letter .sign em { color: var(--soft); }
.letter .sign .script { font-size: clamp(48px, 5vw, 66px); align-self: flex-start; }
.letter .roses.small { width: clamp(150px, 20vw, 250px); }
.letter .roses-tl { left: -11%; top: -11%; }
@media (max-width: 899px) { .letter-wrap { grid-template-columns: 1fr; } .couple img { max-height: 52svh; margin: 0 auto; } }

/* ---------- ceremonies ---------- */
.city-group { max-width: 1240px; margin: 0 auto clamp(40px, 7vh, 70px); }
.city { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 28px; text-align: center; }
.city .script { font-size: clamp(50px, 5.4vw, 70px); line-height: 1; }
.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.event { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 30px 30px;
  border-radius: 50% 50% 4px 4px / 150px 150px 4px 4px; border: 1.5px solid transparent;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #5E0B15 0%, #3A060D 55%, #26030A 100%) padding-box, var(--foil) border-box;
  box-shadow: 0 26px 60px rgba(10, 0, 2, .55); }
.event::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(232, 166, 41, .45); border-radius: inherit; pointer-events: none; }
.ic { width: 58px; height: 58px; flex: none; filter: drop-shadow(0 0 5px rgba(232, 166, 41, .5)); }
.event h3 { margin: 6px 0 0; font-size: clamp(40px, 3.1vw, 46px); line-height: 1.1; }
.when { margin: 12px 0 10px; color: var(--gold-lt); letter-spacing: .12em; line-height: 1.7; }
.when i { font-style: normal; font-size: 8px; color: var(--gold); margin: 0 6px; vertical-align: 2px; }
.when b { display: block; font-weight: 500; color: var(--cream); letter-spacing: var(--track); margin-top: 2px; }
.where { margin: 0; display: flex; flex-direction: column; }
.where b { font-weight: 600; font-size: 22px; color: var(--cream); line-height: 1.25; text-wrap: balance; }
.where em { color: var(--soft); font-size: 19px; }
.mini-rule { width: 54px; height: 1px; background: var(--foil); margin: 14px auto 12px; }
.desc { margin: 0; color: #EBD7C8; line-height: 1.45; font-size: 19px; font-style: italic; }
.ev-actions { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; align-items: center; }
.dir, .cal summary { font-size: 12px; letter-spacing: .14em; text-decoration: none; cursor: pointer; padding: 6px 0 4px; border-bottom: 1.3px solid var(--gold-2); list-style: none; }
.cal summary::-webkit-details-marker { display: none; }
.cal { position: relative; }
.cal > div { position: absolute; z-index: 5; top: 36px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; background: #2A0408; border: 1px solid var(--gold-2); padding: 8px 14px; white-space: nowrap; }
.cal > div a { padding: 6px 0; text-decoration: none; }
@media (max-width: 1000px) { .events { grid-template-columns: repeat(2, minmax(0, 1fr)); } .events > li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 13px); justify-self: center; } }
@media (max-width: 640px) { .events { grid-template-columns: 1fr; } .events > li:last-child:nth-child(odd) { width: auto; } }

/* ---------- travel ---------- */
.facts { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(30px, 5vw, 70px); padding: clamp(30px, 4vw, 56px) clamp(26px, 5vw, 70px); }
.facts > div { padding: 22px 0 20px; border-bottom: 1px solid rgba(232, 166, 41, .28); }
.facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { color: var(--gold-lt); }
.facts dt i { font-style: normal; font-size: 9px; color: var(--gold); margin-right: 12px; vertical-align: 2px; }
.facts dd { margin: 8px 0 0; color: #EBD7C8; line-height: 1.5; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } .facts > div:nth-last-child(2) { border-bottom: 1px solid rgba(232, 166, 41, .28); } }

/* ---------- rsvp ---------- */
.rsvp-card { max-width: 760px; margin: 60px auto 0; padding: clamp(70px, 9vw, 96px) clamp(24px, 5vw, 64px) clamp(36px, 5vw, 56px); }
.rsvp-card .seal { position: absolute; left: 50%; top: 0; width: 132px; transform: translate(-50%, -52%); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .55)); z-index: 4; }
.rsvp-card .seal.in { transform: translate(-50%, -52%); }
.rsvp-card .sec-head h2 { font-size: clamp(44px, 5.4vw, 70px); }
.field { display: block; margin: 0 0 22px; border: 0; padding: 0; }
.field .caps, .field legend { display: block; margin-bottom: 8px; }
.field i { text-transform: none; font-family: var(--serif); letter-spacing: 0; font-size: var(--t-small); font-weight: 500; }
input:not([type]), input[name="guestName"], textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(232, 166, 41, .7); color: var(--cream);
  font: inherit; font-size: 20px; padding: 10px 4px; outline: none; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: rgba(233, 207, 192, .66); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { position: relative; cursor: pointer; }
.chips:not(.wide) { display: grid; grid-template-columns: repeat(6, minmax(0, 54px)); gap: 8px; }
.chips:not(.wide) span { display: block; min-width: 0; padding-inline: 0; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.chips span { display: inline-block; min-width: 46px; text-align: center; padding: 7px 16px 6px; border: 1px solid rgba(232, 166, 41, .55); font-weight: 500; font-size: 19px; transition: background .25s, color .25s, border-color .25s; }
.chips label:hover span { border-color: var(--gold-lt); }
.chips input:checked + span { background: var(--foil); color: var(--velvet); border-color: transparent; }
.chips input:focus-visible + span { outline: 2px solid var(--gold-lt); outline-offset: 2px; }
.send { width: 100%; margin-top: 8px; padding: 16px; border: 0; background: var(--foil); color: var(--velvet); font-family: var(--capsf); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; font-size: 14px; line-height: 1.5; cursor: pointer; box-shadow: 0 0 20px rgba(232, 166, 41, .35); }
.fine { text-align: center; color: var(--soft); font-size: var(--t-small); font-style: italic; }
.thanks { display: none; text-align: center; }
.thanks h3 { font-size: 64px; margin: 0; display: inline-block; }
.rsvp-card.sent form { display: none; } .rsvp-card.sent .thanks { display: block; }
.thanks .via-sheet { display: none; } .rsvp-card.saved .thanks .via-sheet { display: block; } .rsvp-card.saved .thanks .via-wa { display: none; }
.ghost { background: none; border: 1.5px solid var(--gold-2); color: var(--cream); padding: 12px 26px; font-family: var(--capsf); font-size: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; cursor: pointer; }
.ghost:hover { background: var(--gold); color: var(--velvet); }

/* ---------- closing ---------- */
#closing { text-align: center; padding-top: clamp(110px, 18vh, 200px); padding-bottom: clamp(70px, 12vh, 120px); min-height: 80svh; }
#closing > :not(.petals):not(.roses):not(.dust) { position: relative; z-index: 2; }
#closing .big { font-size: clamp(56px, 9vw, 120px); margin: 0; display: inline-block; }
#closing .roses-tl { width: min(46vw, 520px); left: -8vw; top: -4vh; }
#closing .roses-br { width: min(42vw, 480px); right: -8vw; bottom: -2vh; }
.tag { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 26px 0; }
.tag b { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; }
#closing footer { margin-top: clamp(60px, 12vh, 120px); display: flex; flex-direction: column; align-items: center; gap: 8px; }
#closing footer .script { font-size: clamp(32px, 3.2vw, 42px); }
@media (max-width: 640px) { #closing .roses-tl { width: 50vw; left: -16vw; top: -2vh; } #closing .roses-br { width: 34vw; right: -12vw; bottom: -4vh; } }

/* ---------- gallery ("Moments") ---------- */
#gallery { padding-inline: 0; }
#gallery .sec-head { padding-inline: var(--pad); margin-bottom: clamp(32px, 6vh, 60px); }
.carousel { position: relative; --w: min(76vw, 440px, 58svh); }
.track {
  display: flex; gap: clamp(14px, 2vw, 26px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 14px calc(50% - var(--w) / 2) 30px; scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 var(--w); aspect-ratio: 4 / 5; max-width: 100%; scroll-snap-align: center; padding: 0; border: 0;
  background: color-mix(in srgb, var(--fg) 8%, transparent); cursor: pointer; overflow: hidden;
  transform: scale(.88); opacity: .42; transition: transform .7s cubic-bezier(.2,.7,.1,1), opacity .7s ease, box-shadow .7s ease;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide.on { transform: none; opacity: 1; box-shadow: 0 28px 60px rgba(0, 0, 0, .35); cursor: zoom-in; }
.slide:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.gal-nav, .lb-nav {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  border: 1px solid color-mix(in srgb, var(--fg) 30%, transparent); background: color-mix(in srgb, var(--bg) 55%, transparent);
  color: var(--fg); transition: border-color .3s, background .3s;
}
.gal-nav { position: absolute; top: calc(50% - 8px); transform: translateY(-50%); backdrop-filter: blur(6px); }
.gal-nav:hover, .lb-nav:hover { border-color: var(--accent); }
.gal-nav svg, .lb-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gal-nav.prev { left: max(12px, calc(50% - var(--w) / 2 - 80px)); }
.gal-nav.next { right: max(12px, calc(50% - var(--w) / 2 - 80px)); }
.gal-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 8px; padding-inline: var(--pad); }
.gal-count { font-family: var(--capsf); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .14em; font-size: var(--t-label); color: var(--soft); }
.gal-count b { color: var(--fg); font-weight: 500; }
.gal-bar { width: 110px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.gal-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .6s ease; }
.gal-cap { font-style: italic; color: var(--gold-lt); min-width: 7em; }
.single .gal-nav, .single .gal-bar { display: none; }
@media (max-width: 700px) { .gal-nav { display: none; } .gal-cap { min-width: 0; } }

.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(9, 13, 23, .95); display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 14px; padding: max(64px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; height: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 44px); object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #e7dccb; font-style: italic; }
.lightbox .lb-nav { color: #f2ece2; border-color: rgba(242, 236, 226, .3); background: transparent; }
.lb-close {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(242, 236, 226, .3); background: transparent; color: #f2ece2; font-size: 26px; line-height: 1; cursor: pointer;
}
.lb-close:focus-visible, .lb-nav:focus-visible, .gal-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body.lb-open { overflow: hidden; }
@media (max-width: 700px) { .lightbox { grid-template-columns: minmax(0, 1fr); } .lightbox .lb-nav { display: none; } }


/* ---------- opening envelope: a still until the tap, then the film ---------- */
#envelope {
  position: fixed; inset: 0; z-index: 50; background: radial-gradient(ellipse at 50% 45%, #5A0912, #26030A 72%); color: #F6E6D0; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: center; transition: opacity 1.1s ease, visibility 1.1s;
  -webkit-tap-highlight-color: transparent; outline: none;
}
/* once the page is behind the light, the flash adds light instead of veiling it, so colours stay rich as it fades */
#envelope.gone { opacity: 0; visibility: hidden; pointer-events: none; background: none; mix-blend-mode: screen; transition: opacity 1.15s cubic-bezier(.3, 0, .5, 1), visibility 1.15s; }
#envelope.gone .env-stage { visibility: hidden; }
.env-stage { position: relative; width: 100%; height: 100%; }
#env-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* wider than a phone: the envelope keeps its shape in the middle of a wine glow */
@media (min-aspect-ratio: 3/4) {
  .env-stage { width: auto; aspect-ratio: 9 / 16; box-shadow: 0 0 90px rgba(0,0,0,.6); }
}
.env-to { position: absolute; left: 0; right: 0; top: 15%; margin: 0; padding: 0 12%; text-align: center; font-size: clamp(30px, 4.6vh, 46px); line-height: 1.15; transition: opacity .5s ease; }
.env-tap { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; z-index: 3; font-size: 14px; letter-spacing: .3em; color: #FBEBC8; text-shadow: 0 1px 4px rgba(20,0,4,.85); opacity: 0; }
#envelope.ready .env-tap { opacity: 1; animation: tapin .6s ease both, tappulse 2.6s ease-in-out .6s infinite; }
@keyframes tapin { from { opacity: 0 } to { opacity: 1 } }
@keyframes tappulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }
/* the join between film and page: the burst blooms until it fills the screen, the page swaps in behind it, the glow fades */
.env-flash { position: absolute; left: 50%; top: 46%; width: 320vmax; height: 320vmax; z-index: 4; pointer-events: none; border-radius: 50%; opacity: 0;
  transform: translate(-50%, -50%) scale(.04);
  background: radial-gradient(closest-side, #FFFDF4 0%, #FFF3CF 42%, #FFE29C 60%, rgba(250,196,104,.9) 72%, rgba(240,170,70,0) 100%); }
.env-flash::after { content: ''; position: absolute; inset: 0; border-radius: 50%; opacity: 0; transition: opacity .32s ease-out;
  background: radial-gradient(closest-side, #FFD58A 0%, #F8B955 55%, #EE9E3A 72%, rgba(232, 150, 50, 0) 100%); }
#envelope.gone .env-flash::after { opacity: 1; }   /* the light warms to amber as it fades, so nothing goes milky */
#envelope.flash .env-flash { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: transform .62s cubic-bezier(.55,0,.75,.35), opacity .16s linear; }
#envelope.opening .env-to, #envelope.opening .env-tap, #envelope.opening .sound { opacity: 0; animation: none; transition: opacity .5s; }
/* tapped, but the film needs a moment: say so, rather than leave the envelope looking dead */
#envelope.opening.waiting .env-tap { opacity: 1; animation: tappulse 1.6s ease-in-out infinite; }
.sound { position: absolute; top: max(18px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(236, 233, 225, .25); background: rgba(255, 255, 255, .04); color: #ece9e1; display: grid; place-items: center; cursor: pointer; transition: opacity .4s; }
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sound svg path:first-child { fill: currentColor; stroke: none; }
.sound[hidden] { display: none; }
.sound .x { display: none; }
.sound.off .x { display: inline; }
.sound.off .w1, .sound.off .w2 { display: none; }


/* ---------- motion (page/motion.js adds .moving once the envelope opens) ---------- */
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 110%; }
section { scroll-margin-top: calc(var(--nav-h) - 1px); }
/* script titles write themselves in, left to right, with a soft leading edge */
.moving .write { --p: -14%; -webkit-mask-image: linear-gradient(90deg, #000 var(--p), transparent calc(var(--p) + 14%));
  mask-image: linear-gradient(90deg, #000 var(--p), transparent calc(var(--p) + 14%)); }
.moving .write.go { animation: write 1.9s cubic-bezier(.45, .05, .25, 1) var(--delay, 0ms) forwards; }
@keyframes write { to { --p: 110%; } }
/* capitals settle in softly; nothing changes size, so the page never shifts */
.moving .settle { opacity: 0; transform: translateY(10px); filter: blur(3px); transition: opacity 1.1s ease var(--hd, 0s), transform 1.3s cubic-bezier(.2, .7, .1, 1) var(--hd, 0s), filter 1.1s ease var(--hd, 0s); }
.moving .settle.go { opacity: 1; transform: none; filter: none; }
/* the hero waits for the light to clear, then arrives in order: greeting, names, couple, date, countdown */
html:not(.opened) .hero-in > [data-reveal] { opacity: 0; }
.hero-in > [data-reveal] { transition-delay: var(--hd, 0s); }
.hero-in > .eyebrow { --hd: .2s; } .hero-in > .names { --hd: .25s; } .hero-in > .couple-gold { --hd: 1.5s; } .hero-in > .rule { --hd: 1.7s; }
.hero-in > .hero-date { --hd: 1.85s; } .hero-in > .hero-place { --hd: 2s; } .hero-in > .invite-line { --hd: 2.15s; } .hero-in > .countdown { --hd: 2.15s; }
/* the gold arches draw themselves, then a light keeps running along the hero arch */
.moving .arch path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.moving .arch.go path { animation: draw 2.6s cubic-bezier(.6, .05, .3, 1) forwards; }
.moving .arch.go path:nth-child(3) { animation-delay: .5s; }
.arch .runner { opacity: 0; }
.moving .arch.go .runner { stroke-dasharray: .03 .97; stroke-dashoffset: 1; stroke-width: 2px; filter: drop-shadow(0 0 5px #FFE6A0) drop-shadow(0 0 10px rgba(232, 166, 41, .7));
  animation: run 9s linear 4s infinite both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes run { 0% { stroke-dashoffset: 1; opacity: 0 } 6% { opacity: 1 } 46% { opacity: 1 } 52% { stroke-dashoffset: -.04; opacity: 0 } 100% { stroke-dashoffset: -.04; opacity: 0 } }
/* flourishes unfold from the centre once their line is revealed */
.moving .flourish { clip-path: inset(0 50% 0 50%); }
.moving .in > .flourish { animation: unfold 1.6s cubic-bezier(.3, .7, .2, 1) .25s both; }
@keyframes unfold { from { clip-path: inset(0 50% 0 50%) } to { clip-path: inset(0 0 0 0) } }
/* roses open up, then breathe */
.moving .roses { opacity: 0; scale: .9; transition: opacity 1.6s ease, scale 2.2s cubic-bezier(.2, .7, .1, 1); }
.moving .roses.bloom { opacity: 1; scale: 1; animation: breathe 8s ease-in-out 2.2s infinite; }
.moving .roses-tl.bloom { transform-origin: 0 0; }
@keyframes breathe { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.025; rotate: .8deg; } }
/* cards, panels and travel lines arrive one after another, and catch the light when touched */
.moving .event[data-reveal], .moving .facts > div { transition-delay: var(--delay, 0ms); }
.moving .event.in:hover { transition-delay: 0s; }
@media (max-width: 640px) { .moving .event[data-reveal] { transition-delay: 0s; } }
.moving .facts > div { opacity: 0; transform: translateY(14px); transition: opacity 1s ease var(--delay, 0ms), transform 1.2s cubic-bezier(.2, .7, .1, 1) var(--delay, 0ms); }
.moving .facts.in > div { opacity: 1; transform: none; }
.event { transition: transform .6s cubic-bezier(.2, .7, .1, 1), box-shadow .6s ease, opacity 1s ease, translate .6s ease; }
.event::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 230, 160, .16) 50%, transparent 62%) no-repeat; background-size: 260% 100%; background-position: 130% 0;
  transition: background-position 1.4s ease; }
.event:hover { translate: 0 -6px; box-shadow: 0 34px 70px rgba(10, 0, 2, .6), 0 0 26px rgba(232, 166, 41, .18); }
.event:hover::before, .moving .event.in::before { background-position: -30% 0; }
.event:hover .ic { animation: nudge 1.2s ease; }
@keyframes nudge { 30% { transform: translateY(-4px) } 60% { transform: translateY(1px) } }
/* sparkles catching the gold */
.glint { position: absolute; z-index: 30; pointer-events: none; fill: #FFF3CF; animation: glint 1.9s ease-in-out forwards;
  filter: drop-shadow(0 0 4px #FFE6A0) drop-shadow(0 0 10px rgba(232, 166, 41, .9)); }
.glint svg { width: 100%; height: 100%; display: block; }
@keyframes glint { 0% { opacity: 0; transform: scale(.2) rotate(0deg) } 40% { opacity: 1; transform: scale(1) rotate(45deg) } 100% { opacity: 0; transform: scale(.3) rotate(110deg) } }
/* petals drifting down */
.petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.petal { position: absolute; top: -40px; opacity: 0; animation: fall var(--dur) linear var(--delay) infinite; filter: drop-shadow(0 4px 6px rgba(20, 0, 4, .4)); }
@keyframes fall { 0% { transform: translate(0, -5vh) rotate(0deg); opacity: 0 } 8% { opacity: .9 } 50% { transform: translate(var(--sway), 50vh) rotate(calc(var(--spin) / 2)) }
  90% { opacity: .85 } 100% { transform: translate(calc(var(--sway) * -.4), 108vh) rotate(var(--spin)); opacity: 0 } }
.moving #hero .petals, .moving #closing .petals { min-height: 100%; }
/* countdown flips */
.countdown b.flip { animation: flip .7s cubic-bezier(.3, .7, .2, 1); }
@keyframes flip { 0% { transform: translateY(-60%) rotateX(80deg); opacity: 0 } 100% { transform: none; opacity: 1 } }
/* foil headings carry a slow sheen once written */
.moving .sec-head h2.go, .moving .city .script.go, .moving #closing .big.go { background-size: 220% 100%; animation: write 1.9s cubic-bezier(.45, .05, .25, 1) forwards, sheen 9s ease-in-out 2s infinite; }
/* nav links underline in gold */
.nav nav a:not(.pill) { background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 100% / 0 1px; transition: background-size .5s ease, color .3s; }
.nav nav a:not(.pill):hover { background-size: 100% 1px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } [data-reveal] { transition: opacity .4s ease; transform: none; } .hero-in > [data-reveal] { transition-delay: 0s; } .star, .dust i, .shimmer .foil { animation: none; } }

/* a city with one ceremony: the card sits in the middle */
.events:has(> .event:only-child){display:flex;justify-content:center}
.events:has(> .event:only-child) > .event{width:100%;max-width:400px}
