/* ================================================================
   Свадебное приглашение · Андрей & Екатерина
   ================================================================ */
:root {
  --linen: #EFE6DA;
  --paper: #F7F1E8;
  --card: #FCF9F3;
  --ink: #3B322B;
  --ink-soft: #6B5D52;
  --muted: #8F7F72;
  --line: #DCCDBA;
  --gold: #B39668;
  --rose: #B7796B;
  --rose-deep: #9A5E52;
  --mocha: #8A6A5C;
  --leaf: #B3BC9E;
  --leaf-deep: #7F8C6C;
  --berry: #D2A79B;

  --script: "Wedding Capital A", "Great Vibes", "Segoe Script", cursive;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --caps: "Forum", "Cormorant Garamond", serif;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .26  0 0 0 0 .18  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Заглавная «А» для рукописного шрифта: у Great Vibes она похожа на «U»,
   поэтому берём каллиграфическую «A» из Pinyon Script (OFL), привязанную к кириллической «А» */
@font-face {
  font-family: "Wedding Capital A";
  src: url("fonts/capital-a.woff") format("woff");
  unicode-range: U+0410;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--noise), var(--paper);
  color: var(--ink);
  font: 500 19px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-sealed { overflow: hidden; }
img { display: block; max-width: 100%; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Рукописный шрифт: у Great Vibes узкие пробелы */
.script-title, .signature, .intro__to, .envelope__names, .hero__names, .footer__names { word-spacing: .14em; }

/* Классический амперсанд вместо рукописного (тот похож на «Е») */
.amp { font-family: var(--serif); font-style: normal; font-weight: 400; color: var(--rose); font-size: .72em; margin: 0 .1em; word-spacing: normal; }
.letter__mono .amp { font-size: .62em; margin: 0 .08em; }

/* Веточка. Символ не должен обрезать кончик последнего листа, он выходит за рамку 200x60 */
symbol { overflow: visible; }
.sp-stem { fill: none; stroke: var(--leaf-deep); stroke-width: 1.1; stroke-linecap: round; }
.sp-leaf { fill: var(--leaf); stroke: var(--leaf-deep); stroke-width: .6; }
.sp-vein { fill: none; stroke: var(--leaf-deep); stroke-width: .5; opacity: .55; }
.sp-berry { fill: var(--berry); }
.sprig { display: block; width: 200px; height: 60px; overflow: visible; }

/* ================= Экран-конверт ================= */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(18px, 4vh, 40px);
  padding: 24px 16px;
  overflow: hidden;
  background: var(--noise), radial-gradient(120% 90% at 50% 42%, #FCF8F2 0%, #F2E6D8 58%, #E4D2BE 100%);
  transition: opacity 1s ease .25s, visibility 0s linear 1.3s;
}
.intro__to {
  margin: 0;
  font-family: var(--script);
  font-size: clamp(30px, 7.5vw, 42px); line-height: 1.2;
  color: var(--ink-soft);
  text-align: center;
  transition: opacity .5s ease;
  animation: fadeIn 1.2s ease .2s both;
}
.intro__hint {
  margin: 0;
  font-family: var(--caps);
  font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted);
  transition: opacity .4s ease;
  animation: fadeIn 1.2s ease 1s both, breathe 3s ease-in-out 2.2s infinite;
}

.scene {
  transform-origin: 50% 12%;
  transition: transform 1.2s cubic-bezier(.6, 0, .25, 1), opacity .9s ease .2s;
  animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both;
}
.envelope {
  position: relative;
  width: min(90vw, 560px, calc((100svh - 190px) * 1.45));
  aspect-ratio: 1.45;
  container-type: inline-size;
  perspective: 1400px;
}
.envelope__back {
  position: absolute; inset: 0; z-index: 0;
  border-radius: 6px;
  background: var(--noise), linear-gradient(#D8C2AA, #E3D1BE);
  box-shadow: 0 34px 60px -28px rgba(90, 60, 40, .5), 0 10px 20px -10px rgba(90, 60, 40, .25);
}

.letter {
  position: absolute; left: 6%; right: 6%; top: 5%; height: 88%; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 4cqw;
  background: var(--noise), var(--card);
  border-radius: 3px;
  box-shadow: 0 1px 8px rgba(90, 60, 40, .14);
  transition: transform 1.1s cubic-bezier(.25, .8, .3, 1);
}
.letter__sprig { width: 30cqw; height: 9cqw; overflow: visible; }
.letter__kicker { margin-top: 1.5cqw; font-family: var(--caps); font-size: 2.4cqw; letter-spacing: .4em; text-transform: uppercase; color: var(--muted); }
.letter__mono { font-family: var(--script); font-size: 13cqw; line-height: 1.15; color: var(--ink); }
.letter__date { font-family: var(--caps); font-size: 3cqw; letter-spacing: .3em; color: var(--ink-soft); }

.envelope__pocket { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; }

.envelope__names {
  position: absolute; left: 0; right: 0; bottom: 6%; z-index: 4;
  text-align: center;
  font-family: var(--script);
  font-size: 8.6cqw; line-height: 1;
  color: var(--ink);
  pointer-events: none;
}
.envelope__names span { color: var(--rose); }

.envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 55%; z-index: 5;
  transform-origin: 50% 0;
  filter: drop-shadow(0 5px 5px rgba(90, 60, 40, .2));
  transition: transform 1s cubic-bezier(.5, 0, .3, 1), z-index 0s linear .5s;
}
.envelope__flap-shape {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
  background: var(--noise), linear-gradient(180deg, #E8D7C3, #F0E3D3);
}

/* Печать */
.seal {
  position: absolute; left: 50%; top: 55%; z-index: 6;
  width: 24cqw; aspect-ratio: 1;
  padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 7px rgba(70, 10, 20, .38));
  -webkit-tap-highlight-color: transparent;
  transition: transform .3s ease;
}
.seal::before {
  content: "";
  position: absolute; inset: -9%;
  border: 1px solid rgba(147, 25, 43, .45);
  border-radius: 50%;
  animation: pulse 2.6s ease-out 1.4s infinite;
}
.seal:hover { transform: translate(-50%, -50%) scale(1.05); }
.seal:active { transform: translate(-50%, -50%) scale(.96); }
.seal:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 8px; }
.seal__half {
  position: absolute; inset: 0;
  transition: transform .9s cubic-bezier(.4, 0, .2, 1), opacity .6s ease .3s;
}
.seal__half svg { display: block; width: 100%; height: 100%; }
.seal__half--l { clip-path: polygon(0 0, 53% 0, 47% 27%, 56% 52%, 45% 76%, 51% 100%, 0 100%); }
.seal__half--r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 51% 100%, 45% 76%, 56% 52%, 47% 27%); }

