/* ============================================================
   Coastal Modern — Jayden & Mandy
   Finalised palette: "Sea, Sand & Sky"
   ivory · champagne · sage · taupe · stone · dove grey · soft blue-grey
   ============================================================ */

:root {
  /* Finalised palette */
  --ivory:      #f7f4ee;   /* Ivory          */
  --champagne:  #e6dcc6;   /* Champagne      */
  --sage:       #9db0bd;   /* soft sea-blue (was sage) — light accents */
  --taupe:      #b8a999;   /* Taupe          */
  --stone:      #c7c2b8;   /* Stone          */
  --dove:       #d9dadb;   /* Dove Grey      */
  --sky:        #b7c6cf;   /* Soft Blue-Grey */

  /* Working tones derived from the palette */
  --ivory-warm: #f3e9d5;   /* ivory ↔ champagne wash */
  --sand:       #e6dcc6;   /* alias → champagne (gradients) */
  --sage-deep:  #8a684a;   /* warm umber — labels & accents */
  --foliage:    #54687a;   /* dusk blue-grey (sea at dusk) — anchor: buttons, headings, footer */
  --ink:        #494640;   /* warm charcoal body text */
  --ink-soft:   #726d62;   /* secondary text */
  --line:       rgba(73, 70, 64, 0.16);
  --white:      #fffcf6;

  /* Candlelight golds — the warmth thread (echoes the wax-seal gold) */
  --gold:       #a8823f;   /* text-safe gold for labels & accents */
  --gold-soft:  #d3b678;   /* decorative gold — dividers, markers */
  --candle:     rgba(240, 205, 130, 0.8); /* glow for motes & hovers */

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; }

img { max-width: 100%; display: block; }

::selection { background: var(--sage); color: var(--white); }

/* visible keyboard focus (mouse clicks stay clean) */
:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Reusable ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 1.5rem;
}

.section__head { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* calligraphy kicker — echoes the wax-seal monogram on the envelope */
.section__eyebrow {
  font-family: "Pinyon Script", "Cormorant Garamond", cursive;
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.section__title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--foliage);
  letter-spacing: 0.005em;
}

/* heraldic divider — hairline · J · lion cartouche · M · hairline */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.3rem auto 0;
}
.ornament__line {
  width: clamp(40px, 8vw, 62px);
  height: 1px;
  background: #c9ab6e;
}
.ornament__letter {
  font-family: "Pinyon Script", "Cormorant Garamond", cursive;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
}
.ornament__lion {
  width: 33px;
  height: 62px;
  background: url("photos/lion.png") center / contain no-repeat;
}

.section__lede {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.section__lede code {
  font-family: var(--sans);
  background: var(--ivory-warm);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-size: 0.9em;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.4rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  border: 1px solid transparent;
}
.btn--solid {
  background: var(--foliage);
  color: var(--ivory);
}
.btn--solid:hover {
  background: var(--sage-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(168, 130, 63, 0.55);
}
.btn--outline {
  background: transparent;
  color: var(--foliage);
  border-color: var(--foliage);
}
.btn--outline:hover { background: var(--foliage); color: var(--ivory); }

/* ---------- Placeholder tiles ---------- */
.ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, var(--sand), var(--ivory-warm));
  border: 1px dashed var(--line);
  color: var(--sage-deep);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  min-height: 220px;
}
.ph span { padding: 1rem; }

/* ============================================================
   ENVELOPE INTRO
   ============================================================ */
body.intro-open { overflow: hidden; height: 100vh; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  transition: opacity 0.9s var(--ease), visibility 0.9s var(--ease);
}
/* satin backdrop on its own layer so it can dissolve into the site */
.intro__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* the couple at the gallery — softly out of focus, the envelope in sharp
     foreground, so the whole intro reads as one photograph */
  background: url("photos/intro-bg.jpg") center 42% / cover no-repeat;
  filter: blur(5px) brightness(0.94) saturate(0.98);
  transform: scale(1.05); /* hides the blurred edge fringe */
  transition: opacity 1.3s var(--ease);
}
.intro__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32,32,34,0.22) 0%, rgba(32,32,34,0.06) 45%, rgba(32,32,34,0.4) 100%);
}
/* once opened, the satin fades to reveal the site beneath, seamlessly */
.intro.is-revealing .intro__bg { opacity: 0; }
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* the 920x580 design is scaled by JS (--introScale) to fit any screen.
   Absolutely centred so its large layout size never pushes off-centre. */
