/* ==========================================================================
   Harry & Aya — Eastnor Castle, 2 April 2027
   Design tokens lifted directly from the printed invitation.
   ========================================================================== */

:root {
  /* Palette — straight from the invite */
  --paper:        #f6f1e6;   /* the card stock */
  --paper-deep:   #e7e2d6;   /* the surround */
  --paper-warm:   #efe9dc;   /* alternating band */
  --ink:          #201f1d;
  --ink-70:       rgba(32, 31, 29, 0.70);
  --ink-62:       rgba(32, 31, 29, 0.62);
  --ink-45:       rgba(32, 31, 29, 0.45);
  --gold:         #b68235;
  --gold-deep:    #7d5411;
  --gold-dark:    #63410d;   /* hover fill — keeps white-ish text legible */
  --gold-hair:    rgba(182, 130, 53, 0.34);
  --gold-rule:    rgba(182, 130, 53, 0.70);
  --error:        #8c2f20;

  /* Type */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:    "Lora", Georgia, "Times New Roman", serif;

  /* Rhythm */
  --gutter:  clamp(20px, 5.5vw, 40px);
  --measure: 34rem;
  --section-y: clamp(56px, 11vw, 104px);

  --shadow-card: 0 14px 40px rgba(45, 43, 43, 0.18);
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper-deep);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--gold-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Hover darkens rather than lightens — the mid gold is only 3:1 on paper. */
a:hover { color: var(--gold-dark); }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--paper);
  border: 1px solid var(--gold);
}
.skip-link:focus { left: 8px; top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Shared type ---------------------------------------------------------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(2rem, 6.5vw, 2.85rem); line-height: 1.12; }
h3 { font-size: clamp(1.25rem, 3.6vw, 1.5rem); line-height: 1.25; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.0625rem;
  color: var(--ink-70);
  max-width: var(--measure);
  margin-inline: auto;
}

/* A visible marker for content that is not confirmed yet. */
.todo {
  display: inline;
  background: rgba(182, 130, 53, 0.14);
  border-bottom: 1px dashed var(--gold);
  padding: 0 0.25em;
  font-style: italic;
  color: var(--gold-deep);
}

/* --- Ornaments ------------------------------------------------------------ */

/* The rule-diamond-rule divider used throughout the invitation. */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 180px;
  margin: 24px auto;
}
.divider span:first-child,
.divider span:last-child { flex: 1; height: 1px; background: var(--gold-rule); }
.divider .diamond {
  width: 7px; height: 7px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  flex: 0 0 auto;
}
.divider--wide { width: min(280px, 70%); }


/* --- Navigation ----------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 230, 0.93);
  -webkit-backdrop-filter: saturate(150%) blur(8px);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--gold-hair);
}
@supports not (backdrop-filter: blur(8px)) {
  .nav { background: var(--paper); }
}

.nav__inner {
  max-width: 1060px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
}

.nav__mark {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  margin-right: auto;
}
.nav__mark em { font-style: italic; color: var(--gold-deep); }

.nav__toggle {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 1px solid var(--gold-hair);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 2px;
}
.nav__toggle:hover { border-color: var(--gold); }

.nav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(12px, 2vw, 24px);
}
.nav__links a {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-70);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.nav__links a:hover,
.nav__links a[aria-current="true"] {
  color: var(--gold-deep);
  border-bottom-color: var(--gold);
}

/* Mobile: the links collapse behind the Menu button. */
@media (max-width: 940px) {
  .nav__links {
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--gold-hair);
    box-shadow: 0 12px 24px rgba(45, 43, 43, 0.1);
    padding: 6px var(--gutter) 14px;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
  }
  /* .nav__links sets display:flex, which would otherwise beat the browser
     rule for [hidden] — they have equal specificity. */
  .nav__links[hidden] { display: none; }
  .nav__links a {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid var(--gold-hair);
    letter-spacing: 0.24em;
  }
  .nav__links li:last-child a { border-bottom: 0; }
}
@media (min-width: 941px) {
  .nav__toggle { display: none; }
  /* The toggle is meaningless at this width, so ignore its hidden state. */
  .nav__links[hidden] { display: flex !important; }
}

/* --- Hero: the invitation itself ------------------------------------------ */

.hero {
  padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(40px, 7vw, 72px);
  background: var(--paper-deep);
}

.card {
  position: relative;
  width: min(700px, 100%);
  margin-inline: auto;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}

