/* ============================================================
   Свадебное приглашение — Кирилл и Алёна
   Чистая редактируемая вёрстка. Все цвета и шрифты — в :root.
   ============================================================ */

/* ---------- Дизайн-система ---------- */
:root {
  /* Палитра (из дресс-кода оригинала) */
  --black:      #000000;
  --ink:        #1c1b19;   /* основной текст */
  --muted:      #6f6b64;   /* второстепенный текст */
  --paper:      #f7f4ef;   /* фон страницы (тёплый белый) */
  --card:       #ffffff;   /* фон карточки-приглашения */
  --cream:      #f2e3d1;   /* бежевый акцент */
  --gray:       #dbdbdb;   /* серый акцент */
  --sage:       #677965;   /* шалфейно-зелёный — главный акцент */
  --sage-dark:  #4f5d4c;
  --line:       #e7e2d9;   /* тонкие разделители */

  /* Шрифты */
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --body:    "Montserrat", -apple-system, "Segoe UI", sans-serif;

  /* Ритм */
  --section-pad: clamp(56px, 11vw, 96px);
  --gutter: clamp(22px, 7vw, 44px);
  --maxw: 480px;
  --radius: 4px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Карточка-приглашение ---------- */
.invite {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(40,36,30,.5);
}
@media (min-width: 540px) {
  body { padding: 40px 16px; }
}

/* ---------- Типографика ---------- */
.section { padding: var(--section-pad) var(--gutter); }

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 14px;
}

.title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 15vw, 68px);
  line-height: .95;
  letter-spacing: .01em;
  margin: 0 0 26px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 18px;
}
.title::before {
  content: "";
  width: clamp(24px, 9vw, 46px);
  height: 1.5px;
  background: var(--ink);
  flex: 0 0 auto;
}
.title--center {
  justify-content: center;
  text-align: center;
}
.title--center::before { display: none; }

.lead {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: #3b3a36;
  margin: 0;
}
.lead b, .lead strong { font-weight: 600; }

.subhead {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 6px;
}
.note { font-size: 15px; font-weight: 300; color: #45433f; margin: 0; }

/* Декоративная «искра» */
.sparkle { display:inline-block; color: var(--ink); vertical-align: middle; }
.sparkle svg { display:block; }

/* ============================================================
   1. ГЕРОЙ
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 620px;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: #fff;
  overflow: hidden;
  padding: clamp(40px,9vh,80px) 24px;
}
.hero > .hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(1) contrast(1.02);
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after {
  content:"";
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.hero > * { position: relative; z-index: 2; }

.hero__monogram {
  margin: auto 0;
  display: flex;
  align-items: center;
  gap: .06em;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(88px, 27vw, 132px);
  line-height: 1;
  color: #fff;
  letter-spacing: .01em;
  text-shadow: 0 6px 26px rgba(0,0,0,.45);
  opacity: 0;
  animation: fadeUp 1.2s var(--ease) .3s forwards;
}
.hero__monogram .amp {
  font-size: .46em;
  font-style: italic;
  font-weight: 400;
  opacity: .8;
  margin: 0 .04em;
}
.hero__names {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 12vw, 54px);
  line-height: 1;
  margin: 0 0 10px;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) .7s forwards;
}
.hero__names + .hero__date { margin-bottom: 30px; }
.hero__date {
  font-size: 13px;
  letter-spacing: .34em;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease) .95s forwards;
}
.hero__scroll {
  position:absolute; left:50%; bottom:16px; z-index:2;
  transform: translateX(-50%);
  width: 22px; height: 34px;
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 12px;
  opacity: 0; animation: fadeIn 1s ease 1.6s forwards;
}
.hero__scroll::after {
  content:""; position:absolute; left:50%; top:7px;
  width:3px; height:7px; border-radius:2px; background:#fff;
  transform: translateX(-50%);
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0%{opacity:0;transform:translate(-50%,0)} 30%{opacity:1} 70%{opacity:1} 100%{opacity:0;transform:translate(-50%,10px)} }

/* ============================================================
   Фото в форме арки
   ============================================================ */
.photo-arch {
  position: relative;
  width: min(78%, 320px);
  margin: 8px auto 0;
  aspect-ratio: 250 / 361;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: var(--gray);
}
.photo-arch img {
  width:100%; height:100%; object-fit: cover;
  filter: grayscale(1) contrast(1.03);
  transform: scale(1.04);
  transition: transform 1.4s var(--ease);
}
.reveal.is-in .photo-arch img { transform: scale(1); }
.photo-cap {
  text-align:center; margin: 20px 0 0;
  font-family: var(--display);
  font-size: 30px; font-weight:500;
}
.photo-cap small {
  display:block; font-family:var(--body);
  font-size:12px; letter-spacing:.3em; font-weight:400;
  color: var(--muted); margin-top: 6px;
}
.floating-sparkle { position:absolute; z-index:3; color:var(--ink); animation: floaty 4s ease-in-out infinite; }

/* ============================================================
   4. МЕСТО ВСТРЕЧИ
   ============================================================ */
/* декоративная линия + один большой круг (наследует язык таймлайна) */
.meet__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(30px, 8vw, 48px);
}
.meet__line {
  width: 1.5px;
  height: 56px;
  background: repeating-linear-gradient(var(--ink) 0 6px, transparent 6px 12px);
  opacity: .5;
}
.meet__badge {
  width: 112px; height: 112px;
  margin-top: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card);
}
.meet__badge svg { width: 54px; height: 54px; }

