:root {
  --paper: #f5f0ed;
  --paper-deep: #ece4df;
  --ink: #2c2826;
  --taupe: #857a72;
  --blush: #d8c5bd;
  --ghost: #dccfc8;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --photo: grayscale(0.35) sepia(0.22) contrast(0.94) brightness(0.97);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 3.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; filter: var(--photo); }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* small tracked caps, used for the date line, nav and labels */
.meta, .nav a, .program time, .place dt, .button, .countdown-label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.monogram { width: 6.5rem; height: 6.5rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.monogram ellipse { fill: none; stroke: var(--blush); stroke-width: 0.6; }
.monogram text { font-family: var(--script); font-size: 58px; fill: #c9b1a7; text-anchor: middle; }

.frame {
  position: relative;
  width: min(22rem, 78vw);
  padding: 0.75rem;
  border: 1px solid var(--blush);
  outline: 1px solid var(--blush);
  outline-offset: 5px;
}
.frame img { aspect-ratio: 1 / 1.05; width: 100%; object-fit: cover; object-position: 30% 50%; }
.frame-note {
  position: absolute;
  right: -2.75rem;
  bottom: -2.9rem;
  font-family: var(--script);
  font-size: 1.5rem;
  line-height: 1.05;
  color: var(--taupe);
  transform: rotate(-14deg);
}

.names {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15em 0.45em;
  margin-top: clamp(4.5rem, 9vw, 6.5rem);
  font-size: clamp(2.5rem, 7.5vw, 4.75rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: scaleX(0.9);
}
.slash { width: 0.42em; height: 0.42em; fill: var(--ink); }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; margin-top: 1.75rem; color: var(--taupe); }
.bar { width: 1px; height: 0.9em; background: currentColor; }

/* ---------- venue image with nav ---------- */
.venue-hero { position: relative; }
.venue-hero img { width: 100%; height: clamp(22rem, 60vw, 42rem); object-fit: cover; object-position: 50% 30%; }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 6vw, 5rem);
  padding: 0.9rem clamp(1rem, 5vw, 4rem) 0.8rem;
  background: rgba(245, 240, 237, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--blush);
}
.nav a { color: var(--ink); text-decoration: none; padding: 0.4rem 0; font-size: 0.625rem; }
.nav a:hover { text-decoration: underline; text-underline-offset: 0.5em; }

/* ---------- shared section pieces ---------- */
.invite, .details, .rsvp { position: relative; text-align: center; padding: clamp(6rem, 13vw, 10rem) 1.5rem clamp(4rem, 8vw, 6rem); }
.script-bg {
  position: absolute;
  inset: clamp(2.6rem, 6vw, 4.6rem) 0 auto;
  font-family: var(--script);
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  line-height: 1;
  color: var(--ghost);
  white-space: nowrap;
  pointer-events: none;
  overflow: hidden;
  padding: 0.15em 0 0.3em;
}
.invite-title, .section-title {
  position: relative;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: scaleX(0.9);
}

/* ---------- invitation ---------- */
.invite-text {
  max-width: 31rem;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 2;
  letter-spacing: 0.04em;
  text-align: justify;
  hyphens: auto;
}
.initial { font-family: var(--script); font-size: 2.9rem; line-height: 0; margin-right: 0.04em; vertical-align: -0.12em; }
.signature {
  max-width: 31rem;
  margin: 2.5rem auto 0;
  font-family: var(--script);
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--taupe);
  text-align: right;
  transform: rotate(-3deg);
}

/* ---------- three photos ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.4rem, 1.2vw, 0.9rem); padding: 0 clamp(0.4rem, 1.2vw, 0.9rem); }
.trio img { width: 100%; aspect-ratio: 7 / 10; object-fit: cover; }

/* ---------- countdown ---------- */
.countdown { padding: clamp(4.5rem, 10vw, 7.5rem) 1.5rem; text-align: center; }
.countdown-number { font-size: clamp(4.5rem, 14vw, 8.5rem); font-weight: 300; line-height: 1; font-variant-numeric: lining-nums; transform: scaleX(0.9); }
.countdown-label { margin-top: 1.25rem; color: var(--taupe); }