/* Анимация открытия */
.intro.is-cracking .seal { pointer-events: none; }
.intro.is-cracking .seal::before { display: none; }
.intro.is-cracking .seal__half--l { transform: translate(-45%, 40%) rotate(-30deg); opacity: 0; }
.intro.is-cracking .seal__half--r { transform: translate(45%, 45%) rotate(26deg); opacity: 0; }
.intro.is-cracking .intro__hint { opacity: 0; animation: none; }
.intro.is-open .envelope__flap { transform: rotateX(180deg); z-index: 1; }
.intro.is-letter .letter { transform: translateY(-52%); }
.intro.is-leaving { opacity: 0; visibility: hidden; }
.intro.is-leaving .scene { transform: scale(2.3); opacity: 0; }
.intro.is-leaving .intro__to { opacity: 0; }

/* Бабочки */
.butterflies { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.bfly {
  position: absolute; left: 0; top: 0;
  margin: -10px 0 0 -12px;
  display: flex; justify-content: center;
  perspective: 120px;
  filter: drop-shadow(0 3px 3px rgba(90, 50, 40, .18));
  will-change: transform, opacity;
}
.bfly::after {
  content: "";
  position: absolute; left: 50%; top: 18%;
  width: 2px; height: 64%;
  margin-left: -1px;
  border-radius: 2px;
  background: #5E4A40;
}
.bfly__wing { width: 50%; height: 100%; }
.bfly__wing svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bfly__wing path { fill: currentColor; stroke: rgba(94, 74, 64, .45); stroke-width: .7; }
.bfly__wing circle { fill: #fff; opacity: .55; }
.bfly__wing--l { transform-origin: 100% 50%; animation: flapL var(--flap, .2s) ease-in-out infinite alternate; }
.bfly__wing--l svg { transform: scaleX(-1); }
.bfly__wing--r { transform-origin: 0 50%; animation: flapR var(--flap, .2s) ease-in-out infinite alternate; }
@keyframes flapL { from { transform: rotateY(0); } to { transform: rotateY(70deg); } }
@keyframes flapR { from { transform: rotateY(0); } to { transform: rotateY(-70deg); } }

@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes pulse { 0% { transform: scale(.88); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }

/* ================= Общее ================= */
.site { opacity: 0; transition: opacity 1.2s ease; }
.site.is-visible { opacity: 1; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 620px; }
.center { text-align: center; }
.section { padding: clamp(72px, 12vw, 120px) 0; }

.caps {
  margin: 0 0 10px;
  font-family: var(--caps);
  font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted);
}
.script-title {
  margin: 0 0 22px;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(46px, 11vw, 68px); line-height: 1.1;
  color: var(--ink);
}
.letter-text { margin: 0 auto; font-size: clamp(20px, 2.6vw, 23px); line-height: 1.6; color: var(--ink-soft); }
.signature { margin: 26px 0 0; font-family: var(--script); font-size: 34px; color: var(--rose); }

/* Бумажная карточка с двойной рамкой */
.paper {
  position: relative;
  background: var(--noise), var(--card);
  box-shadow: 0 1px 2px rgba(60, 40, 25, .06), 0 36px 70px -36px rgba(80, 55, 35, .45);
}
.paper::before, .paper::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.paper::before { inset: 12px; border: 1px solid var(--line); }
.paper::after { inset: 17px; border: 1px solid rgba(179, 150, 104, .35); }

/* ================= Первый экран ================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 48px 16px 120px;
  overflow: hidden;
  background: var(--noise), radial-gradient(90% 70% at 50% 45%, #F5ECE1 0%, var(--linen) 100%);
}
.paper--hero {
  width: min(540px, 100%);
  padding: clamp(64px, 14vw, 88px) clamp(26px, 8vw, 64px) clamp(56px, 12vw, 76px);
  text-align: center;
}
.sprig--tl, .sprig--br { position: absolute; width: clamp(150px, 42vw, 220px); height: auto; aspect-ratio: 200 / 60; }
.sprig--tl, .sprig--br {
  /* Сдвиг наружу не больше, чем позволяет поле до края экрана (на телефоне его почти нет) */
  --out: max(-34px, calc((min(540px, 100vw - 32px) - 100vw) / 2 + 10px));
}
.sprig--tl { top: -6px; left: var(--out); transform: rotate(-12deg); }
.sprig--br { bottom: -6px; right: var(--out); transform: rotate(168deg); }

.hero__names {
  margin: 14px 0 0;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(60px, 16vw, 98px); line-height: 1.02;
}
.hero__names span { display: block; }
.hero__names .hero__amp { font-size: .55em; line-height: 1.1; color: var(--rose); }

.dateblock { margin-top: 30px; font-family: var(--caps); text-transform: uppercase; color: var(--ink-soft); }
.dateblock__month, .dateblock__year { display: block; font-size: 14px; letter-spacing: .5em; padding-left: .5em; }
.dateblock__row {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  margin: 8px auto; max-width: 340px;
}
.dateblock__row span { padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12.5px; letter-spacing: .24em; }
.dateblock__row b { font-weight: 400; font-size: 62px; line-height: 1; color: var(--ink); }
.hero__city { margin: 26px 0 0; font-family: var(--caps); font-size: 12px; letter-spacing: .5em; text-transform: uppercase; color: var(--muted); }

/* Подсказка «листайте вниз» */
.scroll-cue {
  position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  padding: 14px 26px 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateX(-50%);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .5s ease, visibility 0s linear .5s;
  animation: fadeIn 1s ease 1.6s both;
}
.scroll-cue.is-hidden { opacity: 0; visibility: hidden; }
.scroll-cue::before {
  content: "";
  position: absolute; inset: -18px -40px -30px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(239, 230, 218, .95), rgba(239, 230, 218, 0));
  pointer-events: none;
}
.scroll-cue__text {
  font-family: var(--caps); font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  padding-left: .32em;
  white-space: nowrap;
  color: var(--ink-soft);
}
.scroll-cue__btn {
  position: relative;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--rose);
  color: var(--rose-deep);
  box-shadow: 0 10px 22px -12px rgba(80, 55, 35, .5);
  animation: cueBounce 1.8s ease-in-out 2.4s infinite;
}
.scroll-cue__btn::before {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(183, 121, 107, .45);
  animation: pulse 2.2s ease-out 2.4s infinite;
}
.scroll-cue__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scroll-cue:hover .scroll-cue__btn { background: var(--blush); }
@media (max-height: 700px) { .scroll-cue__text { display: none; } }
@keyframes cueBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ================= Фото ================= */
.section--photo { padding-top: 0; }
.photo {
  width: min(380px, 80vw); aspect-ratio: 4 / 5; margin: 0 auto;
  padding: 10px; background: var(--card);
  box-shadow: 0 30px 60px -32px rgba(80, 55, 35, .5);
  transform: rotate(-1.5deg);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ================= Таймер ================= */
.band {
  padding: 56px 0 60px;
  background: var(--noise), var(--mocha);
  color: #F7EEE4;
}
.caps--light { color: rgba(247, 238, 228, .7); }
.count { display: flex; justify-content: center; margin-top: 18px; }
.count__item { flex: 0 1 130px; padding: 0 8px; }
.count__item + .count__item { border-left: 1px solid rgba(247, 238, 228, .28); }
.count__num { display: block; font-size: clamp(44px, 11vw, 70px); font-weight: 400; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.count__label { display: block; margin-top: 8px; font-family: var(--caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(247, 238, 228, .75); }

/* ================= Когда / где ================= */
.split { display: grid; gap: 88px; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }
.block { text-align: center; }
.block__text { margin: 26px 0 16px; font-size: 21px; line-height: 1.45; color: var(--ink-soft); }
.block__text b { font-weight: 600; color: var(--ink); }

.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr);
  max-width: 350px; margin: 0 auto;
  row-gap: 4px;
}
.calendar__dow { padding-bottom: 10px; font-family: var(--caps); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.calendar__day { position: relative; display: grid; place-items: center; aspect-ratio: 1; font-size: 20px; color: var(--ink-soft); }
.calendar__day.is-off { color: var(--muted); }
.calendar__day.is-date { color: var(--rose-deep); font-weight: 600; }
.calendar__ring { position: absolute; inset: -18%; width: 136%; height: 136%; overflow: visible; }
.calendar__ring path { fill: none; stroke: var(--rose); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 190; stroke-dashoffset: 190; transition: stroke-dashoffset 1.6s cubic-bezier(.6, 0, .3, 1) .5s; }
.calendar__heart { position: absolute; top: -10%; right: -14%; width: 38%; fill: var(--rose); opacity: 0; transform: scale(.4); transition: opacity .4s ease 1.9s, transform .5s cubic-bezier(.3, 1.6, .5, 1) 1.9s; }
.reveal.is-in .calendar__ring path { stroke-dashoffset: 0; }
.reveal.is-in .calendar__heart { opacity: 1; transform: none; }

.map-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 460px; margin: 0 auto;
  padding: 9px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(60, 40, 25, .06), 0 26px 50px -30px rgba(80, 55, 35, .5);
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; filter: sepia(.28) saturate(.8) contrast(.97); }

.text-link {
  display: inline-block;
  padding: 2px 0 4px;
  border: 0; border-bottom: 1px solid currentColor;
  background: none;
  font-family: var(--caps); font-size: 12.5px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--rose-deep); text-decoration: none;
  cursor: pointer;
  transition: color .2s, letter-spacing .3s;
}
.text-link::after { content: " →"; letter-spacing: 0; }
.text-link:hover { color: var(--ink); letter-spacing: .28em; }
.text-link--btn::after { content: ""; }
.text-link--btn::before { content: "+ "; letter-spacing: 0; }
#edit-answer::before { content: ""; }

