/* ═══════════════════════════════════════════════════════════
   Вячеслав & Ольга — 27.01.2027
   Палитра и типографика по референсу Loveletter Studio
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper: #FEFAEF;
  --paper-2: #F6F0E4;
  --paper-3: #EFE6D8;
  --wine: #811A1A;
  --wine-deep: #5C0F12;
  --wine-soft: #9A2A25;
  --ink: #2E2E2F;
  --ink-soft: #4A4644;
  --muted: #7C746B;
  --line: rgba(46, 46, 47, .16);
  --line-light: rgba(254, 250, 239, .28);

  --display: 'Cormorant Garamond', Georgia, serif;
  --text: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --script: 'Bad Script', 'Segoe Script', cursive;

  --pad: clamp(20px, 5.5vw, 40px);
  --section: clamp(68px, 16vw, 132px);
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.gate-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--wine); color: var(--paper); }

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

/* ─────────────── Типографика ─────────────── */

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.wrap--narrow { max-width: 640px; }

.nowrap { white-space: nowrap; }

.h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 9.5vw, 58px);
  line-height: 1.12;
  letter-spacing: .015em;
  text-align: center;
  text-wrap: balance;
  margin-bottom: clamp(22px, 5vw, 32px);
}

.h2--light { color: var(--paper); }

.h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 6.2vw, 34px);
  line-height: 1.18;
  letter-spacing: .015em;
  text-wrap: balance;
}

.kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--wine);
  text-align: center;
  margin-bottom: 14px;
}

.lead {
  font-size: clamp(15px, 3.9vw, 17px);
  line-height: 1.75;
  text-align: center;
  max-width: 34em;
  margin-inline: auto;
  color: var(--ink-soft);
}

.lead + .lead { margin-top: 14px; }
.lead--tight { margin-top: 4px; }

.caption {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--muted);
}
.caption--center { text-align: center; }

.script {
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.35;
  text-align: center;
}
.script--wine { color: var(--wine); }
.script--light { color: var(--paper); }
.script--center { text-align: center; }

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}
.ornament span { width: 44px; height: 1px; background: var(--line); }
.ornament svg { width: 15px; height: 15px; fill: var(--wine); }

/* ─────────────── Конверт / вход ─────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 80% at 50% 12%, #93201D 0%, var(--wine) 42%, var(--wine-deep) 100%);
  color: var(--paper);
  padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
  transition: opacity .9s var(--ease), visibility .9s;
}

.gate::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(254, 250, 239, .22);
  pointer-events: none;
}

.gate__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 42% at 50% 36%, transparent 40%, rgba(40, 4, 6, .36) 100%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .016) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.gate__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 460px;
  transition: transform 1s var(--ease), opacity .55s var(--ease);
}

.gate__eyebrow {
  font-size: 10px;
  letter-spacing: .34em;
  color: rgba(254, 250, 239, .72);
  margin-bottom: 14px;
}

.gate__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 7.4vw, 38px);
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: clamp(26px, 7vw, 38px);
}
.gate__title span { display: block; white-space: nowrap; }

.gate__hint {
  margin-top: clamp(24px, 7vw, 34px);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(254, 250, 239, .86);
  line-height: 1.6;
}
.gate__hint span { display: block; }
.gate__hint-sub {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .5);
}
.gate__hint span:first-child { animation: breathe 3.2s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { opacity: .95; }
  50% { opacity: .55; }
}

/* Конверт */