.card--invite {
  --fs: 1;                 /* border geometry scale; 1 == the 700px invitation */
  aspect-ratio: 700 / 980;
  min-height: 560px;
}
@media (max-width: 760px) { .card--invite { --fs: 0.76; } }
@media (max-width: 520px) { .card--invite { --fs: 0.58; } }
/* Narrow phones are handled after the hero rules, at the end of this block. */

/* The watercolour: inset inside the border and feathered on all four sides,
   exactly as the finished invitation has it. */
.card__illustration {
  position: absolute;
  left: calc(80px * var(--fs));
  right: calc(80px * var(--fs));
  bottom: calc(44px * var(--fs));
  height: 39.6%;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 26%, #000 86%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 26%, #000 86%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.card__illustration img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* --- The bracket border --------------------------------------------------
   The invitation draws this in a fixed 700x980 frame. Stretching one SVG over
   a fluid card would distort the notched corners, so the corners are drawn at
   a fixed size and the straight runs between them are CSS rules. Every
   measurement below is the invitation's own, scaled by --fs.
   ------------------------------------------------------------------------- */

.frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.frame__corner {
  position: absolute;
  width: calc(80px * var(--fs));
  height: calc(80px * var(--fs));
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}
.frame__corner--tl { top: 0; left: 0; }
.frame__corner--tr { top: 0; right: 0; }
.frame__corner--br { bottom: 0; right: 0; }
.frame__corner--bl { bottom: 0; left: 0; }

.frame__rule { position: absolute; background: var(--gold); }
.frame__rule--outer { opacity: 0.84; }
.frame__rule--inner { opacity: 0.43; }

.frame__rule--top,
.frame__rule--bottom {
  left: calc(80px * var(--fs));
  right: calc(80px * var(--fs));
  height: 1.3px;
}
.frame__rule--left,
.frame__rule--right {
  top: calc(80px * var(--fs));
  bottom: calc(80px * var(--fs));
  width: 1.3px;
}

.frame__rule--top.frame__rule--outer    { top: calc(24px * var(--fs)); }
.frame__rule--top.frame__rule--inner    { top: calc(34px * var(--fs)); }
.frame__rule--bottom.frame__rule--outer { bottom: calc(24px * var(--fs)); }
.frame__rule--bottom.frame__rule--inner { bottom: calc(34px * var(--fs)); }
.frame__rule--left.frame__rule--outer   { left: calc(24px * var(--fs)); }
.frame__rule--left.frame__rule--inner   { left: calc(34px * var(--fs)); }
.frame__rule--right.frame__rule--outer  { right: calc(24px * var(--fs)); }
.frame__rule--right.frame__rule--inner  { right: calc(34px * var(--fs)); }

/* Pinned to the card so the R.S.V.P. line can sit at the foot of it, exactly
   as it does on the printed invitation. Narrow screens undo this below. */
.card__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: clamp(46px, 11vw, 104px) clamp(30px, 10vw, 72px) clamp(34px, 8vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* The invitation sets this type tightly, and spaces it with explicit
   margin-tops only; the page defaults are far too airy for a card. */
.card__body p { margin-bottom: 0; line-height: 1.34; }

.hero__families {
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(0.625rem, 2.1vw, 0.75rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.hero__names {
  margin-top: 16px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.125rem, 13vw, 4.375rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.hero__names em { font-style: italic; color: var(--gold); }

.hero__invite {
  margin-top: 14px;
  max-width: 400px;
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(0.8125rem, 2.6vw, 0.9375rem);
  line-height: 1.5;
  color: var(--ink-62);
}

.hero__date {
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(1.625rem, 6.2vw, 2.125rem);
  line-height: 1.2;
}

.hero__time {
  margin-top: 8px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.1875rem, 4.4vw, 1.5rem);
  color: rgba(32, 31, 29, 0.72);
}

.hero .divider { margin: 24px auto 0; }

.hero__venue {
  margin-top: 24px;
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(0.75rem, 2.3vw, 0.8125rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero__county {
  margin-top: 6px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.0625rem, 3.4vw, 1.25rem);
  line-height: 1.34;
  color: var(--ink-70);
}

.hero__rsvp-note {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(28px, 5.3vw, 52px);
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(0.625rem, 2vw, 0.6875rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-62);
}
.hero__rsvp-note a { color: inherit; }
.hero__rsvp-note a:hover { color: var(--gold-deep); }

/* Narrow phones: a fixed 700x980 proportion would squeeze the type, so let the
   card grow with its content. The watercolour then cannot sit behind the words
   without drowning them, so it becomes a band beneath them instead — still the
   foot of the card, just no longer underneath the text.
   These rules must follow the ones they override. */
@media (max-width: 520px) {
  .card--invite {
    aspect-ratio: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .card__body {
    position: relative;
    inset: auto;
    order: 1;
    padding: clamp(40px, 11vw, 60px) clamp(24px, 7vw, 40px) clamp(30px, 8vw, 40px);
  }
  .card__illustration {
    position: relative;
    order: 2;
    left: auto; right: auto; bottom: auto;
    height: clamp(150px, 46vw, 210px);
  }
  /* Keep the house in frame once the band is this shallow. */
  .card__illustration img { object-position: center 38%; }
  .hero__rsvp-note { position: static; margin-top: 30px; }
  .hero__date { font-size: clamp(1.25rem, 5vw, 1.8125rem); }
}

/* --- Countdown ------------------------------------------------------------ */

.countdown {
  margin: clamp(26px, 5vw, 38px) auto 0;
  width: min(700px, 100%);
  display: flex;
  justify-content: center;
  gap: clamp(14px, 5vw, 40px);
  text-align: center;
}

.countdown__unit { min-width: 3.5rem; }

.countdown__value {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block;
  margin-top: 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-62);
}

/* --- Sections ------------------------------------------------------------- */

.section {
  padding: var(--section-y) var(--gutter);
  background: var(--paper);
  scroll-margin-top: 56px;
}
.section--warm { background: var(--paper-warm); }
.section--deep { background: var(--paper-deep); }

.section__inner {
  max-width: 960px;
  margin-inline: auto;
}
.section__inner--narrow { max-width: 660px; }

.section__head {
  text-align: center;
  margin-bottom: clamp(32px, 6vw, 52px);
}
.section__head .eyebrow { margin-bottom: 10px; }
.section__head .divider { margin-top: 18px; margin-bottom: 0; }
.section__head .lede { margin-top: 18px; }

/* --- Order of the day -----------------------------------------------------
   The three-column grid from the back of the invitation: time, a threaded
   diamond, then the event.
   ------------------------------------------------------------------------- */

.order {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 520px;
  display: grid;
  grid-template-columns: clamp(72px, 20vw, 104px) 21px 1fr;
}

.order__row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: start;
}
/* Without subgrid each row lays itself out on the same track sizes. */
@supports not (grid-template-columns: subgrid) {
  .order { display: block; }
  .order__row {
    display: grid;
    grid-template-columns: clamp(72px, 20vw, 104px) 21px 1fr;
  }
}

.order__time {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 5vw, 1.5625rem);
  line-height: 1;
  padding: 12px 0;
  text-align: right;
  color: var(--gold-deep);
  white-space: nowrap;
}

/* The vertical thread, with the diamond sitting on it. */
.order__thread {
  position: relative;
  align-self: stretch;
  display: flex;
  justify-content: center;
}
.order__thread::before {
  content: "";
  width: 1px;
  background: var(--gold-hair);
}
.order__thread::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: var(--paper-warm);
  border: 1px solid var(--gold);
}
/* The thread should start and stop at the first and last diamonds. */
.order__row:first-child .order__thread::before { margin-top: 18px; }
/* An explicit height beats the flex stretch, so the thread stops at the
   last diamond instead of running on past it. */
.order__row:last-child .order__thread::before { height: 18px; }

.order__event {
  font-family: var(--body);
  font-size: clamp(0.875rem, 3.4vw, 0.96875rem);
  line-height: 1.3;
  padding: 12px 0 14px;
  color: var(--ink);
}

.order__note {
  display: block;
  margin-top: 4px;
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-62);
}

.order__row--evening .order__time,
.order__row--evening .order__event { color: var(--gold-deep); }
.order__row--evening .order__thread::after { background: var(--gold); }

/* --- Dress code ----------------------------------------------------------- */

.dress {
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 10px;
  align-items: baseline;
  font-size: clamp(0.875rem, 3.2vw, 0.90625rem);
  line-height: 1.5;
}
.dress dt {
  font-style: italic;
  color: var(--gold-deep);
  white-space: nowrap;
}
.dress dt::after { content: ":"; }
.dress dd { margin: 0; color: var(--ink); }

@media (max-width: 420px) {
  .dress { grid-template-columns: 1fr; row-gap: 2px; text-align: center; }
  .dress dd { margin-bottom: 12px; }
}

/* --- Grids and panels ----------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(20px, 4vw, 30px);
}
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--2.grid--split { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
}

.panel {
  background: var(--paper);
  border: 1px solid var(--gold-hair);
  padding: clamp(22px, 5vw, 30px);
}
.panel h3 { margin-bottom: 8px; }
.panel p { font-size: 0.9375rem; color: var(--ink-70); }

.panel__meta {
  margin-top: 14px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.panel__meta a { text-decoration: none; border-bottom: 1px solid var(--gold-hair); }
.panel__meta a:hover { border-bottom-color: var(--gold); }

.stack > * + * { margin-top: clamp(20px, 4vw, 28px); }

.prose { max-width: 52ch; }
.prose p { color: var(--ink-70); }
.center { text-align: center; }


/* --- Accommodation -------------------------------------------------------- */

/* A single highlighted note, for the one thing everyone needs to read. */
.callout {
  max-width: 640px;
  margin: 0 auto clamp(30px, 6vw, 44px);
  border: 1px solid var(--gold);
  background: rgba(182, 130, 53, 0.09);
  padding: clamp(16px, 4vw, 22px) clamp(18px, 4vw, 26px);
  text-align: center;
  font-size: 0.9375rem;
  color: var(--ink);
}

.stay-group {
  margin: clamp(30px, 6vw, 44px) 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-hair);
  font-size: clamp(1.375rem, 4.4vw, 1.625rem);
}
.stay-group:first-of-type { margin-top: 0; }