.intro__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
}

/* === Real-photo envelope === */
/* the envelope photo descends slowly from the top and settles in the centre */
.envelope {
  position: relative;
  /* height cap keeps the envelope + "You're invited" line within the viewport */
  width: min(820px, 92vw, 92vh);
  aspect-ratio: 1194 / 795;
  animation: envelopeFadeIn 2.2s var(--ease) both;
}
@keyframes envelopeFadeIn {
  0%   { opacity: 0; transform: scale(0.945) translateY(1.6vh); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.envelope__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  /* slightly translucent — the scene reads through the paper */
  opacity: 0.86;
  box-shadow: 0 34px 70px -22px rgba(30, 20, 8, 0.55), 0 8px 24px -8px rgba(30, 20, 8, 0.35);
  /* zoom + dissolve on open */
  transition: transform 1.6s var(--ease), opacity 1.3s var(--ease);
}
/* on open, the envelope zooms gently and dissolves straight into the site */
.is-open .envelope__photo {
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 1.1s var(--ease), transform 1.5s var(--ease);
}

/* invisible tap hotspot over the wax seal, with a soft glow cue */
.envelope__seal {
  position: absolute;
  left: 49.5%;
  top: 64%;
  transform: translate(-50%, -50%);
  width: 17%;
  aspect-ratio: 1;
  border: none;
  background: none;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
  transition: opacity 0.5s var(--ease);
}
.envelope__seal::after {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,221,170,0.5) 0%, rgba(255,221,170,0) 66%);
  animation: sealGlow 3s ease-in-out infinite;
}
.is-open .envelope__seal { opacity: 0; pointer-events: none; }
@keyframes sealGlow {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50%      { opacity: 0.6;  transform: scale(1.1); }
}

