/*
 * Template 05: Midnight Gilt (version 1.1.0)
 * Dark editorial with gold accents, after the supplied reference: thin high-contrast display caps,
 * tall pill-shaped photos with big gold numerals, hairline stems and rotating "you are invited"
 * badge. Near-black warm background, ivory text, gold gradient accents and fine gold lines.
 * Bodoni Moda for display type, Karla for everything else. Fixed layout. Fonts and images are local
 * files, so this works offline.
 * Motion: pills that open up one after another, a spotlight that follows the pointer, slowly
 * shimmering gold numerals, lines that draw themselves, a rotating badge, parallax photos, a ruled
 * gold countdown, a line-drawn map that draws its route and a photo viewer. Everything stops for
 * reduced motion.
 */

@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../assets/fonts/bodoni-moda-normal-400-700.woff2') format('woff2'); }
@font-face { font-family: 'Karla'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../assets/fonts/karla-normal-300-700.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0D0C0B;
  --bg-2: #141210;
  --panel: #181614;
  --ink: #EFE8DC;
  --muted: #A89F90;
  --gold: #C9A45C;
  --gold-hi: #E8D08F;
  --gold-lo: #8F6E31;
  --line: rgba(201, 164, 92, .28);
  --line-soft: rgba(239, 232, 220, .12);
  --gold-grad: linear-gradient(135deg, #F1DDA3 0%, #C9A45C 48%, #8F6E31 100%);
  --shine: linear-gradient(110deg, #8F6E31 0%, #F1DDA3 38%, #C9A45C 55%, #8F6E31 100%);
  --display: 'Bodoni Moda', 'Didot', 'Bodoni MT', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-draw: cubic-bezier(0.65, 0, 0.35, 1);
  --wrap: 1240px;
  --bar: 70px;
  --pill: 11 / 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 8px); -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; font-weight: 400; line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::after { content: ''; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: .07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
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: 400; background: var(--gold); color: #1A1510; padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }

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

.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }

/* Gold numerals and text that slowly shimmer */
.num, .brand span, .event-time, .countdown b, .venue-mark { background: var(--shine); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold); animation: shine 11s linear infinite; }
.sec-head .num::before, .rsvp-intro .num::before { content: counter(sec, decimal-leading-zero) '.'; }
.num { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1; letter-spacing: -.02em; }
main { counter-reset: sec; }
.section { counter-increment: sec; }

/* ---------- Scroll progress: a gold rule down the right edge ---------- */
.progress { position: fixed; top: 0; bottom: 0; right: 0; width: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; width: 100%; height: 100%; background: var(--gold-grad); transform-origin: 50% 0; transform: scaleY(var(--progress, 0)); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(13, 12, 11, .84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(201, 164, 92, .18); }
.topbar-inner { width: min(var(--wrap), 100% - 48px); margin-inline: auto; height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { text-decoration: none; }
.brand span { display: inline-block; font-family: var(--display); font-size: 1.9rem; line-height: 1; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 34px; font-size: .7rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.nav a { position: relative; text-decoration: none; padding: 6px 0; color: var(--muted); transition: color 300ms ease; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform 500ms var(--ease-out); }
.top-link { display: inline-flex; align-items: center; gap: 10px; font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; text-decoration: none; color: var(--gold-hi); }
.top-link svg { width: 20px; height: 20px; transition: transform 400ms var(--ease-out); }

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; background: var(--gold-grad); color: #1A1510; font: 600 .72rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; text-decoration: none; padding: 20px 40px; border-radius: 999px; cursor: pointer; transition: transform 200ms var(--ease-out), box-shadow 400ms ease, color 300ms ease, background-color 300ms ease; }
.btn:active { transform: scale(0.98); }
.btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); pointer-events: none; }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold-hi); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-hi); padding-bottom: 4px; border-bottom: 1px solid var(--line); transition: border-color 300ms ease; }
.link-arrow::after { content: '\2192'; font-size: 1rem; letter-spacing: 0; transition: transform 400ms var(--ease-out); }

