/*
 * Template 02: Rose Gallery (version 2.0.0)
 * Bright white and blush with coral accents. Overlapping photos that bleed off the page edge,
 * tilted photo cards, ticket-style schedule rows, giant outlined type and ring countdown.
 * Petit Formal Script for accents, DM Sans for everything else. Fixed layout. Fonts and images
 * are local files, so this works offline.
 * Motion: masked name reveal, photo wipe, floating cards, rising hearts, swaying florals, a running
 * ticker, parallax photos, a giant word that slides with the scroll, ring countdown, tilted photo
 * cards that straighten on hover, tickets that slide in, a photo viewer and a scroll progress line.
 * Everything stops for reduced motion.
 */

@font-face { font-family: 'Petit Formal Script'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/petit-formal-script-normal-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../assets/fonts/dm-sans-normal-400-600.woff2') format('woff2'); }

:root {
  --bg: #FFFFFF;
  --pink: #FCF1EE;
  --pink-2: #F9DFD8;
  --surface: #FFFFFF;
  --ink: #2F2926;
  --muted: #6B605C;
  --accent: #C8503A;
  --accent-dark: #A83E2B;
  --accent-ink: #FFFFFF;
  --coral: #E8715C;
  --line: #F1DDD7;
  --dark: #2B2220;
  --script: 'Petit Formal Script', 'Snell Roundhand', 'Brush Script MT', cursive;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
  --wrap: 1180px;
  --bar: 72px;
  --bleed: calc((100vw - min(var(--wrap), 100vw - 40px)) / 2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

/* Eyebrow: small caps between two diamonds and two lines */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .74rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); line-height: 1.4; }
.eyebrow span { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow span::before, .eyebrow span::after { content: ''; width: 7px; height: 7px; background: var(--coral); transform: rotate(45deg); flex: none; }
.eyebrow::before, .eyebrow::after { content: ''; width: 46px; height: 1px; background: var(--coral); opacity: .7; }
.script-big { font-family: var(--script); font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.2; color: var(--ink); }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-2), var(--coral), var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow 300ms ease; }
.topbar.stuck { box-shadow: 0 10px 30px rgba(200, 80, 58, .09); }
.topbar-inner { width: min(var(--wrap), 100% - 40px); margin-inline: auto; height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: grid; line-height: 1; text-decoration: none; color: var(--ink); }
.brand > span { font-family: var(--script); font-size: 2rem; color: var(--accent); }
.brand small { font-size: .6rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: .92rem; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink); padding: 6px 0; position: relative; }
.nav a::after { content: ''; position: absolute; left: 50%; bottom: -2px; width: 6px; height: 6px; margin-left: -3px; background: var(--coral); transform: rotate(45deg) scale(0); transition: transform 300ms var(--ease-out); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 .84rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 18px 32px; border-radius: 12px; cursor: pointer; transition: transform 200ms var(--ease-out), box-shadow 300ms ease, background-color 200ms ease, color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn-sm { font-size: .74rem; padding: 12px 22px; }
.btn-outline { background: transparent; color: var(--accent); }
.link-arrow { display: inline-block; color: var(--accent); text-decoration: none; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; font-weight: 600; border-bottom: 1.5px solid currentColor; padding-bottom: 3px; }
.link-arrow::after { content: ' \2192'; display: inline-block; transition: transform 300ms var(--ease-out); }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; align-items: center; min-height: min(calc(100svh - var(--bar)), 860px); padding: 56px 0 72px; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--pink) 100%); }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fl { position: absolute; pointer-events: none; }
.hero-bg .f1 { right: 5%; top: 40px; width: 150px; height: 150px; }
.hero-bg .f2 { left: 1%; bottom: 20px; width: 260px; height: 142px; rotate: -6deg; transform-origin: 0 100%; }
.heart { position: absolute; bottom: -30px; left: var(--x); width: var(--s); height: var(--s); color: var(--coral); opacity: 0; animation: heart-rise var(--d) ease-in var(--t) infinite; }
.heart svg { width: 100%; height: 100%; }
.heart.h1 { --x: 12%; --s: 16px; --d: 15s; --t: 0s; }
.heart.h2 { --x: 38%; --s: 11px; --d: 19s; --t: -7s; }
.heart.h3 { --x: 58%; --s: 18px; --d: 16s; --t: -4s; }
.heart.h4 { --x: 80%; --s: 12px; --d: 20s; --t: -11s; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-text { display: grid; justify-items: start; gap: 18px; }
.hero-text .eyebrow::before { display: none; }
.hero h1 { font-weight: 500; font-size: clamp(2.7rem, 6.2vw, 5.4rem); line-height: 1.04; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
.invite { font-family: var(--script); font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.45; max-width: 24ch; padding-bottom: 20px; border-bottom: 2px solid var(--pink-2); color: var(--ink); }
.hero-date { font-size: .95rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 6px; }

/* Photo bleeding off the right edge, with a floating pill and a pink date card */
.hero-visual { position: relative; margin-right: calc(-1 * var(--bleed)); }
.hero-photo { position: relative; aspect-ratio: 4 / 5; max-height: 76vh; width: 100%; border-radius: 36px 0 0 36px; overflow: hidden; background: var(--pink-2); box-shadow: 0 30px 70px rgba(200, 80, 58, .2); }
.hero-photo img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.float-pill { position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px; max-width: 290px; padding: 10px 24px 10px 10px; border-radius: 999px; background: #fff; box-shadow: 0 16px 40px rgba(47, 41, 38, .16); font-size: .95rem; font-weight: 600; line-height: 1.35; }
.hero-visual .float-pill { left: -52px; top: 11%; }
.pill-icon { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; }
.pill-icon svg { width: 26px; height: 26px; }
.date-pink { position: absolute; z-index: 3; left: -44px; bottom: 9%; width: 172px; display: grid; justify-items: center; gap: 2px; padding: 24px 14px 22px; border-radius: 22px; background: #FBE3DE; box-shadow: 0 18px 44px rgba(200, 80, 58, .22); text-align: center; }
.dp-weekday, .dp-month { font-size: .72rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--ink); }
.dp-day { font-size: 4.2rem; font-weight: 500; line-height: 1.05; color: var(--accent); }
.dp-rings { width: 44px; height: 36px; margin-top: 10px; color: var(--coral); }

/* ---------- Ticker ---------- */
.marquee { overflow: hidden; background: var(--accent); color: #fff; padding: 17px 0; }
.marquee-track { display: flex; width: max-content; animation: ticker 42s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 30px; padding-right: 30px; flex: none; font-size: .95rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.marquee-group i { width: 8px; height: 8px; background: #fff; opacity: .8; transform: rotate(45deg); flex: none; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4.5rem, 9vw, 7.5rem); overflow: hidden; }
.section-pink { background: var(--pink); }
.section-head { text-align: center; display: grid; justify-items: center; gap: 10px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section h2 { font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.12; letter-spacing: .02em; text-transform: uppercase; }
.lead { max-width: 580px; color: var(--muted); margin-top: 6px; }

/* Our story */
.story-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: center; }
.story-photo { position: relative; margin-left: calc(-1 * var(--bleed)); }
.story-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 0 36px 36px 0; overflow: hidden; background: var(--pink-2); box-shadow: 0 26px 60px rgba(200, 80, 58, .16); }
.story-frame img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.pill-story { right: -34px; bottom: 11%; }
.story-photo .f3 { right: -20px; top: -44px; width: 120px; height: 120px; z-index: 3; }
.story-text { display: grid; justify-items: start; gap: 14px; }
.story-text .eyebrow::before { display: none; }
.story-text h2::after { content: ''; display: block; width: 64px; height: 3px; margin-top: 18px; background: var(--coral); border-radius: 3px; }
.prose { display: grid; gap: 1.1em; color: var(--muted); }
.prose p { max-width: 58ch; }

/* Band: giant outlined words, floating photo, ring countdown */
.band { position: relative; overflow: hidden; background: var(--pink); padding-block: clamp(4.5rem, 9vw, 7rem); isolation: isolate; }
.outline { position: absolute; left: -32vw; top: 50%; margin-top: -.55em; z-index: -1; font-size: clamp(5.5rem, 19vw, 17rem); font-weight: 600; line-height: 1.1; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px rgba(232, 113, 92, .32); pointer-events: none; user-select: none; }
.band-grid { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.countdown { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 30px); }
.countdown li { position: relative; display: grid; place-content: center; justify-items: center; width: clamp(104px, 15vw, 150px); aspect-ratio: 1 / 1; background: rgba(255, 255, 255, .8); border-radius: 50%; box-shadow: 0 14px 36px rgba(200, 80, 58, .12); }
.countdown svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--pink-2); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--coral); stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 900ms var(--ease-out); }
.countdown b { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.countdown span { font-size: .66rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.band-photo { width: clamp(210px, 24vw, 290px); padding: 12px 12px 44px; background: #fff; border-radius: 8px; box-shadow: 0 24px 56px rgba(47, 41, 38, .2); rotate: 4deg; justify-self: end; }
.band-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }

/* Wedding party */
.party-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px 24px; }
.person { display: flex; align-items: center; gap: 20px; padding: 12px 24px 12px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; transition: transform 400ms var(--ease-out), box-shadow 400ms ease, border-color 300ms ease; }
.person img { flex: none; width: 96px; height: 96px; object-fit: cover; border-radius: 18px; transition: transform 500ms var(--ease-out); }
.person h3 { font-weight: 600; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.person-role { font-family: var(--script); font-size: 1.4rem; line-height: 1.3; color: var(--accent); }

/* Gallery: tilted photo cards, click to enlarge */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 34px; }
.gallery-item { position: relative; padding: 14px 14px 46px; background: #fff; border-radius: 8px; box-shadow: 0 16px 40px rgba(47, 41, 38, .14); cursor: zoom-in; transition: rotate 500ms var(--ease-out), scale 500ms var(--ease-out), box-shadow 500ms ease; }
.gallery-item:nth-child(3n+1) { rotate: -2.4deg; }
.gallery-item:nth-child(3n+2) { rotate: 1.4deg; translate: 0 22px; }
.gallery-item:nth-child(3n+3) { rotate: -1.2deg; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.gallery-item:focus-visible { outline-offset: 6px; }
.lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(35, 25, 22, .93); opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 0s linear 300ms; }
.lb.open { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
.lb img { max-width: min(92vw, 1100px); max-height: 84vh; width: auto; height: auto; border: 10px solid #fff; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transform: scale(.96); transition: transform 400ms var(--ease-out); }
.lb.open img { transform: none; }
.lb button { position: absolute; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; font: 400 1.6rem/1 var(--sans); cursor: pointer; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.lb button:active { transform: scale(0.94); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; margin-top: -25px; }
.lb-next { right: 18px; top: 50%; margin-top: -25px; }
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-size: .85rem; letter-spacing: .2em; }

/* Schedule: ticket rows */
.schedule-inner { max-width: 800px; }
.timeline { display: grid; gap: 18px; }
.event { position: relative; display: grid; grid-template-columns: 150px 1fr; background: #fff; border-radius: 22px; box-shadow: 0 12px 38px rgba(200, 80, 58, .12); overflow: hidden; transition: transform 400ms var(--ease-out), box-shadow 400ms ease; }
.event::before, .event::after { content: ''; position: absolute; left: 139px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); }
.event::before { top: -11px; }
.event::after { bottom: -11px; }
.event-time { display: grid; place-items: center; padding: 22px 10px; background: var(--pink); border-right: 2px dashed rgba(232, 113, 92, .5); font-size: 1.7rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.event-body { display: grid; gap: 2px; align-content: center; padding: 20px 30px; }
.event h3 { font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.event p { color: var(--muted); }

/* Venue */
.venue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.venue-card { display: grid; justify-items: start; gap: 8px; padding: clamp(1.75rem, 4vw, 2.75rem); background: var(--surface); border-radius: 28px; box-shadow: 0 20px 54px rgba(200, 80, 58, .12); }
.venue-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.venue-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; }
.venue-icon svg { width: 22px; height: 22px; }
.venue-label { font-size: .74rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.venue-card h3 { font-weight: 500; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; }
.venue-time { font-family: var(--script); font-size: 2rem; line-height: 1.2; color: var(--accent); }
.venue-address { white-space: pre-line; color: var(--muted); margin-bottom: 12px; }
.venue-note { white-space: pre-line; text-align: center; max-width: 780px; margin: 40px auto 0; padding: 24px 32px; background: var(--pink-2); border-radius: 24px; color: var(--ink); }
.venue-note::before { content: 'Dress code and notes'; display: block; margin-bottom: 4px; font-family: var(--script); font-size: 1.9rem; line-height: 1.2; color: var(--accent); }

/* Gifts */
.gifts-inner { max-width: 960px; }
.gift-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.gift-item { display: grid; justify-items: center; gap: 12px; padding: 34px 22px 28px; text-align: center; background: var(--pink); border: 1px solid var(--line); border-radius: 26px; transition: transform 400ms var(--ease-out), box-shadow 400ms ease, border-color 300ms ease; }
.gift-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--accent); box-shadow: 0 8px 22px rgba(200, 80, 58, .15); }
.gift-icon svg { width: 28px; height: 28px; }
.gift-name { font-weight: 600; font-size: 1.02rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.35; }
.gift-external { text-align: center; margin-top: 40px; }

/* RSVP */
.rsvp .f4 { right: 0; bottom: 14px; width: 300px; height: 164px; opacity: .8; }
.rsvp-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; position: relative; z-index: 1; }
.rsvp-intro { display: grid; justify-items: start; gap: 12px; padding-top: 12px; }
.rsvp-intro .eyebrow::before { display: none; }
.rsvp-form { background: var(--surface); border-radius: 28px; padding: clamp(1.75rem, 4.5vw, 2.9rem); display: grid; gap: 20px; box-shadow: 0 28px 70px rgba(200, 80, 58, .16); }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--pink); border: 1.5px solid transparent; border-radius: 12px; padding: 14px 16px; transition: border-color 160ms ease, background-color 160ms ease; }
.field input:focus, .field textarea:focus { border-color: var(--coral); background: #fff; outline: none; }
.field textarea { resize: vertical; }
.choice { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
.choice legend { grid-column: 1 / -1; margin-bottom: 4px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 20px; font-size: .95rem; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink); cursor: pointer; background: #fff; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out); }
.pill span:active { transform: scale(0.97); }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp-form .btn { justify-self: start; }
.form-status { min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: #2F6B3F; }
.form-status.err { color: #A33A3A; }

/* Footer */
.footer { text-align: center; padding: 64px 20px 72px; background: var(--dark); color: #fff; display: grid; justify-items: center; gap: 6px; }
.footer-rings { width: 60px; height: 50px; color: var(--coral); margin-bottom: 8px; }
.footer-names { font-weight: 500; font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.footer-date { font-family: var(--script); font-size: 1.7rem; color: #F3B7AA; }

/* ---------- Motion ---------- */
/* Scroll reveals. Content is visible by default; the .js class is added in <head>. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-soft), transform 800ms var(--ease-out); transition-delay: var(--delay, 0ms); }
.js .reveal.from-left { transform: translateX(-48px); }
.js .reveal.from-right { transform: translateX(48px); }
.js .reveal.in { opacity: 1; transform: none; }
.js .event:nth-child(odd) { transform: translateX(-44px); }
.js .event:nth-child(even) { transform: translateX(44px); }
.js .event.in { transform: none; }
.js .person:nth-child(3n+2), .js .gift-item:nth-child(3n+2), .js .gallery-item:nth-child(3n+2) { --delay: 100ms; }
.js .person:nth-child(3n+3), .js .gift-item:nth-child(3n+3), .js .gallery-item:nth-child(3n+3) { --delay: 200ms; }

/* Eyebrow lines draw outward */
.eyebrow::before, .eyebrow::after { transition: transform 900ms var(--ease-out) 250ms; }
.js .reveal .eyebrow::before, .js .reveal .eyebrow::after { transform: scaleX(0); }
.js .reveal .eyebrow::before { transform-origin: 100% 50%; }
.js .reveal .eyebrow::after { transform-origin: 0 50%; }
.js .reveal.in .eyebrow::before, .js .reveal.in .eyebrow::after { transform: none; }

/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mask-up { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(34px); } to { opacity: 1; clip-path: inset(-10% -5% -10% -5%); transform: none; } }
@keyframes wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.js .hero-text > * { opacity: 0; animation: rise 900ms var(--ease-out) forwards; }
.js .hero-text > :nth-child(1) { animation-delay: 100ms; }
.js .hero-text > :nth-child(2) { animation: mask-up 1100ms var(--ease-out) 250ms forwards; }
.js .hero-text > :nth-child(3) { animation-delay: 750ms; }
.js .hero-text > :nth-child(4) { animation-delay: 900ms; }
.js .hero-text > :nth-child(5) { animation-delay: 1050ms; }
.js .hero-photo { animation: wipe 1300ms var(--ease-out) 150ms backwards; }
.js .date-pink { animation: slide-in 900ms var(--ease-out) 1s backwards; }
.js .hero-visual .float-pill { animation: pop 700ms var(--ease-out) 1.3s backwards, bob 5s ease-in-out 2s infinite; }

/* Ambient loops */
@keyframes heart-rise { 0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6) rotate(-8deg); } 10% { opacity: .65; } 50% { transform: translate3d(22px, -45vh, 0) scale(1) rotate(8deg); } 90% { opacity: .4; } 100% { opacity: 0; transform: translate3d(-16px, -95vh, 0) scale(1.1) rotate(-6deg); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes sway { from { rotate: -9deg; } to { rotate: -3deg; } }
@keyframes spin-r { to { rotate: 360deg; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hero-bg .f1, .story-photo .f3 { animation: spin-r 46s linear infinite; }
.hero-bg .f2 { animation: sway 7s ease-in-out infinite alternate; }
.pill-story { animation: bob 5.5s ease-in-out infinite; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 12px 28px rgba(200, 80, 58, .32); transform: translateY(-2px); }
  .btn-outline:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .link-arrow:hover::after { transform: translateX(4px); }
  .nav a:hover::after { transform: rotate(45deg) scale(1); }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  .person.in:hover { transform: translateY(-5px); border-color: var(--coral); box-shadow: 0 18px 40px rgba(200, 80, 58, .14); }
  .person:hover img { transform: rotate(-4deg) scale(1.05); }
  .gallery-item:hover { rotate: 0deg; scale: 1.04; box-shadow: 0 26px 60px rgba(47, 41, 38, .24); z-index: 2; }
  .event.in:hover { transform: translateX(8px); box-shadow: 0 18px 46px rgba(200, 80, 58, .2); }
  .venue-card { transition: opacity 800ms var(--ease-soft), transform 400ms var(--ease-out), box-shadow 400ms ease; }
  .venue-card.in:hover { transform: translateY(-6px); box-shadow: 0 30px 66px rgba(200, 80, 58, .2); }
  .gift-item.in:hover { transform: translateY(-6px); border-color: var(--coral); box-shadow: 0 18px 40px rgba(200, 80, 58, .14); }
  .lb button:hover { background: rgba(255, 255, 255, .26); }
}
.gallery-item:focus-visible { rotate: 0deg; scale: 1.04; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.from-left, .js .reveal.from-right, .js .event:nth-child(odd), .js .event:nth-child(even) { transform: none; transition: opacity 200ms ease; }
  .js .hero-text > * { opacity: 1; animation: none; clip-path: none; }
  .js .hero-photo, .js .date-pink, .js .hero-visual .float-pill { animation: none; }
  .js .reveal .eyebrow::before, .js .reveal .eyebrow::after { transform: none; transition: none; }
  .heart, .fl, .pill-story, .marquee-track { animation: none; }
  .heart, .progress { display: none; }
  .hero-photo img, .story-frame img, .fl, .outline, .band-photo, .hero-text, .hero-text > * { transform: none !important; translate: none !important; }
  .ring-fg, .gallery-item, .person, .person img, .event, .venue-card, .gift-item, .lb img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav a { display: none; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-right: 0; width: min(100%, 460px); justify-self: center; }
  .hero-photo { border-radius: 32px; }
  .hero-visual .float-pill { left: -12px; }
  .date-pink { left: -12px; width: 150px; padding: 20px 12px 18px; }
  .dp-day { font-size: 3.4rem; }
  .story-grid { grid-template-columns: 1fr; }
  .story-photo { margin-left: 0; width: min(100%, 420px); justify-self: center; }
  .story-frame { border-radius: 32px; }
  .pill-story { right: -12px; }
  .band-grid { grid-template-columns: 1fr; justify-items: center; }
  .countdown { justify-content: center; }
  .band-photo { justify-self: center; }
  .venue-grid { grid-template-columns: 1fr; }
  .rsvp-grid { grid-template-columns: 1fr; }
  .rsvp .f4 { display: none; }
}
@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .gallery-item { padding: 8px 8px 26px; }
  .gallery-item:nth-child(3n+2) { translate: 0 0; }
  .gallery-item:nth-child(even) { translate: 0 14px; }
  .party-grid { grid-template-columns: 1fr; }
  .choice { grid-auto-flow: row; justify-items: start; }
  .event { grid-template-columns: 96px 1fr; }
  .event::before, .event::after { left: 85px; }
  .event-time { font-size: 1.25rem; padding: 18px 6px; }
  .event-body { padding: 16px 18px; }
  .float-pill { max-width: 230px; font-size: .85rem; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
