/* ==========================================================================
   Dionisio Jr. & Dianne — wedding site
   Palettes, type and spacing follow the "Wedding Invitation" Claude Design.
   ========================================================================== */

/* ---------- Palettes ---------- */
:root,
[data-palette="fiesta-garden"] {
  --bg: #FDF6F1; --bg2: #F8E3E3; --card: #FFFFFF; --ink: #3A2440; --head: #7A2E6F;
  --mute: #6F5A6B; --line: #EBBFC8; --gold: #A42472; --deep: #4A1F42; --deepInk: #FBEFF3;
  --wingA: #C8B4E6; --wingB: #BFE1F4; --wingC: #FFE07A; --bloom: #D13C7D;
  --btn: #D13C7D; --btnInk: #FFFFFF; --nav: rgba(253, 246, 241, .88);
}
[data-palette="peach-berry"] {
  --bg: #FDF8F4; --bg2: #FBEDE4; --card: #FFFFFF; --ink: #2B2E3F; --head: #203A6B;
  --mute: #6B6C7C; --line: #F1CDB6; --gold: #A42472; --deep: #203A6B; --deepInk: #FBF1F5;
  --wingA: #C68FD6; --wingB: #F4B393; --wingC: #E9A8B7; --bloom: #D13C7D;
  --btn: #A42472; --btnInk: #FFFFFF; --nav: rgba(253, 248, 244, .88);
}
[data-palette="evening-bloom"] {
  --bg: #16302B; --bg2: #1D3A34; --card: #22443C; --ink: #EDE8DC; --head: #F3EFE6;
  --mute: #B5C4B8; --line: rgba(217, 194, 143, .42); --gold: #D9C28F; --deep: #0E211D; --deepInk: #F3EFE6;
  --wingA: #C8B4E6; --wingB: #BFE1F4; --wingC: #FFE07A; --bloom: #E9A8B7;
  --btn: #D9C28F; --btnInk: #16302B; --nav: rgba(22, 48, 43, .88);
}
/* Sampled from the prenup photos: sunlit cream, treeline olive, golden hour. */
[data-palette="sunlit-meadow"] {
  --bg: #FBF7F1; --bg2: #F2EADD; --card: #FFFFFF; --ink: #2E2A23; --head: #3F4A33;
  --mute: #655D4E; --line: #DED3C0; --gold: #8A5F25; --deep: #3F4A33; --deepInk: #FBF7F1;
  --wingA: #A9B493; --wingB: #9DB7CB; --wingC: #E3BC73; --bloom: #C06A45;
  --btn: #3F4A33; --btnInk: #FBF7F1; --nav: rgba(251, 247, 241, .88);
}
/* The translucent evening --line is too faint to use as footer text. */
[data-palette="evening-bloom"] .site-footer { --line: #D9C28F; }

/* Metric-matched Georgia so the page doesn't jump when Cormorant arrives. */
@font-face {
  font-family: 'Cormorant Fallback';
  src: local('Georgia');
  size-adjust: 88%; ascent-override: 105%; descent-override: 33%; line-gap-override: 0%;
}

:root {
  --serif: 'Cormorant Garamond', 'Cormorant Fallback', 'Cormorant', Garamond, Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', 'Century Gothic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad-x: clamp(20px, 6vw, 80px);
  --pad-y: clamp(72px, 10vw, 120px);
  --header-h: 62px;
}
/* --rule: hairlines (darker on tinted sections); --sub: the italic line under a section title. */
html { --rule: var(--line); --sub: color-mix(in srgb, var(--bloom) 87%, #000); }
[data-palette="evening-bloom"] { --sub: var(--bloom); }
@supports (color: color-mix(in srgb, red, blue)) {
  .section--tint { --rule: color-mix(in srgb, var(--line) 80%, var(--ink)); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
/* Smooth scrolling only after load, so shared links like …/#rsvp land exactly. */
@media (prefers-reduced-motion: no-preference) { html.is-ready { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--bg); }
a { color: var(--head); text-decoration: none; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; }
strong { font-weight: 500; }
main { display: block; scroll-margin-top: 64px; }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--card); color: var(--head); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; font-size: 13px; letter-spacing: .08em;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared type ---------- */
.h2 {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 4.6vw, 54px); line-height: 1.05; color: var(--head);
}
.h3 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 2.7vw, 34px); line-height: 1.15; color: var(--head);
}
.h3--lg { font-size: 34px; line-height: 1.1; }
.lead { margin: 0; max-width: 58ch; font-size: 17px; line-height: 1.7; color: var(--ink); }
.body { margin: 0; font-size: 16px; line-height: 1.75; color: var(--ink); }
.muted { margin: 0; font-size: 15px; line-height: 1.6; color: var(--mute); }
.lead, .timeline__body, .chapter, .hero__copy, .note, .panel--center { text-wrap: pretty; }

.text-link {
  position: relative; display: inline-block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--head); border-bottom: 1px solid var(--line); padding: 0 0 3px;
  background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer;
  font-family: var(--sans); text-align: left; transition: border-color .2s;
}
.text-link::before { content: ""; position: absolute; inset: -10px -4px -8px; } /* bigger tap area */
.text-link:hover { color: var(--head); border-bottom-color: var(--head); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 15px 30px; border-radius: 999px; background: var(--btn); color: var(--btnInk);
  font-family: var(--sans); font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--btn); cursor: pointer; transition: transform .2s, opacity .2s, background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); opacity: .92; color: var(--btnInk); }