/* ---------- programme ---------- */
.details { background: var(--paper-deep); }
.details .script-bg, .rsvp .script-bg { color: #d6c7bf; }
.program { list-style: none; max-width: 34rem; margin: clamp(3rem, 6vw, 4.5rem) auto 0; padding: 0; text-align: left; }
.program li { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--blush); }
.program li:last-child { border-bottom: 1px solid var(--blush); }
.program time { grid-row: span 2; padding-top: 0.7em; color: var(--taupe); }
.program h3 { font-size: 1.5rem; font-weight: 400; line-height: 1.3; }
.program p { color: var(--taupe); font-style: italic; }

/* ---------- venue details ---------- */
.place { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.place img { width: 100%; height: 100%; min-height: 26rem; object-fit: cover; }
.place-text { padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5rem); max-width: 36rem; }
.place-text .section-title { transform-origin: left; margin-bottom: 1.75rem; }
.place address { margin: 1.75rem 0; font-style: italic; font-size: 1.3rem; line-height: 1.45; }
.place dl > div { padding: 0.9rem 0; border-top: 1px solid var(--blush); }
.place dt { color: var(--taupe); margin-bottom: 0.2rem; }

.button {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 1.05rem 2rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.button:hover { background: var(--ink); color: var(--paper); }

/* ---------- rsvp + footer ---------- */
.rsvp { background: var(--paper-deep); padding-bottom: clamp(5rem, 10vw, 7.5rem); }
.rsvp > p:not(.script-bg) { max-width: 31rem; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; }
.rsvp strong { font-weight: 500; }

.footer { padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem; text-align: center; }
.footer-script { font-family: var(--script); font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.2; }
.footer .meta { margin-top: 0.75rem; }

/* ---------- one load sequence, hero only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero > .frame { animation-delay: 0.15s; }
  .hero > .names { animation-name: rise-names; animation-delay: 0.35s; }
  .hero > .meta { animation-delay: 0.55s; }
  @keyframes rise { from { opacity: 0; translate: 0 14px; } }
  @keyframes rise-names { from { opacity: 0; translate: 0 14px; letter-spacing: 0.16em; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .frame-note { right: -0.6rem; bottom: -3.4rem; font-size: 1.3rem; }
  .nav { gap: 0; justify-content: space-between; }
  .nav a { font-size: 0.5625rem; letter-spacing: 0.16em; }
  .place { grid-template-columns: 1fr; }
  .place img { min-height: 0; aspect-ratio: 4 / 3; }
  .program li { grid-template-columns: 4rem 1fr; column-gap: 1rem; }
}
@media (max-width: 480px) {
  .names { flex-wrap: nowrap; gap: 0 0.3em; margin-top: 4rem; font-size: 10.4vw; letter-spacing: 0.04em; transform: none; white-space: nowrap; }
  .meta { flex-direction: column; }
  .bar { display: none; }
}

.program-note { margin-top: 1.2rem; color: var(--taupe); font-style: italic; text-align: center; }

.contact { margin-top: 2rem; color: var(--taupe); font-style: italic; }
.contact a { color: inherit; }

.bw { filter: grayscale(100%); }

/* ---------- faq ---------- */
.faq { position: relative; text-align: center; padding: clamp(6rem, 13vw, 10rem) 1.5rem clamp(4rem, 8vw, 6rem); }
.faq .script-bg { color: #e3d7d0; }
.faq-list { max-width: 36rem; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--blush); padding: 1.1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--blush); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font-size: 1.35rem; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--taupe); font-family: var(--sans); font-size: 1rem; }
.faq-a { display: grid; grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding-top: 0.7rem; color: var(--taupe); font-style: italic; }
.faq details.js .faq-a {
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.faq details.js.is-open .faq-a { grid-template-rows: 1fr; opacity: 1; }
.faq summary::after { transition: rotate 0.38s cubic-bezier(0.4, 0, 0.2, 1); }
.faq details.is-open summary::after, .faq details:not(.js)[open] summary::after { rotate: 45deg; }
@media (prefers-reduced-motion: reduce) {
  .faq details.js .faq-a, .faq summary::after { transition: none; }
}
@media (hover: hover) { .faq summary:hover { color: var(--taupe); } }