/* Pointer spotlight */
.glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(560px circle at var(--mx, 28%) var(--my, 30%), rgba(201, 164, 92, .15), transparent 62%), radial-gradient(1100px 640px at 72% 52%, rgba(255, 255, 255, .035), transparent 70%); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(calc(100svh - var(--bar)), 900px); display: grid; align-items: center; padding: 48px 0 96px; }
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 4.7fr 7.3fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-text { display: grid; justify-items: start; gap: 14px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(3.4rem, 7.6vw, 7.2rem); line-height: .98; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: anywhere; color: var(--ink);
  background: linear-gradient(100deg, #EFE8DC 28%, rgba(239, 232, 220, .3) 96%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-date { font-size: .78rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-hi); padding-top: 14px; border-top: 1px solid var(--line); }
.invite { position: relative; width: 150px; height: 150px; margin-top: 26px; margin-left: -10px; }
.invite-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 32s linear infinite; }
.invite-ring text { font: 500 11.5px var(--sans); letter-spacing: 4.4px; fill: var(--muted); }
.invite-dot { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: rgba(239, 232, 220, .06); border: 1px solid var(--line); }
.invite-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--gold); }
.invite-leaf { position: absolute; left: -22px; top: 54px; width: 36px; height: 72px; color: var(--gold); rotate: -28deg; opacity: .8; }

/* Tall pills */
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3.2vw, 46px); align-items: start; }
.pill-fig { display: grid; }
.pill { position: relative; grid-area: 1 / 1; aspect-ratio: var(--pill); border-radius: 999px; overflow: hidden; background: var(--panel); box-shadow: 0 34px 70px rgba(0, 0, 0, .55); }
.pill img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(.94); transition: filter 900ms ease; will-change: transform; }
.pill-fig .num { grid-area: 1 / 1; align-self: end; justify-self: end; z-index: 2; margin: 0 -.34em -.2em 0; font-size: clamp(2.6rem, 5.2vw, 4.8rem); text-shadow: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); }
.stem { display: block; width: 1px; height: 66px; margin: 30px auto 18px; background: linear-gradient(var(--gold), transparent); transform-origin: 50% 0; }
.pill-fig figcaption { display: grid; justify-items: center; gap: 4px; text-align: center; }
.cap-label { font-size: .68rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.cap-title { font-family: var(--display); font-size: clamp(.95rem, 1.5vw, 1.4rem); line-height: 1.2; text-transform: uppercase; letter-spacing: .01em; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(5rem, 9vw, 8rem); }
.section::before, .footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: 0 50%; }
.sec-head { position: relative; display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 36px); padding-bottom: 22px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-soft); transform-origin: 0 50%; }
.sec-head > div { display: grid; gap: 6px; }
.sec-grid .sec-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -.005em; text-transform: uppercase; }
.lead { max-width: 560px; color: var(--muted); margin: 0 0 2.5rem; }

/* Our story */
.story-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 6.5rem); align-items: center; }
.story-pill { position: relative; width: min(100%, 360px); justify-self: center; }
.story-pill .pill { grid-area: auto; }
.ring { position: absolute; inset: -14px; border: 1px solid var(--line); border-radius: 999px; pointer-events: none; }
.story-text { display: grid; gap: 22px; }
.story-text h2 { margin-bottom: 4px; }
.prose { display: grid; gap: 1.2em; color: var(--muted); }
.prose p { max-width: 56ch; }
.prose p:first-child::first-letter { font-family: var(--display); font-size: 3.6em; line-height: .8; float: left; padding: .06em .1em 0 0; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Band */
.band { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(6rem, 12vw, 10rem); text-align: center; }
.band-media { position: absolute; inset: -18% 0; z-index: -3; will-change: transform; }
.band-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) brightness(.55) contrast(1.05); }
.band::after { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, var(--bg) 0%, rgba(13, 12, 11, .5) 26%, rgba(13, 12, 11, .5) 74%, var(--bg) 100%); }
.glow-band { z-index: -1; }
.band-inner { display: grid; justify-items: center; gap: 22px; }
.countdown { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.countdown li { display: grid; justify-items: center; padding: clamp(22px, 4vw, 44px) 8px; border-left: 1px solid var(--line); overflow: hidden; }
.countdown li:first-child { border-left: 0; }
.countdown b { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 9vw, 7.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .68rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* Wedding party */
.party-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 52px 30px; counter-reset: p; }
.person { position: relative; counter-increment: p; display: grid; justify-items: center; text-align: center; }
.person-pill { position: relative; width: 100%; max-width: 190px; margin-bottom: 26px; }
.person-pill img { width: 100%; aspect-ratio: 5 / 8; object-fit: cover; border-radius: 999px; filter: grayscale(1) contrast(1.05); transition: filter 800ms ease, transform 800ms var(--ease-out); }
.person-pill::after { content: counter(p, decimal-leading-zero) '.'; position: absolute; right: -.4em; bottom: -.28em; font-family: var(--display); font-size: 2.6rem; line-height: 1; background: var(--shine); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); animation: shine 11s linear infinite; }
.person h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; line-height: 1.2; text-transform: uppercase; }
.person-role { font-size: .68rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }

