@font-face {
  font-family: "Angst";
  src: url("assets/fonts/angst-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "TT Ramillas";
  src: url("assets/fonts/tt-ramillas-light.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: block;
}

@font-face {
  font-family: "Astrum Script";
  src: url("assets/fonts/astrum-script-cyrillic-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Tilda Sans";
  src: url("assets/fonts/tilda-sans-vf.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: block;
}

@font-face {
  font-family: "Marianna";
  src: url("assets/fonts/marianna.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  --brown: #573f2d;
  --paper: #f5f0e9;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--brown);
}

/* Класс добавляет JavaScript: до разблокировки страницу нельзя пролистать. */
html.invitation-locked,
html.invitation-locked body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.invitation-locked body {
  position: fixed;
  inset: 0;
  width: 100%;
}

button {
  font: inherit;
}

.unlock-screen {
  position: relative;
  display: flex;
  min-height: 100svh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(63px, 9.2svh, 80px) 24px clamp(45px, 6.6svh, 59px);
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.unlock-screen--fading {
  pointer-events: none;
  opacity: 0;
  transition: opacity 2400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.unlock-screen--complete {
  display: none;
}

.unlock-screen__content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.unlock-screen__title {
  margin: 0;
  font-family: "Angst", serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.38;
  text-align: center;
  text-transform: uppercase;
}

.unlock-button {
  position: relative;
  display: grid;
  width: 100px;
  height: 100px;
  margin: clamp(104px, 17.4svh, 119px) 0 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  background: var(--brown);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.unlock-button::before {
  position: absolute;
  z-index: 0;
  width: 88px;
  height: 88px;
  border: 1px solid #fff;
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 280ms ease, transform 280ms ease;
}

.unlock-button:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 5px;
}

.unlock-button:active {
  transform: scale(0.95);
}

.unlock-button__circle,
.unlock-button__icon {
  display: block;
}

.unlock-button__circle {
  position: relative;
  z-index: 1;
  width: 97px;
  height: 97px;
}

.unlock-button__icon {
  position: absolute;
  inset: 0;
  width: 97px;
  height: 97px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 230ms ease, transform 230ms ease;
}

.unlock-button__icon--open {
  width: 82px;
  height: 82px;
  inset: 7.5px;
  opacity: 0;
  transform: scale(0.86);
}

.unlock-screen--open .unlock-button::before {
  opacity: 1;
  transform: scale(1);
}

.unlock-screen--open .unlock-button__icon--closed {
  opacity: 0;
  transform: scale(0.86);
}

.unlock-screen--open .unlock-button__icon--open {
  opacity: 1;
  transform: scale(1);
}

.unlock-screen--open .unlock-screen__hint {
  max-height: 0;
  margin-top: -1px;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-7px);
}

.unlock-screen__hint {
  max-height: 60px;
  margin: 0;
  font-family: "TT Ramillas", serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.32;
  text-align: center;
  transition: max-height 260ms ease, margin 260ms ease, opacity 180ms ease, transform 260ms ease;
}

.unlock-screen__names {
  margin: 0;
  font-family: "Astrum Script", cursive;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.hero {
  position: relative;
  height: 100svh;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  background: #9c908d;
}

/* Эти классы добавляются только после нажатия и готовности изображения. */
.hero--preparing {
  opacity: 0;
  transition: none;
}

.hero--preparing.hero--revealing {
  animation: hero-appear 3200ms cubic-bezier(0.16, 0.76, 0.24, 1) forwards;
}

.hero--preparing .hero__photo {
  filter: blur(32px);
  transform: scale(1.12);
}

.hero--preparing.hero--revealing .hero__photo {
  animation: hero-photo-focus 3200ms cubic-bezier(0.16, 0.76, 0.24, 1) forwards;
}

.hero--preparing .hero__names {
  opacity: 0;
  transform: translate(-50%, 18px);
}

.hero--preparing.hero--revealing .hero__names {
  animation: hero-names-appear 1150ms 1500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hero-appear {
  from { opacity: 0; }
  35% { opacity: 0.72; }
  to { opacity: 1; }
}

@keyframes hero-photo-focus {
  from { filter: blur(32px); transform: scale(1.12); }
  45% { filter: blur(13px); transform: scale(1.065); }
  to { filter: blur(0); transform: scale(1); }
}

@keyframes hero-names-appear {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.hero--transitioning {
  position: fixed;
  z-index: 10;
  inset: 0;
  width: 100%;
}

.hero__photo,
.hero__gradient,
.hero__names {
  position: absolute;
  display: block;
}

.hero__photo {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__gradient {
  z-index: 1;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.hero__names {
  z-index: 2;
  bottom: 23px;
  left: calc(50% + 5px);
  width: min(78.6vw, 338px);
  height: auto;
  transform: translateX(-50%);
}

.message {
  overflow: hidden;
  padding: 32px 20px 23px;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.message__heading {
  display: block;
  width: min(78.4vw, 337px);
  height: auto;
  margin: 0 -22px 20px auto;
}

.message__copy {
  color: var(--brown);
  font-family: "TT Ramillas", serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.42;
}

.message__copy p {
  margin: 0;
}

.message__copy p + p {
  margin-top: 20px;
}

.message__date {
  margin: 23px 0 0;
  color: var(--brown);
  font-family: "Angst", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.message__signature {
  margin: 27px 0 0;
  color: var(--brown);
  font-family: "TT Ramillas", serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.3;
}

.message__collage {
  display: block;
  width: calc(100% + 40px);
  height: auto;
  margin: 38px -20px 0;
}

.venue {
  padding: 32px 12px 28px;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
  text-align: center;
}

.venue__title {
  margin: 0;
  color: var(--brown);
  font-family: "Angst", serif;
  font-size: 35px;
  font-weight: 400;
  line-height: 1.36;
  text-transform: uppercase;
}

.venue__text {
  margin: 40px 0 0;
  color: var(--brown);
  font-family: "TT Ramillas", serif;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.4;
  text-align: left;
}

.venue__map-link {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  padding: 6px 28px 7px;
  border-radius: 999px;
  background: rgb(87 63 45 / 60%);
  color: #fff;
  font-family: "Tilda Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, background-color 180ms ease;
}

.venue__map-link:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

.venue__map-link:active {
  transform: scale(0.97);
}

.timeline {
  padding: 25px 20px 32px;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.timeline__title {
  width: calc(100% + 40px);
  height: 111px;
  margin: 0 -20px;
}

.timeline__title img {
  display: block;
  width: 100%;
  height: 100%;
}

.timeline__events {
  margin-top: 37px;
}

.timeline__event {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
}

.timeline__rail {
  position: relative;
  min-height: 122px;
  border-right: 1px solid var(--brown);
}

.timeline__rail time {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  color: var(--brown);
  font-family: "Angst", serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-90deg);
  white-space: nowrap;
}

.timeline__content {
  min-width: 0;
  padding-left: 20px;
  color: var(--brown);
}

.timeline__content h3 {
  margin: 9px 0 15px;
  font-family: "Marianna", cursive;
  font-size: 50px;
  font-weight: 400;
  line-height: 0.93;
}

.timeline__content p {
  margin: 0;
  font-family: "TT Ramillas", serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.38;
}

.timeline__event--guests {
  margin-bottom: 40px;
}

.timeline__event--ceremony {
  margin-bottom: 48px;
}

.timeline__event--ceremony .timeline__rail {
  margin-top: 25px;
}

.timeline__event--ceremony .timeline__content {
  padding-left: 20px;
}

.timeline__ceremony-heading {
  margin: 0 0 8px;
  color: var(--brown);
  font-family: "Marianna", cursive;
  font-size: 50px;
  font-weight: 400;
  line-height: 0.9;
}

.timeline__ceremony-heading span {
  display: block;
  white-space: nowrap;
}

.timeline__event--banquet .timeline__content h3 {
  margin-top: 8px;
}

.timeline__event--banquet .timeline__rail {
  margin-top: 7px;
}

.timeline__event--banquet .timeline__content {
  padding-top: 17px;
}

.dress-code {
  overflow: hidden;
  padding: 28px 20px 26px;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
  text-align: center;
}

.dress-code__title {
  width: 314px;
  height: 113px;
  margin: 0 0 -9px auto;
}

.dress-code__title img {
  display: block;
  width: 100%;
  height: 100%;
}

.dress-code__text {
  margin: 0;
  color: var(--brown);
  font-family: "Tilda Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.28;
}

.dress-code__image {
  display: block;
  width: calc(100% + 40px);
  height: auto;
  margin: 19px -20px 0;
}

.wishes {
  overflow: hidden;
  padding: 20px 20px 0;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.wishes__title {
  width: calc(100% + 40px);
  height: 111px;
  margin: 0 -20px;
}

.wishes__title img {
  display: block;
  width: 100%;
  height: 100%;
}

.wishes__text {
  margin-top: 14px;
  color: var(--brown);
  font-family: "Tilda Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.28;
}

.wishes__text p {
  margin: 0;
}

.wishes__text p + p {
  margin-top: 24px;
}

.wishes__text--long {
  letter-spacing: -0.32px;
}

.wishes__photo {
  display: block;
  width: calc(100% + 40px);
  height: auto;
  margin: 32px -20px 0;
}

.details {
  overflow: hidden;
  padding: 24px 20px 0;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.details__title {
  width: 203px;
  height: 113px;
  margin: 0 0 0 auto;
}

.details__title img {
  display: block;
  width: 100%;
  height: 100%;
}

.details__text {
  margin-top: 1px;
  color: var(--brown);
  font-family: "Tilda Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.28;
}

.details__text p {
  margin: 0;
}

.details__text p + p {
  margin-top: 20px;
}

.details__photo {
  display: block;
  width: calc(100% + 40px);
  height: auto;
  margin: 24px -20px 0;
}

.contact {
  padding: 39px 14px 33px;
  background-color: var(--paper);
  background-image: url("assets/images/paper-background.webp");
  background-position: center;
  background-size: cover;
}

.contact__text {
  margin: 0;
  color: var(--brown);
  font-family: "Tilda Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.28;
  text-align: center;
}

.contact__phone {
  display: flex;
  width: 202px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin: 27px auto 0;
  padding: 6px 16px 7px;
  border-radius: 999px;
  background: rgb(87 63 45 / 60%);
  color: #fff;
  font-family: "Tilda Sans", sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, background-color 180ms ease;
}

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

.contact__phone:active {
  transform: scale(0.97);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal--image {
  transform: translateY(30px) scale(0.96);
  transition-duration: 1200ms;
}

.scroll-reveal--photo {
  filter: blur(7px);
  transform: translateY(22px) scale(0.9);
  transform-origin: center center;
  transition-duration: 1450ms;
  transition-property: opacity, transform, filter;
}

.scroll-reveal--wide-image {
  clip-path: inset(0 8% 0 8% round 2px);
  transform: translateY(12px) scale(1.04);
  transition-duration: 1250ms;
  transition-property: opacity, transform, clip-path;
}

.scroll-reveal--title {
  transform: translateY(16px) scale(0.94);
  transform-origin: right center;
  transition-duration: 1050ms;
}

.scroll-reveal--timeline {
  transform: translateX(-22px);
  transition-duration: 900ms;
}

.scroll-reveal--button {
  transform: translateY(16px) scale(0.9);
  transition-duration: 800ms;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.scroll-reveal--photo.is-visible {
  filter: blur(0);
}

.scroll-reveal--wide-image.is-visible {
  clip-path: inset(0 0 0 0 round 0);
}

.scroll-reveal--timeline.is-visible {
  transform: translateX(0);
}

.music-toggle {
  position: fixed;
  z-index: 20;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: rgb(87 63 45 / 72%);
  color: #fff;
  font-family: "Tilda Sans", sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.music-toggle:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 360px) {
  .unlock-screen__title,
  .unlock-screen__names {
    font-size: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .hero--preparing {
    opacity: 1;
    transform: none;
  }

  .hero--preparing .hero__photo {
    filter: none;
    transform: none;
  }

  .hero--preparing .hero__names {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