/* the invitation letter is drawn up out of the envelope, then opens into the site */
.envelope__card {
  position: absolute;
  left: 17%;
  top: 19%;
  width: 66%;
  height: 58%;
  z-index: 5;
  opacity: 0;
  background: #fffdf8;
  border-radius: 3px;
  box-shadow: 0 24px 54px -22px rgba(50,30,12,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6%;
  transform-origin: center 65%;
}
/* the letter/card no longer appears on open — the envelope dissolves straight into the site */

/* card typography (responsive) */
.envelope__eyebrow {
  font-size: clamp(0.6rem, 1.4vw, 0.95rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.envelope__names {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  color: var(--foliage);
  margin-top: 0.6rem;
  line-height: 1.05;
}
.envelope__names span { font-style: italic; font-weight: 400; }
.envelope__rule { width: clamp(56px, 8vw, 96px); height: 1px; background: var(--sage); margin: 1.1rem 0; }
.envelope__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.7rem);
  color: var(--ink-soft);
  max-width: 24ch;
}
.envelope__date {
  font-size: clamp(0.85rem, 2vw, 1.35rem);
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-top: 1.1rem;
}
.envelope__place {
  font-size: clamp(0.62rem, 1.4vw, 1rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-top: 0.6rem;
}

/* "You're invited" — calligraphy script beneath the envelope */
.intro__invite {
  position: relative;
  margin-top: clamp(1.2rem, 3vh, 2.4rem);
  font-family: "Pinyon Script", "Cormorant Garamond", cursive;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  text-align: center;
  padding: 0.25em 0.5em; /* room for script descenders */
  color: #fdf7e8; /* candlelit ivory — crisp over sea and sun alike */
  /* golden halo, breathing (text-shadow inherits to the letter spans) */
  text-shadow:
    0 0 14px rgba(255, 214, 140, 0.75),
    0 0 36px rgba(255, 190, 90, 0.45),
    0 2px 6px rgba(60, 40, 15, 0.55);
  animation: glowBreathe 3.6s ease-in-out 3.4s infinite alternate;
}
@keyframes glowBreathe {
  0% {
    text-shadow:
      0 0 14px rgba(255, 214, 140, 0.75),
      0 0 36px rgba(255, 190, 90, 0.45),
      0 2px 6px rgba(60, 40, 15, 0.55);
  }
  100% {
    text-shadow:
      0 0 22px rgba(255, 224, 155, 0.95),
      0 0 58px rgba(255, 198, 105, 0.65),
      0 2px 6px rgba(60, 40, 15, 0.55);
  }
}
/* letters fade in one by one (spans injected by script.js) */
.intro__invite .ch {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  filter: blur(5px);
  animation: chIn 0.75s var(--ease) forwards; /* per-letter delay set inline */
}
@keyframes chIn {
  0%   { opacity: 0; transform: translateY(0.3em); filter: blur(5px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.is-open ~ .intro__invite,
.intro.is-done .intro__invite { opacity: 0; transition: opacity 0.5s; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.5rem, 4vw, 3rem);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s;
}
.nav.is-scrolled {
  background: rgba(247, 244, 239, 0.86);
  backdrop-filter: blur(12px);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--ivory);
  text-decoration: none;
  transition: color 0.4s;
}
.nav.is-scrolled .nav__brand { color: var(--foliage); }

.nav__links {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.nav__links a {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  transition: color 0.3s, opacity 0.3s;
  opacity: 0.92;
}
.nav.is-scrolled .nav__links a { color: var(--ink); }
.nav__links a:hover { opacity: 1; color: var(--sage); }
.nav.is-scrolled .nav__links a:hover { color: var(--sage-deep); }

.nav__cta {
  border: 1px solid currentColor;
  padding: 0.55rem 1.3rem !important;
  border-radius: 2px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px; height: 2px;
  background: var(--ivory);
  transition: 0.3s;
}
.nav.is-scrolled .nav__toggle span { background: var(--foliage); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ivory);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(116,134,106,0.05), rgba(63,74,58,0.18)),
    linear-gradient(165deg, #aeb9a6 0%, #cdd2c5 32%, #e7ddcf 64%, #dfe6e6 100%);
}
/* sea + sky impression */
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background:
    linear-gradient(180deg, rgba(146,166,166,0) 0%, rgba(120,146,150,0.55) 55%, rgba(95,123,128,0.7) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(255,253,250,0.55), transparent 38%);
  mix-blend-mode: screen;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("photos/web/p09.jpg");
  background-size: cover;
  background-position: center 40%;
  /* warmer, golden-hour grade */
  filter: saturate(1.0) brightness(0.96) sepia(0.14);
  animation: heroDrift 38s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.hero__veil {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(200deg, rgba(233, 190, 116, 0.20) 0%, rgba(233, 190, 116, 0) 45%),
    linear-gradient(180deg, rgba(47,50,43,0.30) 0%, rgba(47,50,43,0.10) 40%, rgba(60,48,30,0.48) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(54,46,32,0.35) 100%);
}

/* drifting fairy-tale motes — float over the entire site */
.fairy-motes {
  position: fixed;
  inset: 0;
  z-index: 60; /* above content, below nav & modals */
  overflow: hidden;
  pointer-events: none;
}
.fairy-motes span {
  position: absolute;
  bottom: -5vh;
  border-radius: 50%;
  /* soft amber — visible but understated */
  background: radial-gradient(circle, rgba(224, 168, 66, 0.7) 0%, rgba(210, 150, 50, 0.32) 40%, rgba(210, 150, 50, 0) 72%);
  box-shadow: 0 0 12px 2px rgba(214, 158, 58, 0.28);
  animation: moteRise linear infinite;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes moteRise {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: 0.55; }
  85%  { opacity: 0.16; }
  100% { transform: translate(var(--sway, 30px), -108vh); opacity: 0; }
}

.hero__inner { position: relative; z-index: 3; padding: 1.5rem; }

.hero__eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
  opacity: 0.95;
  text-shadow: 0 1px 12px rgba(47,50,43,0.4);
}
.hero__names {
  font-size: clamp(3.2rem, 11vw, 7.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 30px rgba(47,50,43,0.35);
}
.hero__names span { font-style: normal; font-weight: inherit; display: inline-block; margin: 0 0.1em; }
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-top: 0.4rem;
  opacity: 0.96;
  text-shadow: 0 1px 16px rgba(47,50,43,0.4);
}
.hero__meta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  font-size: 0.84rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(47,50,43,0.4);
}
.hero__meta .dot { opacity: 0.6; }
.hero__btn { margin-top: 2.6rem; background: rgba(255,253,250,0.16); border: 1px solid rgba(255,253,250,0.7); backdrop-filter: blur(6px); }
.hero__btn:hover { background: var(--ivory); color: var(--foliage); }

.hero__olive {
  position: absolute;
  z-index: 2;
  width: clamp(70px, 11vw, 150px);
  color: var(--foliage);
  opacity: 0.5;
  top: -20px;
}
.hero__olive--left  { left: clamp(-10px, 2vw, 40px); transform: rotate(8deg); }
.hero__olive--right { right: clamp(-10px, 2vw, 40px); transform: scaleX(-1) rotate(8deg); }

.hero__scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.hero__scroll span {
  display: block;
  width: 1px; height: 46px;
  background: linear-gradient(var(--ivory), transparent);
  animation: scrollPulse 2.2s var(--ease) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(46px); transform-origin: bottom; opacity: 0; }
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown {
  background: linear-gradient(160deg, #efe3c9 0%, #e7d5ae 100%);
  color: var(--ink);
}
.countdown__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
  padding: 2.6rem 1.5rem;
}
.countdown__unit { text-align: center; }
.countdown__unit strong {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  display: block;
  line-height: 1;
}
.countdown__unit small {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.6rem;
  display: block;
}
/* gentle pulse each second */
.cd-tick { animation: cdPop 0.5s var(--ease); }
@keyframes cdPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.14); color: var(--gold); }
  100% { transform: scale(1); }
}