.stay-note {
  margin: 8px 0 0;
  font-style: italic;
  font-size: 0.875rem;
  color: var(--ink-62);
}

.stay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 clamp(24px, 4vw, 40px);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .stay-list { grid-template-columns: repeat(2, 1fr); }
}

.stay {
  padding: 14px 0;
  border-bottom: 1px solid rgba(182, 130, 53, 0.18);
}

.stay__name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.125rem, 3.4vw, 1.25rem);
  line-height: 1.2;
}
.stay__where {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--ink-62);
}
.stay__where::before { content: ", "; font-style: normal; }

.stay__meta {
  margin: 2px 0 0;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.stay__links {
  margin: 5px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.875rem;
}
.stay__links a { text-decoration: none; border-bottom: 1px solid var(--gold-hair); }
.stay__links a:hover { border-bottom-color: var(--gold); }

.stay-tourist {
  margin-top: clamp(28px, 5vw, 38px);
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-62);
}
.stay-tourist a { white-space: nowrap; }

/* --- Grouped contact numbers (taxis) -------------------------------------- */

.contacts {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .contacts { grid-template-columns: repeat(2, 1fr); }
}
.contacts__group {
  display: block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 4px;
}
.contacts a {
  display: block;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 3px 0;
}
.contacts a:hover { text-decoration: underline; }

