/* ---------- design tokens ---------- */
:root {
  --bg: #fcfaff; /* soft white */
  --bg-soft: #f1e9f8; /* whisper lavender */
  --panel: #ffffff;
  --panel-line: rgba(74, 35, 90, 0.12);
  --terra: #6a2c8f; /* royal purple — primary */
  --terra-deep: #4f1f70;
  --gold: #c6a02e; /* antique gold — accent */
  --gold-soft: #e3c878;
  --gold-deep: #9a7820; /* foil shadow tone */
  --kente: #9b4dca; /* orchid — secondary pop */
  --ink: #2c1838; /* deep aubergine text */
  --muted: #6f5f7a; /* muted mauve text */
  --shadow: 0 16px 40px rgba(60, 28, 80, 0.12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  /* faint paper grain for warmth instead of flat fill */
  background-image:
    radial-gradient(
      1200px 600px at 80% -10%,
      rgba(198, 160, 46, 0.1),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at -10% 110%,
      rgba(106, 44, 143, 0.08),
      transparent 60%
    );
  background-attachment: fixed;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 400;
}

.section {
  padding: 7rem 1.5rem;
  position: relative;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  margin-bottom: 4rem;
}
.section-head h2 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--ink);
}
.divider {
  width: 70px;
  height: 1px;
  margin: 1.2rem auto 0;
  background: linear-gradient(90deg, transparent, var(--terra), transparent);
}

/* ---------- kente thread accent (cultural signature, used sparingly) ---------- */
.kente-thread {
  height: 5px;
  width: 100%;
  border: 0;
  display: block;
  background: repeating-linear-gradient(
    90deg,
    var(--kente) 0 22px,
    var(--gold) 22px 34px,
    var(--terra) 34px 56px,
    var(--ink) 56px 64px
  );
}

/* ---------- loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-mono {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 7.5vw, 2.6rem);
  color: var(--terra);
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0 1rem;
}
.loader-rule {
  width: 120px;
  height: 1px;
  background: var(--gold);
}
.loader-text {
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
}
.loader-text b {
  color: var(--terra);
  font-weight: 400;
}

/* ---------- nav ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  transition:
    background 0.4s ease,
    padding 0.4s ease,
    box-shadow 0.4s ease;
}
header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 2.5rem;
  box-shadow: 0 1px 0 var(--panel-line);
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--terra);
}
nav ul {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
nav a {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.8;
  transition:
    color 0.3s,
    opacity 0.3s;
}
nav a:hover {
  color: var(--terra);
  opacity: 1;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  /* [PHOTOS] hero background — warm couple photo */
  background:
    linear-gradient(180deg, rgba(33, 16, 45, 0.55), rgba(33, 16, 45, 0.78)),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1600&q=80")
      center/cover no-repeat;
}
.hero .eyebrow {
  color: var(--gold-soft);
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}
.hero h1 .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}
/* typewriter caret */
.hero h1 .type-caret {
  display: inline-block;
  width: 0.05em;
  min-width: 2px;
  height: 0.82em;
  margin-left: 0.04em;
  vertical-align: -0.04em;
  background: var(--gold);
  border-radius: 1px;
  animation: caretBlink 0.85s steps(1) infinite;
}
.hero h1 .type-caret--done {
  animation: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}
.hero-date {
  margin-top: 1.8rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold-soft);
}
.hero-loc {
  margin-top: 0.4rem;
  font-size: 0.74rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #efe2c2;
}
.hero-cta {
  margin-top: 1.8rem;
  display: inline-block;
  background: var(--terra);
  color: #fff;
  padding: 0.95rem 2.4rem;
  border-radius: 30px;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 400;
  box-shadow: 0 10px 28px rgba(79, 31, 112, 0.4);
  transition:
    transform 0.2s,
    filter 0.3s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.hero-thread {
  position: absolute;
  top: -114px;
  left: 0;
  right: 0;
}
.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  animation: bob 2s infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}

