:root {
  --white: #ffffff;
  --ivory: #faf8f5;
  --ink: #1c1c1c;
  --muted: #7a7670;
  --line: #e6e2dc;
  --accent: #a89279;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; margin: 0; line-height: 1.15; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 em, h1 em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

.section { padding: clamp(5rem, 11vw, 9rem) 1.5rem; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(3rem, 6vw, 5rem); }
.section__sub { color: var(--muted); margin-top: 1rem; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 1.05rem 2.4rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .35s, color .35s;
}
.btn--outline:hover, .btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: transparent; color: var(--ink); }
.btn--full { width: 100%; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 4vw, 3rem);
  color: var(--white);
  transition: background .4s, padding .4s, color .4s, box-shadow .4s;
}
.nav.is-scrolled {
  background: rgba(255,255,255,.96);
  color: var(--ink);
  padding-block: 1rem;
  box-shadow: 0 1px 0 var(--line);
}
.nav__logo { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .08em; }
.nav__logo span { font-style: italic; }
.nav__links { display: flex; gap: 2.2rem; align-items: center; }
.nav__links a {
  font-size: .7rem; letter-spacing: .26em; text-transform: uppercase;
  opacity: .9; transition: opacity .3s;
}
.nav__links a:hover { opacity: .55; }
.nav__cta { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.nav__toggle { display: none; }

/* Hero */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  color: var(--white); overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: zoomOut 2.4s ease-out forwards; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.38)); }
.hero__content { position: relative; padding: 0 1.5rem; animation: fadeUp 1.6s .3s both; }
.hero .eyebrow { color: rgba(255,255,255,.85); }
.hero__names { font-size: clamp(3.6rem, 12vw, 8.5rem); letter-spacing: .01em; }
.hero__names em { color: inherit; font-weight: 300; }
.hero__rule {
  position: relative; width: min(280px, 60vw); height: 1px; margin: 2.4rem auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85) 35%, rgba(255,255,255,.85) calc(50% - 12px), transparent calc(50% - 12px), transparent calc(50% + 12px), rgba(255,255,255,.85) calc(50% + 12px), rgba(255,255,255,.85) 65%, transparent);
}
.hero__rule::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  border: 1px solid rgba(255,255,255,.9); background: transparent;
  transform: translate(-50%, -50%) rotate(45deg);
}
.hero__date { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.8rem); letter-spacing: .3em; margin: 0; }
.hero__place { font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; margin: .8rem 0 0; opacity: .85; }

/* Countdown */
.countdown { text-align: center; padding: clamp(4rem, 8vw, 6rem) 1.5rem; border-bottom: 1px solid var(--line); }
.countdown__grid { display: flex; justify-content: center; gap: clamp(1.5rem, 6vw, 5rem); }
.countdown__grid div { display: flex; flex-direction: column; align-items: center; }
.countdown__grid span { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__grid small { margin-top: .8rem; font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* Details */
.details { background: var(--ivory); }
.details__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.detail { text-align: center; padding: 3.5rem 2rem; }
.detail + .detail { border-left: 1px solid var(--line); }
.detail__num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.detail h3 { font-family: var(--sans); font-size: .74rem; font-weight: 400; letter-spacing: .34em; text-transform: uppercase; margin: 1.2rem 0 1.4rem; }
.detail__big { font-family: var(--serif); font-size: 2.3rem; margin: 0 0 1rem; line-height: 1.1; }
.detail p:last-child { color: var(--muted); font-size: .92rem; max-width: 260px; margin: 0 auto; }
.details__actions { text-align: center; margin-top: 3.5rem; }

/* Venue */
.venue { display: grid; grid-template-columns: 5fr 7fr; min-height: 560px; }
.venue__info { display: flex; flex-direction: column; justify-content: center; padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 6vw, 6rem); }
.venue__info h2 { margin-bottom: 1.6rem; }
.venue__info address { font-style: normal; color: #4a4743; margin-bottom: 2.4rem; }
.venue__info .btn { align-self: flex-start; }
.venue__map { position: relative; min-height: 420px; background: var(--ivory); }
.venue__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05) brightness(1.04); }

/* Gallery */
.gallery { padding-inline: clamp(1rem, 3vw, 2rem); }
.gallery__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 12px;
}
.gallery__grid figure { margin: 0; overflow: hidden; }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.gallery__grid figure:hover img { transform: scale(1.04); }
.gallery__grid { grid-template-areas: "a b b c" "a d e c" "f f f f"; }
.g1 { grid-area: a; } .g2 { grid-area: b; } .g3 { grid-area: c; }
.g4 { grid-area: d; } .g5 { grid-area: e; } .g6 { grid-area: f; }

/* Gifts */
.gifts { background: var(--ivory); text-align: center; }
.gifts__inner { max-width: 620px; margin: 0 auto; }
.gifts h2 { margin-bottom: 1.4rem; }
.gifts p:not(.eyebrow) { color: var(--muted); margin-bottom: 2.4rem; }

/* RSVP */
.rsvp__inner { max-width: 560px; margin: 0 auto; }
.rsvp__form { display: grid; gap: 1.8rem; }
.field { display: grid; gap: .6rem; }
.field > span { font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.field input[type="text"], .field select, .field textarea {
  font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: .7rem 0; outline: none; transition: border-color .3s; resize: vertical;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field input.is-invalid { border-color: #b4574b; }
.choice { display: grid; gap: .6rem; }
.choice label { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.choice input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1px solid var(--ink); border-radius: 50%; margin: 0; display: grid; place-items: center; flex: none; }
.choice input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .2s; }
.choice input:checked::after { transform: scale(1); }
.rsvp__note { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.25rem; min-height: 1.5em; margin: 0; }

/* Footer */
.footer { text-align: center; padding: 5rem 1.5rem 4rem; border-top: 1px solid var(--line); }
.footer__names { font-family: var(--serif); font-size: 2.4rem; margin: 0; }
.footer__names em { font-style: italic; color: var(--accent); }
.footer__date { font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin: .6rem 0 0; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes zoomOut { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .nav__toggle {
    display: grid; gap: 6px; background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; z-index: 2;
  }
  .nav__toggle span { display: block; width: 24px; height: 1px; background: currentColor; transition: transform .3s; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; background: var(--white); color: var(--ink);
    flex-direction: column; justify-content: center; gap: 2rem;
    opacity: 0; pointer-events: none; transition: opacity .4s;
  }
  .nav.is-open { color: var(--ink); }
  .nav.is-open .nav__links { opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: .8rem; }

  .details__grid { grid-template-columns: 1fr; }
  .detail + .detail { border-left: 0; border-top: 1px solid var(--line); }
  .venue { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; grid-template-areas: "a b" "a c" "d e" "f f"; }
}

@media (max-width: 480px) {
  .countdown__grid { gap: 1.2rem; }
  .countdown__grid small { letter-spacing: .18em; }
  .gallery__grid { grid-auto-rows: 140px; gap: 8px; }
}