.btn:not(.btn--ghost):not(:disabled):hover {
  opacity: 1;
  background: color-mix(in srgb, var(--btn) 88%, #000); border-color: color-mix(in srgb, var(--btn) 88%, #000);
}
/* Outlined in the heading colour, for use beside a filled button. */
.btn--line { background: transparent; color: var(--head); border-color: var(--head); }
.btn.btn--line:not(:disabled):hover { background: color-mix(in srgb, var(--head) 10%, transparent); border-color: var(--head); color: var(--head); }
.btn--ghost { background: transparent; color: var(--head); border-color: var(--line); }
.btn--ghost:hover { opacity: 1; color: var(--head); border-color: var(--head); }
.btn--lg { padding: 16px 32px; }
.btn--sm { padding: 13px 26px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---------- Layout helpers ---------- */
.section { position: relative; background: var(--bg); padding: var(--pad-y) var(--pad-x); scroll-margin-top: 64px; }
.section--tint { background: var(--bg2); }
.section:focus { outline: none; }
.container { max-width: 1120px; margin: 0 auto; }
/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center;
  gap: clamp(14px, 2.4vw, 28px); padding: 10px clamp(16px, 4vw, 40px);
}
.brand { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; margin-right: auto; }
/* The monogram is a mask so it takes the palette's heading colour. */
.brand__mark {
  height: 44px; aspect-ratio: 900 / 773; background: var(--head);
  -webkit-mask: url(../assets/img/monogram.png) center / contain no-repeat;
  mask: url(../assets/img/monogram.png) center / contain no-repeat;
}
@media (max-width: 640px) {
  .site-header__inner { padding-block: 8px; }
  .brand__mark { height: 38px; }
}
.site-footer__names .amp { font-style: italic; font-weight: 400; color: var(--gold); }
.site-nav {
  position: relative; min-width: 0; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* padding gives focus rings room inside the scroller; margins cancel it out */
  padding: 6px 8px; margin: -6px -8px; scroll-padding-inline: 8px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav.is-overflowing {
  padding: 6px 22px 6px 14px; margin: -6px 0; scroll-padding-inline: 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
}
.site-nav a { position: relative; color: var(--ink); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a::after { content: ""; position: absolute; inset: -6px -7px; }
.site-nav a:hover { color: var(--head); }
.site-nav a[aria-current="true"] { color: var(--head); border-bottom-color: var(--line); }
.nav-rsvp {
  flex: none; color: var(--btnInk); background: var(--btn); border-radius: 999px; padding: 11px 18px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; transition: background-color .2s;
}
.nav-rsvp:hover { color: var(--btnInk); background: color-mix(in srgb, var(--btn) 88%, #000); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--bg);
  padding: clamp(56px, 9vh, 110px) var(--pad-x) clamp(72px, 10vh, 120px);
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
}
@supports (height: 100svh) { .hero { min-height: calc(100svh - var(--header-h)); } }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; opacity: 0; transition: opacity .6s;
}
.hero.has-video .hero__video { opacity: 1; }
.hero__wash { position: absolute; inset: 0; pointer-events: none; display: none; background: rgba(253, 246, 241, .74); }
.hero.has-video .hero__wash { display: block; }
.hero.has-video.wash-bold .hero__wash { background: linear-gradient(180deg, rgba(74, 31, 66, .5), rgba(74, 31, 66, .78)); }
.hero.has-video.wash-bold .hero__grid {
  --head: #FBEFF3; --ink: #FBEFF3; --gold: #FFE07A; --mute: #EBD9E6;
  --line: rgba(255, 255, 255, .5); --card: #4A1F42; --bg2: rgba(255, 255, 255, .14);
}
.sound-toggle {
  position: absolute; right: clamp(16px, 4vw, 40px); bottom: clamp(16px, 4vw, 32px); z-index: 3;
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px;
  background: var(--card); color: var(--head); border: 1px solid var(--line);
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 8px 24px rgba(74, 31, 66, .12); transition: border-color .2s;
}
.sound-toggle:hover { border-color: var(--head); }
.sound-toggle__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.sound-toggle[aria-pressed="true"] .sound-toggle__dot { background: #D13C7D; }

.hero__grid {
  position: relative; width: 100%; max-width: 1328px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
  gap: clamp(32px, 4vw, 56px); align-items: center;
}
.hero__copy { min-width: 0; }
.hero__title { margin: 0; }
.hero__save {
  display: block; font-family: var(--serif); font-weight: 300; text-transform: uppercase;
  font-size: clamp(60px, 8vw, 116px); line-height: .86; letter-spacing: .012em; color: var(--head);
}
.hero__names {
  display: block; margin-top: clamp(16px, 1.8vw, 26px);
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(28px, 3.2vw, 46px); line-height: 1.05; color: var(--bloom);
}
.hero__meta {
  margin: 26px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute);
}
.hero__meta span { white-space: nowrap; }
.hero__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero__foot { display: flex; align-items: flex-end; gap: 30px; margin-top: 56px; }
.hero__note {
  margin: 0; max-width: 30ch; font-family: var(--serif); font-style: italic;
  font-size: 18px; line-height: 1.5; color: var(--mute);
}
.hero__hint { display: none; }

/* "You are invited", turning slowly */
.invited { position: relative; width: 112px; height: 112px; flex: none; }
.invited svg { display: block; width: 100%; height: 100%; animation: invited-spin 26s linear infinite; }
.invited text { font-family: var(--sans); font-size: 9.5px; text-transform: uppercase; fill: var(--mute); }
.invited::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold);
}
@keyframes invited-spin { to { transform: rotate(360deg); } }

/* The three arched photos (upload them at /admin/media) */
.arches {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.1vw, 30px); align-items: start;
}
.arch { margin: 0; min-width: 0; }
.arch__frame { position: relative; }
.arch__img { aspect-ratio: 3 / 4; border-radius: 999px 999px 8px 8px; }
/* The numeral straddles the arch's bottom edge, so it sits outside the clipped photo. */
.arch__n {
  position: absolute; right: -.19em; bottom: -.35em; z-index: 2; pointer-events: none;
  font-family: var(--serif); font-weight: 300; font-size: clamp(50px, 6.7vw, 96px); line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: lining-nums;
  color: transparent; -webkit-text-stroke: 1.5px var(--head);
  text-shadow: 0 1px 10px color-mix(in srgb, var(--bg) 35%, transparent);
}
.arch__stem { display: block; width: 1px; height: 44px; background: var(--line); margin: 40px auto 0; }
.arch__meta { display: block; margin-top: 18px; text-align: center; }
.arch__date { display: block; min-height: 1.5em; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.arch__cap {
  display: block; margin-top: 10px; min-height: 2.4em;
  font-family: var(--serif); font-size: clamp(15px, 1.45vw, 21px); line-height: 1.2;
  letter-spacing: .02em; text-transform: uppercase; color: var(--ink);
}

@media (max-width: 899px) {
  .hero { align-items: flex-start; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 5px; margin-top: 16px; }
  .hero__dot, .hero__foot { display: none; }
  .hero__actions { margin-top: 22px; }
  /* The arches become a swipe rail that bleeds to the screen edge. */
  .arches {
    display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    margin-right: calc(-1 * var(--pad-x)); padding: 0 var(--pad-x) 4px 0;
  }
  .arches::-webkit-scrollbar { display: none; }
  .arch { flex: 0 0 clamp(150px, 28vw, 240px); scroll-snap-align: start; }
  .arch__n { font-size: 50px; }
  .arch__stem { height: 24px; margin-top: 26px; }
  .arch__date { display: none; }
  .arch__cap { font-size: 15px; margin-top: 7px; }
}
@media (max-width: 599px) {
  .hero__hint {
    display: flex; align-items: center; gap: 8px; margin: -10px 0 0;
    font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
  }
  .hero__hint::before { content: ""; width: 34px; height: 1px; background: var(--line); }
}

/* ---------- Photo slots (upload photos at /admin/media) ---------- */
.photo { position: relative; overflow: hidden; background: var(--bg2); }
.photo__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .5s ease;
}
.photo.is-loaded .photo__img { opacity: 1; }
.photo.is-loaded .photo__fallback { visibility: hidden; }
.photo__fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--card) 55%, transparent) 0 30%, transparent 62%),
    var(--bg2);
}
.photo__fallback img { width: auto; height: 52px; object-fit: contain; mix-blend-mode: multiply; opacity: .9; }
.photo__fallback:not(.photo__fallback--monogram) img {
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
.photo__fallback--trio img:nth-child(1) { height: 44px; transform: rotate(-14deg) translateY(10px); }
.photo__fallback--trio img:nth-child(2) { height: 58px; transform: translateY(-8px); }
.photo__fallback--trio img:nth-child(3) { height: 46px; transform: rotate(12deg) translateY(12px); }
.photo__fallback--monogram { flex-direction: column; gap: 14px; }
.photo__fallback--monogram img {
  height: 56px;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.photo__fallback--monogram span {
  font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 6vw, 64px);
  letter-spacing: .06em; color: var(--head); line-height: 1;
}
.photo__fallback--monogram em { font-weight: 400; color: var(--gold); }

/* ---------- Section headings and shared blocks ---------- */
.sec-title {
  margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(52px, 7.2vw, 92px);
  line-height: .95; letter-spacing: .01em; text-transform: uppercase; color: var(--head); text-wrap: balance;
}
.sec-sub {
  display: block; margin-top: .4em; font-style: italic; font-weight: 400; font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--sub);
}
.sec-head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 22px clamp(40px, 7.5vw, 96px); align-items: end;
}
.sec-head--wide { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.sec-head__aside { display: flex; flex-direction: column; gap: 14px; }
.item__tag { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.sub-head { margin-top: clamp(56px, 6.5vw, 84px); padding-top: 26px; border-top: 1px solid var(--rule); }

/* ---------- Welcome ---------- */
.welcome__grid {
  max-width: 1120px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(36px, 7vw, 88px); align-items: center;
}
.welcome__arch { aspect-ratio: 23 / 30; border-radius: 999px 999px 0 0; }
.welcome__arch .photo__img { object-position: 42% center; }
.welcome__copy .lead { margin-top: clamp(22px, 3vw, 34px); max-width: 56ch; }
.countdown {
  margin-top: clamp(34px, 4vw, 52px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.countdown__cell {
  min-width: 0; padding: clamp(16px, 2vw, 22px) 0 clamp(14px, 1.8vw, 20px) clamp(12px, 2.2vw, 28px);
  border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px;
}
.countdown__cell:first-child { padding-left: 0; border-left: 0; }
.countdown__num {
  font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 5vw, 64px); line-height: 1; color: var(--head);
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown__unit { font-size: 12px; letter-spacing: clamp(.12em, .5vw, .2em); text-transform: uppercase; color: var(--mute); }

/* ---------- Order of events ---------- */
.events {
  max-width: 1120px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7.5vw, 96px); align-items: start;
}
.events__intro { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 34px); }
.events__intro .lead { max-width: 44ch; }
/* Pin the intro only when it sits beside the timeline; stacked, it would cover it. */
@media (min-width: 820px) and (min-height: 560px) {
  .events__intro { position: sticky; top: 96px; z-index: 1; background: var(--bg2); }
}
.events__links { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.cal { position: relative; display: flex; }
.cal__menu {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 5; min-width: 220px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .12); display: flex; flex-direction: column;
}
.cal__item { padding: 12px 14px; border-radius: 4px; font-size: 13px; letter-spacing: .06em; color: var(--ink); }
.cal__item:hover, .cal__item:focus-visible { background: var(--bg2); color: var(--head); }

.timeline { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.timeline__item {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px;
  padding: 26px 0 28px; border-top: 1px solid var(--rule);
}
.timeline__time {
  font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  padding-top: clamp(6px, 1vw, 12px);
}
.timeline__body p { margin: 8px 0 0; max-width: 46ch; font-size: 17px; line-height: 1.7; }

/* ---------- Where: the two venues ---------- */
.venues { max-width: 1120px; margin: clamp(48px, 6vw, 72px) auto 0; }
.venues__list { margin-top: clamp(20px, 2.4vw, 28px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px clamp(32px, 5vw, 64px); }
.venue {
  border-top: 1px solid var(--rule); padding-top: clamp(22px, 2.4vw, 28px);
  display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 32px; align-items: start;
}
.venue__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.venue__copy .h3 { line-height: 1.12; }
.venue__name { display: flex; align-items: center; gap: clamp(14px, 1.4vw, 16px); }
.venue__name:has(img) { margin: 4px 0 2px; }
.venue__name img { flex: none; display: block; width: 68px; height: 68px; }
.venue__address { margin: 0; font-size: 17px; line-height: 1.7; }
.venue__map { margin-top: 12px; }
.venue__qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* White behind the code whatever the palette, so phone cameras can read it. */
.venue__qr img, .venue__reveal img { display: block; width: 156px; height: auto; background: #fff; }
.venue__qr figcaption { font-size: 12px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); text-align: center; }
.venue__reveal { display: none; }
.venue__reveal summary {
  min-height: 44px; display: flex; align-items: center; cursor: pointer; list-style: none;
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--head);
  text-decoration: underline; text-underline-offset: 5px;
}
.venue__reveal summary::-webkit-details-marker { display: none; }
.venue__reveal img { width: 180px; margin-top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Two venues side by side only once each has room for its text and code. */
@media (max-width: 1099px) { .venues__list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 819px) {
  .venues__list, .venue { grid-template-columns: minmax(0, 1fr); }
  .venue__copy { align-items: stretch; }
  .venue__qr { display: none; }
  .venue__name img { width: 56px; height: 56px; }
  .venue__reveal { display: block; }
  .btn.venue__map, .btn.venue__map:not(:disabled):hover { min-height: 52px; background: var(--btn); border-color: var(--btn); color: var(--btnInk); }
}

/* ---------- Wide photo between sections ---------- */
.pano { height: clamp(240px, 34vw, 440px); }
.pano .photo__img { object-position: center 62%; }
/* If the file is missing the script removes the image; don't leave an empty block. */
.pano:not(:has(img)), .rsvp__arch:not(:has(img)) { display: none; }

/* ---------- RSVP ---------- */
.rsvp {
  max-width: 1120px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(34px, 7.5vw, 96px); align-items: start;
}
.rsvp__intro { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 28px); }
.rsvp__intro .lead { max-width: 42ch; }
.rsvp__arch { width: min(300px, 100%); aspect-ratio: 3 / 4; border-radius: 999px 999px 0 0; margin-top: 20px; }
.rsvp__intro .muted a {
  position: relative; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); overflow-wrap: anywhere;
}
.rsvp__intro .muted a::before { content: ""; position: absolute; inset: -9px 0; } /* bigger tap area */
.rsvp__intro .muted a:hover { text-decoration-color: currentColor; }
.panel { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: clamp(28px, 5vw, 44px) 0; }
.panel--center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.panel--center:focus { outline: none; }
.panel__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--mute); }
.panel__text--sm { font-size: 14px; }