/* A panel that runs the full width of the grid. */
@media (min-width: 720px) {
  .panel--wide { grid-column: 1 / -1; }
}

/* --- Figures -------------------------------------------------------------- */

.figure {
  margin: 0;
  border: 1px solid var(--gold-hair);
  background: var(--paper);
  padding: 10px;
}
.figure img { width: 100%; }
.figure figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--body);
  font-style: italic;
  font-size: 0.8125rem;
  color: var(--ink-62);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(14px, 3vw, 22px);
}
/* Placeholder tiles until real photographs arrive. */
.gallery__slot {
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--gold);
  background: rgba(182, 130, 53, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-family: var(--body);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--gold-deep);
}

.map-frame {
  border: 1px solid var(--gold-hair);
  background: var(--paper);
  padding: 10px;
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: clamp(240px, 45vw, 340px);
  border: 0;
  filter: sepia(16%) saturate(90%);
}

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 660px; margin-inline: auto; }

.faq details { border-bottom: 1px solid var(--gold-hair); }
.faq details:first-of-type { border-top: 1px solid var(--gold-hair); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  position: relative;
  font-family: var(--display);
  font-size: clamp(1.125rem, 3.6vw, 1.3125rem);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px; height: 8px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq summary:hover { color: var(--gold-deep); }

.faq__answer {
  padding: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--ink-70);
  max-width: 54ch;
}

/* --- Form ----------------------------------------------------------------- */

.form { max-width: 580px; margin-inline: auto; }

.field { margin-bottom: 22px; }

.field > label,
.field__legend {
  display: block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
  padding: 0;
}

