/* ==========================================================================
   Mr&Mrs — Wedding HTML Template
   Gilded Garden: antique ivory, dusty rose, aged gold
   Framework-free · CSS custom-property design system
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette — gilded garden */
  --ivory: #fff9f2;
  --ivory-deep: #f7ecdf;
  --blush: #f4dad2;
  --blush-deep: #e8bfb4;
  --rose: #c17663;
  --rose-deep: #96574a;
  --gold: #c7a15b;
  --gold-deep: #a27e3f;
  --gold-soft: #e9d7a7;
  --ink: #43312b;
  --ink-soft: #7e6a60;
  --white: #ffffff;
  --line: rgba(122, 88, 70, 0.16);
  --line-gold: rgba(194, 158, 90, 0.5);

  /* Type */
  --font-script: 'Great Vibes', 'Snell Roundhand', 'Segoe Script', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Jost', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --header-h: 76px;
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-card: 0 26px 60px -30px rgba(67, 49, 43, 0.35);
  --shadow-soft: 0 18px 42px -24px rgba(67, 49, 43, 0.3);
  --shadow-gold: 0 18px 50px -18px rgba(162, 126, 63, 0.55);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--gold);
  color: var(--ivory);
}

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

section[id],
footer[id] {
  scroll-margin-top: calc(var(--header-h) + 10px);
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section--tint {
  background: var(--ivory-deep);
}

.section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.6rem, 6vw, 4.5rem);
}

.section-head > * + * {
  margin-top: 1.1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.eyebrow--light {
  color: var(--gold-soft);
}

.eyebrow--light::before,
.eyebrow--light::after {
  background: var(--gold-soft);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.15rem);
}

.section-head h2 {
  font-style: italic;
}

h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.15;
}

.accent {
  color: var(--rose);
}

/* Ornament divider — a gold hairline with a cut gem */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--gold);
}

.ornament::before,
.ornament::after {
  content: '';
  height: 1px;
  width: min(110px, 22vw);
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament .gem {
  width: 10px;
  height: 10px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  position: relative;
}

.ornament .gem::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--gold);
}

.ornament--light::before,
.ornament--light::after {
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.ornament--light::after {
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.ornament--light {
  color: var(--gold-soft);
}

.ornament--light .gem {
  border-color: var(--gold-soft);
}

.ornament--light .gem::after {
  background: var(--gold-soft);
}

/* Reveal-on-scroll (driven by assets/js/main.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.d-1 { --d: 0.1s; }
.d-2 { --d: 0.2s; }
.d-3 { --d: 0.3s; }
.d-4 { --d: 0.4s; }
.d-5 { --d: 0.5s; }

/* Double-matted photo frame — the template's signature treatment */
.frame {
  position: relative;
  padding: 11px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
}

.frame::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--line-gold);
  border-radius: calc(var(--radius-m) - 5px);
  pointer-events: none;
}

.frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-m) - 10px);
}

/* Decorative texture layer */
.texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.texture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 1em 2.2em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease), transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
}

.btn--gold:hover {
  background: var(--gold-deep);
  box-shadow: var(--shadow-gold);
}

.btn--ghost {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.6);
}

.btn--ghost:hover {
  background: var(--gold);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}

.btn--light {
  background: var(--white);
  color: var(--gold-deep);
}

.btn--light:hover {
  background: var(--gold-soft);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--ivory) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-script);
  font-size: 1.95rem;
  line-height: 1;
  color: var(--gold-deep);
  letter-spacing: 0.01em;
}

.brand .amp {
  color: var(--rose);
  padding-inline: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.1rem);
}

.nav-link {
  position: relative;
  padding-block: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.35s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.2rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-deep);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle span:nth-child(1) { transform: translate(-50%, -8px); }
.nav-toggle span:nth-child(3) { transform: translate(-50%, 8px); }

