/* =========================================================================
   AMBER & ELGIN — wedding site
   Visual north star: the invitation. Cream paper, B&W botanicals, soft cast
   shadows, high-contrast serif, wide-tracked small caps, italic accents.
   ========================================================================= */

/* ----------------------------- TOKENS ---------------------------------- */
:root {
  /* Colour — swap freely. Keep imagery B&W/desaturated for cohesion. */
  --bg:      #F3EFE8;   /* cream paper            */
  --surface: #E5E0D8;   /* warm grey panel        */
  --ink:     #1C1A17;   /* soft near-black        */
  --ink-60:  rgba(28, 26, 23, 0.60);
  --ink-40:  rgba(28, 26, 23, 0.40);
  --ink-15:  rgba(28, 26, 23, 0.15);
  --accent:  #9CA98C;   /* muted sage             */
  /* alt accents to swap in:
     --accent: #C8A86B;  (champagne gold)
     --accent: #8FA3B0;  (dusty blue)            */

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --label: "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Tracking for small-cap labels */
  --track-label: 0.3em;
  --track-detail: 0.22em;

  /* Layout */
  --measure: 64rem;          /* max content width  */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(5rem, 12vw, 9.5rem);
}

/* ----------------------------- RESET ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overscroll-behavior: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.6rem + 0.9vw, 1.3rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overscroll-behavior: none;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Visible, on-brand focus for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ------------------------- SHARED TYPE ELEMENTS ------------------------ */
.eyebrow {
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  font-size: clamp(0.62rem, 0.5rem + 0.3vw, 0.74rem);
  color: var(--ink-60);
  line-height: 1.5;
}

/* Hairline that "draws" under section labels */
.label-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 0.85em;
}
.label-underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 3.5rem;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.label-underline.is-drawn::after { transform: translateX(-50%) scaleX(1); }
/* No-JS / reduced motion: show the underline by default */
html:not(.has-anim) .label-underline::after { transform: translateX(-50%) scaleX(1); }

/* ----------------------------- NAV ------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background-color 0.6s ease, box-shadow 0.6s ease;
}
.nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.6rem) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__monogram {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.9rem + 0.6vw, 1.35rem);
  letter-spacing: 0.12em;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.4s ease;
}
.nav__amp { font-style: italic; color: var(--accent); }

.nav__links {
  list-style: none;
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0;
}
.nav__links a {
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.66rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 0.25em;
  transition: color 0.35s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* Solid state once scrolled past the hero (toggled in main.js) */
.nav.is-scrolled {
  background: rgba(243, 239, 232, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--ink-15);
}

/* Over the dark hero (transparent state) the nav reads in cream;
   once scrolled it inherits the ink colours set above. */
.nav:not(.is-scrolled) .nav__monogram,
.nav:not(.is-scrolled) .nav__links a { color: var(--ink); }  /* dark over the light hero photo */
.nav:not(.is-scrolled) .nav__amp { color: var(--accent); }

/* ---- Mobile menu toggle (hamburger <-> X). Hidden on desktop. ---- */
.nav__toggle {
  display: none;
  position: relative;
  z-index: 2;
  appearance: none; -webkit-appearance: none;
  background: none; border: 0;
  padding: 10px; margin: -10px;      /* generous tap target, no layout shift */
  cursor: pointer;
  color: var(--ink);
  line-height: 0;
}
.nav__toggle-box { position: relative; display: block; width: 26px; height: 13px; }
.nav__toggle-line {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: currentColor; border-radius: 1px;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}
.nav__toggle-line:nth-child(1) { top: 0; }
.nav__toggle-line:nth-child(2) { bottom: 0; }
.nav.is-open .nav__toggle-line:nth-child(1) { transform: translateY(5.75px) rotate(45deg); }
.nav.is-open .nav__toggle-line:nth-child(2) { transform: translateY(-5.75px) rotate(-45deg); }

