:root {
  color-scheme: light;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
html.wedding-document {
  scroll-padding-top: 0;
  scroll-snap-type: y mandatory;
}
html.guide-document { scroll-behavior: auto; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--olive);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.08;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 6vw, 6rem);
}
.wedding-page .site-header {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 100%;
  justify-content: flex-end;
  padding: 1.5rem clamp(1.25rem, 6vw, 6rem);
  color: var(--background);
}
.nav-links { display: flex; align-items: center; gap: clamp(1.2rem, 3vw, 2.8rem); }
.nav-links a,
.back-link {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.nav-links a { transition: opacity .2s ease; }
.nav-links a:hover { opacity: .7; }
.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgb(248 242 233 / 75%);
  border-radius: 50%;
  background: transparent;
  color: var(--background);
  cursor: pointer;
}
.home-link {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
}
.home-link img { width: 100%; height: 100%; object-fit: contain; }
.back-link { color: var(--wood); }
.page-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1.5rem; }

.wedding-page main > section,
.wedding-page footer { scroll-snap-align: start; scroll-snap-stop: always; }
.guide-page .site-header,
.guide-page main > section,
.guide-page footer { scroll-snap-align: start; scroll-snap-stop: always; }
.wedding-page main > section,
.guide-page:not(.not-found-page) main > section {
  min-height: 100vh;
  min-height: 100svh;
}
.hero {
  position: relative;
  display: grid;
  min-height: min(810px, 100svh);
  min-height: min(810px, 100vh);
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--background);
  text-align: center;
}
.hero-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}
.hero::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgb(73 50 43 / 52%) 0%, rgb(73 50 43 / 22%) 38%, rgb(73 50 43 / 52%) 100%);
  content: "";
}
.hero-content { position: relative; z-index: 2; padding: 7rem 1.5rem 4rem; }
.hero .eyebrow { color: var(--accent); }
.hero-emblem {
  display: block;
  width: clamp(10rem, 24vw, 15rem);
  height: auto;
  margin: 0 auto 1.7rem;
  padding: .6rem;
}
.hero h1 {
  margin: .4rem 0 1rem;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 11vw, 9.5rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .96;
}
.hero h1 span { color: var(--accent); font-style: italic; font-weight: 400; }
.hero-date {
  margin: 1.7rem 0 2rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 2rem;
  padding: .85rem 1.55rem;
  background: var(--accent);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.button:hover {
  transform: translateY(-2px);
  border-color: var(--wood);
  background: var(--wood);
  color: var(--background);
}
.button-light { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.button-light:hover { border-color: var(--background); background: var(--background); color: var(--ink); }
.wedding-page .intro {
  display: grid;
  align-content: center;
  padding: clamp(5rem, 10vw, 9rem) 1.5rem;
  background: var(--background);
  text-align: center;
}
.intro-inner { max-width: 700px; margin: auto; }
.wedding-page .intro .section-title { margin-bottom: 1.5rem; }
.intro-copy {
  max-width: 570px;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.8;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1.3rem, 5vw, 4rem);
  margin-top: 3rem;
}
.countdown-item { min-width: 4rem; }
.countdown-number { display: block; font-family: var(--serif); font-size: 2rem; }
.countdown-label { color: var(--muted); font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; }
.story {
  display: grid;
  min-height: 620px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 9vw, 9rem);
  background: var(--surface);
}
.story-photo {
  width: 100%;
  height: clamp(360px, 48vw, 580px);
  object-fit: cover;
  object-position: center;
}
.story-copy { max-width: 480px; }
.story-copy .section-title { margin-bottom: 1.4rem; }
.story-copy p:not(.eyebrow) { margin: 0 0 1rem; color: var(--muted); font-size: .96rem; line-height: 1.9; }
.details {
  display: grid;
  align-content: center;
  padding: clamp(5rem, 9vw, 8rem) 1.5rem;
  background: var(--background);
  text-align: center;
}
.details .section-title { margin-bottom: 3.5rem; }
.event-grid {
  display: grid;
  max-width: 1050px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.event { padding: 2.5rem 1.5rem; }
.event + .event { border-left: 1px solid var(--line); }
.event-time { color: var(--olive); font-size: .68rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.event h3 { margin: 1rem 0 .65rem; font-family: var(--serif); font-size: 1.75rem; font-weight: 400; }
.event p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.venue {
  display: grid;
  min-height: 520px;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
}
.venue-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: var(--surface);
  object-fit: cover;
  object-position: center;
}
.venue-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(3rem, 8vw, 7rem); }
.venue-copy .section-title { margin-bottom: 1.2rem; }
.venue-copy p:not(.eyebrow) { margin: 0 0 1.5rem; color: var(--muted); font-size: .94rem; line-height: 1.8; }
.text-link {
  display: inline-block;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--accent);
  color: var(--wood);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.wedding-page footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 7vw, 7rem);
  background: var(--wood);
  color: var(--background);
  font-size: .72rem;
}
.wedding-page footer a { text-decoration: none; }