/* Gallery: pill-shaped frames */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px clamp(20px, 4vw, 56px); align-items: start; }
.gallery-item { position: relative; border-radius: 999px; overflow: hidden; background: var(--panel); cursor: zoom-in; outline: 1px solid var(--line); outline-offset: 9px; transition: outline-color 400ms ease, transform 700ms var(--ease-out); }
.gallery-item:nth-child(3n+1) { aspect-ratio: 5 / 8; }
.gallery-item:nth-child(3n+2) { aspect-ratio: 1; margin-top: 84px; }
.gallery-item:nth-child(3n+3) { aspect-ratio: 5 / 9; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 800ms ease, transform 1200ms var(--ease-out); }
.gallery-item:focus-visible { outline-color: var(--gold-hi); }
.lb { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(8, 7, 6, .96); 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: 1px solid var(--gold); padding: 10px; background: var(--bg); transform: translateY(16px); transition: transform 600ms var(--ease-out); }
.lb.open img { transform: none; }
.lb button { position: absolute; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--gold-hi); font: 300 1.7rem/1 var(--sans); cursor: pointer; transition: background-color 250ms ease, color 250ms ease, transform 160ms var(--ease-out); }
.lb button:active { transform: scale(0.94); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; margin-top: -27px; }
.lb-next { right: 20px; top: 50%; margin-top: -27px; }
.lb-count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-size: .7rem; font-weight: 500; letter-spacing: .3em; color: var(--muted); }

/* Schedule */
.schedule-inner { max-width: 1020px; }
.timeline { border-top: 1px solid var(--line); }
.event { position: relative; display: grid; grid-template-columns: 210px 1fr 1.4fr; align-items: baseline; gap: 8px 36px; padding: 30px 0; border-bottom: 1px solid var(--line-soft); background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size 700ms var(--ease-out), padding 600ms var(--ease-out); }
.event-time { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.event h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.15; text-transform: uppercase; }
.event p { color: var(--muted); }

/* Venue and map */
.venue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px clamp(24px, 5vw, 64px); }
.venue-card { position: relative; display: grid; justify-items: start; gap: 6px; padding: 30px 0 34px 96px; border-top: 1px solid var(--gold); }
.venue-mark { position: absolute; left: 0; top: 16px; font-family: var(--display); font-size: 4.6rem; line-height: 1; font-style: normal; }
.venue-label { font-size: .68rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.venue-card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.08; text-transform: uppercase; }
.venue-time { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--gold-hi); }
.venue-address { white-space: pre-line; color: var(--muted); margin-bottom: 14px; }
.venue-map { position: relative; margin-top: 60px; aspect-ratio: 16 / 8; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.venue-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.venue-note { white-space: pre-line; margin-top: 2.5rem; padding: 26px 32px; border: 1px solid var(--line); color: var(--muted); }
.venue-note::before { content: 'Dress code and notes'; display: block; margin-bottom: 8px; font-size: .68rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }

/* Gifts */
.gifts-inner { max-width: 960px; }
.gift-list { border-top: 1px solid var(--line); }
.gift-item { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line-soft); background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size 700ms var(--ease-out), padding 600ms var(--ease-out); }
.gift-icon { width: 32px; height: 32px; color: var(--gold); }
.gift-name { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; }
.gift-external { margin-top: 2.5rem; }

