:root {
  --cream: #f6efe3;
  --cream-deep: #eadcc6;
  --paper: #fffaf1;
  --ink: #33281f;
  --muted: #725f4f;
  --gold: #a9854f;
  --olive: #777654;
  --line: rgba(80, 59, 42, 0.16);
  --shadow: 0 24px 70px rgba(76, 56, 39, 0.15);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(169, 133, 79, 0.12), transparent 32rem),
    linear-gradient(180deg, var(--cream), #fbf6eb 46%, var(--cream));
  font-family: var(--sans);
  line-height: 1.6;
}

a { color: inherit; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 20;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.hero {
  min-height: 100svh;
  padding: 1rem;
  display: grid;
  grid-template-rows: auto 1fr;
}
.topbar {
  width: min(100%, 68rem);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.brand {
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
  background: rgba(255, 250, 241, 0.72);
}
.nav-links { display: flex; gap: 0.75rem; }
.nav-links a { text-decoration: none; }

.hero-card {
  width: min(100%, 42rem);
  align-self: center;
  justify-self: center;
  text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: rgba(255, 250, 241, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(169, 133, 79, 0.22);
  border-radius: 1.45rem;
  pointer-events: none;
}
.hero-card::after {
  inset: auto -3rem -5rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(119, 118, 84, 0.1);
  border: 0;
}
.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}
h1, h2, h3 { line-height: 1.05; }
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}
h1 span { display: block; font-size: 0.45em; color: var(--gold); margin: -0.12em 0; }
.date, .venue {
  margin: 0.35rem 0 0;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.venue { color: var(--muted); font-weight: 600; }
.intro { margin: 1.25rem auto 0; max-width: 24rem; color: var(--muted); }
.hero-actions { margin-top: 1.75rem; display: grid; gap: 0.75rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--gold);
  font-weight: 700;
  cursor: pointer;
  font: inherit;
}
.button.primary { background: var(--ink); color: #fffaf1; border-color: var(--ink); }
.button.secondary { background: transparent; color: var(--ink); }
.button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 3px solid rgba(169, 133, 79, 0.45); outline-offset: 3px; }

.section {
  width: min(100% - 2rem, 44rem);
  margin: 0 auto;
  padding: 4rem 0;
}
.section h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 10vw, 4rem);
  letter-spacing: -0.035em;
}
.section p { color: var(--muted); }
.invite { text-align: center; }


.section.photo-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: var(--shadow);
}

.section.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42rem;
  object-fit: cover;
}

.countdown-card,
.closing,
.thanks-card {
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255, 250, 241, 0.78);
  padding: clamp(1.35rem, 5vw, 2.2rem);
  box-shadow: 0 16px 45px rgba(76, 56, 39, 0.08);
}

.section.location,
.section.rsvp,
.section.gifts {
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255, 250, 241, 0.78);
  padding: clamp(1.35rem, 5vw, 2.2rem);
  box-shadow: 0 16px 45px rgba(76, 56, 39, 0.08);
}
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.countdown div {
  min-height: 6rem;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(246, 239, 227, 0.65);
}
.countdown strong { font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.countdown span { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; }

.timeline { display: grid; gap: 1rem; }
.timeline article {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.timeline article:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline time { color: var(--gold); font-weight: 800; }
.timeline h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.timeline p { margin: 0; }

.section.location,
.section.rsvp,
.section.gifts {
  margin-top: clamp(3rem, 12vw, 6rem);
  margin-bottom: clamp(3rem, 12vw, 6rem);
}

.map-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.location .button { width: 100%; }
form { display: grid; gap: 1rem; margin-top: 1.5rem; }
label, legend { font-weight: 700; color: var(--ink); }
input, textarea {
  width: 100%;
  margin-top: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fffdf8;
  color: var(--ink);
  padding: 0.9rem 1rem;
  font: inherit;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  margin: 0;
}
.choice { display: flex; align-items: center; gap: 0.65rem; margin-top: 0.75rem; font-weight: 600; color: var(--muted); }
.choice input {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  accent-color: var(--gold);
  flex: 0 0 auto;
}
.field-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.hidden { display: none; }
form .button { width: 100%; margin-top: 0.5rem; }

.gift-card {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}
.gift-card p {
  margin: 0;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(246, 239, 227, 0.7);
}
.closing { text-align: center; margin-bottom: 6rem; }
.closing .button { width: 100%; }

.sticky-rsvp {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf1;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 16px 45px rgba(51, 40, 31, 0.25);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.sticky-rsvp.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.thanks-page { min-height: 100svh; display: grid; place-items: center; padding: 1rem; }
.thanks-card { width: min(100%, 36rem); text-align: center; }
.thanks-card h1 { font-size: clamp(4rem, 18vw, 7rem); }

@media (min-width: 44rem) {
  .hero-actions { display: flex; justify-content: center; }

  .button { min-width: 12rem; }
  .map-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location .button, form .button, .closing .button { width: auto; }
  .gift-card { grid-template-columns: 1fr 1fr; }
  .sticky-rsvp { display: none; }
  .section { padding: 5.5rem 0; }

  .section.photo-card {
    padding: 0;
  }
}
