:root {
  --ivory: #f5efe7;
  --paper: #fbf8f3;
  --sand: #ecdfcd;
  --nude: #e3c096;
  --taupe: #b2b0b5;
  --cocoa: #65431e;
  --espresso: #2c2018;
  --ink: #33261b;
  --muted: #8b7a6a;
  --caramel: #b0834f;
  --line: rgba(51, 38, 27, .16);

  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 26px;
}

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

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

body {
  background: #e7ddd0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }

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

/* Зерно бумаги поверх всей страницы */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .14 0 0 0 0 .08 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Колонка приглашения: на телефоне — весь экран, на компьютере — по центру */
.page {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ivory);
  overflow: hidden;
  box-shadow: 0 0 90px rgba(51, 38, 27, .14);
}

/* ---------- Общие элементы ---------- */
.section {
  position: relative;
  padding: 88px var(--gutter);
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: rgba(245, 239, 231, .7); }

.num {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--caramel);
  margin-bottom: 8px;
}
.num::before, .num::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 12px;
  vertical-align: middle;
  background: currentColor;
  opacity: .6;
}

.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 10.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 22px;
  text-wrap: balance;
}
.title--italic { font-style: italic; }

.subtitle {
  margin: 44px 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cocoa);
}

.text {
  max-width: 400px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.65;
  color: #4a3a2d;
  text-wrap: pretty;
}
.text--sm { font-size: 15px; }
.text b { font-weight: 600; color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: 1px solid var(--cocoa);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s, color .25s, transform .25s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; }
.btn--solid { background: var(--cocoa); color: var(--ivory); }
.btn--solid:hover { background: #553817; box-shadow: 0 10px 24px rgba(101, 67, 30, .25); transform: translateY(-1px); }
.btn--ghost:hover { background: rgba(101, 67, 30, .07); }
.btn[disabled] { opacity: .6; cursor: default; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cocoa);
  border-bottom: 1px solid rgba(101, 67, 30, .35);
  padding-bottom: 3px;
  transition: border-color .25s;
}
.link:hover { border-color: var(--cocoa); }
.link svg, .map__open svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Мягкие цветовые пятна */
.aura {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.aura--1 {
  width: 440px; height: 440px;
  top: -170px; left: -180px;
  background: radial-gradient(circle, rgba(227, 192, 150, .75), rgba(227, 192, 150, 0) 68%);
  animation: drift 16s ease-in-out infinite alternate;
}
.aura--2 {
  width: 380px; height: 380px;
  top: 30%; right: -200px;
  background: radial-gradient(circle, rgba(178, 176, 181, .6), rgba(178, 176, 181, 0) 68%);
  animation: drift 19s ease-in-out -6s infinite alternate-reverse;
}
.aura--3 {
  width: 460px; height: 460px;
  bottom: -230px; left: -60px;
  background: radial-gradient(circle, rgba(101, 67, 30, .22), rgba(101, 67, 30, 0) 68%);
  animation: drift 22s ease-in-out -3s infinite alternate;
}
.aura--dark {
  width: 520px; height: 520px;
  top: -260px; right: -220px;
  background: radial-gradient(circle, rgba(227, 192, 150, .22), rgba(227, 192, 150, 0) 68%);
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

/* Анимация появления */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .aura, .scroll-cue span { animation: none !important; }
}

/* ============ ОБЛОЖКА ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 28px 110px;
  text-align: center;
  overflow: hidden;
}
.hero__frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(101, 67, 30, .22);
  border-radius: 200px 200px 24px 24px;
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; }

.rings {
  display: block;
  width: 64px;
  margin: 26px auto 18px;
  fill: none;
  stroke: var(--cocoa);
  stroke-width: 1.2;
  stroke-linejoin: round;
}
.rings circle:last-of-type { stroke: var(--caramel); }

.names {
  font-family: var(--display);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.015em;
}
.names__line {
  display: block;
  font-size: clamp(52px, 15.5vw, 84px);
}
.names__amp {
  display: block;
  margin: 6px 0 2px;
  font-style: italic;
  font-size: clamp(40px, 11vw, 60px);
  line-height: 1;
  color: var(--caramel);
}

.hero__date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: .06em;
}
.hero__date i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--caramel);
}
.hero__meta {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid rgba(101, 67, 30, .45);
  border-radius: 999px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--cocoa);
  animation: wheel 2s ease-in-out infinite;
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ ПРИГЛАШЕНИЕ ============ */
.invite { padding-top: 100px; }
.date-card {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
  padding: 18px 30px 18px 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.date-card__day {
  font-family: var(--display);
  font-size: 72px;
  line-height: .9;
  color: var(--cocoa);
}
.date-card__rest {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.date-card__rest span:first-child {
  font-family: var(--display);
  font-style: italic;
  font-size: 28px;
  line-height: 1.1;
}
.date-card__rest span:last-child {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ ТАЙМЕР ============ */
.countdown {
  overflow: hidden;
  padding-top: 76px;
  padding-bottom: 80px;
  background: var(--espresso);
  color: var(--ivory);
}
.countdown > *:not(.aura) { position: relative; }
.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 420px;
  margin: 22px auto 0;
}
.timer__cell {
  padding: 6px 2px;
  border-left: 1px solid rgba(245, 239, 231, .16);
}
.timer__cell:first-child { border-left: 0; }
.timer__num {
  display: block;
  font-family: var(--display);
  font-size: clamp(38px, 11vw, 50px);
  line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums;
}
.timer__label {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--nude);
}
.countdown__note {
  margin-top: 30px;
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: rgba(245, 239, 231, .75);
}

/* ============ ПРОГРАММА ============ */
.steps {
  list-style: none;
  display: grid;
  gap: 16px;
  margin-top: 36px;
  text-align: left;
}
.step {
  position: relative;
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
}
.step__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.step__time {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1;
  color: var(--cocoa);
}
.step__time--tbd {
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
}
.step__index {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  color: var(--caramel);
}
.step__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
}
.step__place {
  margin-top: 6px;
  font-weight: 600;
  font-size: 16px;
}
.step__addr {
  margin: 4px 0 18px;
  font-size: 15px;
  color: var(--muted);
}
.step__addr span { font-size: 13px; }
.step__note {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sand);
  font-size: 14px;
  line-height: 1.5;
}