/* RSVP */
.rsvp-grid { display: grid; grid-template-columns: 4fr 6fr; gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.rsvp-intro { display: grid; justify-items: start; gap: 12px; position: sticky; top: calc(var(--bar) + 28px); }
.rsvp-intro .lead { margin: 6px 0 0; }
.rsvp-form { display: grid; gap: 28px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: .68rem; font-weight: 600; letter-spacing: .28em; 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; font-size: 1.05rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(239, 232, 220, .32); border-radius: 0; padding: 12px 0; transition: border-color 250ms ease, box-shadow 250ms ease; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); box-shadow: 0 1px 0 var(--gold); }
.field textarea { resize: vertical; }
.choice { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
.choice legend { grid-column: 1 / -1; margin-bottom: 8px; }
.choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-pill span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 13px 24px; font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); cursor: pointer; background: transparent; transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform 160ms var(--ease-out); }
.choice-pill span:active { transform: scale(0.97); }
.choice-pill input:checked + span { background: var(--gold-grad); border-color: transparent; color: #1A1510; }
.choice-pill input:focus-visible + span { outline: 1px solid var(--gold-hi); outline-offset: 4px; }
.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: #9BD3A8; }
.form-status.err { color: #E59A9A; }
.confetti { position: fixed; z-index: 450; left: var(--x); top: var(--y); width: 7px; height: 11px; background: var(--c); border-radius: 50% 0 50% 0; pointer-events: none; animation: confetti 1.6s cubic-bezier(.2, .7, .3, 1) forwards; }

/* Footer */
.footer { position: relative; padding: clamp(4rem, 8vw, 6.5rem) 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.footer-main { display: grid; gap: 10px; }
.footer-names { font-family: var(--display); font-size: clamp(2.8rem, 8vw, 7rem); line-height: .98; text-transform: uppercase; letter-spacing: -.01em; background: linear-gradient(100deg, #EFE8DC 30%, rgba(239, 232, 220, .28) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.footer-date { font-family: var(--display); font-style: italic; font-size: 1.4rem; color: var(--gold-hi); }

/* Map drawing */
.venue-map text { font: 500 24px var(--sans); fill: var(--muted); letter-spacing: 2px; }
.venue-map .pin text { font: 400 26px var(--display); fill: #1A1510; letter-spacing: 0; }
.venue-map .compass text { font: 600 18px var(--sans); fill: var(--gold); }
.venue-map .blades { animation: spin-svg 14s linear infinite; }
.js .venue-map .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .venue-map.in .draw { stroke-dashoffset: 0; transition: stroke-dashoffset 2600ms var(--ease-draw) 400ms; }
.js .venue-map .pin, .js .venue-map .banner, .js .venue-map .compass { opacity: 0; }
.js .venue-map.in .pin, .js .venue-map.in .banner, .js .venue-map.in .compass { opacity: 1; transition: opacity 500ms ease 3s; }
.js .venue-map.in .pin-a { animation: pin-drop 800ms var(--ease-out) 400ms backwards; }
.js .venue-map.in .pin-b { animation: pin-drop 800ms var(--ease-out) 3s backwards; }

/* ---------- Motion ---------- */
/* Scroll reveals. Content is visible by default; the .js class is added in <head>. */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1000ms ease, transform 1000ms var(--ease-out); transition-delay: var(--delay, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .person:nth-child(3n+2), .js .gallery-item:nth-child(3n+2) { --delay: 120ms; }
.js .person:nth-child(3n+3), .js .gallery-item:nth-child(3n+3) { --delay: 240ms; }

/* Lines draw themselves */
.js .ruled::before { transform: scaleX(0); transition: transform 1600ms var(--ease-draw); }
.js .ruled.in::before { transform: none; }
.js .sec-head::after { transform: scaleX(0); transition: transform 1600ms var(--ease-draw) 300ms; }
.js .sec-head.in::after { transform: none; }
.js .rsvp-intro .num { margin-bottom: 4px; }

/* Hero entrance */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mask-up { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(40px); } to { opacity: 1; clip-path: inset(-12% -4% -12% -4%); transform: none; } }
@keyframes pill-open { from { clip-path: inset(50% 0 50% 0 round 999px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 999px); opacity: 1; } }
@keyframes stem-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.js .hero-text > * { opacity: 0; animation: rise 1000ms var(--ease-out) forwards; }
.js .hero-text > :nth-child(1) { animation-delay: 150ms; }
.js .hero-text > :nth-child(2) { animation: mask-up 1400ms var(--ease-out) 300ms forwards; }
.js .hero-text > :nth-child(3) { animation-delay: 900ms; }
.js .hero-text > :nth-child(4) { animation-delay: 1100ms; }
.js .pill-fig .pill { animation: pill-open 1500ms var(--ease-draw) backwards; }
.js .pill-fig:nth-child(1) .pill { animation-delay: 500ms; }
.js .pill-fig:nth-child(2) .pill { animation-delay: 750ms; }
.js .pill-fig:nth-child(3) .pill { animation-delay: 1000ms; }
.js .pill-fig .num { animation: rise 900ms var(--ease-out) backwards, shine 11s linear infinite; }
.js .pill-fig:nth-child(1) .num { animation-delay: 1.6s, 0s; }
.js .pill-fig:nth-child(2) .num { animation-delay: 1.85s, 0s; }
.js .pill-fig:nth-child(3) .num { animation-delay: 2.1s, 0s; }
.js .pill-fig .stem { animation: stem-draw 1000ms var(--ease-draw) backwards; }
.js .pill-fig:nth-child(1) .stem { animation-delay: 1.8s; }
.js .pill-fig:nth-child(2) .stem { animation-delay: 2.05s; }
.js .pill-fig:nth-child(3) .stem { animation-delay: 2.3s; }
.js .pill-fig figcaption { animation: rise 900ms var(--ease-out) backwards; }
.js .pill-fig:nth-child(1) figcaption { animation-delay: 2.2s; }
.js .pill-fig:nth-child(2) figcaption { animation-delay: 2.45s; }
.js .pill-fig:nth-child(3) figcaption { animation-delay: 2.7s; }

/* Ambient */
@keyframes shine { to { background-position: -240% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-svg { to { transform: rotate(360deg); } }
@keyframes tick-in { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-60px); } to { opacity: 1; transform: none; } }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
.countdown b.tick { animation: tick-in 450ms var(--ease-out), shine 11s linear infinite; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 14px 34px rgba(201, 164, 92, .3); transform: translateY(-2px); }
  .btn:hover::after { left: 130%; transition: left 800ms var(--ease-out); }
  .btn-outline:hover { background: var(--gold-grad); color: #1A1510; border-color: transparent; }
  .link-arrow:hover { border-color: var(--gold); }
  .link-arrow:hover::after, .top-link:hover svg { transform: translateX(6px); }
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: scaleX(1); }
  .pill-fig:hover .pill img, .story-pill:hover .pill img { filter: grayscale(0) contrast(1); }
  .person:hover .person-pill img { filter: grayscale(0) contrast(1); transform: scale(1.04); }
  .gallery-item:hover { outline-color: var(--gold); transform: translateY(-6px); }
  .gallery-item:hover img { filter: grayscale(0) contrast(1); transform: scale(1.06); }
  .event:hover, .gift-item:hover { background-size: 100% 1px; padding-left: 16px; }
  .venue-card { transition: transform 500ms var(--ease-out); }
  .lb button:hover { background: var(--gold); color: #1A1510; }
}
.gallery-item:focus-visible img { filter: grayscale(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 200ms ease; }
  .js .ruled::before, .js .sec-head::after { transform: none; transition: none; }
  .js .hero-text > *, .js .pill-fig .pill, .js .pill-fig .num, .js .pill-fig .stem, .js .pill-fig figcaption { opacity: 1; animation: none; clip-path: none; }
  .num, .brand span, .event-time, .countdown b, .venue-mark, .person-pill::after { animation: none; }
  .invite-ring, .venue-map .blades { animation: none; }
  .glow { display: none; }
  .progress { display: none; }
  .pill img, .band-media { transform: none !important; }
  .js .venue-map .draw { stroke-dashoffset: 0; transition: none; }
  .js .venue-map .pin, .js .venue-map .banner, .js .venue-map .compass { opacity: 1; transition: none; animation: none; }
  .gallery-item, .gallery-item img, .person-pill img, .event, .gift-item, .lb img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav a { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .invite { display: none; }
  .story-grid, .rsvp-grid { grid-template-columns: 1fr; }
  .rsvp-intro { position: static; }
  .venue-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(3n+2) { margin-top: 0; }
  .gallery-item:nth-child(even) { margin-top: 56px; }
  .event { grid-template-columns: 150px 1fr; }
  .event p { grid-column: 2; }
}
@media (max-width: 700px) {
  .container, .topbar-inner { width: calc(100% - 36px); }
  .pills { gap: 12px; }
  .pill-fig .num { font-size: 2rem; }
  .stem { height: 40px; margin: 20px auto 12px; }
  .cap-label { display: none; }
  .cap-title { font-size: .82rem; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .party-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .countdown li:nth-child(3) { border-left: 0; }
  .countdown li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .choice { grid-auto-flow: row; justify-items: start; }
  .venue-card { padding-left: 76px; }
  .venue-mark { font-size: 3.6rem; }
  .venue-map { aspect-ratio: 4 / 3; }
  .event { grid-template-columns: 1fr; gap: 4px; }
  .event p { grid-column: auto; }
  .gift-item { grid-template-columns: 36px 1fr; }
  .gift-item .link-arrow { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
