@font-face {
  font-family: 'PassionsConflict';
  src: url('assets/fonts/PassionsConflict.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-300-cyrillic.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-300-latin.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-400-cyrillic.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-600-cyrillic.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Montserrat';
  src: url('assets/fonts/montserrat-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5ecdd;
  --dark: #4c3931;
  --ink: #3d2314;
  --rule: rgba(61, 35, 20, 0.55);
  --btn-bg: #493836;
  --btn-border: #5a5d45;
  --stage-width: 300px;
  --reveal-shift: 24px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
figure {
  margin: 0;
}

.script {
  display: block;
  font-family: 'PassionsConflict', 'Montserrat', cursive;
  font-weight: 400;
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
}

.script--50 { font-size: 50px; line-height: 50px; }
.script--65 { font-size: 65px; line-height: 65px; }
.script--70 { font-size: 70px; line-height: 70px; }
.script--80 { font-size: 80px; line-height: 80px; }

/* ---------- прелоадер ---------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  cursor: progress;
  transition: opacity 0.35s ease;
}

#preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader__spinner {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- конверт ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--dark);
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro__envelope,
.intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.intro__video {
  z-index: 2;
  background: var(--dark);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.intro__video.is-playing {
  opacity: 1;
}

.intro__hint {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 3;
  transform: translateX(-50%);
  width: min(88vw, 320px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: clamp(13px, 3.6vw, 15px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.intro__hint::before {
  content: '';
  position: fixed;
  inset: 0;
}

.intro__hint.is-hidden {
  opacity: 0;
}

/* ---------- появление ---------- */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 63px;
}

.hero__media {
  position: relative;
  width: 352px;
  height: 540px;
  overflow: hidden;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__title {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  font-family: 'PassionsConflict', cursive;
  font-weight: 400;
  font-size: 75px;
  line-height: 65px;
  letter-spacing: 0.1px;
  color: #fff;
  text-align: center;
}

.hero__date {
  font-size: 81px;
}

.hero__wave {
  width: 398px;
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.hero__player {
  position: relative;
  width: 85px;
  height: 85px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero__ring {
  width: 100%;
  height: 100%;
}

.hero__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 35px;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.hero__icon--stop { opacity: 0; }
.hero__player.is-playing .hero__icon--play { opacity: 0; }
.hero__player.is-playing .hero__icon--stop { opacity: 1; }

/* ---------- дорогие гости ---------- */

.greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 78px;
}

.greeting__text {
  width: 375px;
  max-width: 100%;
  margin-top: 8px;
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}

.calendar {
  position: relative;
  display: grid;
  grid-template-columns: 32.15% 34.28% 33.57%;
  width: 353px;
  max-width: 100%;
  aspect-ratio: 353 / 153;
  margin-top: 73px;
}

.calendar__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.calendar__mark {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 135px;
  transform: translateX(-50%);
  pointer-events: none;
}

.calendar__cell {
  position: relative;
}

.calendar__weekday,
.calendar__month,
.calendar__day {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.calendar__weekday {
  top: 5px;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calendar__month {
  top: 34px;
  font-size: 13px;
  line-height: 16px;
}

.calendar__day {
  top: 47px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 400;
  font-size: 65px;
  line-height: 78px;
}

/* ---------- таймлайн ---------- */

.timeline {
  display: flex;
  justify-content: center;
  padding-top: 56px;
}

.timeline__stage {
  position: relative;
  width: var(--stage-width);
}

.timeline__path {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 300 / 1378.53;
  overflow: visible;
}

.timeline__heart {
  position: absolute;
  top: 0;
  left: 0;
  width: 79px;
  margin: -32px 0 0 -40px;
  will-change: transform;
}

.timeline__point {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, var(--reveal-shift));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline__point.is-visible {
  transform: translate(-50%, 0);
}

.timeline__point:nth-of-type(1) { --x: 20%; --y: 12.04%; }
.timeline__point:nth-of-type(2) { --x: 108.7%; --y: 30.17%; }
.timeline__point:nth-of-type(3) { --x: 15.5%; --y: 49.53%; }
.timeline__point:nth-of-type(4) { --x: 79.67%; --y: 64.83%; }
.timeline__point:nth-of-type(5) { --x: 51.5%; --y: 84.41%; }

.timeline__time {
  font-size: 35px;
  line-height: 35px;
  font-weight: 300;
}

.timeline__place {
  width: 240px;
  margin-top: 6px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

/* ---------- место проведения ---------- */

.venue {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 27px;
  padding-bottom: 83px;
}

.venue__address {
  width: 375px;
  max-width: 100%;
  margin-top: 17px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.venue__photo {
  width: 761px;
  max-width: 100%;
  aspect-ratio: 761 / 514;
  margin-top: 44px;
  object-fit: cover;
}

.circle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  margin-top: 24px;
  border: 1px solid var(--btn-border);
  border-radius: 50%;
  background: var(--btn-bg);
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 21.7px;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease;
}

.circle-btn:hover {
  background: #5a4643;
}

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

.dresscode {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 57px;
}

.dresscode__text {
  width: 453px;
  max-width: 100%;
  margin-top: 12px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.dresscode__palette {
  display: flex;
  gap: 5px;
  margin-top: 25px;
}

.dresscode__palette span {
  width: 40px;
  height: 40px;
  /* Без обводки светлые образцы палитры сливаются с кремовым фоном. */
  border: 1px solid rgba(61, 35, 20, 0.15);
}

.dresscode__palette--men {
  margin-top: 10px;
}

.dresscode__note {
  width: 520px;
  max-width: 100%;
  margin-top: 26px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

/* ---------- details ---------- */

.details {
  display: flex;
  justify-content: center;
  padding: 20px 0 87px;
}

.details__card {
  position: relative;
  width: 352px;
  max-width: 100%;
}

.details__photo {
  width: 100%;
  aspect-ratio: 352 / 483;
  object-fit: cover;
}

.details__title {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  color: #fff;
  letter-spacing: 0.1px;
  /* Текст лежит поверх фото с бликами бокалов, без тени местами разваливается. */
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.details__text {
  position: absolute;
  left: 50%;
  width: 255px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.1px;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.details__text--first { top: 147px; }
.details__text--second { top: 312px; }

/* ---------- анкета ---------- */

.rsvp {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 81px;
}

.rsvp__lead {
  margin-top: 6px;
  font-size: 16px;
  line-height: 25px;
  text-align: center;
}

.form__send-error {
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  color: #a3462f;
  text-align: center;
}

.rsvp__thanks {
  margin-top: 40px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.form {
  width: 364px;
  max-width: 100%;
  margin-top: 24px;
}

.form__group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.form__label {
  display: block;
  padding: 0 0 5px;
  font-size: 16px;
  line-height: 20px;
  font-weight: 300;
  color: var(--ink);
}

.form__input {
  width: 100%;
  height: 50px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
}

.form__input:focus {
  outline: none;
  border-bottom-color: var(--dark);
}

.form__input::placeholder {
  color: rgba(61, 35, 20, 0.5);
}

.form__option {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 20px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 16.8px;
  font-weight: 300;
  cursor: pointer;
}

.form__option:first-of-type {
  margin-top: 7px;
}

.form__option:last-of-type {
  margin-bottom: 0;
}

.form__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form__option i {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--ink);
}

.form__option input[type='radio'] + i {
  border-radius: 50%;
}

.form__option input:checked + i::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--ink);
}

.form__option input[type='radio']:checked + i::after {
  border-radius: 50%;
}

.form__error {
  display: block;
  min-height: 0;
  font-size: 12px;
  color: #a3462f;
}

.form__group.has-error .form__input {
  border-bottom-color: #a3462f;
}

.form__submit {
  display: block;
  width: 160px;
  height: 50px;
  margin: 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.form__submit:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- контакты ---------- */

.contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 27px;
  padding-bottom: 86px;
}

.contacts__text {
  width: 375px;
  max-width: 100%;
  margin-top: 17px;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
}

.contacts .circle-btn {
  margin-top: 28px;
}

/* ---------- обратный отсчёт ---------- */

.countdown {
  display: flex;
  justify-content: center;
  padding: 20px 0 57px;
}

.countdown__card {
  position: relative;
  width: 352px;
  max-width: 100%;
}

.countdown__photo {
  width: 100%;
  aspect-ratio: 352 / 543;
  object-fit: cover;
}

.countdown__title {
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  color: #fff;
}

.countdown__grid {
  position: absolute;
  top: 59px;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 10px;
  transform: translateX(-50%);
}

.countdown__cell {
  text-align: center;
  color: #fff;
}

.countdown__value {
  display: block;
  font-size: 40px;
  line-height: 40px;
  font-weight: 300;
}

.countdown__label {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
}

/* ---------- планшет ---------- */

@media (max-width: 960px) {
  .venue__photo {
    width: 100%;
  }
}

/* ---------- мобильный ---------- */

@media (max-width: 640px) {
  :root {
    --stage-width: min(366px, 94vw);
  }

  .script--50 { font-size: 61px; line-height: 61px; }
  .script--65 { font-size: 73px; line-height: 79px; }
  .script--70 { font-size: 85px; line-height: 85px; }
  .script--80 { font-size: 85px; line-height: 95px; }

  .hero {
    padding-top: 20px;
    padding-bottom: 80px;
  }

  .hero__media {
    width: 100%;
    height: 610px;
  }

  .hero__title {
    top: 101px;
    font-size: 85px;
    line-height: 72px;
  }

  .hero__date {
    font-size: 97px;
  }

  .hero__wave {
    width: 100%;
    margin-top: -36px;
  }

  .hero__player {
    width: 104px;
    height: 104px;
    margin-top: 28px;
  }

  .hero__icon {
    width: 43px;
  }

  .greeting,
  .venue,
  .dresscode,
  .rsvp,
  .contacts {
    padding-left: 10px;
    padding-right: 10px;
  }

  .greeting {
    padding-bottom: 89px;
  }

  .greeting__text {
    width: 369px;
    margin-top: 25px;
    font-size: 19px;
    line-height: 23px;
  }

  .calendar {
    width: 354px;
    aspect-ratio: 354 / 154;
    margin-top: 68px;
  }

  .calendar__mark {
    top: -30px;
    width: 158px;
  }

  .calendar__weekday { font-size: 13px; line-height: 17px; }
  .calendar__month { font-size: 13px; line-height: 16px; }
  .calendar__day { font-size: 71px; line-height: 85px; }

  .timeline {
    padding-top: 68px;
  }

  .timeline__point:nth-of-type(1) { --x: 37.3%; --y: 11.79%; }
  .timeline__point:nth-of-type(2) { --x: 69.9%; --y: 29.70%; }
  .timeline__point:nth-of-type(3) { --x: 44.9%; --y: 49.23%; }
  .timeline__point:nth-of-type(4) { --x: 63.4%; --y: 64.64%; }
  .timeline__point:nth-of-type(5) { --x: 36.9%; --y: 84.82%; }

  .timeline__time {
    font-size: 43px;
    line-height: 43px;
  }

  .timeline__place {
    width: 264px;
    font-size: 15px;
    line-height: 21px;
  }

  .venue {
    padding-top: 44px;
    padding-bottom: 34px;
  }

  .venue .script {
    font-size: 78px;
    line-height: 78px;
  }

  .venue__address {
    width: 352px;
    margin-top: 30px;
    font-size: 19px;
    line-height: 30px;
  }

  .venue__photo {
    aspect-ratio: 390 / 289;
    margin-top: 43px;
  }

  .circle-btn {
    width: 134px;
    height: 134px;
    margin-top: 37px;
    font-size: 17px;
    line-height: 26px;
  }

  .dresscode {
    padding-bottom: 59px;
  }

  .dresscode__text {
    width: 349px;
    margin-top: 21px;
    font-size: 18px;
    line-height: 28px;
  }

  .dresscode__palette {
    gap: 6px;
    margin-top: 24px;
  }

  .dresscode__palette span {
    width: 49px;
    height: 49px;
  }

  .dresscode__note {
    width: 349px;
    margin-top: 26px;
    font-size: 18px;
    line-height: 28px;
  }

  .details {
    padding: 0 0 57px;
  }

  .details__card {
    width: 100%;
  }

  .details__photo {
    aspect-ratio: 390 / 601;
  }

  .details__title {
    top: 82px;
  }

  .details__text {
    font-size: 17px;
    line-height: 21px;
  }

  .details__text--first { width: 315px; }
  .details__text--second { width: 349px; }

  .details__text--first { top: 188px; }
  .details__text--second { top: 397px; }

  .rsvp {
    padding-bottom: 63px;
  }

  .rsvp__lead {
    margin-top: 21px;
    font-size: 18px;
    line-height: 28px;
  }

  .form {
    width: 341px;
    margin-top: 26px;
  }

  .form__group {
    margin-bottom: 24px;
  }

  .form__label {
    font-size: 17px;
    line-height: 22px;
  }

  .form__input {
    height: 61px;
  }

  .form__option {
    height: 24px;
    font-size: 17px;
  }

  .form__option:first-of-type {
    margin-top: 10px;
  }

  .form__submit {
    width: 150px;
    height: 40px;
    margin-top: 5px;
    font-size: 17px;
  }

  .contacts {
    padding-top: 0;
    padding-bottom: 65px;
  }

  .contacts__text {
    width: 352px;
    margin-top: 12px;
    font-size: 18px;
    line-height: 28px;
  }

  .contacts .circle-btn {
    margin-top: 37px;
  }

  .countdown {
    padding: 12px 0 45px;
  }

  .countdown__card {
    width: 100%;
  }

  .countdown__photo {
    aspect-ratio: 390 / 601;
  }

  .countdown__title {
    top: 3px;
  }

  .countdown__grid {
    top: 77px;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    width: 100%;
  }

  .countdown__value { font-size: 37px; line-height: 37px; }
  .countdown__label { font-size: 13px; line-height: 21px; margin-top: 3px; }

  .timeline__heart {
    width: 87px;
    margin: -35px 0 0 -44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --reveal-shift: 0px;
  }

  .reveal {
    opacity: 1;
    transition: none;
  }
}