.sub {
  list-style: none;
  margin: -4px 0 18px;
}
.sub li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
  font-size: 15px;
}
.sub li:first-child { border-top: 0; }
.sub b {
  flex: 0 0 72px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  color: var(--cocoa);
}

/* ============ КАРТА ============ */
.map { margin-top: 30px; }
.map__tabs {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--sand);
}
.map__tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .25s, color .25s;
}
.map__tab.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px rgba(51, 38, 27, .12); }
.map__tab:focus-visible { outline: 2px solid var(--caramel); outline-offset: 2px; }
.map__card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.map__card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(51, 38, 27, .14); }
.map__card:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; }
.map__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 13 / 9;
  object-fit: cover;
  background: var(--sand);
  filter: sepia(.18) saturate(.9);
  transition: opacity .3s;
}
.map__img.is-loading { opacity: .35; }
.map__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
  text-align: left;
}
.map__place { font-size: 15px; line-height: 1.4; }
.map__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cocoa);
}

/* ============ ДРЕСС-КОД ============ */
.dress { background: linear-gradient(180deg, var(--ivory), var(--sand) 55%, var(--ivory)); }
.hero-swatches {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}
.hs {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 10px 22px rgba(51, 38, 27, .12);
}
.hs--nude { background: linear-gradient(115deg, #ecc69f, #e3c096 45%, #d6b183); }
.hs__name {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
}

.grid-swatches {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 18px auto 0;
}
.grid-swatches li {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}

.chips {
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 400px;
  margin: 22px auto 0;
  text-align: left;
}
.chips li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 243, .7);
  font-size: 15px;
}
.chips b { font-weight: 600; }
.chip__dot {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c);
}
.chip__dot--white { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

.bad-swatches {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.bad-swatches li {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--c);
  overflow: hidden;
}
.bad-swatches li::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right,
    transparent calc(50% - 1.5px), rgba(255, 255, 255, .95) calc(50% - 1.5px),
    rgba(255, 255, 255, .95) calc(50% + 1.5px), transparent calc(50% + 1.5px));
}