/* ---- Mobile: monogram + hamburger, full-screen fade-in menu ---- */
@media (max-width: 48rem) {
  .nav__inner { position: relative; z-index: 2; padding-inline: clamp(1rem, 5vw, 1.5rem); }
  .nav__monogram { position: relative; z-index: 2; }   /* stays above the overlay */
  .nav__toggle { display: inline-block; }

  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);                 /* site's warm off-white; use #fff for pure white */
    opacity: 0; visibility: hidden;
    transition: opacity 0.55s ease, visibility 0s linear 0.55s;
  }
  .nav.is-open .nav__menu {
    opacity: 1; visibility: visible;
    transition: opacity 0.55s ease;
  }
  .nav__links {
    flex-direction: column;
    align-items: center;
    gap: clamp(1.4rem, 5vw, 2.5rem);
  }
  .nav__menu .nav__links a {
    font-family: var(--label);                 /* Jost — same family as the desktop nav */
    font-weight: 200;                          /* extra-light */
    text-transform: uppercase;                 /* caps, like desktop */
    letter-spacing: 0.2em;
    font-size: clamp(1.25rem, 0.95rem + 2.4vw, 1.7rem);   /* bigger than desktop */
    color: var(--ink);
    padding-bottom: 0.15em;
    padding-left: 0.2em;                        /* offset the trailing tracking so caps stay centered */
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav__menu .nav__links a::after { height: 1.5px; }
  .nav.is-open .nav__menu .nav__links a { opacity: 1; transform: none; }
  .nav.is-open .nav__links li:nth-child(1) a { transition-delay: 0.10s; }
  .nav.is-open .nav__links li:nth-child(2) a { transition-delay: 0.16s; }
  .nav.is-open .nav__links li:nth-child(3) a { transition-delay: 0.22s; }
  .nav.is-open .nav__links li:nth-child(4) a { transition-delay: 0.28s; }
  .nav.is-open .nav__links li:nth-child(5) a { transition-delay: 0.34s; }

  /* keep the top bar clean while open: transparent even if scrolled, ink icon + logo */
  .nav.is-open.is-scrolled {
    background: transparent; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .nav.is-open .nav__monogram, .nav.is-open .nav__toggle { color: var(--ink); }
}

/* lock background scroll while the mobile menu is open */
html.nav-open, html.nav-open body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .nav__menu .nav__links a { transform: none !important; transition: opacity 0.3s ease; }
  .nav__toggle-line { transition: none; }
}

/* ----------------------------- HERO ------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  height: 100svh;          /* definite height so the row below can't grow */
  display: grid;
  place-items: center;
  /* Fixed row/column: the invitation artwork's transparent margin may extend past
     the hero, and this stops that empty space from stretching the section or the
     column (which would push the card off-centre). It is simply clipped below. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 7rem var(--gutter) 5rem;
  overflow: hidden;
  isolation: isolate;
  --hero-cast-opacity: 1;   /* multiply shadow strength — set to 0 to preview without it */
}
/* ===============================================================
   HERO PHOTO TREATMENT — background photo + multiply shadow cast.
   To REVERT to the original dark SVG hero: point .hero__bg back to
   hero-bg.svg, set .hero { --hero-cast-opacity: 0 }, and change the
   over-hero nav colour (below) back to var(--bg). (Originals are
   also kept in /assets and in the saved snapshot.)
   =============================================================== */