.field__hint {
  display: block;
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-62);
  margin: -4px 0 8px;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;   /* 16px keeps iOS from zooming on focus */
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--gold-hair);
  border-radius: 2px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover, textarea:hover, select:hover { border-color: rgba(182, 130, 53, 0.6); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 130, 53, 0.16);
}
textarea { resize: vertical; min-height: 110px; }

::placeholder { color: rgba(32, 31, 29, 0.66); font-style: italic; }

/* The invite code sits apart, like a keyhole. */
.code-field input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-family: var(--display);
  font-size: 1.375rem;
}

/* Yes / no as a pair of paper cards. */
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice__option { position: relative; }
.choice__option input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice__option span {
  display: block;
  text-align: center;
  padding: 14px 10px;
  border: 1px solid var(--gold-hair);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--display);
  font-size: 1.125rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.choice__option input:hover + span { border-color: var(--gold); }
.choice__option input:focus-visible + span {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 130, 53, 0.16);
}
.choice__option input:checked + span {
  border-color: var(--gold);
  background: rgba(182, 130, 53, 0.1);
  color: var(--gold-deep);
}


/* Tick-boxes, laid out as small paper cards like the yes/no pair. */
.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.check { position: relative; }
.check input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.check span {
  display: block;
  padding: 10px 12px 10px 34px;
  border: 1px solid var(--gold-hair);
  border-radius: 2px;
  background: var(--paper);
  font-size: 0.875rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
/* The box itself, drawn as a small gold square. */
.check span::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  margin-top: -6px;
  width: 12px; height: 12px;
  border: 1px solid var(--gold);
  background: var(--paper);
}
/* And the tick, drawn as two borders rotated into an L. */
.check span::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  margin-top: -5px;
  width: 5px; height: 9px;
  border-right: 2px solid var(--gold-deep);
  border-bottom: 2px solid var(--gold-deep);
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.check input:hover + span { border-color: var(--gold); }
.check input:focus-visible + span {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182, 130, 53, 0.16);
}
.check input:checked + span {
  border-color: var(--gold);
  background: rgba(182, 130, 53, 0.1);
  color: var(--gold-deep);
}
.check input:checked + span::after { transform: rotate(45deg) scale(1); }

fieldset {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
  min-width: 0;
}

/* Honeypot — out of sight for people, reachable by naive bots. */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.field__error {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--error);
}
.field__error:empty { display: none; }

.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select { border-color: var(--error); }
.field.is-invalid .choice__option span { border-color: var(--error); }

.button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  width: 100%;
  cursor: pointer;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--gold-deep);
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  padding: 16px 24px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.button:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.button[disabled] { opacity: 0.55; cursor: progress; }

.button--ghost {
  width: auto;
  color: var(--gold-deep);
  background: transparent;
  border-color: var(--gold);
  text-decoration: none;
}
.button--ghost:hover { background: rgba(182, 130, 53, 0.1); color: var(--gold-deep); }

.form__status {
  margin-top: 16px;
  text-align: center;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--ink-70);
  min-height: 1.5em;
}
.form__status[data-state="error"] { color: var(--error); font-style: normal; }

/* The thank-you card that replaces the form on success. */
.thankyou {
  text-align: center;
  border: 1px solid var(--gold);
  background: var(--paper);
  padding: clamp(30px, 7vw, 48px) clamp(22px, 6vw, 40px);
  max-width: 580px;
  margin-inline: auto;
}
.thankyou h3 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
.thankyou p { margin-top: 10px; color: var(--ink-70); }

/* Notice shown when JavaScript is unavailable. */
.noscript-note {
  max-width: 580px;
  margin: 0 auto 24px;
  border: 1px solid var(--gold);
  background: rgba(182, 130, 53, 0.1);
  padding: 16px 20px;
  text-align: center;
  font-size: 0.9375rem;
}

/* --- Contact & footer ----------------------------------------------------- */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 6vw, 52px);
  text-align: center;
}
.contact-list .eyebrow { margin-bottom: 6px; }
.contact-list a { font-family: var(--display); font-size: 1.25rem; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--gold-hair);
  padding: clamp(40px, 8vw, 64px) var(--gutter);
  text-align: center;
}
.footer__names {
  font-family: var(--display);
  font-size: clamp(1.5rem, 5vw, 1.875rem);
}
.footer__names em { font-style: italic; color: var(--gold); }
.footer__meta {
  margin-top: 10px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-62);
}

/* --- Entrance ------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Without JS nothing may stay invisible. */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .countdown, .form, .map-frame { display: none; }
  body { background: #fff; }
  .section { padding-block: 24px; }
}