/* ============ ГОЛОСОВАЛКА ============ */
.rsvp-form, .rsvp-done {
  max-width: 420px;
  margin: 32px auto 0;
  text-align: left;
}
.field { display: block; }
.field__label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cocoa);
}
.field__input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field__input::placeholder { color: #b3a594; }
.field__input:focus { outline: none; border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(176, 131, 79, .18); }

.choices {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  border: 0;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__mark {
  flex: 0 0 20px;
  height: 20px;
  border: 1px solid rgba(101, 67, 30, .45);
  border-radius: 50%;
  transition: border-color .2s, box-shadow .2s;
}
.choice__text { font-size: 16px; }
.choice:hover { border-color: rgba(101, 67, 30, .4); }
.choice:has(input:checked) { border-color: var(--cocoa); background: var(--sand); }
.choice input:checked + .choice__mark { border-color: var(--cocoa); box-shadow: inset 0 0 0 5px var(--sand), inset 0 0 0 10px var(--cocoa); }
.choice input:focus-visible + .choice__mark { outline: 2px solid var(--caramel); outline-offset: 3px; }

/* Напитки: чекбоксы в две колонки */
.drinks {
  margin-top: 30px;
  border: 0;
}
.drinks[hidden] { display: none; }
.drinks__hint {
  margin: -4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
/* Все карточки одной высоты (по самой высокой), текст и галочка — по центру */
.drinks__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 8px;
}
.drinks__extra {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.drinks .choice {
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
}
.drinks .choice__text { font-size: 14px; line-height: 1.35; }
.choice--check .choice__mark {
  flex: 0 0 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--paper) no-repeat center / 12px 12px;
}
.choice--check input:checked + .choice__mark {
  border-color: var(--cocoa);
  background-color: var(--cocoa);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3L9.5 3.6' fill='none' stroke='%23f5efe7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: none;
}
.field--other[hidden] { display: none; }
.field--other .field__input { padding: 12px 14px; font-size: 15px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-error {
  margin-top: 14px;
  font-size: 14px;
  color: #a2402a;
}
.rsvp-form .btn { width: 100%; margin-top: 22px; }

.rsvp-done { text-align: center; outline: none; }
.rsvp-done__icon {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--cocoa);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rsvp-done__title {
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: 28px;
}
.rsvp-done .btn { margin-top: 22px; }

/* ============ КОНТАКТЫ ============ */
.contacts { padding-top: 40px; }
.phones {
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 340px;
  margin: 26px auto 0;
}
.phones a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--display);
  font-size: 22px;
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.phones a:hover { border-color: var(--cocoa); background: var(--sand); }

/* ============ ФИНАЛ ============ */
.finale {
  position: relative;
  overflow: hidden;
  padding: 110px var(--gutter) 120px;
  text-align: center;
  background: var(--espresso);
  color: var(--ivory);
}
.finale > *:not(.aura) { position: relative; }
.finale__names {
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(38px, 11vw, 54px);
  line-height: 1.15;
}
.finale__names em { color: var(--nude); }
.finale__date {
  margin-top: 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .4em;
  color: rgba(245, 239, 231, .65);
}

/* ---------- Широкие экраны ---------- */
@media (min-width: 561px) {
  body {
    background:
      radial-gradient(45% 55% at 12% 20%, rgba(227, 192, 150, .45), transparent 70%),
      radial-gradient(40% 50% at 90% 85%, rgba(178, 176, 181, .4), transparent 70%),
      #e7ddd0;
    background-attachment: fixed;
  }
  .hero { min-height: min(100vh, 920px); }
}