/* ---------- love story / timeline ---------- */
.timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--terra), transparent);
  transform: translateX(-50%);
}
.tl-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.6rem;
  margin-bottom: 1.5rem;
}
.tl-item:nth-child(odd) {
  left: 0;
  text-align: right;
}
.tl-item:nth-child(even) {
  left: 50%;
}
.tl-dot {
  position: absolute;
  top: 2.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--terra);
  box-shadow: 0 0 0 5px rgba(106, 44, 143, 0.18);
}
.tl-item:nth-child(odd) .tl-dot {
  right: -7px;
}
.tl-item:nth-child(even) .tl-dot {
  left: -7px;
}
.tl-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow);
}
.tl-card .heart {
  color: var(--terra);
  font-size: 0.9rem;
}
.tl-year {
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin: 0.3rem 0 0.2rem;
}
.tl-card h3 {
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.tl-card p {
  font-size: 0.98rem;
  color: var(--muted);
}
.tl-photo {
  margin-top: 1rem;
  height: 200px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

/* ---------- countdown ---------- */
.countdown-section {
  text-align: center;
  background:
    linear-gradient(180deg, rgba(33, 16, 45, 0.5), rgba(33, 16, 45, 0.68)),
    url("https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1600&q=80")
      center/cover fixed no-repeat;
}
.countdown-section h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: #fff;
  margin-bottom: 2.5rem;
}
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.6rem, 3vw, 2.4rem);
  flex-wrap: wrap;
}
.cd-block {
  min-width: 76px;
}
.cd-num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 4rem);
  color: #fff;
  line-height: 1;
}
.cd-label {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 0.5rem;
}
.cd-sep {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
}

/* ---------- gallery ---------- */
/* mobile-first: horizontal swipe carousel with scroll-snap */
.swipe-hint {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: -2.5rem 0 2rem;
}
.gallery-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  scroll-padding: 0 1.2rem;
}
.gallery-grid::-webkit-scrollbar {
  height: 6px;
}
.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--panel-line);
  border-radius: 6px;
}
.gallery-grid figure {
  flex: 0 0 80%;
  scroll-snap-align: center;
  overflow: hidden;
  border-radius: 10px;
  margin: 0;
  box-shadow: var(--shadow);
}
.gallery-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}
.gallery-grid figure:active img {
  transform: scale(1.03);
}

@media (min-width: 821px) {
  .swipe-hint {
    display: none;
  }
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    overflow: visible;
    padding-bottom: 0;
  }
  .gallery-grid figure {
    flex: none;
  }
  .gallery-grid img {
    height: 100%;
  }
  .gallery-grid figure:hover img {
    transform: scale(1.06);
  }
  .g-tall {
    grid-row: span 2;
  }
  .g-wide {
    grid-column: span 2;
  }
}

/* ---------- details ---------- */
.details-section {
  background: var(--bg-soft);
}
.detail-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.detail-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 2.6rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.detail-card .icon {
  font-size: 1.8rem;
  color: var(--terra);
  margin-bottom: 1.2rem;
}
.detail-card h3 {
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: 1rem;
}
.detail-card .when {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra);
}
.detail-card .time {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0.4rem 0 1rem;
}
.detail-card .where {
  font-size: 0.95rem;
  color: var(--muted);
}
.map-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra);
  border-bottom: 1px solid var(--terra);
  padding-bottom: 2px;
  transition:
    color 0.3s,
    border-color 0.3s;
}
.map-link:hover {
  color: var(--terra-deep);
  border-color: var(--terra-deep);
}