.envelope {
  position: relative;
  width: min(78vw, 320px);
  aspect-ratio: 1.46 / 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  perspective: 900px;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.envelope:focus-visible { outline-offset: 10px; }

.envelope__back,
.envelope__front,
.envelope__flap,
.envelope__letter {
  position: absolute;
  left: 0;
  right: 0;
}

.envelope__back {
  inset: 0;
  background: linear-gradient(158deg, #E7D7BC 0%, #F1E6D1 62%, #E9DAC1 100%);
  box-shadow: 0 30px 56px -18px rgba(28, 0, 2, .62), inset 0 0 0 1px rgba(120, 90, 60, .12);
}

.envelope__letter {
  top: 7%;
  bottom: 8%;
  left: 7%;
  right: 7%;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transform: translateY(6%);
  transition: transform .9s var(--ease);
  box-shadow: 0 2px 18px rgba(46, 20, 12, .12);
}

.envelope__monogram {
  font-family: var(--display);
  font-size: clamp(34px, 10vw, 46px);
  color: var(--wine);
  line-height: 1;
  letter-spacing: .04em;
}
.envelope__monogram i {
  font-style: normal;
  font-size: .62em;
  vertical-align: .08em;
  padding-inline: .06em;
}
.envelope__date {
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
}

.envelope__front {
  inset: 0;
  background: linear-gradient(168deg, #FBF3E3 0%, #F1E4CC 58%, #EBDCC0 100%);
  clip-path: polygon(0 0, 50% 48%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
  filter: drop-shadow(0 -1px 1px rgba(120, 90, 60, .22));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.envelope__flap {
  top: 0;
  height: 52%;
  background: linear-gradient(178deg, #FFF9ED 0%, #F6EBD7 72%, #F0E2C8 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform: rotateX(0deg);
  transition: transform .85s cubic-bezier(.6, 0, .3, 1), z-index 0s .4s;
  z-index: 4;
  filter: drop-shadow(0 10px 12px rgba(70, 40, 20, .16));
}

.envelope__seal {
  position: absolute;
  z-index: 5;
  top: 42%;
  left: 50%;
  width: clamp(42px, 11vw, 54px);
  height: clamp(42px, 11vw, 54px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #B23A33 0%, var(--wine) 38%, #5E0F12 78%, #470A0D 100%);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 0 2px rgba(255, 210, 190, .18),
    inset 0 0 12px rgba(0, 0, 0, .28),
    0 6px 12px rgba(40, 0, 2, .34);
  transition: opacity .4s, transform .5s var(--ease);
}
.envelope__seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 224, 206, .34);
}
.envelope__seal svg {
  width: 46%;
  height: 46%;
  fill: #F6D9C8;
  opacity: .92;
  filter: drop-shadow(0 1px 0 rgba(70, 0, 4, .5));
}

/* Открытие */

.gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.gate.is-open .gate__inner { transform: translateY(-16px) scale(.98); opacity: 0; }
.gate.is-open .envelope__flap { transform: rotateX(-178deg); z-index: 1; }
.gate.is-open .envelope__letter { transform: translateY(-16%); }
.gate.is-open .envelope__seal { opacity: 0; transform: translate(-50%, -50%) scale(.82); }

/* ─────────────── Обложка ─────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(110% 72% at 50% 0%, #97231F 0%, var(--wine) 46%, #6B1013 100%);
  color: var(--paper);
  padding: 90px var(--pad) 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 38% at 50% 44%, transparent 30%, rgba(40, 4, 6, .34) 100%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, .014) 0 1px, transparent 1px 5px);
  pointer-events: none;
}

.hero__frame {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(254, 250, 239, .26);
  pointer-events: none;
}
.hero__frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(254, 250, 239, .12);
}

.hero__inner { position: relative; z-index: 1; }

.hero__seal {
  width: 54px;
  height: 54px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 1px solid rgba(254, 250, 239, .45);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(254, 250, 239, .92);
  white-space: nowrap;
}
.hero__seal span { display: block; line-height: 1; }
.hero__seal i { font-style: normal; font-size: .66em; padding-inline: .05em; }

.hero__eyebrow {
  font-size: 10px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .68);
  margin-bottom: clamp(16px, 4vw, 22px);
}

.hero__names {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(52px, 15.5vw, 94px);
  line-height: .98;
  letter-spacing: .005em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hero__amp {
  font-family: var(--display);
  font-size: .42em;
  line-height: 1.2;
  color: rgba(254, 250, 239, .62);
  margin: 6px 0 4px;
}

.hero__date {
  margin-top: clamp(26px, 7vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .9);
}
.hero__date i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(254, 250, 239, .4);
}

.hero__place {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(254, 250, 239, .58);
}

.hero__scroll {
  position: absolute;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 8.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .6);
}
.hero__scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, rgba(254, 250, 239, .55), transparent);
  animation: scrollLine 2.4s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ─────────────── Секции ─────────────── */

.section {
  padding-block: var(--section);
  position: relative;
}
.section--paper { background: var(--paper); }
.section--paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(rgba(46, 46, 47, .045) .6px, transparent .6px);
  background-size: 4px 4px;
}
.section > * { position: relative; }

.section--wine {
  background:
    radial-gradient(120% 80% at 50% 0%, #8F1E1C 0%, var(--wine) 45%, #6C1114 100%);
  color: var(--paper);
}

/* ─────────────── Коллаж ─────────────── */

.collage {
  margin-top: clamp(42px, 10vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
}

.photo {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
}
.photo--tall { aspect-ratio: 3 / 4; }

.collage--aesthetic {
  margin-top: clamp(32px, 8vw, 46px);
  max-width: 1000px;
  margin-inline: auto;
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.photo__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(255, 245, 230, .14), transparent 55%),
    repeating-linear-gradient(102deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px),
    linear-gradient(160deg, #8E201F 0%, #6C1114 48%, #43090C 100%);
  color: rgba(254, 250, 239, .5);
}
.photo:nth-child(2) .photo__fallback {
  background:
    radial-gradient(120% 90% at 70% 8%, rgba(255, 250, 240, .2), transparent 55%),
    repeating-linear-gradient(98deg, rgba(120, 80, 60, .06) 0 2px, transparent 2px 10px),
    linear-gradient(155deg, #DFCEB8 0%, #B99F84 50%, #8C715B 100%);
  color: rgba(72, 44, 30, .55);
}
.photo__fallback b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 9vw, 44px);
  letter-spacing: .03em;
}
.photo__fallback b i { font-style: normal; font-size: .6em; padding-inline: .05em; }

/* ─────────────── Календарь ─────────────── */

.section--calendar { padding-top: calc(var(--section) * .82); }

.calendar {
  margin: clamp(26px, 6vw, 38px) auto clamp(30px, 7vw, 42px);
  max-width: 430px;
}

.calendar__head { text-align: center; margin-bottom: clamp(22px, 5vw, 30px); }
.calendar__title {
  font-family: var(--display);
  font-size: clamp(32px, 8.6vw, 44px);
  line-height: 1.1;
  color: var(--ink);
}
.calendar__title span { color: var(--muted); }
.calendar__note {
  margin-top: 8px;
  font-size: 9.5px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.calendar__week {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar__grid { row-gap: clamp(10px, 2.6vw, 15px); padding-top: 16px; }

.calendar__day {
  position: relative;
  font-size: clamp(14px, 3.9vw, 16px);
  font-weight: 300;
  color: var(--ink-soft);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.calendar__day--out { opacity: .1; }

.calendar__day--special {
  color: var(--paper);
  font-weight: 400;
  z-index: 0;
}
.calendar__day--special::before {
  content: "";
  position: absolute;
  width: 148%;
  height: 148%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--wine);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.2-4.35-9.33-8.13C1.2 10.2 2.36 6.7 5.36 5.7c1.9-.63 4 .1 5.14 1.78l1.5 2.2 1.5-2.2C14.64 5.8 16.74 5.07 18.64 5.7c3 1 4.16 4.5 2.69 7.17C19.2 16.65 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.2-4.35-9.33-8.13C1.2 10.2 2.36 6.7 5.36 5.7c1.9-.63 4 .1 5.14 1.78l1.5 2.2 1.5-2.2C14.64 5.8 16.74 5.07 18.64 5.7c3 1 4.16 4.5 2.69 7.17C19.2 16.65 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  z-index: -1;
  animation: heartBeat 3.4s var(--ease) infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  8% { transform: translate(-50%, -50%) scale(1.07); }
  16% { transform: translate(-50%, -50%) scale(1); }
  24% { transform: translate(-50%, -50%) scale(1.04); }
  32% { transform: translate(-50%, -50%) scale(1); }
}

/* ─────────────── Кнопки ─────────────── */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: clamp(26px, 6vw, 36px);
}
.btn-row--center { justify-content: center; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 16px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--wine);
  color: var(--paper);
  font-family: var(--text);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.btn:hover { background: var(--wine-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border-color: rgba(129, 26, 26, .42);
  color: var(--wine);
}
.btn--ghost:hover { background: rgba(129, 26, 26, .06); border-color: var(--wine); }

.btn--light {
  background: var(--paper);
  color: var(--wine);
}
.btn--light:hover { background: #fff; color: var(--wine-deep); }

.btn--small { min-height: 48px; padding: 13px 24px; }
.btn--wide { width: 100%; }

/* ─────────────── Локация ─────────────── */

.section--location .wrap { text-align: center; }

.place {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: clamp(32px, 7vw, 44px) auto 0;
  max-width: 1040px;
  width: 100%;
}
.venue {
  margin: 0;
  max-width: none;
  width: 100%;
}
.venue img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: sepia(.08) saturate(.9) contrast(.98);
}

.map {
  margin: 0;
  width: 100%;
  max-width: none;
  height: clamp(240px, 66vw, 300px);
  background: #E8E2D5;
  overflow: hidden;
  position: relative;
}
.map__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.1) saturate(.9) contrast(.97);
}
.map__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -100%) rotate(-45deg);
  border-radius: 50% 50% 50% 4px;
  background: var(--wine);
  border: 2px solid var(--paper);
  box-shadow: 0 12px 24px -8px rgba(60, 6, 10, .65);
  display: grid;
  place-items: center;
}
.map__pin::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(129, 26, 26, .45);
  animation: pinPulse 2.8s var(--ease) infinite;
}
.map__pin svg {
  width: 24px;
  height: 24px;
  fill: var(--paper);
  stroke: none;
  transform: rotate(45deg);
}
@keyframes pinPulse {
  0% { transform: scale(.7); opacity: .8; }
  70%, 100% { transform: scale(1.25); opacity: 0; }
}
.map__label {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 12px 16px;
  background: rgba(254, 250, 239, .94);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px -14px rgba(46, 30, 20, .55);
}
.map__label span {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.map__credit {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 8px;
  letter-spacing: .04em;
  color: rgba(46, 46, 47, .55);
  text-decoration: none;
  background: rgba(254, 250, 239, .7);
  padding: 2px 5px;
}

/* ─────────────── Программа ─────────────── */

.timeline {
  position: relative;
  max-width: 520px;
  margin: clamp(36px, 8vw, 50px) auto 0;
  padding-block: 4px;
}

.timeline__item {
  position: relative;
  text-align: center;
  padding-block: clamp(26px, 6vw, 34px);
}

.timeline__line {
  width: 1px;
  height: clamp(30px, 7vw, 44px);
  margin: 0 auto;
  background: var(--line-light);
}

.timeline__time {
  position: relative;
  z-index: 1;
  display: block;
  font-family: var(--display);
  font-size: clamp(38px, 10.5vw, 52px);
  line-height: 1.15;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.timeline__tag {
  display: block;
  width: fit-content;
  margin: 6px auto 0;
  padding: 3px 8px;
  border: 1px solid rgba(254, 250, 239, .4);
  border-radius: 999px;
  font-family: var(--text);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .8);
  white-space: nowrap;
}
.timeline__title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
}
.timeline__text {
  margin-top: 6px;
  max-width: 28em;
  margin-inline: auto;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(254, 250, 239, .68);
}

/* ─────────────── Дресс-код ─────────────── */

.section--dress .lead { max-width: 30em; }

.palette {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: center;
  gap: clamp(16px, 4.5vw, 22px) 10px;
  margin: clamp(30px, 7vw, 40px) auto 18px;
  max-width: 320px;
}
.palette li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 72px;
}
.heart {
  width: 40px;
  height: 38px;
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.2-4.35-9.33-8.13C1.2 10.2 2.36 6.7 5.36 5.7c1.9-.63 4 .1 5.14 1.78l1.5 2.2 1.5-2.2C14.64 5.8 16.74 5.07 18.64 5.7c3 1 4.16 4.5 2.69 7.17C19.2 16.65 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.2-4.35-9.33-8.13C1.2 10.2 2.36 6.7 5.36 5.7c1.9-.63 4 .1 5.14 1.78l1.5 2.2 1.5-2.2C14.64 5.8 16.74 5.07 18.64 5.7c3 1 4.16 4.5 2.69 7.17C19.2 16.65 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  box-shadow: 0 6px 12px -6px rgba(46, 30, 20, .4);
}
.heart--white { box-shadow: inset 0 0 0 1px rgba(46, 46, 47, .18), 0 6px 12px -6px rgba(46, 30, 20, .25); }
.palette__name {
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

.looks-head {
  display: block;
  max-width: 430px;
  margin: clamp(44px, 10vw, 60px) auto 0;
}
.looks-head .h3 { font-size: clamp(22px, 5.8vw, 30px); }

.looks-hint {
  display: block;
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.looks-hint span { color: var(--wine); margin-left: 4px; }

/* ─────────────── Карусель образов ─────────────── */

.looks-c {
  position: relative;
  width: min(92vw, 430px);
  margin: clamp(24px, 6vw, 32px) auto 0;
}

.looks-c__viewport {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  padding-block: 8px 30px;
  margin-block: -8px -30px;
}
.looks-c__viewport img { -webkit-user-drag: none; }
.looks-c.is-dragging .looks-c__viewport { cursor: grabbing; }
.looks-c.is-dragging .looks-c__slide { pointer-events: none; }
.looks-c__viewport:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 5px;
}

.looks-c__track {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.looks-c__slide {
  flex: 0 0 100%;
  padding: 9px 9px 0;
  background: #FFFDF7;
  box-shadow: 0 18px 44px -26px rgba(46, 30, 20, .5);
}

.looks-c__slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #EDE3D6;
}

.looks-c__cap {
  display: block;
  padding: 11px 4px 13px;
  font-size: 9px;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.looks-c__btn {
  position: absolute;
  top: calc(50% - 30px);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #FFFDF7;
  color: var(--wine);
  box-shadow: 0 8px 22px -10px rgba(46, 30, 20, .55);
  cursor: pointer;
  transition: opacity .25s ease, transform .25s ease;
}
.looks-c__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.looks-c__btn--prev { left: 12px; }
.looks-c__btn--next { right: 12px; }
@media (hover: hover) {
  .looks-c__btn:hover { transform: scale(1.06); }
}

.looks-c__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.looks-c__dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--wine);
  opacity: .22;
  cursor: pointer;
  transition: opacity .25s ease, transform .25s ease;
}
.looks-c__dots button[aria-selected="true"] {
  opacity: 1;
  transform: scale(1.25);
}

.looks-c + .caption { margin-top: 18px; }

.looks {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 0 var(--pad) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.looks::-webkit-scrollbar { display: none; }

.look {
  position: relative;
  flex: 0 0 min(72vw, 300px);
  aspect-ratio: 3 / 4.15;
  scroll-snap-align: center;
  overflow: hidden;
  color: var(--paper);
  isolation: isolate;
}
.look__fabric {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 60% at 30% 12%, rgba(255, 240, 225, .2), transparent 60%),
    repeating-linear-gradient(98deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 8px),
    linear-gradient(158deg, #9C2A25 0%, #7A1618 48%, #450A0D 100%);
}
.look__fabric::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 4, 6, .62) 0%, transparent 55%);
}
.look--beige { color: #3A2A1F; }
.look--beige .look__fabric {
  background:
    radial-gradient(90% 60% at 30% 12%, rgba(255, 255, 255, .5), transparent 60%),
    repeating-linear-gradient(98deg, rgba(120, 85, 60, .06) 0 2px, transparent 2px 9px),
    linear-gradient(158deg, #E7D8C4 0%, #C3AB92 52%, #9A8068 100%);
}
.look--beige .look__fabric::after {
  background: linear-gradient(to top, rgba(255, 250, 240, .78) 0%, transparent 60%);
}
.look--graphite .look__fabric {
  background:
    radial-gradient(90% 60% at 30% 12%, rgba(255, 255, 255, .16), transparent 60%),
    repeating-linear-gradient(98deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 8px),
    linear-gradient(158deg, #5C5A58 0%, #36383A 50%, #17181A 100%);
}

.look__body {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 22px 24px;
}
.look__role {
  font-size: 8.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .72;
  margin-bottom: 8px;
}
.look__title {
  font-family: var(--display);
  font-size: clamp(23px, 6vw, 28px);
  line-height: 1.15;
}
.look__text {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  opacity: .78;
  max-width: 24em;
}

/* ─────────────── Детали ─────────────── */

.section--details .h2 { margin-bottom: clamp(34px, 8vw, 46px); }

.detail {
  text-align: center;
  max-width: 34em;
  margin: 0 auto;
  padding-block: clamp(26px, 6.5vw, 36px);
  position: relative;
}
.detail + .detail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 1px;
  background: rgba(254, 250, 239, .26);
}
.detail .script { margin-bottom: 14px; }
.detail__text {
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(254, 250, 239, .86);
}
.detail__text + .detail__text { margin-top: 12px; }
.detail__text--soft { color: rgba(254, 250, 239, .68); }

.detail__contact {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.detail__contact a {
  font-family: var(--display);
  font-size: clamp(25px, 6.6vw, 31px);
  color: var(--paper);
  text-decoration: none;
  letter-spacing: .01em;
}
.detail__contact span {
  font-size: 9.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(254, 250, 239, .6);
}

/* ─────────────── Анкета ─────────────── */

.section--rsvp { padding-bottom: calc(var(--section) * .6); }
.section--rsvp .h2 { margin-bottom: 20px; }
.section--rsvp .lead { margin-bottom: clamp(34px, 8vw, 46px); }

.form { max-width: 480px; margin: 0 auto; }

.field { border: 0; padding: 0; margin: 0 0 30px; }
.field__label {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--ink);
  margin-bottom: 12px;
}
.field__hint {
  font-size: 10.5px;
  color: var(--muted);
  margin: -6px 0 12px;
  letter-spacing: .03em;
}

.input {
  display: block;
  width: 100%;
  padding: 12px 2px 14px;
  border: 0;
  border-bottom: 1px solid rgba(46, 46, 47, .38);
  border-radius: 0;
  background: transparent;
  font-family: var(--text);
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  transition: border-color .3s;
}
.input::placeholder { color: #A9A096; }
.input:focus { outline: none; border-color: var(--wine); }

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

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 2px;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__dot {
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid rgba(46, 46, 47, .42);
  position: relative;
  transition: border-color .25s;
}
.choice__dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--wine);
  transform: scale(0);
  transition: transform .25s var(--ease);
}
.choice input:checked ~ .choice__dot { border-color: var(--wine); }
.choice input:checked ~ .choice__dot::after { transform: scale(1); }
.choice input:focus-visible ~ .choice__dot { outline: 2px solid var(--wine); outline-offset: 3px; }
.choice:hover, .check:hover { color: var(--ink); }
.choice:hover .choice__dot, .check:hover .check__box { border-color: rgba(129, 26, 26, .55); }
.choice:has(input:checked), .check:has(input:checked) { color: var(--ink); }

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
}
.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(46, 46, 47, .42);
  position: relative;
  transition: background .25s, border-color .25s;
}
.check__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--paper);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg) scale(0);
  transition: transform .2s var(--ease);
}
.check input:checked ~ .check__box { background: var(--wine); border-color: var(--wine); }
.check input:checked ~ .check__box::after { transform: rotate(42deg) scale(1); }
.check input:focus-visible ~ .check__box { outline: 2px solid var(--wine); outline-offset: 3px; }

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