/* ============================================================
   QUOTE BAND
   ============================================================ */
.quote {
  position: relative;
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
  overflow: hidden;
  color: var(--ivory);
}
.quote__bg {
  position: absolute;
  inset: 0;
  background: url("photos/web/p41.jpg") center/cover no-repeat;
  background-attachment: fixed;
  filter: saturate(0.9) brightness(0.9);
}
.quote__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(73,70,64,0.46), rgba(86,98,76,0.52));
}
.quote__text {
  position: relative;
  max-width: 900px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.55rem, 4vw, 2.9rem);
  line-height: 1.36;
  text-shadow: 0 2px 26px rgba(47,50,43,0.45);
}
.quote__mark {
  display: block;
  font-size: 3.4em;
  line-height: 0.1;
  margin-bottom: 0.32em;
  color: var(--sage);
  opacity: 0.92;
}

/* ============================================================
   STORY
   ============================================================ */
.story__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.story__media { box-shadow: 0 30px 60px -30px rgba(47,50,43,0.3); border-radius: 2px; overflow: hidden; }
.story__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.ph--portrait { min-height: 460px; }
.story__text p { margin-bottom: 1.3rem; font-size: 1.08rem; color: var(--ink-soft); }
.story__sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem !important;
  color: var(--foliage) !important;
}

/* ============================================================
   DETAILS
   ============================================================ */
.details__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 2.6rem 1.8rem;
  text-align: center;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(47,50,43,0.4); }
.card__icon {
  width: 40px;
  height: 40px;
  color: var(--sage-deep);
  margin: 0 auto 1.1rem;
  display: block;
}
.card h3 { font-size: 1.7rem; color: var(--foliage); margin-bottom: 0.5rem; }
.card__time {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 0.9rem;
}
.card p { color: var(--ink-soft); }