/* ---------- rsvp ---------- */
.rsvp-section {
  background: var(--bg);
}
.rsvp-form {
  max-width: 760px;
  margin: 0 auto;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 2rem;
}
.field {
  display: flex;
  flex-direction: column;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 0.6rem;
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--panel-line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.6rem 0;
  transition: border-color 0.3s;
}
.field textarea {
  resize: vertical;
  min-height: 90px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--terra);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.4;
  font-weight: 300;
}
.field select option {
  background: var(--bg);
}
.btn-send {
  grid-column: 1 / -1;
  margin-top: 1rem;
  background: var(--terra);
  color: #fff;
  border: 0;
  border-radius: 30px;
  padding: 1.1rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.78rem;
  cursor: pointer;
  transition:
    filter 0.3s,
    transform 0.2s;
}
.btn-send:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.form-note {
  text-align: center;
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--terra);
  min-height: 1.2em;
}

/* ---------- footer ---------- */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-soft);
  position: relative;
}
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--kente) 0 22px,
    var(--gold) 22px 34px,
    var(--terra) 34px 56px,
    var(--ink) 56px 64px
  );
}
footer .brand {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--terra);
}
footer p {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- hero entrance (triggered when body.loaded) ---------- */
.hero .eyebrow,
.hero h1,
.hero-date,
.hero-loc,
.hero-cta {
  opacity: 0;
  transform: translateY(22px);
}
body.loaded .hero .eyebrow,
body.loaded .hero h1,
body.loaded .hero-date,
body.loaded .hero-loc,
body.loaded .hero-cta {
  animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
body.loaded .hero .eyebrow {
  animation-delay: 0.15s;
}
body.loaded .hero h1 {
  animation-delay: 0.35s;
}
body.loaded .hero-date {
  animation-delay: 0.65s;
}
body.loaded .hero-loc {
  animation-delay: 0.8s;
}
body.loaded .hero-cta {
  animation-delay: 1s;
}
@keyframes heroRise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- floating RSVP (mobile) ---------- */
.rsvp-fab {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 90;
  background: var(--terra);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 30px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(33, 16, 45, 0.32);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.rsvp-fab:hover {
  transform: translateY(-2px);
}
.rsvp-fab.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
@media (min-width: 821px) {
  .rsvp-fab {
    display: none;
  }
}

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

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero .eyebrow,
  .hero h1,
  .hero-date,
  .hero-loc,
  .hero-cta {
    opacity: 1 !important;
    transform: none !important;
  }
  .countdown-section {
    background-attachment: scroll;
  }
  .scroll-cue {
    animation: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .detail-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .section {
    padding: 5rem 1.2rem;
  }
  /* mobile: no hamburger, no menu — clean centered monogram; page scrolls + floating RSVP */
  header {
    justify-content: center;
  }
  nav {
    display: none;
  }
  nav ul {
    display: none;
  }
  .nav-toggle {
    display: none;
  }
  .timeline::before {
    left: 18px;
  }
  .tl-item,
  .tl-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding-left: 3rem;
    padding-right: 0.5rem;
  }
  .tl-item:nth-child(odd) {
    text-align: left;
  }
  .tl-item:nth-child(odd) .tl-dot,
  .tl-item:nth-child(even) .tl-dot {
    left: 11px;
    right: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   ELEVATION LAYER — editorial art direction (overrides above)
   ===================================================================== */

/* ---- icons (inline SVG, sized by em so parent font-size controls them) ---- */
.ic {
  width: 1em;
  height: 1em;
  fill: currentColor;
  display: inline-block;
  vertical-align: -0.125em;
  flex: none;
}
.hero-cta .ic,
.btn-send .ic,
.map-link .ic,
.swipe-hint .ic {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.08em;
}
.detail-card .icon {
  font-size: 2.6rem;
  line-height: 1;
}
.tl-card .heart {
  font-size: 1.2rem;
  display: inline-block;
  line-height: 1;
}
.scroll-cue .ic {
  width: 1.05rem;
  height: 1.05rem;
}
.attend-toggle label .ic {
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.12em;
}

/* ---- editorial section heads with structural kente tick ---- */
.section-head {
  position: relative;
}
.section-head .eyebrow {
  display: inline-block;
  position: relative;
  padding-bottom: 0.2rem;
}
.section-head h2 {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 1.04;
  margin-top: 0.6rem;
}
.section-head h2 em,
.amp {
  font-style: italic;
}
/* kente motif rebuilt as a deliberate woven bar, not a hairline */
.divider {
  width: 64px;
  height: 7px;
  margin: 1.4rem auto 0;
  border-radius: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--kente) 0 10px,
    var(--gold) 10px 16px,
    var(--terra) 16px 26px,
    var(--ink) 26px 30px
  );
  opacity: 0.9;
}

/* ---- hero: duotone grade + grain + editorial type ---- */
.hero {
  background:
    linear-gradient(180deg, rgba(33, 16, 45, 0.3), rgba(33, 16, 45, 0.72)),
    /* terracotta duotone wash so any photo reads art-directed */
    linear-gradient(140deg, rgba(106, 44, 143, 0.34), rgba(142, 68, 173, 0.18)),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1700&q=80")
      center/cover no-repeat;
  background-blend-mode: normal, multiply, normal;
}
.hero::after {
  /* fine film grain for texture */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero .eyebrow {
  letter-spacing: 0.5em;
}
.hero h1 {
  font-size: clamp(3.6rem, 13vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 0.92;
}
.hero h1 .amp {
  display: block;
  font-size: 0.42em;
  margin: 0.1em 0;
  letter-spacing: 0.1em;
}
.hero-date::before,
.hero-date::after {
  content: "";
  display: inline-block;
  width: 26px;
  height: 1px;
  vertical-align: middle;
  background: var(--gold-soft);
  margin: 0 0.8rem;
  opacity: 0.7;
}

/* ---- warm photo grade (unifies stock imagery) ---- */
.tl-photo {
  filter: sepia(0.22) saturate(1.05) contrast(1.02) brightness(0.98);
  transition: filter 0.6s ease;
}
.tl-card:hover .tl-photo {
  filter: none;
}
.gallery-grid img {
  filter: sepia(0.2) saturate(1.04) contrast(1.02) brightness(0.98);
}
.gallery-grid figure:hover img,
.gallery-grid figure:active img {
  filter: none;
}

/* ---- detail cards: a touch more editorial ---- */
.detail-card {
  padding-top: 3rem;
}
.detail-card .icon {
  margin-bottom: 1rem;
}

/* ---- buttons: refined motion timing (ui-ux 150–300ms) ---- */
.hero-cta,
.btn-send,
.rsvp-fab {
  transition:
    transform 0.2s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
}
.hero-cta:hover {
  box-shadow: 0 14px 34px rgba(79, 31, 112, 0.5);
}

/* ---- RSVP: attend Yes/No segmented toggle ---- */
.field .opt {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.9em;
}
/* ---- "Need Assistance?" contact block (replaces optional message) ---- */
.assist-block {
  border: 1px solid var(--panel-line);
  border-radius: 4px;
  padding: 1.3rem 1.4rem;
  background: rgba(198, 160, 46, 0.05);
}
.assist-title {
  font-family: var(--serif);
  color: var(--terra);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.assist-text {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.9rem;
}
.assist-contact {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1rem;
  margin: 0.35rem 0;
}
.assist-contact .ic {
  width: 1.05em;
  height: 1.05em;
  color: var(--gold);
  flex: none;
}
.assist-name {
  color: var(--terra);
  font-weight: 600;
}
.assist-contact a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
}
.assist-contact a:hover {
  color: var(--terra);
}
.attend-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.2rem;
}
.attend-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attend-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--panel-line);
  border-radius: 30px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  margin: 0;
}
.attend-toggle label:hover {
  transform: translateY(-1px);
  border-color: var(--terra);
}
.attend-toggle input:checked + label {
  background: var(--terra);
  color: #fff;
  border-color: var(--terra);
}
.attend-toggle input#attend-no:checked + label {
  background: var(--ink);
  border-color: var(--ink);
}
.attend-toggle input:focus-visible + label {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}
@media (max-width: 420px) {
  .attend-toggle {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   RICHNESS LAYER — engraved-invitation luxury (crest, gold foil,
   filigree, curved section transitions, grain, cinematic hero, petals).
   All CSS/SVG, framework-free. Placed before dark mode so tokens flip.
   ===================================================================== */

/* ---- paper grain woven into the page background ---- */
body {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.035'/%3E%3C/svg%3E"),
    radial-gradient(
      1200px 600px at 80% -10%,
      rgba(198, 160, 46, 0.1),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at -10% 110%,
      rgba(106, 44, 143, 0.08),
      transparent 60%
    );
  background-attachment: fixed, fixed, fixed;
}

/* ---- gold-foil shimmer (metallic sweep on gold typography) ---- */
@keyframes foilSweep {
  to {
    background-position: 200% center;
  }
}
.hero h1 .amp,
.hero-date,
.crest .crest-mono {
  background: linear-gradient(
    100deg,
    var(--gold-deep) 0%,
    var(--gold) 18%,
    #fff6da 38%,
    var(--gold-soft) 52%,
    var(--gold) 72%,
    var(--gold-deep) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: foilSweep 5.5s linear infinite;
}

/* ---- bespoke S&B monogram crest ---- */
.crest {
  --crest-size: 96px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--crest-size);
  height: var(--crest-size);
  color: var(--gold);
  flex: none;
}
.crest-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.crest-mono {
  display: inline-flex;
  align-items: center;
  gap: 0.04em;
  font-family: var(--serif);
  line-height: 1;
}
.crest-i {
  font-size: calc(var(--crest-size) * 0.34);
  font-weight: 600;
}
.crest-amp {
  font-size: calc(var(--crest-size) * 0.2);
  font-style: italic;
  font-weight: 400;
  transform: translateY(-0.04em);
}
.crest--lg {
  --crest-size: 110px;
}
.crest--hero {
  --crest-size: 86px;
  margin-bottom: 1.6rem;
}
.crest--sm {
  --crest-size: 62px;
  margin: 0 auto 0.7rem;
}

/* loader crest gets a gentle reveal */
#loader .crest {
  animation: crestIn 1s ease both;
}
@keyframes crestIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---- filigree section dividers (replaces the woven bar) ---- */
.divider {
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  opacity: 1;
  display: flex;
  justify-content: center;
  margin: 1.5rem auto 0;
  color: var(--gold);
}
.flourish {
  width: clamp(130px, 32vw, 190px);
  aspect-ratio: 160 / 24;
  height: auto;
  display: block;
}

/* ---- curved transitions between sections ---- */
.details-section,
.rsvp-section {
  position: relative;
}
.rsvp-section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: clamp(36px, 7vw, 68px);
  pointer-events: none;
  z-index: 2;
  background: var(
    --bg-soft
  ); /* details (lavender) spills down into white RSVP */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 70' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H1200 V34 C980 78 760 16 560 40 C380 60 180 74 0 38 Z' fill='%23000'/%3E%3C/svg%3E")
    no-repeat center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 70' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H1200 V34 C980 78 760 16 560 40 C380 60 180 74 0 38 Z' fill='%23000'/%3E%3C/svg%3E")
    no-repeat center / 100% 100%;
}