.rsvp-page main {
  display: grid;
  min-height: calc(100vh - 6rem);
  place-items: center;
  padding: 2rem 1.25rem 5rem;
}
.rsvp-card {
  width: min(100%, 620px);
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1.25rem 3.5rem rgb(73 50 43 / 9%);
}
.rsvp-page .eyebrow { margin-bottom: .85rem; font-size: .68rem; letter-spacing: .2em; text-align: center; }
.rsvp-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1.1;
  text-align: center;
}
.rsvp-page .intro {
  margin: 1rem 0 2.25rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
}
.invite-status {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.6;
  text-align: center;
}
.invite-status:empty { display: none; }
.invite-status.is-loading::before {
  display: inline-block;
  width: .9rem;
  height: .9rem;
  margin-right: .55rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  vertical-align: -.12rem;
  animation: rsvp-spinner .7s linear infinite;
}
.loading-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgb(73 50 43 / 48%);
}
.loading-overlay[hidden] { display: none; }
.loading-panel {
  display: grid;
  min-width: min(18rem, 100%);
  justify-items: center;
  gap: 1.1rem;
  padding: 2rem;
  background: var(--background);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 1.25rem 3.5rem rgb(73 50 43 / 18%);
}
.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: rsvp-spinner 2.4s linear infinite;
}
@keyframes rsvp-spinner {
  to { transform: rotate(360deg); }
}
.rsvp-page form[hidden] { display: none; }
.rsvp-page form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .55rem; }
.rsvp-page label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.field-hint { color: var(--muted); font-size: .78rem; }
.rsvp-page input,
.rsvp-page select,
.rsvp-page textarea {
  width: 100%;
  border: 1px solid var(--wood);
  border-radius: 0;
  padding: .85rem .9rem;
  background: var(--background);
  color: var(--ink);
}
.rsvp-page textarea { min-height: 7rem; resize: vertical; }
.rsvp-page input:focus,
.rsvp-page select:focus,
.rsvp-page textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.submit-button {
  min-height: 3.2rem;
  border: 1px solid var(--ink);
  border-radius: 2rem;
  padding: .85rem 1.5rem;
  background: var(--ink);
  color: var(--background);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.submit-button:disabled { cursor: not-allowed; opacity: .58; }
.form-note { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.6; text-align: center; }

.guide-page .site-header { border-bottom: 1px solid var(--line); }
.guide-page main { overflow-x: clip; }
.not-found-page { display: flex; flex-direction: column; }
.not-found-page main { display: flex; flex: 1; }
.not-found-page .guide-intro { flex: 1; }
.guide-intro {
  display: grid;
  min-height: 430px;
  justify-items: center;
  align-content: center;
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  background: var(--surface);
  text-align: center;
}
.guide-intro .eyebrow { margin-bottom: 1.25rem; }
.guide-intro h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: 1.04;
}
.guide-lede {
  max-width: 620px;
  margin: 1.5rem auto 2rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.8;
}
.guide-page .button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--background);
}
.guide-page .button:hover { border-color: var(--wood); background: var(--wood); }
.guide-section {
  display: grid;
  align-content: center;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 7vw, 6rem);
}
.guide-section > .eyebrow,
.guide-section > .section-title { text-align: center; }
.guide-section > .section-title { margin-bottom: 3rem; }
.guide-grid {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.guide-card {
  min-height: 265px;
  padding: 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.guide-number { color: var(--olive); font-size: .68rem; font-weight: 700; letter-spacing: .15em; }
.guide-card h3 {
  margin: 1.35rem 0 .75rem;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
}
.guide-card p,
.guide-outing-copy p,
.guide-note > p:not(.eyebrow) {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.8;
}
.guide-card p { margin: 0 0 1.35rem; }
.guide-card .text-link { font-size: .64rem; }
.guide-outing {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: clamp(2rem, 8vw, 8rem);
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 11vw, 10rem);
  background: var(--surface);
}
.guide-outing .section-title { max-width: 480px; }
.guide-outing-copy p { margin: 0 0 1.5rem; }
.guide-note {
  display: grid;
  align-content: center;
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6rem) 1.5rem;
  text-align: center;
}
.guide-note .section-title { margin-bottom: 1rem; }
.guide-note > p:not(.eyebrow) { max-width: 580px; margin: 0 auto 2rem; }
.guide-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.5rem, 7vw, 7rem);
  background: var(--wood);
  color: var(--background);
  font-size: .72rem;
}
.guide-footer a { text-decoration: none; }

@media (max-width: 760px) {
  .wedding-page .site-header { padding: 1rem 1.25rem; }
  .wedding-page .menu-toggle { position: relative; z-index: 2; display: grid; place-items: center; }
  .wedding-page .nav-links {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 5rem 1.5rem 1.5rem;
    background: var(--background);
  }
  .wedding-page .nav-links.is-open { display: flex; flex-direction: column; color: var(--ink); }
  .wedding-page .site-header.menu-open .menu-toggle { border-color: var(--accent); background: var(--background); color: var(--ink); }
  .wedding-page .nav-links a { padding: 1rem 0; }
  .hero { min-height: 680px; }
  .hero h1 { font-size: clamp(4.3rem, 19vw, 7rem); }
  .story, .venue { grid-template-columns: 1fr; }
  .story { padding: 4rem 1.5rem; }
  .story-photo { height: min(100vw, 470px); }
  .story-copy { padding: 1rem .25rem 0; }
  .event-grid { grid-template-columns: 1fr; }
  .event + .event { border-top: 1px solid var(--line); border-left: 0; }
  .event { padding: 2rem 1rem; }
  .venue-image { min-height: 340px; }
  .venue-copy { padding: 3.5rem 1.5rem; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-outing { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 520px) {
  .rsvp-page .site-header { padding: 1rem 1.1rem; }
  .rsvp-page main { min-height: calc(100vh - 5rem); padding: 1rem .75rem 3rem; }
  .rsvp-card { padding: 2rem 1.25rem; }
  .page-links { gap: .75rem; }
  .back-link { font-size: .62rem; }
  .guide-intro { min-height: 380px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; padding: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