/* ---- Day timeline ---- */
.timeline {
  list-style: none;
  max-width: 560px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  padding: 0;
  position: relative;
}
/* the connecting line */
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--gold-soft), var(--sage) 55%, var(--stone));
}
.timeline__item {
  position: relative;
  padding: 0 0 clamp(1.8rem, 4vw, 2.6rem) 2.6rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
  position: absolute;
  left: 0;
  top: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ivory);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 4px var(--ivory), 0 0 14px 2px rgba(211, 182, 120, 0.45);
  transition: transform 0.55s var(--ease) 0.25s;
}
.timeline__marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--gold-soft);
}
/* markers pop in as each item reveals */
.timeline__item.reveal .timeline__marker { transform: scale(0); }
.timeline__item.reveal.is-in .timeline__marker { transform: scale(1); }
/* stagger the items */
.timeline__item:nth-child(2) { transition-delay: 0.12s; }
.timeline__item:nth-child(3) { transition-delay: 0.24s; }
.timeline__item:nth-child(4) { transition-delay: 0.36s; }
.timeline__time {
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.timeline__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  color: var(--foliage);
  line-height: 1.1;
}
.timeline__desc { color: var(--ink-soft); margin-top: 0.25rem; }

/* ---- Dress code colour guide ---- */
.dress {
  text-align: center;
  max-width: 860px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.dress__label {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--foliage);
  margin-bottom: 0.4rem;
}
.dress__note {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto clamp(1.6rem, 3vw, 2.2rem);
}
.dress__swatches {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.7rem, 2vw, 1.3rem);
}
.dress__swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(82px, 12vw, 116px);
  transition: transform 0.35s var(--ease);
}
.dress__swatch:hover { transform: translateY(-7px); }
/* staggered rise-in */
.dress.reveal .dress__swatch { opacity: 0; transform: translateY(16px); }
.dress.reveal.is-in .dress__swatch { opacity: 1; transform: translateY(0); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.dress.reveal.is-in .dress__swatch:nth-child(2) { transition-delay: 0.07s; }
.dress.reveal.is-in .dress__swatch:nth-child(3) { transition-delay: 0.14s; }
.dress.reveal.is-in .dress__swatch:nth-child(4) { transition-delay: 0.21s; }
.dress.reveal.is-in .dress__swatch:nth-child(5) { transition-delay: 0.28s; }
.dress.reveal.is-in .dress__swatch:nth-child(6) { transition-delay: 0.35s; }
.dress.reveal.is-in .dress__swatch:nth-child(7) { transition-delay: 0.42s; }
.dress.reveal.is-in .dress__swatch:hover { transform: translateY(-7px); }
.dress__chip {
  width: 100%;
  height: clamp(74px, 10vw, 104px);
  border-radius: 3px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 22px -14px rgba(47, 50, 43, 0.45);
  transition: box-shadow 0.35s var(--ease);
}
.dress__swatch:hover .dress__chip { box-shadow: 0 16px 30px -14px rgba(168, 130, 63, 0.5); }
.dress__name {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-top: 0.7rem;
  line-height: 1.3;
}
.dress__hex {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

/* details section ends at the transport cards — trim the stacked gap into RSVP */
.details { padding-bottom: clamp(2rem, 4vw, 3rem); }

/* ---- How to get there ---- */
.getting { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.getting__title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--foliage);
  text-align: center;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}
.getting .card h3 { font-size: 1.45rem; }
.getting .card p { max-width: 30ch; margin: 0 auto; }

.details__venue {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: 2px;
}
.details__venue-text {
  background: var(--ivory-warm);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.2rem;
}
.details__venue-text h3 { font-size: 2.2rem; color: var(--foliage); }
.details__venue-text p { color: var(--ink-soft); }
.details__venue-text .btn { align-self: flex-start; }
.details__map { min-height: 320px; }
.details__map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.85) contrast(0.96); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery__tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 2px;
}
.gallery__tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.gallery__tile:hover img { transform: scale(1.06); }
.gallery__tile--wide { grid-column: span 2; aspect-ratio: 3 / 2; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 820px; }
.faq__item {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
}
.faq__item summary {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--foliage);
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 2.5rem 1.2rem 0;
  position: relative;
  transition: color 0.3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--sage);
  transition: transform 0.3s var(--ease);
  font-family: var(--sans);
  font-weight: 300;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding-bottom: 1.4rem; color: var(--ink-soft); max-width: 70ch; }

/* ============================================================
   RSVP
   ============================================================ */