/* ---- cinematic hero: Ken Burns photo + layered grade + grain + petals ---- */
.hero {
  background: var(--ink);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: -2.5%;
  z-index: 0;
  background: url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1700&q=80")
    center / cover no-repeat;
  transform-origin: 60% 40%;
  animation: kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.13) translateY(-1.5%);
  }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(33, 16, 45, 0.34), rgba(33, 16, 45, 0.76)),
    linear-gradient(140deg, rgba(106, 44, 143, 0.34), rgba(142, 68, 173, 0.16));
  background-blend-mode: multiply;
}
.hero::after {
  z-index: 2;
}
.hero > *:not(.hero-media):not(.petals) {
  position: relative;
  z-index: 3;
}
.petals {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.petals span {
  position: absolute;
  top: -10%;
  width: var(--p-size, 11px);
  height: var(--p-size, 11px);
  background: radial-gradient(
    circle at 30% 30%,
    #fff6da,
    var(--p-color, var(--gold))
  );
  border-radius: 0 100% 0 100%;
  opacity: 0;
  animation: petalFall var(--p-dur, 16s) linear var(--p-delay, 0s) infinite;
}
@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translateY(-12vh) translateX(0) rotate(0deg);
  }
  12% {
    opacity: var(--p-op, 0.35);
  }
  88% {
    opacity: var(--p-op, 0.35);
  }
  100% {
    opacity: 0;
    transform: translateY(112vh) translateX(var(--p-x, 30px)) rotate(420deg);
  }
}