/* Иконки (тонкая линия) */
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

/* Программа дня */
.split--when { align-items: start; }
.block--program { text-align: left; }
.block--program .caps, .block--program .script-title { text-align: center; }
.timeline { max-width: 470px; margin: 0 auto; }
.timeline__group + .timeline__group { margin-top: 30px; }
.timeline__place {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  font-family: var(--caps); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--rose-deep);
}
.timeline__place::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.timeline__list { position: relative; list-style: none; margin: 0; padding: 0; }
.timeline__list::before {
  content: "";
  position: absolute; left: 21px; top: 22px; bottom: 22px;
  border-left: 1px dashed #CDBBA5;
}
.timeline__item { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding-bottom: 24px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--paper);
  color: var(--rose-deep);
}
.timeline__body { padding-top: 2px; }
.timeline__time { display: block; font-family: var(--caps); font-size: 24px; line-height: 1.1; letter-spacing: .04em; color: var(--ink); }
.timeline__title { display: block; margin-top: 2px; font-size: 21px; font-weight: 600; line-height: 1.3; }
.timeline__text { margin: 4px 0 0; font-size: 18px; line-height: 1.5; font-style: italic; color: var(--muted); }

/* Адреса */
.section--venues { padding-top: 0; }
.venues { display: grid; gap: 64px; margin-top: 12px; }
@media (min-width: 880px) { .venues { grid-template-columns: 1fr 1fr; gap: 56px; } }
.venue { text-align: center; }
.venue__title { margin: 0; font-family: var(--serif); font-size: clamp(26px, 5vw, 30px); font-weight: 600; line-height: 1.2; }
.venue__addr { margin: 4px 0 22px; font-size: 20px; color: var(--ink-soft); }
.venue__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin-top: 22px; }