.nav-toggle.open span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translate(-50%, 0) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 3rem) 1rem 6rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hero-bg img.active {
  opacity: 1;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(54, 38, 31, 0.55) 0%,
    rgba(54, 38, 31, 0.28) 45%,
    rgba(54, 38, 31, 0.62) 100%
  );
}

.hero-content {
  max-width: 920px;
  color: var(--white);
  animation: hero-rise 1.4s var(--ease-out) both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1em;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  height: 1px;
  width: clamp(30px, 6vw, 70px);
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}

.hero-eyebrow::after {
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.hero-title {
  margin-top: 1.6rem;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(4.2rem, 14vw, 10rem);
  line-height: 0.95;
  color: var(--ivory);
  text-shadow: 0 12px 40px rgba(30, 18, 14, 0.45);
}

.hero-title .amp {
  color: var(--gold-soft);
}

.hero-names {
  margin-top: 1.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  letter-spacing: 0.06em;
  color: var(--ivory);
}

.hero-tagline {
  max-width: 540px;
  margin: 1.2rem auto 0;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: rgba(255, 249, 242, 0.85);
}

/* Date badge */
.date-badge {
  position: relative;
  width: min(580px, 90vw);
  margin: 2.6rem auto 0;
  aspect-ratio: 12 / 5;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid rgba(255, 249, 242, 0.4);
  box-shadow: 0 34px 80px -30px rgba(20, 12, 9, 0.7);
}

.date-badge img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.date-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(67, 49, 43, 0.35), rgba(67, 49, 43, 0.55));
}

.date-badge-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--ivory);
}

.date-badge .db-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.date-badge .db-date {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem);
  line-height: 1.05;
}

.date-badge .db-place {
  font-size: 0.86rem;
  color: rgba(255, 249, 242, 0.9);
}

/* Scroll cue */
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 249, 242, 0.75);
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  z-index: 2;
}

.hero-scroll .line {
  width: 1px;
  height: 52px;
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  position: relative;
  overflow: hidden;
}

.hero-scroll .line::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--gold-soft);
  animation: scroll-drip 2.2s var(--ease) infinite;
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes scroll-drip {
  0% { top: -45%; }
  100% { top: 110%; }
}

/* --------------------------------------------------------------------------
   6. Our story — timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 880px;
  margin-inline: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent,
    var(--line-gold) 8%,
    var(--line-gold) 92%,
    transparent
  );
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.2rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(2.6rem, 5vw, 3.6rem);
}

.timeline-item:nth-child(even) .timeline-media {
  order: 2;
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ivory);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 5px var(--ivory-deep), 0 0 0 6px var(--line-gold);
  z-index: 2;
}

.timeline-media {
  aspect-ratio: 3 / 2;
}

.timeline-media img {
  transition: transform 0.8s var(--ease-out);
}

.timeline-item:hover .timeline-media img {
  transform: scale(1.04);
}

.timeline-body .tl-chapter {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: var(--gold-deep);
}

.timeline-body h3 {
  margin-top: 0.35rem;
}

.timeline-body p {
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

.tl-date {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.35em 1.1em;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   7. The couple
   -------------------------------------------------------------------------- */
.couple-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.couple-feature {
  aspect-ratio: 12 / 13;
  max-width: 480px;
  margin-inline: auto;
}

.couple-feature img {
  transition: transform 0.9s var(--ease-out);
}

.couple-feature:hover img {
  transform: scale(1.03);
}

.couple-copy .eyebrow {
  margin-bottom: 1.1rem;
}

.couple-copy h2 {
  font-style: italic;
}

.couple-copy .ornament {
  margin: 1.4rem 0;
  justify-content: flex-start;
}

.couple-copy > p {
  color: var(--ink-soft);
  max-width: 46ch;
}

.couple-names {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  margin-top: 2.2rem;
}

.portrait {
  text-align: center;
  width: 150px;
}

.portrait .photo {
  position: relative;
  width: 132px;
  height: 132px;
  margin-inline: auto;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(140deg, var(--gold), var(--gold-soft), var(--rose));
}

.portrait .photo::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.75);
}

.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ivory);
}