.meet__info { text-align: center; margin-top: 30px; }
.meet__when {
  font-family: var(--body);
  font-size: 13px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}
.meet__place {
  font-family: var(--display);
  font-size: clamp(26px, 7.5vw, 32px);
  font-weight: 600; line-height: 1.2;
  margin: 0 0 18px;
}
.meet__text {
  font-size: 15.5px; font-weight: 300; line-height: 1.75;
  color: #3b3a36;
  max-width: 32ch; margin: 0 auto;
}

/* закрывающий акцент */
.meet__accent {
  max-width: 30ch;
  margin: clamp(40px, 9vw, 54px) auto 0;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(20px, 6vw, 24px);
  line-height: 1.4;
  color: var(--sage-dark);
}
.meet__accent::before {
  content: "";
  display: block;
  width: 44px; height: 1px;
  background: var(--line);
  margin: 0 auto 24px;
}

/* ============================================================
   5. ДРЕСС-КОД
   ============================================================ */
.script-line {
  text-align:center;
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  color: var(--ink);
  margin: 0 0 6px;
}

.swatches { display: grid; gap: 10px; margin-top: 26px; }
.swatch {
  height: 54px;
  border-radius: var(--radius);
  display:flex; align-items:center; padding: 0 18px;
  font-size: 11px; letter-spacing:.2em; text-transform:uppercase;
  color: rgba(255,255,255,.85);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.swatch--light { color: rgba(0,0,0,.4); }
.swatch--white { border: 1px solid var(--line); }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family: var(--body); font-size: 15px; font-weight:500;
  letter-spacing:.02em;
  padding: 17px 26px;
  border: none; cursor: pointer;
  background: var(--ink); color:#fff;
  border-radius: var(--radius);
  text-decoration:none;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); background: var(--sage-dark); box-shadow: 0 14px 30px -12px rgba(79,93,76,.7); }
.btn--block { width:100%; }
.btn--sage { background: var(--sage); }
.btn--sage:hover { background: var(--sage-dark); }

/* ============================================================
   3. ГДЕ — карта
   ============================================================ */
.map {
  position: relative;
  margin: 26px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #1d1f1e;
  aspect-ratio: 4 / 5;
}
.map iframe { width:100%; height:100%; border:0; filter: grayscale(.4); }
.map__btn { margin-top: 14px; }