/* Дресс-код: подпись к палитре */
.swatches-note { margin: 22px 0 0; font-style: italic; font-size: 18px; color: var(--muted); }

/* Подарки */
.section--gifts { padding-top: 0; }
.gift-swap { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 4px 0 26px; }
.gift-swap__item {
  position: relative;
  display: grid; place-items: center;
  width: 72px; height: 72px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--card);
  color: var(--rose-deep);
}
.gift-swap__item .ic { width: 34px; height: 34px; }
.gift-swap__item--no { color: var(--muted); opacity: .75; }
.gift-swap__item--no::after {
  content: "";
  position: absolute; left: 14px; right: 14px; top: 50%;
  height: 1.3px; background: var(--rose);
  transform: rotate(-40deg);
}
.gift-swap__arrow { width: 54px; height: 1px; background: var(--gold); position: relative; }
.gift-swap__arrow::after {
  content: "";
  position: absolute; right: 0; top: -3.5px;
  width: 8px; height: 8px;
  border-top: 1px solid var(--gold); border-right: 1px solid var(--gold);
  transform: rotate(45deg);
}

.ornament { display: flex; justify-content: center; gap: 0; opacity: .9; }
.ornament .sprig { width: 150px; height: 45px; }
.sprig--flip { transform: scaleX(-1); }

