/* =========================================================
   Свадебный сайт · Фёдор и Ирина · 21.07.2027
   Оливковый бархат, белое кружево, серебро и зелёные цветы
   ========================================================= */

@font-face { font-family: "Great Vibes"; src: url(assets/fonts/greatvibes-cyr.woff2) format("woff2"); font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Great Vibes"; src: url(assets/fonts/greatvibes-lat.woff2) format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; src: url(assets/fonts/cormorant-cyr.woff2) format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; src: url(assets/fonts/cormorant-lat.woff2) format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; src: url(assets/fonts/cormorant-italic-cyr.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant"; src: url(assets/fonts/cormorant-italic-lat.woff2) format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* оформление */
  --olive: #56602a;          /* заголовки, имена */
  --olive-ink: #5e6338;      /* даты, время, цифры */
  --olive-btn: #727548;      /* кнопка */
  --olive-soft: #6c6e4f;     /* подписи (контраст ≥ 4,5:1 на светлом фоне) */
  --olive-text: #4e532a;     /* текст на рамках – как на образцах */
  --gold: #c79b45;           /* золотые акценты – как на образцах */
  --ink: #2a2924;            /* основной текст */
  --ink-soft: #66655d;       /* календарь, второстепенное */
  --paper: #fbf9f5;
  --paper-glass: rgba(252, 250, 246, .94);
  --card: #f8f7ee;
  --velvet: #1b1e06;

  --script: "Great Vibes", "Segoe Script", cursive;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* наибольшая ширина колонки контента; всё внутри масштабируется от её ширины */
  --col: 560px;

  /* кривые движения */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-write: cubic-bezier(.65, 0, .35, 1);
  --ease-settle: cubic-bezier(.34, 1.36, .64, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .42 0 0 0 0 .36 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 1200px) { :root { --col: 600px; } }
@media (min-width: 1700px) { :root { --col: 660px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: #f2f0ea; }
html.is-locked, html.is-locked body, html:has(.ask[open]) { overflow: hidden; }
body {
  margin: 0;
  min-width: 300px;
  background: none;   /* фон – штора в .backdrop */
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.col { position: relative; inline-size: min(100%, var(--col)); margin-inline: auto; container-type: inline-size; }

/* только для экранных дикторов и поисковиков: текст, нарисованный на картинках */
.sr-only {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Типографика ---------- */
.title {
  font-family: var(--script);
  font-weight: 400;
  font-size: 12.4cqi;
  line-height: 1.04;
  color: var(--olive);
}
.text {
  max-width: 34em;
  margin: 1.1em auto 0;
  font-size: clamp(16px, 4.6cqi, 22px);
  line-height: 1.42;
  text-wrap: balance;
}
.title + .text { margin-top: .85em; }

/* =========================================================
   Лицо открытки: присланная анимация открытия конверта (Lottie, assets/envelope; запуск – в script.js).
   Кадр анимации 1080 × 1920 виден целиком: по высоте экрана, но не шире экрана там, где нужно, –
   письмо в конце занимает ≈ 990 из 1080 пикселей кадра и не обрезается. Вокруг – та же штора, что у сайта;
   пока письмо растворяется, растворяется и штора – под ними обложка.
   ========================================================= */
.intro { display: none; padding: 0; }
.js .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #efe9df url(assets/img/bg-sections.webp) 50% 0 / cover no-repeat;
  transition: opacity .9s ease-in-out;
}
.intro.is-leaving { pointer-events: none; }
.intro.is-leaving::before { opacity: 0; }
.intro__box {
  --u: min(100vh / 1920, 100vw / 990);   /* один пиксель кадра анимации */
  position: absolute;
  top: 50%;
  left: 50%;
  inline-size: calc(1080 * var(--u));
  block-size: calc(1920 * var(--u));
  translate: -50% -50%;
}
@supports (height: 100svh) { .intro__box { --u: min(100svh / 1920, 100vw / 990); } }
.intro__anim { position: absolute; inset: 0; }
.intro__anim svg { display: block; }

/* печать: кнопка – прозрачная, точно над печатью в первом кадре анимации */
.seal {
  position: absolute;
  left: 48.8%;
  top: 48.5%;
  inline-size: 27.5%;
  aspect-ratio: 297 / 308;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  translate: -50% -50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seal:focus-visible { outline: 2px solid #8a6a1f; outline-offset: 6px; }
.intro.is-open .seal { visibility: hidden; }

/* появление: только прозрачность – без масштаба и размытия */
.js .intro .intro__box { opacity: 0; }
.intro.is-ready .intro__box { opacity: 1; transition: opacity .9s ease; }

/* =========================================================
   Обложка: присланное фото слоями – фон без сердца, сердце, имена и дата.
   Сцена – кадр картинки фона, растянутый как cover (широкие экраны: сцена 1920 × 1080, продолженная вправо и влево)
   или целиком по высоте (узкие: фото 1124 × 1999, по краям то же фото, размытое).
   .hero__frame – место присланного фото в сцене; сердце и надписи – в процентах от него.
   ========================================================= */
.hero {
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);   /* одна ячейка ровно в размер экрана */
  block-size: 100vh;
  block-size: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #ece6dc;
  /* книзу обложка растворяется в общем фоне страницы */
  -webkit-mask-image: linear-gradient(#000 94%, transparent);
  mask-image: linear-gradient(#000 94%, transparent);
}
.hero__fill { grid-area: 1 / 1; filter: blur(28px); scale: 1.15; }
.hero__scene {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(100vw, 100vh * 1124 / 1999);
  aspect-ratio: 1124 / 1999;
  translate: -50% -50%;
}
@supports (height: 100svh) { .hero__scene { inline-size: min(100vw, 100svh * 1124 / 1999); } }
.hero__photo { inline-size: 100%; block-size: 100%; max-inline-size: none; }
.hero__frame { position: absolute; inset: 0; }
.hero__heart { position: absolute; inset-inline-start: 2.669%; inset-block-start: 20.31%; inline-size: 94.306%; }
.hero__heart-img { inline-size: 100%; }
.hero__name, .hero__date { position: absolute; max-inline-size: none; }
.hero__name--1 { inset-inline-start: 27.925%; inset-block-start: 29.455%; inline-size: 45.377%; }
.hero__name--2 { inset-inline-start: 38.208%; inset-block-start: 44.025%; inline-size: 33.962%; }
.hero__date { inset-inline-start: 38.585%; inset-block-start: 63.103%; inline-size: 22.642%; }
/* размытое фото по краям – только на узких экранах */
@media (max-aspect-ratio: 7 / 10) {
  .hero__fill { background: url(assets/img/hero-bg.jpg) 50% 50% / cover; }
}
/* стык фото с размытыми полями – мягкий */
@media (min-aspect-ratio: 1124 / 1999) and (max-aspect-ratio: 7 / 10) {
  .hero__scene { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent); mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent); }
}
@media (max-aspect-ratio: 1124 / 1999) {
  .hero__scene { -webkit-mask-image: linear-gradient(transparent, #000 2%, #000 98%, transparent); mask-image: linear-gradient(transparent, #000 2%, #000 98%, transparent); }
}
/* широкие экраны: сцена 1920 × 1080 на весь экран (cover), фото – в её середине */
@media (min-aspect-ratio: 7 / 10) {
  .hero__fill { display: none; }
  .hero__scene { inline-size: max(100vw, 100vh * 1920 / 1080); aspect-ratio: 1920 / 1080; }
  .hero__frame { inset: auto; inset-inline-start: 31.701%; inset-block-start: -1.852%; inline-size: 36.597%; block-size: 115.741%; }
}
@supports (height: 100svh) { @media (min-aspect-ratio: 7 / 10) { .hero__scene { inline-size: max(100vw, 100svh * 1920 / 1080); } } }

/* после открытия конверта: фон проявляется, сердце поднимается, как рамки ниже, имена пишутся пером, затем дата */
.js .hero__fill, .js .hero__photo { opacity: 0; }
.js .hero__photo { scale: 1.03; }
.is-opened .hero__fill { opacity: 1; transition: opacity 1.2s ease .1s; }
.is-opened .hero__photo { opacity: 1; scale: 1; transition: opacity 1.4s ease .25s, scale 2.6s var(--ease-out-soft) .25s; }
.js .hero__heart { opacity: 0; translate: 0 30px; scale: .94; }
.is-opened .hero__heart { opacity: 1; translate: 0 0; scale: 1; transition: opacity 1.3s ease .5s, translate 1.8s var(--ease-out-soft) .5s, scale 1.8s var(--ease-out-soft) .5s; }
.js .hero__name { clip-path: inset(-35% 104% -35% -8%); opacity: .2; }
.is-opened .hero__name { clip-path: inset(-35% -8% -35% -8%); opacity: 1; transition: clip-path 1.6s var(--ease-write) 1.3s, opacity .5s ease 1.3s; }
.is-opened .hero__name--2 { transition-delay: 2.3s; }
.js .hero__date { opacity: 0; translate: 0 22px; filter: blur(5px); }
.is-opened .hero__date { opacity: 1; translate: 0 0; filter: blur(0); transition: opacity 1s ease 3.3s, translate 1.2s var(--ease-out) 3.3s, filter 1s var(--ease-out) 3.3s; }

/* =========================================================
   Секции: одна колонка по центру на любом экране
   ========================================================= */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.sec {
  display: grid;
  justify-items: center;
  padding-block: clamp(36px, 7vw, 96px);
}
.sec--invite { padding-block-start: clamp(30px, 6vw, 80px); }
.sec--place { padding-block-end: clamp(48px, 9vw, 120px); }

/* ---------- Рамки из присланных картинок: картинка – фон, текст – на сайте ---------- */
/* рамки крупнее: колонка шире, чем у финала */
.sec--invite .col, .sec--place .col, .sec--program .col, .sec--panel .col { --col: 740px; }
.oval, .frame { position: relative; inline-size: 96cqi; margin-inline: auto; container-type: inline-size; }
.oval__img, .frame__img { inline-size: 100%; filter: drop-shadow(0 22px 30px rgba(60, 62, 40, .16)); }

/* «Программа»: в кадре вокруг рамы больше пустого поля – картинка шире, чтобы золотая рама была
   той же ширины, что у «Приглашения» и «Дресс-кода» (≈ 83 % против 85–87 %) */
@container (min-width: 600px) { .frame { inline-size: 100cqi; } }

/* Широкие экраны (1920 × 1080, ноутбуки): секция не ниже экрана, рамка по центру */
@media (min-aspect-ratio: 1 / 1) and (min-height: 600px) {
  .sec, .sec--invite, .sec--place {
    min-block-size: 100vh;
    min-block-size: 100svh;
    align-content: center;
    padding-block: 3.5vh;
    padding-block: 3.5svh;
  }
}

/* ---------- Рамки-подложки: «Приглашение» и «Дресс-код» ----------
   «Приглашение» растёт под текст: border-image – верх и низ как на картинке, полоса с ровными планками между ними
   тянется по высоте, когда текст длиннее (на телефоне шрифт не мельче 15 px). «Дресс-код» – присланная рамка
   как есть, без растяжения. Размеры – от ширины рамки (cqi);
   --cut-t / --cut-b – высота верха и низа в пикселях картинки, --pad – поле для текста. */
.panel {
  position: relative;
  isolation: isolate;
  inline-size: 96cqi;
  margin-inline: auto;
  container-type: inline-size;
  color: var(--olive-text);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 0 solid transparent;
  border-image-source: var(--frame);
  border-image-slice: var(--cut-t) 0 var(--cut-b) fill;
  border-image-width: calc(100cqi * var(--cut-t) / var(--frame-w)) 0 calc(100cqi * var(--cut-b) / var(--frame-w)) 0;
  border-image-repeat: stretch;
  filter: drop-shadow(0 22px 30px rgba(60, 62, 40, .16));
}
/* «Дресс-код»: присланная рамка целиком, ровно в её пропорциях – высота панели по картинке, текст ужат под поле */
.panel--dress::before { border-image: none; background: var(--frame) 0 0 / 100% 100% no-repeat; }
.panel--dress .panel__body { block-size: calc(100cqi * var(--frame-h) / var(--frame-w)); justify-content: center; }
.panel__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-block-size: calc(100cqi * var(--frame-h) / var(--frame-w));
  padding: var(--pad);
}
.panel--invite { --frame: url(assets/img/frame-invite.webp); --frame-w: 942; --frame-h: 1533; --cut-t: 1020; --cut-b: 423; --pad: 50.5cqi 13cqi 14.5cqi; }
.panel--dress { --frame: url(assets/img/frame-dress.webp); --frame-w: 835; --frame-h: 1486; --pad: 24.4cqi 18cqi 25.6cqi; }   /* сверху и снизу – цветки рамки; по бокам поровну – всё по центру поля */

.panel .title { font-size: 11cqi; line-height: .95; color: inherit; }
.panel .text { max-width: none; margin: 2.2cqi 0 0; font-weight: 600; font-size: max(15px, 3.3cqi); line-height: 1.12; text-wrap: balance; }
.panel .br { display: none; }
/* шрифт уже не упирается в 15 px – строки как на образце */
@container (min-width: 520px) {
  .panel .br { display: inline; }
  .panel .text { text-wrap: nowrap; }
}

/* разделитель: золотые линии от звёздочки */
.divider {
  position: relative;
  display: block;
  flex: none;
  inline-size: var(--divider, 26cqi);
  block-size: 4.2cqi;
  margin: 2.6cqi 0 1.2cqi;
}
.divider::before, .divider::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inline-size: calc(50% - 2.6cqi);
  block-size: max(1px, .4cqi);
  translate: 0 -50%;
  border-radius: 1px;
}
.divider::before { inset-inline-start: 0; background: linear-gradient(90deg, rgba(199, 155, 69, 0), var(--gold) 45%, #8f6428); }
.divider::after { inset-inline-end: 0; background: linear-gradient(270deg, rgba(199, 155, 69, 0), var(--gold) 45%, #8f6428); }
.divider b { position: absolute; inset: 0; margin: auto; block-size: 100%; aspect-ratio: 34 / 40; background: url(assets/img/orn-sparkle.webp) 50% 50% / 100% 100% no-repeat; }

/* ---------- Приглашение: как на образце ---------- */
.panel--invite .title { font-size: 12.6cqi; line-height: .74; }
.panel--invite .title + .text { margin-top: 4.2cqi; }
.title--month { margin-top: .6cqi; font-size: 15cqi !important; line-height: 1 !important; }
.year {
  display: flex;
  align-items: center;
  gap: 2.4cqi;
  margin-top: -2.8cqi;
  font-weight: 600;
  font-size: max(15px, 3.9cqi);
  line-height: 1;
  letter-spacing: .38em;
}
.year span { margin-inline-end: -.38em; }
.year::before, .year::after { content: ""; inline-size: 10.8cqi; block-size: max(1px, .22cqi); background: currentColor; opacity: .8; }
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 1.17em;
  align-items: center;
  inline-size: min(58cqi, 100%);
  margin-top: 1.2cqi;
  font-weight: 500;
  font-size: max(15px, 4.5cqi);
  font-style: italic;
  line-height: 1;
}
.cal i { font-size: max(13px, .74em); }
.cal__day--heart { position: relative; }
.cal__day--heart::before {   /* сердце с рамки – вокруг дня свадьбы */
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 2.05em;
  aspect-ratio: 93 / 79;
  translate: -50% -52%;
  background: url(assets/img/orn-heart.webp) 50% 50% / 100% 100% no-repeat;
}

/* ---------- Адрес: текст и орнаменты – как на образце ---------- */
.oval__text {
  position: absolute;
  inset: 24.4% 17% 19.3%;   /* поле рамки: x 17–83 %, y 20–82 % */
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--olive-text);
}
.oval .title { font-size: 17.5cqi; line-height: 1; color: inherit; }
.rule {
  display: block;
  inline-size: 48.9cqi;
  aspect-ratio: 500 / 57;
  margin-top: 1.25cqi;
}
.rule::before { content: ""; position: absolute; inset: 0; background: url(assets/img/orn-rule.webp) 50% 50% / 100% 100% no-repeat; }
.rule { position: relative; }
.rule--short { inline-size: 24.6cqi; aspect-ratio: 252 / 56; margin-top: 1.8cqi; }
.rule--short::before { background-image: url(assets/img/orn-rule-short.webp); }
.venue { margin-top: -.5cqi; font-weight: 500; font-size: 4.7cqi; letter-spacing: .03em; text-transform: uppercase; }
.oval .text { max-width: none; margin-top: .85cqi; font-size: 4.45cqi; text-wrap: nowrap; }
.oval .text--note { margin-top: -1.3cqi; font-style: italic; font-size: 4.15cqi; line-height: 1.24; }
.link {
  position: relative;
  display: inline-block;
  margin-top: 3.75cqi;
  padding: 0 .1em .2em;
  font-size: 4.65cqi;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(#a98c58, #a98c58) 0 100% / 100% .45cqi no-repeat;
  transition: background-size .35s var(--ease-out), transform .16s var(--ease-out);
}
.link::after {   /* подвеска с образца под линией */
  content: "";
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 50%;
  inline-size: 7.4cqi;
  aspect-ratio: 76 / 33;
  translate: -50% 0;
  background: url(assets/img/orn-pendant.webp) 50% 0 / 100% 100% no-repeat;
}
.link:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 0 .45cqi; background-position: 100% 100%; }
}

/* ---------- Программа: как на присланном макете ---------- */
.frame__card {
  position: absolute;
  inset: 27.4% 22% 15.6% 24.4%;   /* поле рамы; слева сверху и справа снизу – лилии: текст чуть правее центра */
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #4d4a2b;
}
.frame .title { margin-top: 2.4cqi; font-size: 12cqi; color: #555a2c; translate: 2cqi 0; }
.prog { margin: 5.6cqi 0 0; padding: 0; list-style: none; }
.prog li { display: flex; flex-direction: column; align-items: center; }
.prog li + li::before {   /* стрелка со звёздочкой с макета */
  content: "";
  display: block;
  inline-size: 2.7cqi;
  aspect-ratio: 28 / 61;
  margin: .3cqi 0 .25cqi;
  background: url(assets/img/orn-star.webp) 50% 0 / 100% 100% no-repeat;
  transform-origin: top;
}
.prog time { font-style: italic; font-weight: 500; font-size: 7.6cqi; line-height: .85; letter-spacing: .01em; color: #4f4b28; }
.prog span { font-size: 3.95cqi; line-height: 1.2; }


/* ---------- Дресс-код · Фото · Анкета: как на образце ----------
   Рамка не растягивается, поэтому всё – только от ширины рамки (cqi), без нижних пределов в px:
   на любом экране текст лежит в поле одинаково, строки – как на образце. */
.panel--dress .title { font-size: 9.6cqi; }
.panel--dress .title + .text { margin-top: .8cqi; }
.panel--dress .text { font-size: 2.65cqi; text-wrap: nowrap; }
.panel--dress .br { display: inline; }
.panel--dress .text + .text { margin-top: 1.8cqi; }
.title--dress { font-size: 11.2cqi !important; margin-bottom: 1.3cqi; }
.panel--dress .divider { block-size: 3.7cqi; margin: 2cqi 0 1.2cqi; }
/* лилия с образца – в середине первого разделителя; линии той же длины, что у звёздочки */
.panel--dress .divider--lily { --divider: 38cqi; block-size: 8cqi; margin: 1.4cqi 0 .6cqi; }
.divider--lily::before, .divider--lily::after { inline-size: calc(50% - 6.4cqi); }
.divider--lily b { aspect-ratio: 141 / 114; background-image: url(assets/img/orn-lily.webp); }

/* анкета: поле, кружки и кнопка – как нарисованы на образце, настоящие; всё по центру, как текст над ними */
.rsvp {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  inline-size: 96%;
  margin: 2.4cqi 0 0;
  text-align: center;
}
.rsvp__label { padding: 0; font-weight: 600; font-size: 2.6cqi; line-height: 1.15; color: inherit; }
.rsvp__field {
  inline-size: 82%;
  block-size: max(24px, 4.6cqi);   /* шрифт поля – не меньше 16 px */
  margin-top: .7cqi;
  padding: 0 2cqi;
  border: max(1px, .22cqi) solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 253, 246, .45);
  font-family: var(--serif);
  font-weight: 500;
  font-size: max(16px, 2.5cqi);   /* не меньше 16 px: телефон не увеличивает страницу при вводе */
  color: #3f3c22;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.rsvp__field:focus-visible { border-color: #a97a2f; box-shadow: 0 0 0 3px rgba(199, 155, 69, .28); }
.rsvp__choice { margin: 2cqi 0 0; padding: 0; border: 0; min-inline-size: 0; }
.rsvp__choice legend { margin-inline: auto; margin-bottom: .5cqi; white-space: nowrap; }   /* вопрос – одной строкой */
.rsvp__opts { display: flex; justify-content: center; gap: 4.4cqi; }   /* варианты – рядом, по центру */
.rsvp__opt {
  display: flex;
  align-items: center;
  gap: 2.2cqi;
  min-block-size: 4.5cqi;
  font-weight: 600;
  font-size: 2.65cqi;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rsvp__opt input {
  flex: none;
  inline-size: 3.75cqi;
  aspect-ratio: 1;
  margin: 0;
  border: max(1.5px, .31cqi) solid #b8853a;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: radial-gradient(circle, #4f5a26 0 44%, transparent 48%) 50% 50% / 0 0 no-repeat;
  cursor: pointer;
  transition: background-size .26s var(--ease-out);
}
.rsvp__opt input:checked { background-size: 100% 100%; }
.rsvp__opt input:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.rsvp__send {
  inline-size: 27.8cqi;
  block-size: 6.3cqi;
  align-self: center;
  margin: 2.1cqi 0 0;
  padding: 0;
  border: max(1px, .28cqi) solid #c9a35a;
  border-radius: 999px;
  background: linear-gradient(#6a6e44, #565a32);
  color: #fff;
  font-size: 2.85cqi;
  font-weight: 500;
  letter-spacing: .02em;
  box-shadow: 0 .9cqi 1.8cqi rgba(60, 50, 20, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .2s ease, transform .16s var(--ease-out);
}
.rsvp__send:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
.rsvp__send:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .rsvp__send:hover { filter: brightness(1.08); } }
.rsvp__send.is-busy { filter: brightness(.9); cursor: progress; }
.rsvp.is-sent input, .rsvp.is-sent .rsvp__opt, .rsvp.is-sent .rsvp__send { pointer-events: none; }

/* ---------- Окно анкеты: имя и «Спасибо!» ---------- */
.ask {
  inline-size: min(100% - 32px, 440px);
  max-block-size: calc(100% - 32px);
  padding: clamp(30px, 7vw, 44px) clamp(22px, 6vw, 40px) clamp(24px, 6vw, 36px);
  overflow: auto;
  border: 1px solid rgba(192, 149, 83, .65);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 60px -24px rgba(40, 44, 20, .5);
  container-type: inline-size;
}
.ask::backdrop { background: rgba(32, 34, 14, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ask[open] { animation: ask-in .45s var(--ease-out); }
@keyframes ask-in { from { opacity: 0; translate: 0 14px; scale: .98; } }
.ask__step { display: flex; flex-direction: column; gap: 20px; }
.ask__step[hidden] { display: none; }
.ask__title { padding-inline: 34px; font-size: clamp(28px, 10cqi, 44px); }   /* поля – чтобы не заходить под крестик */
.ask__close {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--olive-ink);
  cursor: pointer;
  transition: background-color .2s ease;
}
.ask__close svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.ask__close:focus-visible { outline: 2px solid var(--olive); }
@media (hover: hover) and (pointer: fine) { .ask__close:hover { background: rgba(86, 96, 42, .1); } }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  min-block-size: 54px;
  padding-inline: 1.4em;
  border: 0;
  border-radius: 999px;
  background: #5b6236;
  color: #fff;
  font-size: clamp(18px, 5.2cqi, 22px);
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 14px 24px -16px rgba(40, 44, 20, .9);
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, transform .16s var(--ease-out), opacity .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #4d5330; } }
.rsvp-done, .rsvp-fail { align-items: center; outline: none; }
.rsvp-done__heart { inline-size: min(46cqi, 180px); }
.rsvp-done .text, .rsvp-fail .text { margin: 0; }
.rsvp-done:not([hidden]) .rsvp-done__heart { animation: wreath-in 1.6s var(--ease-settle) .1s both; }
@keyframes wreath-in { from { opacity: 0; scale: .7; rotate: -6deg; } 60% { opacity: 1; } to { opacity: 1; scale: 1; rotate: 0deg; } }

/* ---------- Финал ---------- */
.finale { position: relative; padding-block-start: clamp(28px, 6vw, 80px); overflow: hidden; }
.finale__love { font-size: clamp(19px, 6cqi, 32px); color: var(--olive-soft); }
.finale__names { margin-block-start: .05em; font-family: var(--script); font-size: 14cqi; line-height: 1.2; color: var(--olive); }
.finale__names i { font-style: normal; }
.countdown {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .6cqi;
  inline-size: 92cqi;   /* контур не касается краёв экрана */
  margin: 8cqi auto 0;
  padding: 7cqi 3cqi 6cqi;
  border-radius: 999px;
  background: var(--paper-glass);
  box-shadow: 0 24px 40px -30px rgba(40, 40, 30, .5);
}
.countdown__line { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; pointer-events: none; }
.countdown__line rect { fill: none; stroke: #222; stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.countdown div { flex: 1 1 0; min-inline-size: 0; }
.countdown b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13cqi;
  line-height: .95;
  color: var(--olive-ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown span { display: block; margin-block-start: 2cqi; font-size: clamp(13px, 4cqi, 18px); color: var(--olive-soft); }
.countdown em { flex: none; font-style: normal; font-size: 8cqi; line-height: 1.1; color: var(--olive-ink); }
/* цветы внизу – целиком в ширину экрана, не шире */
.finale__flowers {
  inline-size: min(100%, 1100px);
  margin: 4vw auto 0;
  pointer-events: none;
  transform-origin: 50% 100%;
}

/* ---------- Музыка ---------- */
.music {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 50;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--olive-btn);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(40, 44, 20, .7);
  cursor: pointer;
  transition: transform .16s var(--ease-out);
}
.music:active { transform: scale(.94); }
.music svg { position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; transition: opacity .2s ease, transform .2s var(--ease-out); }
.music .music__off { opacity: 0; transform: scale(.8); }
.music.is-playing .music__on { opacity: 0; transform: scale(.8); }
.music.is-playing .music__off { opacity: 1; transform: none; }

/* =========================================================
   Фон: штора целиком, при прокрутке медленно едет – к концу страницы виден её низ
   ========================================================= */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #f2f0ea; }
.backdrop img {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  block-size: max(135vh, 150vw);   /* выше экрана: есть куда ехать */
  max-inline-size: none;
  object-fit: cover;
  object-position: 50% 0;
  will-change: transform;
}

/* =========================================================
   Движение при прокрутке
   ========================================================= */
/* текст: проявляется из лёгкого расфокуса */
.js [data-reveal] {
  opacity: 0;
  translate: 0 22px;
  filter: blur(5px);
  transition: opacity 1s ease, translate 1.2s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms + .1s);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; filter: blur(0); }
/* большие карточки поднимаются */
.js [data-reveal="rise"] { translate: 0 70px; scale: .97; filter: none; transition: opacity 1.2s ease, translate 1.6s var(--ease-out-soft), scale 1.6s var(--ease-out-soft); }
/* рамы проявляются */
.js [data-reveal="frame"] { translate: 0 30px; scale: .94; filter: none; transition: opacity 1.3s ease, translate 1.8s var(--ease-out-soft), scale 1.8s var(--ease-out-soft); }
.js [data-reveal].is-in { scale: 1; }

/* рукописные заголовки: строка будто пишется пером
   (маска – на внутреннем слое: полностью скрытый элемент наблюдатель прокрутки не замечает) */
[data-write] > .ink { display: inline-block; }
.js [data-write] > .ink { clip-path: inset(-35% 104% -35% -8%); opacity: .2; }
.js [data-write].is-in > .ink { clip-path: inset(-35% -8% -35% -8%); opacity: 1; transition: clip-path 1.6s var(--ease-write) .15s, opacity .5s ease .15s; }

/* цветы «распускаются»: поднимаются и мягко покачиваются на месте */
.js [data-bloom] { opacity: 0; translate: 0 18%; rotate: -5deg; }
.js [data-bloom].is-in { opacity: 1; translate: 0 0; rotate: 0deg; transition: opacity 1.2s ease .3s, translate 2s var(--ease-settle) .3s, rotate 2.4s var(--ease-settle) .3s; }
.js [data-bloom].is-settled { animation: sway 13s ease-in-out infinite; }
@keyframes sway { 0%, 100% { rotate: 0deg; } 25% { rotate: 1.3deg; } 75% { rotate: -1.2deg; } }
.finale__flowers[data-bloom] { rotate: 0deg; translate: 0 10%; }
.js .finale__flowers[data-bloom].is-in { translate: 0 0; }

/* программа: линии растут, пункты по очереди */
.js .prog li > * { opacity: 0; translate: 0 10px; filter: blur(3px); }
.js .prog li + li::before { scale: 1 0; }
.js .prog.is-in li > * { opacity: 1; translate: 0 0; filter: blur(0); transition: opacity .9s ease, translate 1.1s var(--ease-out), filter .9s ease; transition-delay: calc(var(--i, 0) * 280ms + .55s); }
.js .prog.is-in li + li::before { scale: 1 1; transition: scale .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 280ms + .4s); }

/* разделители и линии с лилией: золото расходится от середины, звёздочка раскрывается */
.js .divider::before { clip-path: inset(0 0 0 100%); }
.js .divider::after { clip-path: inset(0 100% 0 0); }
.js .divider.is-in::before, .js .divider.is-in::after { clip-path: inset(0); transition: clip-path 1.3s var(--ease-out) .35s; }
.js .divider b { opacity: 0; scale: .2; rotate: -90deg; }
.js .divider--lily b { rotate: -12deg; }
.js .divider.is-in b { opacity: 1; scale: 1; rotate: 0deg; transition: opacity .6s ease .1s, scale 1s var(--ease-settle) .1s, rotate 1.2s var(--ease-out) .1s; }
.js .rule::before { clip-path: inset(0 50%); }   /* маска – на слое: скрытый целиком элемент наблюдатель прокрутки не замечает */
.js .rule.is-in::before { clip-path: inset(0); transition: clip-path 1.5s var(--ease-out) .2s; }

/* календарь: дни проявляются по очереди, затем сердце вокруг 21 */
.js .cal > * { opacity: 0; translate: 0 .35em; filter: blur(2px); }
.js .cal.is-in > * { opacity: 1; translate: 0 0; filter: blur(0); transition: opacity .7s ease, translate .9s var(--ease-out), filter .7s ease; transition-delay: calc(var(--i, 0) * 24ms + .2s); }
.js .cal__day--heart::before { opacity: 0; scale: .3; }
.js .cal.is-in .cal__day--heart::before { opacity: 1; scale: 1; transition: opacity .6s ease 1.3s, scale 1.2s var(--ease-settle) 1.3s; }

/* отсчёт: контур обводится, цифры поднимаются */
.js .countdown { opacity: 0; translate: 0 24px; }
.js .countdown__line rect { stroke-dashoffset: 1; }
.js .countdown div, .js .countdown em { opacity: 0; translate: 0 .5em; }
.js .countdown.is-in { opacity: 1; translate: 0 0; transition: opacity 1s ease, translate 1.4s var(--ease-out-soft); }
.js .countdown.is-in .countdown__line rect { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease-in-out) .2s; }
.js .countdown.is-in div, .js .countdown.is-in em { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s var(--ease-out); }
.js .countdown.is-in > :nth-child(2) { transition-delay: .5s; }
.js .countdown.is-in > :nth-child(3) { transition-delay: .6s; }
.js .countdown.is-in > :nth-child(4) { transition-delay: .7s; }
.js .countdown.is-in > :nth-child(5) { transition-delay: .8s; }
.js .countdown.is-in > :nth-child(6) { transition-delay: .9s; }
.js .countdown.is-in > :nth-child(7) { transition-delay: 1s; }
.js .countdown.is-in > :nth-child(8) { transition-delay: 1.1s; }

/* =========================================================
   Без анимаций: только мягкие проявления, без движения
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rsvp-done__heart, .ask[open] { animation: none !important; }
  [data-bloom].is-settled { animation: none !important; opacity: 1; }
  .js [data-reveal], .js [data-bloom], .js .prog li > *, .js .countdown, .js .countdown div, .js .countdown em, .js .hero__photo,
  .js .hero__heart, .js .hero__date,
  .js .divider b, .js .cal > *, .js .cal__day--heart::before {
    translate: none !important; rotate: none !important; scale: none !important; filter: none !important;
  }
  .js .divider::before, .js .divider::after, .js .rule::before, .js .hero__name { clip-path: none !important; }
  .js [data-write] > .ink { clip-path: none !important; opacity: 0; }
  .js [data-write].is-in > .ink { opacity: 1; transition: opacity .6s ease; }
  .hero, .hero * { transition-duration: .6s !important; transition-delay: 0s !important; }
}