.hero__bg,
.hero__cast,
.hero__veil {
  position: absolute;
  inset: -8% 0 -8% 0;   /* slight overscan so parallax never reveals an edge */
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero__bg {
  z-index: -3;
  background-image: url("../assets/bg1.webp");   /* SWAP: desktop background photo */
}
/* TOP cast-shadow layer — a same-size overlay multiplied over the background
   AND the card (Photoshop "Multiply"). Light areas leave things untouched;
   only the soft grey leaf shadows darken what is beneath.                  */
.hero__cast {
  z-index: 2;                 /* above the card, so shadows fall on the letter too */
  background-image: url("../assets/shadows.webp");  /* SWAP: desktop shadow overlay */
  mix-blend-mode: multiply;
  opacity: var(--hero-cast-opacity, 1);
  pointer-events: none;       /* never intercepts clicks */
}
.hero__veil {
  z-index: -1;
  inset: 0;
  /* Gentle cream vignette + bottom fade so the photo melts into the page below */
  background:
    linear-gradient(to bottom, rgba(243,239,232,0) 72%, rgba(243,239,232,0.92) 100%),
    radial-gradient(120% 95% at 50% 44%, rgba(243,239,232,0) 50%, rgba(243,239,232,0.4) 100%);
}

/* The invitation card — a real piece of A5 paper photographed on the botanicals */
.card {
  position: relative;
  isolation: isolate;
  margin: 0;
  /* Natural ratio of the letter artwork (838 x 1080). About a quarter of the
     image is transparent margin carrying its own soft drop shadow.
       - 46rem  : desktop ceiling (keeps the paper the size it always was)
       - 100vw  : on phones the artwork spans the full screen width and simply
                  scales with it, so the whole letter + its shadow always fit
       - calc() : caps the height from the PAPER inside the artwork (838 x 834 of
                  the file), so the letter never runs under the nav or off-screen */
  width: min(46rem, 100vw, calc((100svh - 11rem) * 838 / 834));
  aspect-ratio: 838 / 1080;
  /* No box-shadow / border-radius / overflow here: the artwork's alpha already
     includes the drop shadow. A CSS shadow would outline the transparent box. */
}
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Dappled leaf shadow falling across the paper — echoes the invitation photo */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/leaf-overlay.svg") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: 0;   /* synthetic dapple OFF — the real photo cast-shadow layer now falls on the card */
  z-index: 0;
  pointer-events: none;
}
/* Keep all card content above the cast-shadow layer */
.card > * { position: relative; z-index: 1; }

/* Hero invitation type scales to the card itself (cqw), so the layout stays
   proportionally identical and always fits the A5 box at any size. rem
   floors/ceilings keep it sane on extreme viewports. Vertical spacing uses
   cqw too (card height is a fixed ratio of width, so proportions hold). */
.card .eyebrow   { font-size: clamp(0.58rem, 3.1cqw, 0.92rem); }
.card .card__sub { font-size: clamp(0.95rem, 5cqw, 1.5rem); margin-top: 2.3cqw; }
.card .names     { font-size: clamp(2.2rem, 21.5cqw, 5.6rem); margin: 7cqw 0; }
.card .date      { margin: 6.4cqw 0 5.7cqw; }
.card .date__num { font-size: clamp(0.66rem, 3.4cqw, 0.95rem); }
.card .date__month { font-size: clamp(1.3rem, 10cqw, 2.6rem); }
.card .detail    { font-size: clamp(0.56rem, 2.95cqw, 0.76rem); }
.card .card__attire { font-size: clamp(0.92rem, 4.6cqw, 1.2rem); margin-top: 6.4cqw; }
.card__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem);
  color: var(--ink-60);
  margin-top: 0.65rem;
}

/* Couple names — the loudest moment on the page */
.names {
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 1.4rem + 7vw, 5.6rem);
  margin: clamp(1.2rem, 3vw, 2.2rem) 0;
}
.names__line {
  display: block;
  overflow: hidden;          /* mask for the clip/slide reveal */
}
.names__reveal { display: inline-block; will-change: transform; }
.names__and {
  font-style: italic;
  text-transform: lowercase;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0 0.12em;
}

/* Stacked date — 02 / February / 22 */
.date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: clamp(1.2rem, 3vw, 2rem) 0 clamp(1.2rem, 2.5vw, 1.6rem);
}
.date__num {
  font-family: var(--label);
  font-weight: 300;
  letter-spacing: var(--track-detail);
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 0.95rem);
  color: var(--ink-60);
}
.date__month {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem);
  line-height: 1.1;
  color: var(--ink);
  margin: 0.1rem 0;
}