/* ================= Дресс-код ================= */
.swatches {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 26px 14px;
  max-width: 900px; margin: 44px auto 0; padding: 0 16px;
  list-style: none;
}
.swatch { width: 84px; text-align: center; font-style: italic; font-size: 16px; line-height: 1.2; color: var(--ink-soft); }
.swatch__chip {
  display: block;
  height: 112px; margin-bottom: 10px;
  padding: 6px 6px 24px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(60, 40, 25, .08), 0 14px 24px -16px rgba(80, 55, 35, .55);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
.swatch__chip i { display: block; height: 100%; }
.swatch:nth-child(odd) .swatch__chip { transform: rotate(-2.5deg); }
.swatch:nth-child(3n) .swatch__chip { transform: rotate(2deg); }
.swatch:hover .swatch__chip { transform: translateY(-6px) rotate(0); }

/* ================= Анкета ================= */
.section--rsvp { background: var(--noise), var(--linen); }
.paper--rsvp {
  max-width: 640px; margin: 0 auto;
  padding: clamp(56px, 10vw, 76px) clamp(28px, 8vw, 68px) clamp(48px, 9vw, 68px);
}
.rsvp-lead { margin: -8px 0 34px; font-style: italic; font-size: 20px; color: var(--muted); }

.field { margin: 0 0 30px; padding: 0; border: 0; min-width: 0; }
.field__label {
  display: block; margin: 0 0 4px; padding: 0;
  font-family: var(--caps); font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted);
}
.hint { margin: 4px 0 6px; font-style: italic; font-size: 17px; color: var(--muted); }
.line-input {
  width: 100%;
  padding: 8px 2px;
  border: 0; border-bottom: 1px solid #CDBBA5; border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 22px/1.4 var(--serif);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.line-input::placeholder { color: #B5A697; font-style: italic; }
.line-input:focus { outline: none; border-color: var(--rose); box-shadow: 0 1px 0 var(--rose); }
.line-input.is-invalid { border-color: #B04E42; box-shadow: 0 1px 0 #B04E42; }
.line-input--area {
  display: block;
  min-height: calc(2em * 2 + 2px);
  padding: 0 2px;
  border-bottom: 0;
  line-height: 2em;
  background-image: linear-gradient(transparent calc(2em - 1px), #CDBBA5 0);
  background-size: 100% 2em;
  background-attachment: local;
  resize: vertical;
}
.line-input--area:focus { box-shadow: none; }

.choices { display: grid; gap: 12px; margin-top: 10px; }
.choice { display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 22px; color: var(--ink); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box { flex: 0 0 24px; height: 24px; border: 1.3px solid var(--ink-soft); display: grid; place-items: center; transition: border-color .2s; }
.choice__box svg { width: 22px; height: 22px; overflow: visible; }
.choice__box path { fill: none; stroke: var(--rose-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset .35s ease; }
.choice input:checked + .choice__box { border-color: var(--rose-deep); }
.choice input:checked + .choice__box path { stroke-dashoffset: 0; }
.choice input:focus-visible + .choice__box { box-shadow: 0 0 0 4px rgba(183, 121, 107, .25); }
.choices.is-invalid .choice__box { border-color: #B04E42; }

.companions { display: grid; gap: 4px; }
.companions:empty { display: none; }
.companion { display: flex; align-items: flex-end; gap: 10px; }
.companion .line-input { flex: 1; min-width: 0; }
.companion__remove {
  flex: 0 0 36px; height: 40px;
  border: 0; background: none;
  color: var(--muted); font: 26px/1 var(--serif);
  cursor: pointer;
}
.companion__remove:hover { color: var(--rose-deep); }
#add-companion { margin-top: 14px; }

.form-status { min-height: 1.4em; margin: -6px 0 14px; font-style: italic; font-size: 18px; color: #A4473B; text-align: center; }

.ink-btn {
  display: block; width: 100%; max-width: 320px; margin: 0 auto;
  min-height: 58px; padding: 0 28px;
  border: 0;
  background: var(--ink); color: #F7EEE4;
  font-family: var(--caps); font-size: 13.5px; letter-spacing: .32em; text-transform: uppercase;
  cursor: pointer;
  transition: background .25s, letter-spacing .3s;
}
.ink-btn:hover { background: var(--rose-deep); letter-spacing: .36em; }
.ink-btn:disabled { opacity: .6; cursor: default; }

.rsvp-done { text-align: center; animation: fadeIn .6s ease; }
.rsvp-done__sprig { width: 160px; height: 48px; margin: 0 auto 10px; overflow: visible; }
.rsvp-done .script-title { font-size: clamp(38px, 9vw, 52px); }
.rsvp-done .letter-text { margin-bottom: 24px; }
.demo-note { margin: 0 auto 20px; padding: 10px 14px; max-width: 420px; background: #F6ECD3; color: #7A6232; font-size: 16px; font-style: italic; }

/* Контакты */
.contacts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 14px; font-size: 21px; }
.contacts a { color: var(--rose-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
.contacts span { color: var(--muted); font-style: italic; }

/* Подвал */
.footer { padding: 88px 20px 96px; text-align: center; }
.footer__sprig { width: 150px; height: 45px; margin: 0 auto 12px; }
.footer__names { margin: 0 0 14px; font-family: var(--script); font-size: clamp(46px, 10vw, 60px); line-height: 1.1; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .calendar__ring path { stroke-dashoffset: 0; }
  .calendar__heart { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
