:root {
  --bg: #f7f5f2;
  --bg-soft: #efece7;
  --ink: #121212;
  --muted: #6b6b6b;
  --line: #d8d3cb;
  --heart: #b4232c;
  --white: #ffffff;
  --max: 720px;
  --wide: 1100px;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-body: "Spectral", Georgia, serif;
  --font-sans: "Spectral", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.section {
  position: relative;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0;
}

.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.lead {
  position: relative;
  z-index: 1;
  margin: 0 auto 2rem;
  max-width: 34rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 400;
}

.lead strong {
  color: var(--ink);
  font-weight: 700;
}

.invite .lead,
.countdown .section-title,
.program .section-title,
.wishes .section-title,
.rsvp .section-title,
.contacts .section-title,
.invite .section-title {
  text-align: center;
}

.invite,
.countdown,
.program,
.wishes,
.rsvp,
.contacts {
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-1px);
}

.btn--block {
  width: 100%;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  overflow: hidden;
  color: var(--white);
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
    url("https://images.unsplash.com/photo-1523438885200-e635ba2c371e?auto=format&fit=crop&w=1600&q=80")
      center 40% / cover no-repeat;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.04);
  animation: hero-zoom 18s ease-out forwards;
  pointer-events: none;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 18, 18, 0.2) 0%,
    rgba(18, 18, 18, 0.35) 45%,
    rgba(18, 18, 18, 0.72) 100%
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, 40rem);
  padding: 0 0 6.5rem;
  text-align: center;
  animation: fade-up 1.1s ease both;
  pointer-events: none;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero__names {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 14vw, 6.8rem);
  font-weight: 400;
  line-height: 1;
}

.hero__names span {
  display: inline-block;
  margin: 0 0.2em;
  font-size: 0.55em;
  font-weight: 400;
  vertical-align: middle;
}

.hero__date {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 5;
  width: 24px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
}

.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  transform: translateX(-50%);
  animation: scroll-dot 1.6s ease-in-out infinite;
}

/* Invite */
.date-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.date-block__label {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.date-block__value {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

/* Countdown */
.countdown {
  background: var(--bg-soft);
  width: 100%;
  max-width: none;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  overflow: hidden;
}

.countdown .section-title,
.countdown__grid,
.calendar {
  width: min(100%, var(--max));
  margin-left: auto;
  margin-right: auto;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 2rem auto 2.75rem;
}

.countdown__item {
  padding: 1.1rem 0.4rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.countdown__num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1;
}

.countdown__label {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar {
  padding: 1.5rem 1.25rem 1.75rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.calendar__month {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.calendar__weekdays,
.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.calendar__weekdays span,
.calendar__days span {
  display: grid;
  place-items: center;
  min-height: 2.2rem;
  font-size: 0.78rem;
}

.calendar__weekdays span {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.calendar__days .is-wedding {
  position: relative;
  font-weight: 600;
  color: var(--heart);
}

.calendar__days .is-wedding::after {
  content: "";
  position: absolute;
  inset: 0.1rem;
  border: 1.5px solid var(--heart);
  border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-8deg);
  animation: heart-pulse 2.8s ease-in-out infinite;
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--white);
  padding: 0.85rem 0;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
}

.marquee__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Program */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  text-align: left;
}

.timeline__item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.timeline__item:last-child {
  border-bottom: 1px solid var(--line);
}

.timeline time {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.timeline h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1.02rem;
}

/* Location */
.location {
  width: min(100% - 2rem, var(--wide));
  display: grid;
  gap: 1.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.location__panel {
  position: relative;
  padding: 2.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  text-align: center;
}

.location__note {
  margin: -1rem auto 1.75rem;
  max-width: 22rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 1rem;
}

.location__map {
  min-height: 320px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-soft);
}

.location__map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  filter: grayscale(1);
}

/* Wishes */
.wishes__list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  text-align: left;
}

.wishes__list li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.wishes__list li:last-child {
  border-bottom: 1px solid var(--line);
}

.wishes__num {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--muted);
}

.wishes__list p {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
}

/* Form */
.rsvp-form {
  position: relative;
  z-index: 1;
  margin: 2.5rem auto 0;
  max-width: 34rem;
  text-align: left;
}

.field {
  display: block;
  margin-bottom: 1.6rem;
}

.field > span,
.field legend {
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

.field input[type="text"],
.field input[type="password"],
.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.35rem 0 0.4rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
  outline: none;
  resize: none;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.field__control--name {
  width: 22ch;
}

.field__control--drinks {
  width: 48ch;
}

.field__control--allergies {
  width: 42ch;
}

.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--heart);
}

.field--choice {
  margin: 0 0 1.8rem;
  padding: 0;
  border: 0;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
}

.choice input {
  accent-color: var(--ink);
  width: 1.05rem;
  height: 1.05rem;
}

.choice span {
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 400;
}

.form-status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.form-status.is-success {
  color: #1f6b3a;
}

.form-status.is-error {
  color: var(--heart);
}

/* Contacts */
.contacts__grid {
  display: grid;
  gap: 2rem;
  margin: 2.5rem auto 0;
  max-width: 34rem;
  text-align: left;
}

.contacts h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
}

.contacts p {
  margin: 0 0 0.45rem;
  color: var(--muted);
}

.contacts a {
  color: var(--ink);
}

.closing {
  margin: 3.5rem 0 0 !important;
  font-family: var(--font-script);
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--ink) !important;
  text-align: center;
}

.footer {
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title,
.date-block,
.countdown__grid,
.calendar,
.timeline,
.wishes__list,
.contacts__grid,
.section-kicker {
  position: relative;
  z-index: 1;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes scroll-dot {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.35;
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes heart-pulse {
  0%,
  100% {
    transform: rotate(-8deg) scale(1);
  }
  50% {
    transform: rotate(-8deg) scale(1.06);
  }
}

@media (min-width: 820px) {
  .section {
    padding: 7rem 0;
  }

  .location {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: stretch;
  }

  .location__panel,
  .location__map {
    min-height: 420px;
  }

  .location__panel {
    display: grid;
    place-content: center;
    padding: 3rem;
  }

  .location__map iframe {
    min-height: 420px;
  }

  .contacts__grid {
    grid-template-columns: 1fr 1fr;
    max-width: none;
  }

  .timeline__item {
    grid-template-columns: 6rem 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .countdown__grid {
    gap: 0.45rem;
  }

  .countdown__item {
    padding: 0.9rem 0.2rem;
  }

  .countdown__label {
    letter-spacing: 0.08em;
    font-size: 0.6rem;
  }
}