.portrait .name {
  margin-top: 0.85rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
}

.portrait .role {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* --------------------------------------------------------------------------
   8. Bridal party
   -------------------------------------------------------------------------- */
.party-team {
  width: min(400px, 78vw);
  aspect-ratio: 4 / 5;
  margin: 0 auto clamp(2.8rem, 6vw, 4rem);
}

.party-team img {
  transition: transform 0.9s var(--ease-out);
}

.party-team:hover img {
  transform: scale(1.03);
}

.party-team-caption {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--gold-deep);
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: clamp(1.2rem, 3vw, 1.9rem);
  max-width: 1020px;
  margin-inline: auto;
}

.party-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0.7rem 0.7rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease);
}

.party-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
}

.party-photo {
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--radius-m) - 6px);
  overflow: hidden;
}

.party-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.party-card:hover .party-photo img {
  transform: scale(1.06);
}

.party-card h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
}

.party-card .role {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--gold-deep);
}

.party-card .tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* --------------------------------------------------------------------------
   9. Gallery
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.8rem, 1.8vw, 1.2rem);
}

.gallery-item {
  position: relative;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.07);
  filter: brightness(0.82);
}

.gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 1.4rem;
  text-align: center;
  color: var(--ivory);
  background: linear-gradient(180deg, transparent 40%, rgba(54, 38, 31, 0.72));
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption .gl {
  width: 26px;
  height: 1px;
  background: var(--gold-soft);
}

.gallery-caption span {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   10. Quote band
   -------------------------------------------------------------------------- */
.quote {
  text-align: center;
  background: var(--ivory-deep);
}

.quote-inner {
  max-width: 720px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.quote-inner .script {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: var(--gold-deep);
}

.quote-inner .script .accent {
  color: var(--rose);
}

.quote-inner cite {
  display: block;
  margin-top: 1.4rem;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   11. Event schedule
   -------------------------------------------------------------------------- */
.schedule {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  text-align: center;
}

.schedule-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.schedule-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(54, 38, 31, 0.88),
    rgba(54, 38, 31, 0.78)
  );
}

.schedule .section-head h2 {
  color: var(--ivory);
}

.schedule .section-head p {
  color: rgba(255, 249, 242, 0.78);
}

.schedule-date {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.45em 1.4em;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem);
  text-align: left;
}

.day-card {
  position: relative;
  padding: 1.9rem 1.7rem;
  background: rgba(255, 249, 242, 0.07);
  border: 1px solid rgba(233, 215, 167, 0.32);
  border-radius: var(--radius-m);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease-out), background 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.day-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 249, 242, 0.12);
  border-color: var(--gold-soft);
}

.day-card .time {
  font-family: var(--font-script);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--gold-soft);
}

.day-card .title {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--ivory);
}

.day-card .note {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 249, 242, 0.72);
}

.venue {
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
  color: rgba(255, 249, 242, 0.85);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}

.venue strong {
  color: var(--gold-soft);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   12. RSVP
   -------------------------------------------------------------------------- */
.rsvp-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.6rem, 6vw, 4.5rem);
  align-items: center;
}

.rsvp-copy .eyebrow {
  margin-bottom: 1.1rem;
}

.rsvp-copy h2 {
  font-style: italic;
}

.rsvp-copy .ornament {
  margin: 1.4rem 0;
  justify-content: flex-start;
}

.rsvp-copy > p {
  color: var(--ink-soft);
  max-width: 44ch;
}

.rsvp-facts {
  margin-top: 1.8rem;
  display: grid;
  gap: 1rem;
}

.rsvp-fact {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rsvp-fact .gem {
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.rsvp-fact strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.rsvp-fact small {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.rsvp-card {
  background: var(--white);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-l);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: var(--shadow-card);
}

.rsvp-card h3 {
  font-style: italic;
  text-align: center;
}

.rsvp-card .ornament {
  margin: 1rem 0 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85em 1.1em;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.35s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--ink-soft) 60%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%),
    linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 1.3em) 50%, calc(100% - 1em) 50%;
  background-size: 0.45em 0.45em;
  background-repeat: no-repeat;
}

