/* =====================================================================
   site.css — luxury invitation design system (mobile-first)
   Colors and fonts come from the couple's theme (core.js → applyTheme):
     --bg --surface --ink --muted --accent --soft --line --deep --deep-ink
     --f-display --f-serif --f-sans --f-script
   Layout concept: an editorial "wedding issue" — full-bleed cover, a personal
   letter, then alternating light/deep chapters set like a fine magazine.
   ===================================================================== */
:root {
  --bg: #F6F1E8; --surface: #FFFCF6; --ink: #1F1A15; --muted: #6E6255; --accent: #A88655;
  --soft: #E6D9C4; --line: #E2D6C3; --deep: #231D17; --deep-ink: #F3ECE0;
  --f-display: "Bodoni Moda", Didot, Georgia, serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --f-script: "Pinyon Script", cursive;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.22, .61, .2, 1);
  --space: clamp(84px, 13vw, 168px);
  --bar-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.75 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-opening, body.menu-open { overflow: hidden; }
img, video, iframe, svg { max-width: 100%; }
h1, h2, h3, h4, p, figure, blockquote, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--soft); color: var(--ink); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: var(--bg); padding: 10px 14px; }
.skip-link:focus { top: 12px; }

/* Film grain — a whisper of texture, never a gradient wash */
html[data-grain="on"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 250; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type ---------- */
.eyebrow { font: 500 11px/1.6 var(--f-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--muted); }
.eyebrow.light, .deep .eyebrow { color: color-mix(in srgb, var(--deep-ink) 70%, transparent); }
.script { font-family: var(--f-script); font-weight: 400; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.wrap.narrow { max-width: 720px; }
.wrap.wide { max-width: 1320px; }
.section { padding-block: var(--space); position: relative; }
.section.tint { background: var(--surface); }
.section.deep { background: var(--deep); color: var(--deep-ink); }
.sec-head { display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: clamp(48px, 8vw, 88px); }
.sec-head h2 { font: 400 clamp(42px, 8.5vw, 92px)/1 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.sec-sub { font: italic 400 clamp(19px, 3.6vw, 24px)/1.5 var(--f-serif); color: var(--muted); max-width: 34ch; }
.deep .sec-sub { color: color-mix(in srgb, var(--deep-ink) 72%, transparent); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 32px;
  border: 1px solid currentColor; background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; overflow: hidden;
  font: 500 11.5px/1 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { color: var(--bg); border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid::before { background: var(--accent); }
.btn.solid:hover { border-color: var(--accent); color: #fff; }
.btn-light { color: #fff; border-color: rgba(255, 255, 255, .8); }
.btn-light::before { background: #fff; }
.btn-light:hover { color: #1a1510; border-color: #fff; }
.btn-lg { min-height: 58px; padding: 0 40px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 6px 0; cursor: pointer; font: 500 11px/1 var(--f-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* =====================================================================
   OPENING
   ===================================================================== */
.opening { position: fixed; inset: 0; z-index: 200; background: #120E0B; color: #fff; overflow: hidden; display: grid; place-items: center; }
.opening.is-leaving { pointer-events: none; }
.op-media { position: absolute; inset: 0; transition: transform 1.6s var(--ease), opacity 1.2s ease; }
.op-media img, .op-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-media iframe { position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none; width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh; transform: translate(-50%, -50%); }
.op-media .kenburns { animation: kenburns 22s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16) translate(-1.5%, -1%); } }
.op-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(14, 10, 8, .28), rgba(14, 10, 8, .72)); }
/* Cinematic letterbox bars that part when the invitation opens */
.op-bar { position: absolute; left: 0; right: 0; height: 11vh; background: #0b0907; z-index: 2; transition: transform 1.2s var(--ease); }
.op-bar.top { top: 0; } .op-bar.bottom { bottom: 0; }
.opening.is-leaving .op-bar.top { transform: translateY(-100%); }
.opening.is-leaving .op-bar.bottom { transform: translateY(100%); }
.opening.is-leaving .op-content { opacity: 0; transform: translateY(-14px); }
.opening.is-leaving .op-media { transform: scale(1.08); opacity: 0; }
.opening.is-gone { display: none; }

.op-content { position: relative; z-index: 3; display: grid; justify-items: center; gap: 18px; text-align: center; padding: 0 var(--gutter-r) 0 var(--gutter-l); transition: opacity .8s ease, transform .9s var(--ease); }
.op-mono { width: 84px; height: 84px; color: rgba(255, 255, 255, .85); }
.op-mono .mg-l { font: 400 30px var(--f-display); } .op-mono .mg-amp { font: italic 400 14px var(--f-serif); }
.op-for { font: 500 11px/1.6 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.op-for b { display: block; margin-top: 6px; font: italic 400 22px/1.3 var(--f-serif); letter-spacing: 0; text-transform: none; color: #fff; }
.op-names { font: 400 clamp(52px, 13vw, 132px)/.98 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.op-names i { font: italic 400 .5em var(--f-serif); display: inline-block; margin: 0 .25em; color: rgba(255, 255, 255, .8); }
.op-message { font: italic 400 clamp(19px, 4vw, 26px)/1.4 var(--f-serif); color: rgba(255, 255, 255, .86); max-width: 30ch; }
.op-date { font: 500 12px/1 var(--f-sans); letter-spacing: .42em; color: rgba(255, 255, 255, .9); margin-bottom: 10px; padding-left: .42em; }
/* entrance choreography */
html[data-motion="full"] .op-content > *, html[data-motion="subtle"] .op-content > * { animation: op-rise 1.4s var(--ease) both; }
.op-content > :nth-child(1) { animation-delay: .25s !important; } .op-content > :nth-child(2) { animation-delay: .45s !important; }
.op-content > :nth-child(3) { animation-delay: .6s !important; } .op-content > :nth-child(4) { animation-delay: .9s !important; }
.op-content > :nth-child(5) { animation-delay: 1.1s !important; } .op-content > :nth-child(6) { animation-delay: 1.35s !important; }
@keyframes op-rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }

.op-loading { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(11vh + 18px); display: grid; justify-items: center; gap: 10px; font: 500 10px/1 var(--f-sans); letter-spacing: .34em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.line-loader { width: 120px; height: 1px; background: rgba(255, 255, 255, .25); overflow: hidden; position: relative; }
.line-loader::after { content: ""; position: absolute; inset: 0; background: #fff; transform: translateX(-100%); animation: line 1.6s var(--ease) infinite; }
@keyframes line { to { transform: translateX(100%); } }
.op-controls { position: absolute; z-index: 4; right: calc(16px + env(safe-area-inset-right, 0px)); top: calc(11vh + 14px); display: flex; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(10, 8, 6, .3); color: #fff; cursor: pointer; font: 500 10px/1 var(--f-sans); letter-spacing: .24em; text-transform: uppercase; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.i-pause { width: 10px; height: 10px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.i-play { width: 0; height: 0; border-left: 9px solid currentColor; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }

/* =====================================================================
   TOP BAR & MENU
   ===================================================================== */
.topbar {
  position: fixed; z-index: 120; top: 0; left: 0; right: 0; height: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--gutter-r) 0 var(--gutter-l);
  display: flex; align-items: center; justify-content: space-between; color: #fff; transition: background .5s ease, color .5s ease, border-color .5s ease; border-bottom: 1px solid transparent;
}
.topbar.solid { background: color-mix(in srgb, var(--bg) 92%, transparent); color: var(--ink); border-bottom-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tb-mono { width: 40px; height: 40px; display: block; color: currentColor; }
.tb-mono .mg-l { font: 400 30px var(--f-display); } .tb-mono .mg-amp { font: italic 400 14px var(--f-serif); }
.tb-actions { display: flex; align-items: center; gap: 6px; }
.tb-rsvp, .tb-menu { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer; text-decoration: none; font: 500 10.5px/1 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; color: currentColor; }
.tb-rsvp { border: 1px solid currentColor; padding: 0 16px; min-height: 38px; }
.tb-menu .bars, .tb-menu .bars::before { display: block; width: 22px; height: 1px; background: currentColor; position: relative; transition: transform .4s var(--ease); }
.tb-menu .bars::before { content: ""; position: absolute; top: 6px; width: 14px; }
.menu-open .tb-menu .bars { transform: translateY(3px) rotate(45deg); }
.menu-open .tb-menu .bars::before { transform: translate(0, -6px) rotate(-90deg); width: 22px; }
.menu-open .topbar { color: var(--deep-ink); background: transparent; border-color: transparent; backdrop-filter: none; }

.menu { position: fixed; inset: 0; z-index: 110; background: var(--deep); color: var(--deep-ink); display: grid; align-content: center; padding: 90px var(--gutter-r) 40px var(--gutter-l); overflow-y: auto; clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease); }
.menu.open { clip-path: inset(0 0 0 0); }
.menu-list { display: grid; gap: 2px; max-width: 900px; margin: 0 auto; width: 100%; }
.menu-list a { display: flex; align-items: baseline; gap: 18px; text-decoration: none; padding: 8px 0; font: 400 clamp(32px, 7vw, 64px)/1.1 var(--f-display); color: color-mix(in srgb, var(--deep-ink) 82%, transparent); transition: color .3s ease, transform .5s var(--ease); }
.menu-list a small { font: 500 10px/1 var(--f-sans); letter-spacing: .3em; color: var(--accent); min-width: 28px; }
.menu-list a:hover, .menu-list a.active { color: var(--deep-ink); transform: translateX(8px); }
.menu-foot { max-width: 900px; margin: 34px auto 0; width: 100%; font: italic 400 18px/1.4 var(--f-serif); color: color-mix(in srgb, var(--deep-ink) 60%, transparent); }
.menu.open .menu-list li { animation: menu-in .8s var(--ease) both; }
.menu.open .menu-list li:nth-child(2) { animation-delay: .04s; } .menu.open .menu-list li:nth-child(3) { animation-delay: .08s; } .menu.open .menu-list li:nth-child(4) { animation-delay: .12s; }
.menu.open .menu-list li:nth-child(5) { animation-delay: .16s; } .menu.open .menu-list li:nth-child(6) { animation-delay: .2s; } .menu.open .menu-list li:nth-child(7) { animation-delay: .24s; }
.menu.open .menu-list li:nth-child(8) { animation-delay: .28s; } .menu.open .menu-list li:nth-child(9) { animation-delay: .32s; } .menu.open .menu-list li:nth-child(10) { animation-delay: .36s; }
@keyframes menu-in { from { opacity: 0; transform: translateY(24px); } }

.notice { position: relative; z-index: 2; margin-top: var(--bar-h); background: var(--soft); color: var(--ink); text-align: center; padding: 14px var(--gutter-r) 14px var(--gutter-l); font: 400 14.5px/1.5 var(--f-sans); }
.demo-ribbon { position: fixed; z-index: 260; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 16px; font: 500 10px/1.3 var(--f-sans); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }

/* =====================================================================
   COVER
   ===================================================================== */
.cover { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: #fff; background: var(--deep); }
.cover-img { position: absolute; inset: -8% 0; background-size: cover; background-position: center; will-change: transform; }
.cover-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 10, 8, .38), rgba(14, 10, 8, .1) 35%, rgba(14, 10, 8, .62)); }
.cover-text { position: relative; z-index: 1; padding: 0 var(--gutter-r) clamp(96px, 16vh, 150px) var(--gutter-l); display: grid; gap: 18px; justify-items: center; text-align: center; width: 100%; }
.kicker { font: 500 11px/1 var(--f-sans); letter-spacing: .42em; text-transform: uppercase; padding-left: .42em; color: rgba(255, 255, 255, .88); }
.cover-names { font: 400 clamp(64px, 16vw, 200px)/.9 var(--f-display); letter-spacing: -.02em; text-wrap: balance; }
.cover-names .line { display: block; overflow: hidden; padding-bottom: .06em; }
.cover-names .line > span { display: inline-block; }
.cover-names .amp { display: block; font: italic 400 .36em/1.3 var(--f-serif); color: rgba(255, 255, 255, .85); }
.cover-date { font: italic 400 clamp(19px, 3.6vw, 26px)/1.4 var(--f-serif); color: rgba(255, 255, 255, .92); }
.cover-date span { font-style: normal; margin: 0 .5em; opacity: .6; }
.scroll-cue { position: absolute; z-index: 1; left: 50%; bottom: 28px; width: 1px; height: 56px; transform: translateX(-50%); overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: rgba(255, 255, 255, .9); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
body.opened .cover-names .line > span { animation: line-up 1.4s var(--ease) both; }
body.opened .cover-names .line:nth-child(2) > span { animation-delay: .12s; } body.opened .cover-names .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes line-up { from { transform: translateY(105%); } }

/* =====================================================================
   LETTER
   ===================================================================== */
.letter { text-align: center; overflow: hidden; }
.letter .wrap { display: grid; gap: 26px; justify-items: center; position: relative; z-index: 1; }
.letter-greeting { font: italic 400 clamp(34px, 7vw, 60px)/1.15 var(--f-serif); text-wrap: balance; }
.letter-body { font: 400 clamp(20px, 3.6vw, 26px)/1.6 var(--f-serif); max-width: 32ch; color: color-mix(in srgb, var(--ink) 88%, transparent); }
.letter-personal { font: italic 400 20px/1.6 var(--f-serif); color: var(--muted); max-width: 36ch; border-top: 1px solid var(--line); padding-top: 26px; }
.letter-seats { display: grid; gap: 6px; justify-items: center; padding: 22px 30px; border: 1px solid var(--line); min-width: min(100%, 360px); }
.letter-seats b { font: 400 54px/1 var(--f-display); color: var(--accent); }
.letter-seats span { font: 500 11px/1.6 var(--f-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.letter-seats .status { margin-top: 8px; font: italic 400 17px/1.4 var(--f-serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.letter-sign { display: grid; gap: 4px; justify-items: center; font: italic 400 19px var(--f-serif); color: var(--muted); }
.letter-sign .script { font-size: clamp(44px, 8vw, 64px); line-height: 1.2; color: var(--ink); }
.floral { position: absolute; width: 180px; height: 344px; color: var(--accent); opacity: .5; pointer-events: none; }
.floral-left { left: -40px; top: 12%; }
.floral path, .floral circle { fill: none; stroke: currentColor; stroke-width: .9; }
html[data-motion="full"] .floral path, html[data-motion="full"] .floral circle { stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 3.2s var(--ease); }
html[data-motion="full"] .floral.drawn path, html[data-motion="full"] .floral.drawn circle { stroke-dashoffset: 0; }
.art-figure { width: min(100%, 420px); margin: 8px auto 0; }
.art-figure img { width: 100%; display: block; }

/* =====================================================================
   COUNTDOWN
   ===================================================================== */
.countdown { text-align: center; padding-block: clamp(70px, 11vw, 130px); }
.countdown .wrap { display: grid; gap: 34px; justify-items: center; }
.cd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 860px); border-top: 1px solid color-mix(in srgb, var(--deep-ink) 22%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--deep-ink) 22%, transparent); }
.cd-grid div { display: grid; gap: 10px; justify-items: center; padding: clamp(18px, 4vw, 34px) 4px; }
.cd-grid div + div { border-left: 1px solid color-mix(in srgb, var(--deep-ink) 22%, transparent); }
.cd-grid b { font: 400 clamp(38px, 10vw, 104px)/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; font-weight: 400; }
.cd-grid span { font: 500 9.5px/1 var(--f-sans); letter-spacing: .32em; text-transform: uppercase; color: color-mix(in srgb, var(--deep-ink) 66%, transparent); padding-left: .32em; }
.cd-done { font: italic 400 clamp(26px, 5vw, 40px)/1.35 var(--f-serif); max-width: 26ch; }

/* =====================================================================
   DETAILS
   ===================================================================== */
.events { display: grid; gap: 0; border-top: 1px solid var(--line); }
.event { display: grid; gap: 14px; padding: 44px 0; border-bottom: 1px solid var(--line); text-align: center; justify-items: center; }
.event .eyebrow { color: var(--accent); }
.event h3 { font: 400 clamp(32px, 6vw, 48px)/1.1 var(--f-display); }
.event .time { font: 400 clamp(54px, 11vw, 96px)/1 var(--f-display); font-variant-numeric: lining-nums; letter-spacing: -.02em; }
.event .time small { font: 500 .2em/1 var(--f-sans); letter-spacing: .3em; margin-left: .4em; vertical-align: .9em; }
.event .kind { font: italic 400 21px/1.3 var(--f-serif); color: var(--muted); }
.event .venue { font: 500 14px/1.5 var(--f-sans); letter-spacing: .16em; text-transform: uppercase; }
.event .addr { color: var(--muted); max-width: 36ch; }
.event .note { font: italic 400 18px/1.5 var(--f-serif); color: var(--muted); max-width: 38ch; }
.event .link-btn { margin-top: 4px; }
.details-extra { display: grid; gap: 28px; justify-items: center; text-align: center; margin-top: 52px; }
.details-extra .instructions { font: italic 400 clamp(20px, 3.4vw, 26px)/1.55 var(--f-serif); max-width: 36ch; }
.details-extra .dress { display: grid; gap: 4px; }
.details-extra .dress b { font: 400 30px/1.2 var(--f-display); }

/* =====================================================================
   STORY
   ===================================================================== */
.chapters { display: grid; gap: clamp(72px, 12vw, 140px); }
.chapter { display: grid; gap: 28px; align-items: center; }
.chapter figure { position: relative; }
.chapter img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--soft); }
.chapter figcaption { margin-top: 12px; font: italic 400 16px/1.4 var(--f-serif); color: var(--muted); }
.chapter .year { font: italic 400 clamp(64px, 14vw, 150px)/.9 var(--f-display); color: transparent; -webkit-text-stroke: 1px var(--accent); letter-spacing: -.02em; }
.chapter h3 { font: 400 clamp(32px, 6vw, 52px)/1.1 var(--f-display); margin: 12px 0 16px; }
.chapter p { font: 400 clamp(19px, 3vw, 23px)/1.65 var(--f-serif); color: color-mix(in srgb, var(--ink) 86%, transparent); max-width: 34ch; }

/* =====================================================================
   GALLERY
   ===================================================================== */
.films { display: grid; gap: 18px; margin-bottom: 64px; }
.film { position: relative; background: #0d0a08; aspect-ratio: 16 / 9; overflow: hidden; }
.film button.poster { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; background: #0d0a08; }
.film button.poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .78; transition: transform 1.4s var(--ease), opacity .6s ease; }
.film button.poster:hover img { transform: scale(1.04); opacity: .9; }
.film .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 14px; color: #fff; font: 500 10.5px/1 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; pointer-events: none; }
.film .play i { width: 74px; height: 74px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; display: grid; place-items: center; }
.film .play i::after { content: ""; border-left: 14px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }
.film .film-title { position: absolute; left: 20px; bottom: 16px; color: #fff; font: italic 400 22px/1.2 var(--f-serif); pointer-events: none; }
.film iframe, .film video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.film .film-state { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; text-align: center; padding: 20px; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-bottom: 34px; }
.filters button { background: none; border: 0; padding: 8px 0; cursor: pointer; font: 500 10.5px/1 var(--f-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid transparent; }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; grid-auto-flow: dense; }
.mosaic figure { position: relative; overflow: hidden; background: var(--soft); }
.mosaic button { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 5; transition: transform 1.2s var(--ease); }
.mosaic figure.wide { grid-column: span 2; } .mosaic figure.wide img { aspect-ratio: 16 / 10; }
.mosaic button:hover img { transform: scale(1.035); }
.mosaic figcaption { position: absolute; left: 12px; bottom: 10px; color: #fff; font: italic 400 16px/1.2 var(--f-serif); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); pointer-events: none; }

/* Lightbox */
.lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(10, 8, 6, .97); color: #fff; }
.lightbox::backdrop { background: rgba(10, 8, 6, .9); }
.lb-figure { height: 100%; display: grid; place-items: center; align-content: center; gap: 14px; padding: 70px 14px 80px; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; transition: opacity .45s ease, transform .6s var(--ease); }
.lb-figure img.swap { opacity: 0; transform: scale(.985); }
.lb-figure figcaption { font: italic 400 18px var(--f-serif); color: rgba(255, 255, 255, .8); }
.lb-btn { position: absolute; background: none; border: 1px solid rgba(255, 255, 255, .35); color: #fff; cursor: pointer; min-width: 48px; min-height: 48px; font: 500 10px/1 var(--f-sans); letter-spacing: .24em; text-transform: uppercase; padding: 0 14px; }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
.lb-prev { left: calc(14px + env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); font-size: 18px; }
.lb-next { right: calc(14px + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); font-size: 18px; }
.lb-count { position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); text-align: center; font: 500 10.5px/1 var(--f-sans); letter-spacing: .3em; color: rgba(255, 255, 255, .7); }

/* =====================================================================
   ENTOURAGE
   ===================================================================== */
.groups { display: grid; gap: clamp(56px, 9vw, 96px); }
.group { display: grid; gap: 26px; text-align: center; justify-items: center; }
.group > h3 { font: 500 11px/1.5 var(--f-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 18px; }
.group > h3::before, .group > h3::after { content: ""; width: 34px; height: 1px; background: var(--line); }
.people-centered { display: grid; gap: 6px; }
.people-centered p { font: 400 clamp(24px, 4.6vw, 34px)/1.35 var(--f-serif); }
.people-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; width: 100%; max-width: 760px; }
.people-columns p { font: 400 clamp(19px, 3.4vw, 24px)/1.35 var(--f-serif); }
.people-columns small, .people-centered small, .portrait small { display: block; font: 500 9.5px/1.6 var(--f-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.people-portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; width: 100%; max-width: 900px; }
.portrait { display: grid; gap: 10px; justify-items: center; }
.portrait .ph { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: var(--soft); border-radius: 999px 999px 0 0; }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--ease); }
.portrait:hover img { transform: scale(1.04); }
.portrait p { font: 400 clamp(21px, 3.6vw, 27px)/1.25 var(--f-serif); }
.portrait .desc { font: italic 400 16px/1.5 var(--f-serif); color: var(--muted); max-width: 26ch; }

/* =====================================================================
   PROGRAM
   ===================================================================== */
.timeline { position: relative; max-width: 760px; margin: 0 auto; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 22px; padding: 18px 0; }
.tl-icon { width: 64px; height: 64px; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; color: var(--accent); position: relative; z-index: 1; }
.tl-icon .icon { width: 34px; height: 34px; }
.tl-item .tl-time { font: 500 11px/1 var(--f-sans); font-style: normal; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.tl-item h3 { font: 400 clamp(26px, 4.6vw, 36px)/1.15 var(--f-display); margin: 8px 0 4px; }
.tl-item p { font: italic 400 18px/1.5 var(--f-serif); color: var(--muted); }

/* =====================================================================
   ATTIRE
   ===================================================================== */
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px; margin-bottom: 64px; }
.palette li { display: grid; justify-items: center; gap: 12px; width: 108px; text-align: center; }
.palette i { display: block; width: 76px; height: 104px; border-radius: 60px 60px 0 0; border: 1px solid color-mix(in srgb, var(--deep-ink) 25%, transparent); transition: transform .7s var(--ease); }
.palette li:hover i { transform: translateY(-8px); }
.palette b { font: 400 19px/1.2 var(--f-serif); font-weight: 500; }
.palette small { font: 500 10px/1 var(--f-sans); letter-spacing: .2em; color: color-mix(in srgb, var(--deep-ink) 60%, transparent); }
.attire-grid { display: grid; gap: 44px; max-width: 860px; margin: 0 auto; }
.attire-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; align-items: center; }
.attire-card .attire-art { width: 110px; height: 184px; color: var(--accent); }
.attire-card h3 { font: 500 11px/1.5 var(--f-sans); letter-spacing: .32em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.attire-card p { font: 400 clamp(20px, 3.4vw, 26px)/1.45 var(--f-serif); }
.attire-note { text-align: center; font: italic 400 clamp(19px, 3vw, 23px)/1.55 var(--f-serif); color: color-mix(in srgb, var(--deep-ink) 78%, transparent); max-width: 40ch; margin: 0 auto; }

/* =====================================================================
   VENUES
   ===================================================================== */
.venue-tabs { display: flex; justify-content: center; gap: 28px; margin-bottom: 34px; }
.venue-tabs button { background: none; border: 0; border-bottom: 1px solid transparent; padding: 10px 0; cursor: pointer; font: 500 11px/1 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.venue-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.venue-panel { display: grid; gap: 26px; }
.venue-info { display: grid; gap: 10px; text-align: center; justify-items: center; }
.venue-info h3 { font: 400 clamp(30px, 6vw, 48px)/1.1 var(--f-display); }
.venue-info p { color: var(--muted); max-width: 40ch; }
.map { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.35) contrast(.95); }
.map .map-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; color: var(--muted); }
.venue-notes { display: grid; gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.venue-notes div { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.venue-notes dt { font: 500 10.5px/1.5 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.venue-notes dd { margin: 0; font: 400 19px/1.55 var(--f-serif); }

/* =====================================================================
   RSVP
   ===================================================================== */
.rsvp-card { background: var(--bg); border: 1px solid var(--line); padding: clamp(26px, 6vw, 52px); display: grid; gap: 26px; }
.rsvp-card .lead { text-align: center; font: italic 400 21px/1.5 var(--f-serif); color: var(--muted); }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice label { position: relative; cursor: pointer; display: grid; }
.choice label > span { height: 100%; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: grid; place-items: center; gap: 4px; min-height: 92px; padding: 14px; border: 1px solid var(--line); text-align: center; font: italic 400 21px/1.2 var(--f-serif); transition: border-color .3s ease, background .3s ease; }
.choice span small { font: 500 9.5px/1.4 var(--f-sans); letter-spacing: .24em; text-transform: uppercase; font-style: normal; color: var(--muted); }
.choice input:checked + span { border-color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:focus-visible + span { outline: 1.5px solid var(--accent); outline-offset: 3px; }
.field { display: grid; gap: 8px; }
.field > span, .field legend { font: 500 10.5px/1.4 var(--f-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); padding: 0; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 19px/1.4 var(--f-serif); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 2px; border-radius: 0; min-height: 46px; -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-bottom-color: #9b3b2b; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.attendee { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
.attendee-list { display: grid; gap: 14px; }
.form-error { color: #9b3b2b; font-size: 14.5px; text-align: center; }
.form-error:empty { display: none; }
.rsvp-actions { display: grid; justify-items: center; gap: 12px; }
.rsvp-done { text-align: center; display: grid; gap: 18px; justify-items: center; }
.rsvp-done .big { font: italic 400 clamp(30px, 6vw, 46px)/1.2 var(--f-serif); }
.rsvp-done dl { display: grid; gap: 6px; margin: 0; font: 400 18px/1.5 var(--f-serif); color: var(--muted); }
.rsvp-done dt { display: inline; font: 500 10px/1 var(--f-sans); letter-spacing: .26em; text-transform: uppercase; margin-right: 8px; }
.rsvp-done dd { display: inline; margin: 0; }
.spinner { width: 14px; height: 14px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   AFTERWORD & FOOTER
   ===================================================================== */
.afterword { text-align: center; }
.afterword-text { font: italic 400 clamp(24px, 5vw, 36px)/1.5 var(--f-serif); }
.footer { background: var(--deep); color: var(--deep-ink); text-align: center; display: grid; justify-items: center; gap: 16px; padding: 90px var(--gutter-r) calc(90px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
.ft-mono { width: 96px; height: 96px; color: var(--accent); }
.ft-mono .mg-l, .tb-mono .mg-l { font: 400 30px var(--f-display); }
.ft-mono .mg-amp { font: italic 400 14px var(--f-serif); }
.ft-names { font: 400 clamp(36px, 7vw, 60px)/1.1 var(--f-display); }
.ft-top { font: 500 10.5px/1 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; text-underline-offset: 6px; padding: 12px; color: var(--accent); }
.footer .eyebrow { color: color-mix(in srgb, var(--deep-ink) 65%, transparent); }

/* =====================================================================
   REVEALS & MOTION
   ===================================================================== */
html[data-motion="full"] .reveal-pending { opacity: 0; transform: translateY(34px); }
html[data-motion="subtle"] .reveal-pending { opacity: 0; }
.reveal-in { opacity: 1; transform: none; transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); }
html[data-motion="none"] *, html[data-motion="none"] *::before, html[data-motion="none"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-pending { opacity: 1 !important; transform: none !important; }
  .floral path, .floral circle { stroke-dashoffset: 0 !important; }
}

/* =====================================================================
   LARGER SCREENS
   ===================================================================== */
@media (min-width: 760px) {
  body { font-size: 17px; }
  .events { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .event { padding: 10px 48px 34px; border-bottom: 0; }
  .event + .event { border-left: 1px solid var(--line); }
  .event.single { grid-column: 1 / -1; }
  .chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .chapter:nth-child(even) figure { order: 2; }
  .chapter:nth-child(even) .chapter-text { text-align: right; justify-items: end; }
  .chapter:nth-child(even) .chapter-text p { margin-left: auto; }
  .chapter-text { display: grid; }
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .films.one { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-inline: auto; }
  .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .mosaic figure.tall { grid-row: span 2; } .mosaic figure.tall img { aspect-ratio: auto; height: 100%; }
  .people-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .people-portraits { grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); justify-content: center; }
  .timeline::before { left: 50%; }
  .tl-item { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 0 34px; }
  .tl-item .tl-icon { grid-column: 2; grid-row: 1; }
  .tl-item .tl-body { grid-row: 1; }
  .tl-item:nth-child(odd) .tl-body { grid-column: 1; text-align: right; }
  .tl-item:nth-child(even) .tl-body { grid-column: 3; }
  .attire-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map { aspect-ratio: 16 / 8; }
  .venue-notes div { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: baseline; }
  .floral { width: 220px; height: 420px; opacity: .6; }
  .floral-left { left: max(0px, calc(50% - 560px)); }
}
@media (min-width: 1100px) {
  .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .people-columns { max-width: 900px; }
}
@media (max-width: 420px) {
  .op-names { font-size: 15vw; }
  .cd-grid span { letter-spacing: .2em; font-size: 8.5px; }
  .attendee { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .attire-card { grid-template-columns: 80px minmax(0, 1fr); }
  .attire-card .attire-art { width: 80px; height: 134px; }
}