.detail {
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: var(--track-detail);
  font-size: clamp(0.64rem, 0.55rem + 0.3vw, 0.76rem);
  color: var(--ink);
  line-height: 1.9;
}
.card__attire {
  font-style: italic;
  color: var(--ink-60);
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
  margin-top: clamp(1.4rem, 3vw, 2rem);
}

/* --------------------------- SECTIONS ---------------------------------- */
.section {
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--section-y) var(--gutter);
}
.section__head { text-align: center; margin-bottom: clamp(3rem, 7vw, 5rem); }
.section__title {
  font-weight: 500;
  font-size: clamp(1.9rem, 1.3rem + 3vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-top: 0.2rem;
}
.section__lede {
  max-width: 34rem;
  margin: 1.25rem auto 0;
  color: var(--ink-60);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
}

/* --------------------------- TIMELINE ---------------------------------- */
.timeline {
  list-style: none;
  padding: 0;
  max-width: 30rem;
  margin-inline: auto;
  position: relative;
}
.timeline::before {       /* central hairline */
  content: "";
  position: absolute;
  left: 50%;
  top: 0.4rem; bottom: 0.4rem;
  width: 1px;
  background: var(--ink-15);
  transform: translateX(-50%);
}
.timeline__item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) 0;
}
.timeline__time {
  text-align: right;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-style: italic;
  line-height: 1;
  color: var(--ink);
}
.timeline__node {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  position: relative;
  z-index: 1;
}
.timeline__node::after {
  content: "";
  position: absolute; inset: 2.5px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.timeline__item.is-in .timeline__node::after { transform: scale(1); }
.timeline__label {
  text-align: left;
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.62rem, 0.55rem + 0.3vw, 0.74rem);
  color: var(--ink);
}