/* Блоки локаций */
.place { margin-top: 26px; }
.place__label {
  font-family: var(--body);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--sage); margin: 0 0 5px;
}
.place__name {
  font-family: var(--display);
  font-size: 26px; font-weight: 600; line-height: 1.2; margin: 0;
}
.place--sub {
  margin-top: 38px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.place__links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Малые кнопки */
.btn--sm { padding: 12px 22px; font-size: 14px; }
.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: #fff; box-shadow: none; }

/* ============================================================
   6. ДЕТАЛИ
   ============================================================ */
.detail + .detail { margin-top: 34px; }
.detail__label {
  font-family: var(--display);
  font-size: 24px; font-weight:600; margin:0 0 6px;
}
.phone-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:14px; }
.phone-row .who { font-size:15px; color:var(--muted); }

/* ============================================================
   7. АНКЕТА (RSVP)
   ============================================================ */
.form { margin-top: 8px; }
.field { margin-bottom: 24px; }
.field > label.q {
  display:block; font-size: 16px; font-weight:400; color:#3b3a36; margin-bottom: 10px;
}
.q-note {
  font-size: 13.5px; font-weight: 300; line-height: 1.55;
  color: var(--muted); margin: -2px 0 12px;
}
textarea.input { min-height: 88px; resize: vertical; line-height: 1.55; }
.input {
  width:100%; font-family:var(--body); font-size:15px; font-weight:300;
  padding: 16px 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.input::placeholder { color:#b7b3ab; }
.input:focus { outline:none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(103,121,101,.15); }

.radios { display:grid; gap:12px; }
.radio { display:flex; align-items:center; gap:12px; cursor:pointer; font-size:15px; }
.radio input { position:absolute; opacity:0; }
.radio .dot {
  width:22px; height:22px; border-radius:50%;
  border:1.5px solid var(--ink); flex:0 0 auto;
  display:grid; place-items:center; transition: border-color .2s;
}
.radio .dot::after { content:""; width:11px; height:11px; border-radius:50%; background:var(--sage); transform:scale(0); transition: transform .2s var(--ease); }
.radio input:checked + .dot { border-color: var(--sage); }
.radio input:checked + .dot::after { transform: scale(1); }
.radio input:focus-visible + .dot { box-shadow: 0 0 0 3px rgba(103,121,101,.2); }

.form__hint { font-size:14px; font-weight:600; font-style:italic; color:var(--ink); margin:0 0 22px; }
.form__ok { display:none; margin-top:16px; padding:14px 16px; background: var(--cream); border-radius:var(--radius); font-size:14px; }

/* ============================================================
   8. ФИНАЛ — обратный отсчёт
   ============================================================ */
.final { text-align:center; }
.countdown {
  display:flex; justify-content:center; gap: clamp(10px,4vw,22px);
  margin-top: 26px;
}
.cd-cell { min-width: 62px; }
.cd-num {
  font-family: var(--display);
  font-size: clamp(38px, 13vw, 52px);
  font-weight: 500; line-height:1;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.cd-lab {
  font-size: 10px; letter-spacing:.18em; text-transform:uppercase;
  color: var(--muted); margin-top: 8px;
}
.footer-note {
  margin-top: 40px; padding-top: 26px; border-top:1px solid var(--line);
  font-size: 12px; letter-spacing:.06em; color: var(--muted);
}

/* ============================================================
   Анимации появления
   ============================================================ */
.reveal { opacity:0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity:1; transform:none; }
.reveal[data-delay="1"] { transition-delay:.1s; }
.reveal[data-delay="2"] { transition-delay:.2s; }
.reveal[data-delay="3"] { transition-delay:.3s; }
.reveal[data-delay="4"] { transition-delay:.4s; }

@keyframes fadeUp { from{opacity:0; transform:translateY(24px);} to{opacity:1; transform:none;} }
@keyframes fadeIn { to { opacity:1; } }
@keyframes floaty { 0%,100%{ transform: translateY(0) rotate(0);} 50%{ transform: translateY(-8px) rotate(8deg);} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity:1 !important; transform:none !important; }
  .hero__monogram, .hero__names, .hero__date { opacity:1 !important; }
}