.form__error {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: #A2261F;
  text-align: center;
}

.form .btn { margin-top: 8px; }
.form__note { margin-top: 14px; font-size: 9.5px; }

.thanks {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(34px, 8vw, 46px) 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .34);
}
.thanks__heart { font-size: 26px; color: var(--wine); line-height: 1; }
.thanks__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  margin-top: 12px;
}
.thanks__text { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }

/* ─────────────── Отсчёт ─────────────── */

.section--countdown { padding-bottom: calc(var(--section) * .7 + 48px); }
.h2--count { margin-bottom: clamp(30px, 7vw, 40px); }

.count {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 2.2vw, 16px);
  margin-bottom: clamp(40px, 10vw, 60px);
}
.count__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(52px, 15vw, 86px);
}
.count__cell b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 9.5vw, 48px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.count__cell span {
  margin-top: 5px;
  font-size: 8px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.count__sep {
  font-family: var(--display);
  font-size: clamp(24px, 7vw, 38px);
  line-height: 1.25;
  color: rgba(129, 26, 26, .38);
}

.photo--final {
  width: min(76vw, 360px);
  aspect-ratio: 4 / 5;
  margin: 0 auto clamp(36px, 9vw, 48px);
  padding: 10px 10px 46px;
  background: #FFFDF7;
  box-shadow: 0 18px 44px -22px rgba(46, 30, 20, .5);
  transform: rotate(-1.6deg);
  overflow: visible;
}
.photo--final img { position: absolute; inset: 10px 10px 46px; width: auto; height: auto; }
.photo--final .photo__fallback { inset: 10px 10px 46px; }
.photo__date {
  font-family: var(--display);
  font-style: normal;
  font-size: 12px;
  letter-spacing: .16em;
  color: inherit;
  opacity: .8;
}

.final__text {
  text-align: center;
  font-family: var(--display);
  font-size: clamp(24px, 6.6vw, 32px);
  line-height: 1.3;
}
.final__sign { margin-top: 18px; }

/* ─────────────── Подвал и док ─────────────── */

.footer {
  background: var(--wine);
  color: rgba(254, 250, 239, .8);
  text-align: center;
  padding: 38px var(--pad) 34px;
}
.footer__monogram {
  font-family: var(--display);
  font-size: 30px;
  color: var(--paper);
  letter-spacing: .04em;
}
.footer__monogram i { font-style: normal; font-size: .6em; padding-inline: .08em; }
.footer__date {
  margin-top: 6px;
  font-size: 9px;
  letter-spacing: .34em;
  color: rgba(254, 250, 239, .55);
}
.footer__links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 22px;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.footer__links a { color: rgba(254, 250, 239, .62); text-decoration: none; }
.footer__links a:hover { color: var(--paper); }

.dock {
  position: fixed;
  z-index: 40;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateY(20px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--paper);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 30px -10px rgba(70, 8, 12, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s, transform .4s var(--ease);
}
.dock svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.dock.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
body.gate-locked .dock { display: none; }

/* ─────────────── Появление ─────────────── */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ─────────────── Планшет / десктоп ─────────────── */

@media (min-width: 760px) {
  body { font-size: 16px; }

  .gate::before { inset: 20px; }
  .envelope { width: min(46vw, 380px); }
  .gate__title { font-size: 44px; }

  .hero__frame { inset: 24px; }
  .hero__names { font-size: clamp(78px, 8.6vw, 112px); }
  .hero__amp { font-size: .36em; margin: 4px 0 2px; }
  .hero__seal { width: 64px; height: 64px; font-size: 19px; }

  .collage { max-width: 1000px; margin-inline: auto; gap: 6px; }
  .photo--tall { aspect-ratio: 4 / 5; }

  .calendar { max-width: 480px; }
  .calendar__day { font-size: 17px; }

  .timeline { max-width: 620px; }
  .timeline__text { font-size: 14px; }

  .palette {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 640px;
    gap: 14px 12px;
  }
  .palette li { width: 100%; max-width: none; }
  .palette__name { font-size: 9px; letter-spacing: .07em; }
  .heart { width: 46px; height: 44px; }

  .looks {
    max-width: 1060px;
    margin-inline: auto;
    padding-inline: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    gap: 12px;
  }
  .look { flex: none; width: auto; }
  .looks-head { max-width: 1060px; }
  .looks-hint { display: none; }

  .looks-c { width: 100%; max-width: 100%; }
  .looks-c__slide { flex-basis: calc((100% - 14px) / 2); }
  .looks-c__btn--prev { left: -6px; }
  .looks-c__btn--next { right: -6px; }

  .place {
    grid-template-columns: 1.08fr 1fr;
    gap: 12px;
    align-items: stretch;
  }
  .venue img { aspect-ratio: 4 / 3; }
  .map { height: auto; }
  .map__label { top: auto; bottom: 14px; }

  .count__cell b { font-size: 52px; }
  .photo--final { width: 400px; }
}

@media (min-width: 1100px) {
  .wrap--narrow { max-width: 680px; }
  .hero__names { font-size: 108px; }
  .timeline__time { font-size: 56px; }

  .section--dress .wrap--narrow { max-width: 1080px; }
  .section--dress .lead { max-width: 34em; text-align: center; margin-inline: auto; }
  .section--dress .looks-head { text-align: center; }

  .looks-c__slide { flex-basis: calc((100% - 28px) / 3); }
  .looks-c__btn--prev { left: -56px; }
  .looks-c__btn--next { right: -56px; }
  .looks-c__cap { font-size: 10px; }
}

/* ─────────────── Уменьшенное движение ─────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