/* --------------------------- GALLERY ----------------------------------- */
/* Gallery — horizontal filmstrip (drag / swipe), full-bleed so images peek */
.gallery { max-width: none; padding-inline: 0; }
.gallery .section__head {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.gallery__track {
  display: flex;
  gap: clamp(0.75rem, 1.6vw, 1.4rem);
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: var(--gutter);
  scrollbar-width: none;                 /* Firefox */
  cursor: grab;
  touch-action: pan-y;                   /* vertical gestures scroll the page; we own horizontal */
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.gallery__track::-webkit-scrollbar { display: none; }   /* Chrome / Safari */
.gallery__track.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.gallery__item {
  flex: 0 0 auto;
  height: clamp(340px, 56vh, 560px);
  overflow: hidden;
  position: relative;
  background: var(--surface);
  cursor: zoom-in;
}
.gallery__item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s ease;
  -webkit-user-drag: none;
  user-select: none;
}
.gallery__item::after {          /* faint sage wash on hover */
  content: "";
  position: absolute; inset: 0;
  background: var(--accent);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.gallery__item:hover img { transform: scale(1.04); filter: grayscale(1) contrast(1.06); }
.gallery__item:hover::after { opacity: 0.08; }
.gallery__progress-wrap {
  max-width: var(--measure);
  margin: clamp(1.6rem, 3vw, 2.4rem) auto 0;
  padding-inline: var(--gutter);
}
.gallery__progress { position: relative; height: 1px; background: var(--ink-15); }
.gallery__progress-fill {
  position: absolute; left: 0; top: 0; height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.12s linear;
}

/* --------------------------- REGISTRY ---------------------------------- */
.registry__list {
  list-style: none;
  padding: 0;
  max-width: 42rem;
  margin-inline: auto;
  border-top: 1px solid var(--ink-15);
}
.registry__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name arrow" "desc arrow";
  align-items: center;
  gap: 0.1rem 1.5rem;
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0.25rem;
  border-bottom: 1px solid var(--ink-15);
  transition: padding-left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.registry__name {
  grid-area: name;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  line-height: 1.2;
}
.registry__desc {
  grid-area: desc;
  color: var(--ink-60);
  font-size: 1.02rem;
  font-style: italic;
}
.registry__arrow {
  grid-area: arrow;
  color: var(--accent);
  font-size: 1.4rem;
  transform: translateX(-0.4rem);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}
.registry__link:hover,
.registry__link:focus-visible { padding-left: 1rem; }
.registry__link:hover .registry__arrow,
.registry__link:focus-visible .registry__arrow { transform: translateX(0); opacity: 1; }

/* ----------------------------- FAQ ------------------------------------- */
/* Sibling of the registry list: hairline rows, serif question, italic answer.
   Each row is an accordion — the chevron rotates and the panel animates open. */
.faq__list {
  list-style: none;
  padding: 0;
  max-width: 42rem;
  margin-inline: auto;
  border-top: 1px solid var(--ink-15);
}
.faq__item { border-bottom: 1px solid var(--ink-15); }
.faq__heading { margin: 0; font-weight: 400; }

.faq__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.35rem, 3.2vw, 2rem) 0.25rem;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.faq__question {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem);
  line-height: 1.25;
  transition: color 0.4s ease;
}
.faq__icon {
  flex: none;
  display: grid;
  place-items: center;
  color: var(--accent);
  /* rotates down -> up on open, on the site's signature easing */
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq__trigger:hover .faq__question { color: var(--ink-60); }
.faq__item.is-open .faq__question { color: var(--ink); }   /* never muted while open (incl. sticky touch hover) */
.faq__trigger:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.faq__item.is-open .faq__icon { transform: rotate(180deg); }

/* Collapsible panel — animate height via grid-template-rows 0fr -> 1fr */
.faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq__panel-inner { overflow: hidden; min-height: 0; }
.faq__item.is-open .faq__panel { grid-template-rows: 1fr; }

.faq__answer {
  margin: 0;
  padding: 0 0.25rem clamp(1.4rem, 3vw, 2rem);
  max-width: 38rem;
  color: var(--ink-60);
  font-style: italic;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq__item.is-open .faq__answer {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;   /* let the panel begin opening first */
}

@media (prefers-reduced-motion: reduce) {
  .faq__panel, .faq__icon, .faq__answer { transition: none; }
}

/* ----------------------------- RSVP ------------------------------------ */
.rsvp .form { max-width: 42rem; margin-inline: auto; }   /* match the FAQ / registry column width */
.form { display: flex; flex-direction: column; gap: clamp(1.5rem, 3.5vw, 2.25rem); }
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}
@media (max-width: 34rem) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.64rem;
  color: var(--ink-60);
}
.field__opt { text-transform: none; letter-spacing: 0; font-style: italic; }

.field input,
.field select,
.field textarea {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-40);
  padding: 0.55rem 0.1rem;
  border-radius: 0;
  transition: border-color 0.4s ease;
  width: 100%;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-40); font-style: italic; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}

/* Native select restyled to match the hairline fields */
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  padding-right: 1.75rem;
}
.select-wrap__chevron {
  position: absolute;
  right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  pointer-events: none;
  font-size: 0.8rem;
}

.btn {
  align-self: center;
  margin-top: 0.75rem;
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.72rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 1.1rem 2.75rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.5s ease;
  z-index: 0;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}