/* Attending radio pills */
.attend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.attend input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attend label span {
  display: block;
  text-align: center;
  padding: 0.85em 0.5em;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.35s var(--ease);
}

.attend label span:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.attend input:checked + span {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.rsvp-card .btn {
  width: 100%;
  margin-top: 0.4rem;
}

.form-ok,
.form-err {
  display: none;
  margin-top: 1.1rem;
  padding: 0.95em 1.2em;
  border-radius: var(--radius-s);
  font-size: 0.9rem;
  text-align: center;
}

.form-ok.show,
.form-err.show {
  display: block;
}

.form-ok {
  background: var(--blush);
  color: var(--rose-deep);
  border: 1px solid var(--blush-deep);
}

.form-err {
  background: #fbeae6;
  color: #a8483d;
  border: 1px solid #f0c9c0;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: rgba(255, 249, 242, 0.82);
}

.footer-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.footer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(54, 38, 31, 0.93), rgba(38, 26, 21, 0.96));
}

.footer-top {
  padding: clamp(3.6rem, 7vw, 5.5rem) 0 2.6rem;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.footer .brand {
  font-size: 2.3rem;
  color: var(--gold-soft);
}

.footer-about p {
  margin-top: 1rem;
  max-width: 34ch;
  font-size: 0.95rem;
}

.footer h4 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.2rem;
}

.footer-links li + li {
  margin-top: 0.6rem;
}

.footer-links a {
  font-size: 0.95rem;
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.footer-links a:hover {
  color: var(--gold-soft);
  padding-left: 0.4rem;
}

.footer-contact li {
  display: flex;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.footer-contact li + li {
  margin-top: 0.9rem;
}

.footer-contact .gem {
  width: 7px;
  height: 7px;
  margin-top: 0.6em;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.footer-bottom {
  padding: 1.5rem 0 2.2rem;
  border-top: 1px solid rgba(233, 215, 167, 0.18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: rgba(255, 249, 242, 0.62);
}

.footer-bottom a:hover {
  color: var(--gold-soft);
}

.back-to-top {
  position: fixed;
  right: 1.3rem;
  bottom: 1.3rem;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease),
    background 0.45s var(--ease);
}

.back-to-top:hover {
  background: var(--gold-deep);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   14. 404 page
   -------------------------------------------------------------------------- */
.page-404 {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 3rem) 1rem 5rem;
  text-align: center;
  background: var(--ivory);
  position: relative;
  isolation: isolate;
}

.page-404 .texture {
  z-index: -1;
}

.p404-code {
  font-family: var(--font-script);
  font-size: clamp(7rem, 24vw, 15rem);
  line-height: 0.9;
  color: var(--gold);
}

.p404-code .accent {
  color: var(--rose);
}

.page-404 h1 {
  margin-top: 1.6rem;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-style: italic;
}

.page-404 p {
  max-width: 46ch;
  margin: 1rem auto 2.2rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   15. Responsive — ≤980px
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .couple-grid,
  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .couple-feature {
    max-width: 420px;
  }

  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   16. Responsive — ≤720px (burger nav)
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.8rem 1.4rem;
    background: var(--ivory);
    border: 1px solid var(--line-gold);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
      visibility 0.4s;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
  }

  .nav-link:last-child {
    border-bottom: 0;
  }

  .nav-link::after {
    display: none;
  }

  .hero {
    padding-top: calc(var(--header-h) + 2rem);
  }

  .hero-title {
    font-size: clamp(3.6rem, 17vw, 6rem);
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding-left: 52px;
  }

  .timeline-item:nth-child(even) .timeline-media {
    order: 0;
  }

  .tl-dot {
    left: 18px;
  }

  .schedule-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  .gallery-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .attend {
    grid-template-columns: 1fr;
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero-content {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-scroll .line::after {
    display: none;
  }
}