/* hero crest joins the staggered entrance */
.hero .crest {
  opacity: 0;
  transform: translateY(22px);
}
body.loaded .hero .crest {
  animation: heroRise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: 0.05s;
}

/* ---- detail cards: lift + gold crown on hover ---- */
.detail-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.detail-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 1;
}
.detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(60, 28, 80, 0.16);
}

/* staggered reveal for the card grid */
.detail-cards .detail-card:nth-child(2) {
  transition-delay: 0.12s;
}
.detail-cards .detail-card:nth-child(3) {
  transition-delay: 0.24s;
}

/* ---- countdown: glass blocks over the photo ---- */
.cd-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 1.1rem 0.6rem 0.9rem;
  backdrop-filter: blur(2px);
}

/* ---- buttons: gold sheen sweep on hover ---- */
.hero-cta,
.btn-send {
  position: relative;
  overflow: hidden;
}
.hero-cta > *,
.btn-send > * {
  position: relative;
  z-index: 1;
}
.hero-cta::before,
.btn-send::before {
  content: "";
  position: absolute;
  top: 0;
  left: -65%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 246, 218, 0.4),
    transparent
  );
  transform: skewX(-18deg);
  pointer-events: none;
}
.hero-cta:hover::before,
.btn-send:hover::before {
  animation: sheen 0.75s ease;
}
@keyframes sheen {
  to {
    left: 130%;
  }
}

