:root {
  --bg: #faf8f5;
  --text: #2c2825;
  --muted: #5c5651;
  --accent: #6b5b4f;
  --border: #e3ddd4;
  --max-width: 40rem;
  --save-date-bg: #e0c9cc;
  --save-date-text: #e25c69;
  --event-bg: #8a99c7;
  --event-text: #3a3f6e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.hero-image {
  display: block;
  width: min(100%, 425px);
  height: auto;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0.25rem 0;
}

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

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.cta-link {
  font-weight: 600;
  text-decoration: none;
}

.cta-link:hover {
  text-decoration: underline;
}

.page-cta {
  text-align: center;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.lead {
  margin-top: 0;
}

.venue {
  font-style: normal;
  margin: 1rem 0;
}

.notes {
  padding-left: 1.1rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.carousel {
  margin-top: 1rem;
  max-width: 100%;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
}

.carousel-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  width: calc(var(--slide-count, 4) * 100%);
  transition: transform 0.35s ease;
}

.carousel-slide {
  flex: 0 0 calc(100% / var(--slide-count, 4));
  min-width: 0;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--bg);
}

.carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--bg);
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.carousel-dot:hover {
  background: var(--muted);
}

.carousel-dot[aria-current="true"] {
  background: var(--accent);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

.section-rsvp {
  background: #fff;
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding: 1.5rem 1.25rem 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.deadline {
  margin-top: 0;
  color: var(--muted);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.field span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
}

.attending-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.attending-fieldset legend {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding: 0;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1.25rem;
  cursor: pointer;
}

.submit {
  align-self: flex-start;
  padding: 0.6rem 1.25rem;
  font: inherit;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.submit:hover {
  filter: brightness(1.05);
}

.submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-message {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
}

.form-message.error {
  color: #8a2c2c;
}

.form-message.success {
  color: #2f5f3a;
}

.footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* Home full-page scroll (index + /family) */
body.home-fullpage {
  margin: 0;
  overflow: hidden;
  background: var(--save-date-bg);
}

.home-scroll {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.home-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 2rem 1.25rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-panel--save-date {
  position: relative;
  background-color: var(--save-date-bg);
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.75rem;
  border: none;
  background: none;
  transform: translateX(-50%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scroll-hint img {
  display: block;
  width: clamp(2rem, 8vw, 3.25rem);
  height: auto;
}

.home-panel--details {
  background-color: var(--event-bg);
  padding-left: calc(1.25rem + 16px);
  padding-right: calc(1.25rem + 16px);
}

/* Save the date panel */
.save-date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--save-date-text);
  width: 100%;
  max-width: min(90vw, 52rem);
  gap: 0;
}

.save-date-eyebrow {
  margin: 0;
  padding-block: clamp(3.75rem, 12vh, 7.5rem);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.save-date-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
}

.save-date-stack .word {
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  text-transform: uppercase;
}

.save-date-stack .the {
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  text-transform: lowercase;
  margin: -0.12em 0;
}

.save-date-signature {
  margin: 0;
  padding-block: clamp(3.75rem, 12vh, 7.5rem);
  font-family: "Bodoni Moda", Georgia, serif;
  font-style: italic;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Event details panel */
.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--event-text);
  max-width: 28rem;
}

.event-heading {
  margin: 0 0 clamp(1rem, 3vh, 1.75rem);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.event-lines {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  line-height: 1.65;
}

.event-duo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vh, 3rem);
  width: 100%;
  max-width: 100%;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

/* Family page (/family) */
body.family-page {
  background: var(--save-date-bg);
}

.family-page .family-panel--save-date {
  background-color: var(--save-date-bg);
}

.family-page .family-panel--details {
  background-color: var(--event-bg);
}

@media (min-width: 768px) {
  .event-duo {
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 2rem;
    max-width: min(90vw, 56rem);
  }

  .event-duo .event-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-scroll {
    scroll-behavior: auto;
  }
}