.btn:hover, .btn:focus-visible { color: var(--bg); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn[disabled] { opacity: 0.5; cursor: default; }

.form__status {
  text-align: center;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  padding-top: 0.5rem;
}
.form__status.is-error { color: #8a4a3f; font-style: normal; font-family: var(--label); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }

/* Elegant success state — replaces the form */
.form.is-sent { align-items: center; text-align: center; gap: 1rem; }

/* ----------------------------- FOOTER ---------------------------------- */
/* Photographic botanical close — faded photo + soft multiply shadows on cream,
   bookending the hero. Layers sit behind the content via the footer's own
   stacking context. */
.footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: clamp(5.5rem, 11vw, 9rem) var(--gutter);
  background: var(--bg);
}
.footer__photo,
.footer__veil,
.footer__shadows {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}
.footer__photo {
  z-index: -3;
  background-image: url("../assets/bg1.webp");
  opacity: 0.45;                 /* faded so the plants are a soft hint */
}
.footer__veil {
  z-index: -2;
  /* cream wash top & bottom + soft centre vignette keeps it airy and readable */
  background:
    linear-gradient(to bottom, rgba(243,239,232,0.88), rgba(243,239,232,0.62) 45%, rgba(243,239,232,0.9)),
    radial-gradient(120% 90% at 50% 50%, rgba(243,239,232,0) 28%, rgba(243,239,232,0.7));
}
.footer__shadows {
  z-index: -1;
  background-image: url("../assets/shadows.webp");
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.footer__inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer__eyebrow {
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  font-size: 0.72rem;
  color: var(--accent);
}
.footer__close {
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.3rem);
  line-height: 1.3;
  color: var(--ink);
  margin-top: 1.3rem;
  max-width: 22em;
}
.footer__close em { font-style: italic; }
.footer__names {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: 2.4rem;
}
.footer__names em { font-style: italic; text-transform: lowercase; font-weight: 500; }
.footer__meta {
  margin-top: 2.2rem;
  font-family: var(--label);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  color: var(--ink-60);
  line-height: 2.1;
}

/* ---------------------------- LIGHTBOX --------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 19, 16, 0.92);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  opacity: 0;
  pointer-events: none;          /* never intercept clicks while closed */
  transition: opacity 0.45s ease;
}
.lightbox[hidden] { display: none; }   /* class display:grid was overriding [hidden] */
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: min(90vw, 60rem);
  max-height: 86vh;
  filter: grayscale(1);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.7);
  grid-area: 1 / 1;                       /* stack with the arrows, stay centred */
  transition: opacity 0.28s ease;
}
.lightbox__img.is-swapping { opacity: 0; }

/* Prev / next — thin chevrons, in the same minimal line style as the menu icon */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(3rem, 7vw, 4.5rem);
  height: clamp(3rem, 7vw, 4.5rem);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--bg);
  opacity: 0.55;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox__nav svg {
  width: clamp(0.85rem, 1.5vw, 1.05rem);
  height: auto;
  overflow: visible;
  /* keeps the pale chevron readable where it overlaps a light photo */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}
.lightbox__nav polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;      /* stays hairline-thin at any size */
}
.lightbox__nav--prev { left: clamp(0.25rem, 2.5vw, 2rem); }
.lightbox__nav--next { right: clamp(0.25rem, 2.5vw, 2rem); }
.lightbox__nav:hover,
.lightbox__nav:focus-visible { opacity: 1; }
.lightbox__nav--prev:hover { transform: translate(-4px, -50%); }
.lightbox__nav--next:hover { transform: translate(4px, -50%); }
.lightbox__nav[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .lightbox__nav:hover { transform: translateY(-50%); }
  .lightbox__img { transition: none; }
}
.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  background: transparent;
  border: none;
  color: var(--bg);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
}

/* ------------------- ANIMATION INITIAL STATES -------------------------
   These are applied only when JS adds .has-anim to <html> AND the user has
   not requested reduced motion. Without JS (or with reduced motion), every
   element stays fully visible — no FOUC, no hidden content.            */
.has-anim [data-fade],
.has-anim [data-reveal] { opacity: 0; }
.has-anim [data-reveal] { transform: translateY(28px); }
/* NOTE: .names__reveal is intentionally NOT given a CSS transform here.
   GSAP owns its reveal entirely (fromTo yPercent 110 -> 0); setting a CSS
   percentage transform too makes GSAP mis-parse it and the reveal stalls. */

@media (prefers-reduced-motion: reduce) {
  .has-anim [data-fade],
  .has-anim [data-reveal],
  .has-anim .names__reveal { opacity: 1 !important; transform: none !important; }
}