/* ---- reduced motion: silence the new ambient effects ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-media,
  .petals span,
  .hero h1 .amp,
  .hero-date,
  .crest .crest-mono,
  #loader .crest {
    animation: none !important;
  }
  .hero h1 .amp,
  .hero-date,
  .crest .crest-mono {
    -webkit-text-fill-color: var(--gold);
    color: var(--gold);
  }
  .petals {
    display: none;
  }
  .hero .crest {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =====================================================================
   DARK MODE — auto, follows the device's prefers-color-scheme.
   Warm cocoa dark variant of the sunlit light theme. Tokens flip;
   a few hardcoded spots are overridden below.
   ===================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140a1c; /* deep aubergine-black */
    --bg-soft: #1e1029;
    --panel: #1d0f28;
    --panel-line: rgba(227, 200, 120, 0.14);
    --terra: #b884d8; /* lifted orchid for contrast on dark */
    --terra-deep: #9a5fc0;
    --gold: #e3c878;
    --gold-soft: #efdda8;
    --gold-deep: #b8923c;
    --kente: #c79be6;
    --ink: #efe6f6; /* light lavender-white text */
    --muted: #b6a6c6;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  }

  /* hardcoded white nav bar -> dark */
  header.scrolled {
    background: rgba(20, 10, 28, 0.85);
    box-shadow: 0 1px 0 var(--panel-line);
  }

  /* "Sadly, can't" selected state used light --ink as bg in light mode;
     force a readable dark tone in dark mode */
  .attend-toggle input#attend-no:checked + label {
    background: #3a2450;
    border-color: #3a2450;
    color: #fff;
  }

  /* slightly calmer photo grade on dark so images don't glare */
  .tl-photo,
  .gallery-grid img {
    filter: saturate(1.05) contrast(1.02) brightness(0.9);
  }
}