.rsvp-form { border: 0; padding: 14px 0 0; display: flex; flex-direction: column; gap: clamp(28px, 3vw, 34px); }
.field {
  display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0;
  font-size: clamp(12px, 1.1vw, 13px); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
.field legend { padding: 0; margin-bottom: 14px; }
.field input {
  font-family: var(--sans); font-size: clamp(17px, 1.6vw, 19px); font-weight: 400; line-height: 1.4;
  padding: 10px 0 12px; min-height: 48px; border: 0; border-radius: 0;
  border-bottom: 1px solid var(--mute); border-bottom-color: color-mix(in srgb, var(--mute) 80%, var(--bg2));
  background: transparent; color: var(--ink); outline: none;
  width: 100%; letter-spacing: 0; text-transform: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-bottom-color: var(--head); box-shadow: 0 2px 0 0 var(--head); }
.field input::placeholder { color: var(--mute); opacity: 1; }
/* Plus-ones: one name per line, added and taken away by main.js. */
.plus { gap: 0; }
.plus legend { margin-bottom: 6px; }
.plus__list { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 22px); }
.plus__list:not(:empty) { margin: 16px 0 clamp(18px, 2vw, 22px); }
.plus__row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 12px; align-items: end; }
.plus__label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 400; letter-spacing: .12em; }
.plus__label input { padding-top: 8px; }
.plus__remove {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 999px; background: transparent; color: var(--head); transition: background-color .2s, border-color .2s;
  border: 1px solid var(--mute); border-color: color-mix(in srgb, var(--mute) 80%, var(--bg2));
}
.plus__remove:hover { border-color: var(--head); background: color-mix(in srgb, var(--head) 10%, transparent); }
.plus__add { align-self: flex-start; gap: 10px; padding: 0 24px; font-weight: 500; }
.field [aria-invalid="true"] { border-bottom-color: var(--gold); box-shadow: 0 2px 0 0 var(--gold); }
.rsvp-form__foot {
  border-top: 1px solid var(--rule); padding-top: clamp(22px, 2.4vw, 26px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px;
}
.rsvp-form__total { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.4vw, 28px); line-height: 1.2; color: var(--head); }
.rsvp-form__error { margin: 0; font-size: 15px; color: var(--gold); }
.btn--submit { min-height: 58px; padding: 0 56px; font-size: 14px; letter-spacing: .18em; }
.rsvp-done { gap: 16px; }
.rsvp-done__summary { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.rsvp-done [data-rsvp-edit] { margin-top: 6px; }

@media (max-width: 819px) {
  .sec-head, .sec-head--wide, .welcome__grid, .events, .rsvp { grid-template-columns: minmax(0, 1fr); }
  .welcome__arch { aspect-ratio: 7 / 8; }
  .rsvp__arch { display: none; }
  .rsvp-form__foot { flex-direction: column; align-items: stretch; }
  .plus__add { align-self: stretch; min-height: 52px; }
}
@media (max-width: 599px) {
  .timeline__item { display: block; padding: 18px 0 20px; }
  .timeline__time { display: block; padding: 0 0 2px; font-size: 12px; }
  .timeline__body p { margin-top: 6px; }
  .events__links > * { flex: 1 1 150px; }
  .events__links .btn { width: 100%; padding-inline: 12px; font-size: 12px; letter-spacing: .12em; }
}

/* ---------- Our story ---------- */
.story { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 46px); }
.story__top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px clamp(20px, 3vw, 40px); }
.story__title {
  margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(42px, 5vw, 72px);
  line-height: .95; letter-spacing: .01em; color: var(--head);
}
.story__lede {
  margin: 0 0 14px; max-width: 34ch; font-family: var(--serif); font-style: italic;
  font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--mute);
}
.story__body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px); align-items: center;
}
.story__photo { aspect-ratio: 4 / 5; border-radius: 999px 999px 8px 8px; }
.chapter { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 24px; padding: 30px 0; }
.chapter + .chapter { border-top: 1px solid var(--line); }
.chapter__n {
  font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1;
  font-variant-numeric: lining-nums; color: transparent; -webkit-text-stroke: 1px var(--gold);
}
.chapter__date { margin: 0 0 9px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.chapter__title {
  margin: 0 0 10px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(23px, 2.2vw, 30px); line-height: 1.15; letter-spacing: .01em; color: var(--ink);
}
.chapter__body { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.65; color: var(--mute); }
.chapter__body + .chapter__body { margin-top: 10px; }
@media (max-width: 760px) {
  .story__body { grid-template-columns: minmax(0, 1fr); }
  .chapter { grid-template-columns: 38px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
  .chapter__n { font-size: 28px; }
}

/* ---------- Wedding details ---------- */
.dress__moodboard { aspect-ratio: 4 / 3; margin-top: 40px; }
/* Until the mood board has loaded the frame takes no space. */
.dress__moodboard:not(.is-loaded) { height: 0; margin-top: 0; }
/* Guest colours, with names and codes. */
.gp {
  margin-top: 28px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 32px clamp(20px, 3.4vw, 40px);
}
.gp__group h4 {
  margin: 0 0 16px; font-family: var(--sans); font-weight: 500; font-size: 13px; line-height: 1.3;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.gp__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gp__group li { display: flex; align-items: center; gap: 14px; }
.gp__group i {
  flex: none; width: clamp(44px, 4.2vw, 52px); aspect-ratio: 1; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
}
.gp__group li span { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.gp__group b { font-weight: 500; font-size: 16px; color: var(--ink); }
.gp__group small { font-size: 13px; color: var(--mute); }
.notes {
  margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(28px, 3vw, 36px) clamp(24px, 4vw, 48px);
}
.note h4 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--head); }
.note p { margin: 0; font-size: 16px; line-height: 1.7; }
.hashtag { color: var(--head); font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Closing ---------- */
.closing {
  position: relative; overflow: hidden; background: #1F1A14; color: var(--deepInk); text-align: center;
  min-height: clamp(520px, 48vw, 620px); padding: 64px var(--pad-x); display: grid; place-items: center;
}
.closing__photo { position: absolute; inset: 0; background: none; opacity: .62; }
.closing__photo .photo__img { object-position: center 45%; }
.closing__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.closing .sec-title { color: inherit; }
/* Keeps the words readable over the bright parts of the photo. */
.closing .sec-title, .closing__when { text-shadow: 0 0 18px rgba(31, 26, 20, .85), 0 1px 3px rgba(31, 26, 20, .7); }
.closing__when {
  margin: 22px 0 0; font-size: clamp(12px, 1.2vw, 14px); font-weight: 500; line-height: 1.7;
  letter-spacing: clamp(.2em, .5vw, .24em); text-transform: uppercase; text-wrap: balance;
}
.closing .closing__btn {
  margin-top: clamp(30px, 3vw, 38px); min-height: 58px; padding: 0 56px; font-size: 14px; font-weight: 500; letter-spacing: .18em;
  background: var(--deepInk); border-color: var(--deepInk); color: var(--deep);
}
.closing .btn.closing__btn:not(:disabled):hover {
  background: color-mix(in srgb, var(--deepInk) 90%, #000); border-color: color-mix(in srgb, var(--deepInk) 90%, #000); color: var(--deep);
}
.closing :focus-visible { outline-color: var(--deepInk); }
@media (max-width: 599px) { .closing__photo .photo__img { object-position: 46% center; } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; overflow: hidden; color: var(--deepInk); background: var(--deep);
  padding: clamp(52px, 6vw, 72px) var(--pad-x) clamp(32px, 3.5vw, 40px);
}
.site-footer :focus-visible { outline-color: var(--deepInk); }
.site-footer__inner {
  position: relative; max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.site-footer__mark {
  height: clamp(76px, 8vw, 96px); aspect-ratio: 900 / 773; background: var(--deepInk);
  -webkit-mask: url(../assets/img/monogram.png) center / contain no-repeat;
  mask: url(../assets/img/monogram.png) center / contain no-repeat;
}
.site-footer__names {
  margin: clamp(22px, 2.4vw, 26px) 0 0; padding-left: .34em;
  font-size: clamp(13px, 1.3vw, 15px); letter-spacing: .34em; text-transform: uppercase;
}
.site-footer__motto { margin: 14px 0 0; opacity: .85; }
.site-footer__motto em { font-family: var(--serif); font-size: clamp(21px, 2.1vw, 24px); }
.site-footer__base {
  margin-top: clamp(32px, 4vw, 48px); padding-top: 22px; align-self: stretch;
  border-top: 1px solid color-mix(in srgb, var(--deepInk) 28%, transparent);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 12px;
  font-size: 13px; letter-spacing: .08em; opacity: .85;
}
@media (max-width: 599px) { .site-footer__base { justify-content: center; text-align: center; } }

/* ---------- Butterflies ----------
   The 3D ones draw into one canvas per layer (js/butterflies-3d.js). The .bf
   rules style the flat SVG butterflies shown where 3D can't run. */
.butterflies { position: absolute; inset: 0; pointer-events: none; }
.bf3d { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.bf3d.is-live { opacity: 1; }
.bf { position: absolute; --bf-body: #221a15; --bf-k: clamp(1.2px, .13636vw, 1.65px); } /* = 3D scale: 1.5 × clamp(width/1100, .8, 1.1) */
.bf--morpho  { --bf-field: #3d98ff; --bf-border: #17120f; --bf-vein: #111a3d; --bf-spot: #f3efe5; }
.bf--monarch { --bf-field: #e9741c; --bf-border: #17120f; --bf-vein: #17120f; --bf-spot: #f6f1e6; }
.bf--ivory   { --bf-field: #f6efe0; --bf-border: #9a7b3c; --bf-vein: #b4934f; --bf-spot: #fffaf0; }
.bf--palette { --bf-field: var(--wing); --bf-border: #241a1f; --bf-vein: rgba(36, 26, 31, .5); --bf-spot: #fff8ef; }
.bf__float { position: absolute; inset: 0; animation: wf-float var(--float-dur, 8s) ease-in-out var(--delay, 0s) infinite alternate; }
.bf__stage { position: absolute; inset: 0; perspective: 160px; transform-style: preserve-3d; }
.bf__wing { position: absolute; top: 0; bottom: 0; width: 50%; }
.bf__wing svg, .bf__body svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bf__wing--l { left: 0; transform-origin: 100% 50%; animation: wf-flapL var(--flap, .8s) ease-in-out var(--delay, 0s) infinite alternate; }
.bf__wing--l svg { transform: scaleX(-1); }
.bf__wing--r { right: 0; transform-origin: 0% 50%; animation: wf-flapR var(--flap, .8s) ease-in-out var(--delay, 0s) infinite alternate; }
.bf__body { position: absolute; top: 0; bottom: 0; left: 50%; width: 17.6%; transform: translateX(-50%); }

@keyframes wf-float { 0% { transform: translate(0, 0); } 50% { transform: translate(10px, -16px); } 100% { transform: translate(-8px, 6px); } }
@keyframes wf-flapL { from { transform: rotateY(10deg); } to { transform: rotateY(72deg); } }
@keyframes wf-flapR { from { transform: rotateY(-10deg); } to { transform: rotateY(-72deg); } }

@media (prefers-reduced-motion: reduce) {
  .bf__float, .bf__wing { animation: none !important; }
  .bf3d { transition: none; }
  .invited svg { animation: none; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* RSVP spam trap: off-screen, so people never fill it in (bots do). */
.rsvp-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Print: a tidy one-pager of the essentials ---------- */
@media print {
  .site-header, .butterflies, .sound-toggle, .invited, .hero__hint, .arch__n, .closing__btn, .site-footer__mark,
  .countdown, #rsvp .panel, [data-rsvp], .cal, .photo { display: none !important; }
  .section, .hero { padding: 24px 0; min-height: 0; }
  .events__intro { position: static; }
  .site-footer, .closing { background: none; color: #000; min-height: 0; }
  /* On paper the codes are the useful part; the buttons are not. */
  .venue__reveal, .venue__map { display: none; }
  .venue__qr { display: flex; }
}
