/* ==========================================================================
   Palette and typography
   ========================================================================== */
:root {
  --bg: #f6f1ea;
  --paper: #fbf8f4;
  --surface: #ffffff;
  --ink: #1c1a18;
  --ink-soft: #3d3934;
  --muted: #857c71;
  --line: #e2d9cd;
  --accent: #a88b68;
  --accent-soft: #e9dccb;
  --danger: #a4453a;
  --ok: #5f7356;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --amp: var(--sans);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(88px, 14vw, 160px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
  height: 100svh;
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

/* [hidden] beats any display rule (except animated reveal blocks) */
[hidden]:not(.reveal-block) {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Shared elements
   ========================================================================== */
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

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

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

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

.section--dark .eyebrow {
  color: #a39a8f;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.container--wide {
  max-width: 960px;
}

.title {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.title em {
  font-style: italic;
}

.lead {
  margin: 28px auto 0;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 16px;
}

.lead p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.lead--greeting p:first-child {
  margin-bottom: 1.6em;
}

.lead p:last-child {
  margin-bottom: 0;
}

.section--dark .lead {
  color: #d9d1c7;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto 0;
  color: var(--accent);
}

.divider::before,
.divider::after {
  content: "";
  width: 48px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.divider svg {
  width: 14px;
  height: 14px;
}

/* Buttons */
.btn {
  --h: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 30px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.2s var(--ease),
    opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

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

.btn:active {
  transform: scale(0.98);
}

.btn--dark {
  background: var(--ink);
  color: var(--paper);
}

.btn--dark:hover {
  background: #000;
}

.btn--light {
  border-color: #f4efe8;
  color: #f4efe8;
}

.btn--light:hover {
  background: #f4efe8;
  color: var(--ink);
}

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

.btn--ghost {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  letter-spacing: 0.08em;
  padding: 0 12px;
}

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

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--delay, 0s);
}

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

/* ==========================================================================
   Secret question gate
   ========================================================================== */
.app {
  transition: filter 1.4s var(--ease), opacity 1.4s var(--ease), transform 1.4s var(--ease);
}

.app.is-blurred {
  filter: blur(18px) saturate(0.9);
  opacity: 0.85;
  transform: scale(1.03);
  pointer-events: none;
  user-select: none;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: radial-gradient(circle at 50% 30%, rgba(251, 248, 244, 0.55), rgba(246, 241, 234, 0.82));
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.gate.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.gate.is-hidden .gate__card {
  transform: translateY(-16px) scale(0.98);
}

.gate__card {
  width: min(100%, 420px);
  padding: 44px 30px 34px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  box-shadow: 0 30px 80px -30px rgba(60, 45, 30, 0.35);
  text-align: center;
  transition: transform 0.9s var(--ease);
}

.gate__mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  color: var(--accent);
}

.gate__question {
  display: block;
  margin: 14px 0 26px;
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 34px);
  font-weight: 400;
  line-height: 1.15;
}

.gate__input {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 18px; /* >=16px so iOS does not zoom the field */
  text-align: center;
  transition: border-color 0.2s;
}

.gate__input:focus {
  outline: none;
  border-color: var(--accent);
}

.gate__card.is-wrong .gate__input {
  border-color: var(--danger);
  animation: shake 0.45s;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.gate__error {
  min-height: 1.6em;
  margin: 10px 0 8px;
  font-size: 14px;
  color: var(--danger);
}

.gate__btn {
  width: 100%;
}

.noscript {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  margin: 0;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(48px + env(safe-area-inset-top)) var(--gutter) 64px;
  text-align: center;
  position: relative;
}

/* Full-screen photo with names on top */
.hero__bg {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  background: var(--accent-soft);
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  animation: slowzoom 18s var(--ease) both;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.35) 0%, rgba(20, 16, 12, 0) 28%, rgba(20, 16, 12, 0) 45%, rgba(20, 16, 12, 0.72) 100%);
}

@keyframes slowzoom {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

.hero__text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero:has(.hero__bg) {
  justify-content: space-between;
  color: #fff;
}

.hero:has(.hero__bg) .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.hero:has(.hero__bg) .hero__text {
  flex: 1;
  justify-content: space-between;
  padding-bottom: 28px;
}

.hero:has(.hero__bg) .hero__names {
  margin-top: auto;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.hero:has(.hero__bg) .hero__names .amp {
  color: #f0dcc0;
}

.hero:has(.hero__bg) .hero__date {
  color: rgba(255, 255, 255, 0.92);
}

.hero:has(.hero__bg) .hero__date::before,
.hero:has(.hero__bg) .hero__date::after {
  background: rgba(255, 255, 255, 0.7);
}

.hero:has(.hero__bg) .hero__scroll {
  background: linear-gradient(#fff, transparent);
}

.hero__names {
  margin: 34px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 13vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.hero__names span {
  display: block;
}

/* "&" between the names: plain sans ampersand, reads clearly as "и" */
.hero__names .amp {
  margin: 0.12em 0 0.08em;
  font-family: var(--amp);
  font-style: normal;
  font-weight: 300;
  font-size: 0.5em;
  line-height: 1;
  color: var(--accent);
}

.hero__date {
  margin: 24px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__date::before,
.hero__date::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--accent), transparent);
  animation: drip 2.4s var(--ease) infinite;
}

@keyframes drip {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 36px auto 0;
}

.countdown__cell {
  padding: 18px 4px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.countdown__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.countdown__label {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown__done {
  margin: 36px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
}

/* ==========================================================================
   Calendar
   ========================================================================== */
.calendar {
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 18px 96px;
  background: var(--paper);
  border-radius: 28px;
  box-shadow: 0 30px 70px -45px rgba(60, 45, 30, 0.45);
}

.calendar__month {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 12vw, 60px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar__year {
  margin: 6px 0 26px;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--muted);
}

.calendar__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar__col {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.calendar__dow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar__day {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--serif);
  font-size: 24px;
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}

.calendar__day b {
  position: relative;
  font-weight: 400;
}

.calendar__day.is-other {
  color: var(--muted);
}

.calendar__day.is-date {
  color: var(--ink);
}

.calendar__day.is-date svg {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  color: var(--accent);
  stroke-width: 0.9;
  animation: beat 2.8s var(--ease) infinite;
}

/* Thin line from the heart down to the caption */
.calendar__day.is-date::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: 1px;
  height: 22px;
  background: var(--accent);
}

.calendar__caption {
  position: absolute;
  left: 50%;
  top: calc(100% + 26px);
  transform: translateX(-30%);
  white-space: nowrap;
  font-family: var(--script);
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.08);
  }
  24% {
    transform: scale(1);
  }
  36% {
    transform: scale(1.05);
  }
}

/* ==========================================================================
   Venue
   ========================================================================== */
.venue__photo {
  margin: 0 auto 40px;
  max-width: 560px;
  border-radius: 24px;
  overflow: hidden;
}

.venue__photo img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.venue__pin {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  color: var(--ink-soft);
}

.venue__pin svg {
  width: 28px;
  height: 28px;
}

.script-title {
  margin: 14px 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(42px, 11vw, 60px);
  line-height: 1.1;
}

.venue__name {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.venue__address {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-style: normal;
}

.venue__actions {
  margin-top: 30px;
}

.btn--map {
  gap: 0;
  padding: 0 28px 0 0;
  border-radius: 16px;
  border-color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.btn--map__icon {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 58px;
  margin-right: 22px;
  border-right: 1px solid currentColor;
}

.directions {
  margin: 36px auto 0;
  padding: 0;
  list-style: none;
  max-width: 30em;
  text-align: left;
}

.directions li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}

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

.directions svg {
  position: absolute;
  left: 0;
  top: 17px;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* ==========================================================================
   Schedule timeline
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 480px;
  margin: 48px auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: linear-gradient(var(--line), var(--accent) 50%, var(--line));
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding-bottom: 40px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
}

.section:not(.section--paper) .timeline__icon {
  background: var(--bg);
}

.timeline__icon svg {
  width: 24px;
  height: 24px;
}

.timeline__time {
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  padding-top: 4px;
  font-variant-numeric: lining-nums;
}

.timeline__title {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline__text {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ==========================================================================
   Dress code
   ========================================================================== */
.dress__color {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
}

.swatches {
  display: flex;
  justify-content: center;
  margin: 26px 0 0;
}

.swatch {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 14px 30px -18px rgba(60, 45, 30, 0.55);
  margin-left: -12px;
  transition: transform 0.4s var(--ease);
}

.swatch:first-child {
  margin-left: 0;
}

@media (max-width: 380px) {
  .swatch {
    width: 72px;
    height: 72px;
  }
}

.swatches:hover .swatch {
  transform: translateY(-4px);
}

.swatches:hover .swatch:nth-child(2n) {
  transform: translateY(4px);
}

/* ==========================================================================
   Gifts
   ========================================================================== */
.gift__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  color: var(--accent);
}

.gift__note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 30em;
  margin: 30px auto 0;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  font-size: 15px;
  color: var(--ink-soft);
}

.gift__note svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}

/* ==========================================================================
   RSVP
   ========================================================================== */
.rsvp {
  max-width: 560px;
  margin: 44px auto 0;
  text-align: left;
}

.card {
  padding: 30px 22px;
  background: var(--surface);
  border-radius: 26px;
  box-shadow: 0 30px 70px -50px rgba(60, 45, 30, 0.5);
}

@media (min-width: 560px) {
  .card {
    padding: 40px 38px;
  }
}

.field {
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label,
.field legend {
  display: block;
  margin: 0 0 12px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.field__req {
  color: var(--accent);
  margin-left: 2px;
}

.field__hint {
  display: block;
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.field__error {
  display: none;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.has-error > .field__error,
.has-error .field__error--own {
  display: block;
}

.input,
.textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px; /* >=16px so iOS does not zoom the field */
  transition: border-color 0.2s, background 0.2s;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.has-error > .input,
.has-error > .textarea,
.input.is-invalid {
  border-color: var(--danger);
}

.choices {
  display: grid;
  gap: 10px;
}

.choices--row {
  grid-template-columns: 1fr 1fr;
}

.choices--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.3;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.choice span::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  transition: border 0.2s, background 0.2s, box-shadow 0.2s;
}

.choice input[type="checkbox"] + span::before {
  border-radius: 5px;
}

.choice input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.choice input:checked + span::before {
  border-color: var(--paper);
  background: var(--paper);
  box-shadow: inset 0 0 0 3.5px var(--ink);
}

.choice input[type="checkbox"]:checked + span::before {
  box-shadow: none;
  background: var(--paper)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231c1a18' stroke-width='2'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choices--chips .choice span {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.choices--chips .choice span::before {
  display: none;
}

.choices--row .choice span {
  justify-content: center;
  text-align: center;
  min-height: 64px;
}

.choices--row .choice span::before {
  display: none;
}

.reveal-block {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.6s var(--ease), opacity 0.5s;
}

.reveal-block > div {
  overflow: hidden;
  min-height: 0;
}

.reveal-block[hidden] {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.reveal-block > div > :last-child {
  margin-bottom: 30px;
}

.reveal-block > div > :first-child {
  margin-top: 0;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.stepper button {
  width: 52px;
  height: 52px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.stepper button:disabled {
  opacity: 0.3;
  cursor: default;
}

.stepper output {
  min-width: 44px;
  text-align: center;
  font-family: var(--serif);
  font-size: 28px;
  font-variant-numeric: lining-nums;
}

.guest {
  margin: 0 0 14px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
}

.guest__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.guest__num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.guest__who {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}

.guest__remove {
  border: 0;
  background: none;
  padding: 4px 0;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.guest-add {
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-decoration: none;
}

.guest-add:hover {
  border-color: var(--accent);
}

.guest-add__hint {
  margin: 8px 0 0;
  text-align: center;
}

.guest .field {
  margin-bottom: 16px;
}

.guest .field:last-child {
  margin-bottom: 0;
}

.guest .field legend,
.guest .field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.sub-input {
  margin-top: 10px;
}

.note {
  margin: 0 0 24px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: var(--paper);
  border-radius: 0 14px 14px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.form-alert {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f6e7e4;
  color: var(--danger);
  font-size: 14px;
}

.form-alert[hidden] {
  display: none;
}

.form-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.form-alert .btn {
  --h: 44px;
  padding: 0 18px;
  font-size: 11px;
}

.form-actions {
  margin-top: 34px;
}

.form-actions .btn--ghost {
  width: 100%;
  margin-top: 8px;
}

.thanks {
  text-align: center;
}

.thanks__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: var(--accent);
}

.thanks__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 400;
  line-height: 1.2;
}

.thanks__summary {
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  color: var(--ink-soft);
}

.thanks__summary dt {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.thanks__summary dd {
  margin: 2px 0 0;
}

.thanks__actions {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.thanks__hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   Organizer
   ========================================================================== */
.contact {
  max-width: 420px;
  margin: 36px auto 0;
}

.contact__avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  font-family: var(--serif);
  font-size: 38px;
  font-style: italic;
}

.contact__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
}

.contact__phone {
  display: inline-block;
  margin: 4px 0 0;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.contact__email {
  display: block;
  width: fit-content;
  margin: 2px auto 0;
  letter-spacing: 0.02em;
}

.contact__actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.btn--wa {
  background: #1f3d2b;
  border-color: #1f3d2b;
  color: #fff;
}

.btn--wa:hover {
  background: #142a1d;
}

/* ==========================================================================
   Final screen
   ========================================================================== */
.final {
  min-height: 90svh;
  display: grid;
  place-items: center;
  padding: var(--section) var(--gutter) calc(var(--section) + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #f4efe8;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final__photo {
  position: absolute;
  inset: 0;
}

.final__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.final__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 26, 24, 0.4), rgba(28, 26, 24, 0.85));
}

.final__inner {
  position: relative;
}

.final__text {
  max-width: 18em;
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(26px, 6.4vw, 38px);
  line-height: 1.25;
  text-wrap: balance;
}

/* Floating RSVP button */
.fab {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  --h: 50px;
  padding: 0 26px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), background 0.3s;
}

.fab.is-shown {
  transform: translate(-50%, 0);
  opacity: 1;
}

.fab:active {
  transform: translate(-50%, 0) scale(0.98);
}

/* ==========================================================================
   Loading / error states
   ========================================================================== */
.load-error {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  text-align: center;
}

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

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

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