.rsvp {
  max-width: none;
  background:
    linear-gradient(180deg, var(--ivory), var(--ivory-warm));
  padding: 0;
}
.rsvp__panel {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem clamp(4.5rem, 9vw, 8rem);
}
.rsvp__form { display: grid; gap: 1.5rem; margin-top: 1rem; }
.field { display: grid; gap: 0.5rem; }
.field label, .field__label {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.req { color: #b08968; }
.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.9rem 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(183,198,207,0.4);
}
.field textarea { resize: vertical; }

.choice { display: flex; gap: 1rem; flex-wrap: wrap; }
.choice__opt {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  color: var(--ink);
}
.choice__opt:hover { border-color: var(--sage); }
.choice__opt input { width: auto; accent-color: var(--sage-deep); }
.choice__opt:has(input:checked) { border-color: var(--sage-deep); background: var(--ivory-warm); }

.field--guests { max-width: 200px; }

[data-attend-only] {
  transition: opacity 0.4s, max-height 0.4s;
}
[data-attend-only].is-hidden {
  display: none;
}

.rsvp__submit { width: 100%; margin-top: 0.5rem; }
.rsvp__status {
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.4em;
  transition: color 0.3s;
}
.rsvp__status.is-ok { color: var(--sage-deep); }
.rsvp__status.is-err { color: #b3593f; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(180deg, #54687a 0%, #3f4f5e 100%);
  color: var(--ivory);
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.footer__olive {
  width: 90px;
  color: var(--sage);
  opacity: 0.4;
  margin: 0 auto 1.5rem;
}
.footer__names { font-family: var(--serif); font-size: 2.2rem; color: var(--gold-soft); }
.footer__date {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-top: 0.8rem;
  opacity: 0.8;
}
.footer__credit {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.4;
  margin: 0.4rem auto 0;
  max-width: 34ch;
  opacity: 0.92;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav__toggle { display: flex; z-index: 110; }
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--ivory);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    box-shadow: -20px 0 60px -30px rgba(47,50,43,0.5);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a { color: var(--ink) !important; font-size: 0.9rem; }

  .story__grid { grid-template-columns: 1fr; }
  .details__cards { grid-template-columns: 1fr; }
  .details__venue { grid-template-columns: 1fr; }
  .details__map { min-height: 280px; order: 2; }
  .gallery__tile--wide { grid-column: span 1; aspect-ratio: 3 / 4; }
  .quote__bg { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  .hero__bg { animation: none; }
  .fairy-motes { display: none; }
  .cd-tick { animation: none; }
  .timeline__item.reveal .timeline__marker { transform: scale(1); }
  .dress.reveal .dress__swatch { opacity: 1; transform: none; }
  .intro__invite .ch { animation: none; opacity: 1; filter: none; }
  .intro__invite .spark { display: none; }
  .envelope { animation: none; }
}

/* ============================================================
   MESSAGE POP-UP
   ============================================================ */
body.modal-open { overflow: hidden; }

.msg {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.msg[hidden] { display: none; }
.msg__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 50, 43, 0.16);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.msg.is-open .msg__backdrop { opacity: 1; }

.msg__card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(2.4rem, 5vw, 3.6rem) clamp(1.8rem, 5vw, 3.4rem);
  text-align: center;
  box-shadow: 0 40px 80px -30px rgba(47, 50, 43, 0.5);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.msg.is-open .msg__card { opacity: 1; transform: none; }

.msg__close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.msg__close:hover { color: var(--foliage); }

.msg__title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  color: var(--foliage);
  margin-bottom: 1.4rem;
}
.msg__body {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 42ch;
  margin: 0 auto 1.1rem;
}
.msg__body strong { color: var(--ink); font-weight: 500; }
.msg__sprig { color: var(--gold-soft); margin-left: 0.25em; }

.msg__continue {
  margin-top: 1.4rem;
  background: transparent;
  color: var(--foliage);
  border: 1px solid var(--foliage);
  border-radius: 999px;
  letter-spacing: 0.16em;
  padding: 0.9rem 2.6rem;
}
.msg__continue:hover { background: var(--foliage); color: var(--ivory); transform: translateY(-2px); }
