:root {
  --ivory: #f7f3eb;
  --champagne: #e7d8be;
  --gold: #b89b65;
  --ink: #262421;
  --white: #ffffff;
  --muted: #6d675e;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
  --page-width: 32rem;
  --side-space: clamp(1.25rem, 7vw, 2rem);
  --section-space: clamp(5.5rem, 22vw, 8rem);
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  background: #ddd7cd;
}

body {
  margin: 0;
  min-width: 20rem;
  overflow-x: hidden;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 3rem rgb(38 36 33 / 8%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  position: relative;
  padding: var(--section-space) var(--side-space);
}

.section__inner {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}

.section--ivory {
  background: var(--ivory);
}

.section--white {
  background: var(--white);
}

.section--champagne {
  background: var(--champagne);
}

.section--dark {
  background: var(--ink);
  color: var(--white);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.kicker--light {
  color: var(--champagne);
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 12vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.section-title--light {
  color: var(--white);
}

.ornament {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 1.75rem 0;
  background: var(--gold);
}

.ornament--center {
  margin-right: auto;
  margin-left: auto;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.135em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 120ms ease;
  touch-action: manipulation;
}

.button:active,
.stepper__button:active {
  transform: scale(0.98);
}

.button:focus-visible,
.stepper__button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.button--primary {
  background: var(--ink);
  color: var(--white);
}

.button--outline {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: var(--champagne);
}

.hero__photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 48%;
  background: linear-gradient(to bottom, rgb(38 36 33 / 0%), rgb(38 36 33 / 14%));
  content: "";
  pointer-events: none;
}

.hero__edition {
  position: absolute;
  top: max(1.5rem, calc(env(safe-area-inset-top) + 0.75rem));
  right: 1rem;
  display: flex;
  width: 2rem;
  align-items: center;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.35rem;
  background: rgb(247 243 235 / 88%);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
}

.hero__edition-line {
  width: 1px;
  height: 0.9rem;
  background: var(--gold);
}

.hero__card {
  width: 100%;
  padding: clamp(1.35rem, 6vw, 1.9rem);
  border-top: 1px solid rgb(184 155 101 / 60%);
  background: rgb(247 243 235 / 92%);
  text-align: center;
}

.hero__eyebrow {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.hero__names {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.85rem, 15vw, 4.65rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: nowrap;
}

.hero__names span {
  color: var(--gold);
  font-size: 0.78em;
  font-style: italic;
}

.hero__date {
  margin: 1rem 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.hero__button {
  width: 100%;
}

.button__arrow {
  color: var(--champagne);
  font-size: 1rem;
}

.welcome {
  text-align: center;
}

.welcome::before {
  position: absolute;
  top: 2rem;
  left: 50%;
  color: rgb(184 155 101 / 22%);
  content: "&";
  font-family: var(--serif);
  font-size: 8rem;
  font-style: italic;
  line-height: 1;
  transform: translateX(-50%);
}

.welcome__lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 8.5vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.18;
  text-wrap: balance;
}

.welcome__copy {
  max-width: 22rem;
  margin: 2rem auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.signature {
  margin-top: 3.5rem;
}

.signature__names {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-style: italic;
  line-height: 1;
}

.signature__names span {
  color: var(--gold);
}

.signature__date {
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.countdown {
  text-align: center;
}

.countdown::before,
.countdown::after {
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 1px;
  background: rgb(184 155 101 / 25%);
  content: "";
}

.countdown::before {
  left: 0.75rem;
}

.countdown::after {
  right: 0.75rem;
}

.countdown__grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(0.18rem, 1.3vw, 0.45rem);
  margin-top: 2.75rem;
}

.countdown__item {
  min-width: 0;
}

.countdown__value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 11vw, 3.25rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.countdown__label {
  display: block;
  margin-top: 0.65rem;
  color: var(--champagne);
  font-size: clamp(0.54rem, 2.5vw, 0.66rem);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown__separator {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 9vw, 2.6rem);
  line-height: 1;
}

.countdown__today {
  margin: 2.75rem 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.2;
}

.events {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.event-card {
  position: relative;
  padding: clamp(2rem, 10vw, 3rem) clamp(1.25rem, 7vw, 2rem);
  border: 1px solid var(--champagne);
  background: var(--ivory);
  text-align: left;
}

.event-card__number {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: rgb(184 155 101 / 30%);
  font-family: var(--serif);
  font-size: 3.75rem;
  line-height: 1;
}

.event-card__place {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.2;
}

.event-card__detail {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.event-card__time {
  margin: 0.2rem 0 1.65rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.event-card__time--small {
  margin-bottom: 0;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.event-transition {
  display: flex;
  height: 7rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.event-transition__line {
  width: 1px;
  height: 1.75rem;
  margin-bottom: 0.45rem;
  background: var(--gold);
}

.event-transition__arrow {
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.rsvp {
  text-align: center;
}

.rsvp__subtitle {
  margin: 1rem 0 0;
  color: var(--muted);
}

.rsvp-form {
  margin-top: 2.75rem;
  text-align: left;
}

.field label,
.confirmation-options legend {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.field input:focus {
  border-bottom-color: var(--gold);
}

.field input[aria-invalid="true"] {
  border-bottom-color: #8b2929;
}

.field__error {
  margin: 0.55rem 0 0;
  color: #702424;
  font-size: 0.88rem;
}

.counter-row {
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgb(38 36 33 / 22%);
}

.counter-row:first-of-type {
  margin-top: 1.6rem;
  border-top: 1px solid rgb(38 36 33 / 22%);
}

.counter-row__label {
  margin: 0;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.counter-row__hint {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.stepper {
  display: grid;
  flex: 0 0 auto;
  align-items: center;
  grid-template-columns: 2.75rem minmax(2.5rem, auto) 2.75rem;
}

.stepper__button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgb(38 36 33 / 45%);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  touch-action: manipulation;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}

.stepper__value {
  padding: 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.confirmation-options {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  padding: 0;
  border: 0;
}

.confirmation-options legend {
  width: 100%;
  margin-bottom: 0.9rem;
  text-align: center;
}

.button--whatsapp {
  width: 100%;
  background: var(--ink);
  color: var(--white);
}

.button--whatsapp-alt {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.rsvp__privacy {
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.closing {
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.closing::before,
.closing::after {
  position: absolute;
  border: 1px solid rgb(184 155 101 / 18%);
  border-radius: 50%;
  content: "";
}

.closing::before {
  top: -7rem;
  right: -8rem;
  width: 18rem;
  height: 18rem;
}

.closing::after {
  bottom: -8rem;
  left: -9rem;
  width: 21rem;
  height: 21rem;
}

.closing__monogram {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 21vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.closing__monogram span {
  color: var(--gold);
  font-size: 0.65em;
  font-style: italic;
}

.rings {
  position: relative;
  width: 3.25rem;
  height: 2rem;
  margin: 2.25rem auto 0.5rem;
}

.rings span {
  position: absolute;
  top: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.rings span:first-child {
  left: 0;
}

.rings span:last-child {
  right: 0;
}

.closing__heart {
  display: block;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.closing__title {
  max-width: 20rem;
  margin: 2rem auto 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}

.closing__copy {
  max-width: 20rem;
  margin: 1.5rem auto 0;
  color: rgb(255 255 255 / 72%);
  font-size: 0.92rem;
}

.closing__names {
  margin: 3.25rem 0 0;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 1.75rem;
  font-style: italic;
}

.closing__date {
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.24em;
}

.js .reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) {
  .button--primary:hover,
  .button--whatsapp:hover {
    background: #403c37;
  }

  .button--outline:hover,
  .button--whatsapp-alt:hover {
    background: var(--ink);
    color: var(--white);
  }

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

@media (max-width: 22rem) {
  .hero {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .hero__card {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .hero__names {
    font-size: 2.65rem;
  }

  .section-title {
    font-size: 2.05rem;
  }

  .stepper {
    grid-template-columns: 2.75rem 2.15rem 2.75rem;
  }
}

@media (orientation: landscape) and (max-height: 31rem) {
  .hero {
    min-height: 34rem;
  }
}

@media (min-width: 32.01rem) {
  body {
    padding: 2rem 0;
  }

  .hero {
    border-radius: 0.15rem 0.15rem 0 0;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
