:root {
  --font-serif: "Cormorant Infant Local", Georgia, "Times New Roman", serif;
  --font-script-good-vibes: "Good Vibes Pro Local", cursive;
  --font-script-marianna: "Marianna Local", cursive;
  --font-script-florisel: "Florisel Script Local", cursive;
  --font-display-mak: "MAK Local", serif;
  --font-ramillas: "TT Ramillas Local", Georgia, "Times New Roman", serif;
}

@font-face {
  font-family: "Cormorant Infant Local";
  src: url("assets/fonts/cormorant-infant/CormorantInfant-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Infant Local";
  src: url("assets/fonts/cormorant-infant/CormorantInfant-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Good Vibes Pro Local";
  src: url("assets/fonts/good-vibes-pro.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "Florisel Script Local";
  src: url("assets/fonts/floriselscript.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MAK Local";
  src: url("assets/fonts/mak.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --page-bg: #f5eedc;
  --text: #16110d;
  --green: #446736;
  --date-red: #c86362;
  --cream: #f5eedc;
  --line: rgba(47, 40, 35, 0.16);
  --button-bg: #2f2823;
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-serif);
}

body {
  margin: 0;
  background: var(--page-bg);
}

.site-loader {
  display: none;
}

.js.is-loading body {
  overflow: hidden;
}

.js.is-loading .invite-page {
  opacity: 0;
  pointer-events: none;
}

.js.is-loading .site-loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: var(--green);
  background: var(--page-bg);
}

.js.is-loading-slow .site-loader__retry {
  display: inline-flex;
}

.site-loader__names {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.site-loader__text {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}

.site-loader__line {
  width: 90px;
  height: 1px;
  margin-top: 22px;
  overflow: hidden;
  background: rgba(68, 103, 54, 0.28);
}

.site-loader__line::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: var(--green);
  animation: loader-line 1.2s ease-in-out infinite;
}

.site-loader__retry {
  display: none;
  margin-top: 26px;
  padding: 11px 24px 12px;
  border: 1px solid rgba(68, 103, 54, 0.6);
  border-radius: 999px;
  color: var(--green);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

a {
  color: inherit;
}

.invite-page {
  width: min(100%, 430px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--page-bg);
}

.intro-block {
  min-height: 100svh;
  padding: 40px 0 67px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.names {
  width: 100%;
  padding: 0 24px 18px;
  color: var(--green);
  overflow: visible;
}

.names__person,
.names__and {
  display: block;
  font-weight: 400;
  letter-spacing: 0;
}

.names__person {
  font-family: var(--font-script-good-vibes);
  font-size: 60px;
  line-height: 1.12;
  overflow: visible;
}

.names__and {
  margin: 8px 0 2px;
  font-family: var(--font-script-marianna);
  font-size: 40px;
  line-height: 1;
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 860 / 650;
  object-fit: cover;
}

.intro-text {
  width: 100%;
  padding: 42px 25px 0;
}

.intro-text__lead,
.intro-text__body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.27;
  letter-spacing: 0;
}

.intro-text__body {
  margin-top: 35px;
}

.date-badge {
  position: relative;
  width: min(100%, 292px);
  margin: 43px auto 0;
  aspect-ratio: 572 / 178;
  display: grid;
  place-items: center;
}

.date-badge__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.date-badge__text {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  color: var(--text);
  font-family: var(--font-script-good-vibes);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.program-block {
  padding: 18px 34px 48px;
  text-align: center;
}

.program-card {
  width: 100%;
  height: 1058px;
  padding: 62px 20px 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 999px;
  background: var(--green);
  color: var(--cream);
}

.program-title {
  margin: 0;
  font-family: var(--font-display-mak);
  font-size: 40px;
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0;
}

.program-list {
  width: 100%;
  flex: 1;
  margin-top: 67px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.program-item {
  width: 100%;
}

.program-time {
  display: block;
  font-family: var(--font-ramillas);
  font-size: 60px;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0;
}

.program-name {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
}

.program-line {
  width: 2px;
  height: 90px;
  margin: 0;
  background: currentColor;
}

.js .program-sequence .program-step {
  opacity: 0;
}

.js .program-sequence .program-step.seq-visible {
  opacity: 1;
}

.js .program-sequence .program-title {
  transform: translateY(18px);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.js .program-sequence .program-title.seq-visible {
  transform: translateY(0);
}

.js .program-sequence .program-item {
  transform: translateY(18px);
  transition:
    opacity 620ms ease,
    transform 620ms ease;
}

.js .program-sequence .program-item.seq-visible {
  transform: translateY(0);
}

.js .program-sequence .program-name {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 520ms ease 460ms,
    transform 520ms ease 460ms;
}

.js .program-sequence .program-item.seq-visible .program-name {
  opacity: 1;
  transform: translateY(0);
}

.program-time .type-char {
  display: inline-block;
}

.js .program-time .type-char {
  opacity: 0;
}

.js .program-item.seq-visible .program-time .type-char {
  animation: type-digit 90ms steps(1, end) both;
  animation-delay: calc(var(--type-index) * 105ms);
}

.js .program-line {
  opacity: 1;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 780ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.js .program-line.seq-visible {
  transform: scaleY(1);
}

.venue-block {
  padding: 12px 22px 42px;
  text-align: center;
}

.venue-title {
  margin: 0;
  color: var(--green);
  font-family: var(--font-display-mak);
  font-size: 40px;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
}

.venue-badge {
  position: relative;
  width: min(100%, 388px);
  margin: 52px auto 0;
  aspect-ratio: 572 / 178;
  display: grid;
  place-items: center;
}

.venue-badge__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.venue-badge__text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.map-button {
  width: min(100%, 287px);
  min-height: 59px;
  margin: 58px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(68, 103, 54, 0.64);
  color: var(--text);
  font-family: var(--font-display-mak);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
}

.dress-code-block {
  padding: 36px 0 34px;
  text-align: center;
}

.dress-code-title {
  margin: 0;
  color: var(--green);
  font-family: var(--font-display-mak);
  font-size: 50px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.palette {
  width: 100%;
  margin: 58px auto 0;
  padding: 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.palette__color {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.palette__color--rose {
  background: #d09d97;
}

.palette__color--yellow {
  background: #f4ebc4;
}

.palette__color--green {
  background: #c0d2ad;
}

.palette__color--blue {
  background: #9de0f3;
}

.dress-code-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 29px auto 0;
}

.wishes-block {
  padding: 37px 0 55px;
  text-align: center;
}

.ornament {
  display: block;
  width: calc(100% - 18px);
  height: auto;
  margin-right: auto;
  margin-left: auto;
}

.ornament--top {
  margin-top: 0;
}

.wishes-title {
  margin: 73px 0 0;
  color: var(--green);
  font-family: var(--font-script-florisel);
  font-size: 80px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
  overflow: visible;
}

.gifts-image {
  display: block;
  width: 232px;
  height: auto;
  margin: 30px auto 0;
}

.wishes-text {
  padding: 0 25px;
}

.wishes-lead,
.wishes-body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0;
}

.wishes-lead {
  margin-top: 55px;
}

.wishes-body {
  margin-top: 54px;
}

.ornament--bottom {
  width: calc(100% - 18px);
  margin-top: 82px;
}

.contact-block {
  padding: 0;
  text-align: center;
}

.contact-arch {
  width: 100%;
  min-height: 343px;
  padding: 91px 22px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 50% 50% 0 0 / 63% 63% 0 0;
  background: var(--green);
  color: var(--cream);
}

.contact-text {
  margin: 0;
  font-family: var(--font-ramillas);
  font-size: 25px;
  font-weight: 300;
  line-height: 1.55;
  letter-spacing: 0;
}

.phone-button {
  width: min(100%, 240px);
  min-height: 47px;
  margin: 36px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px 13px;
  border: 1px solid var(--cream);
  border-radius: 999px;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid var(--button-bg);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
}

.button--ghost {
  background: transparent;
  color: var(--text);
}

/* Без JavaScript весь сайт сразу виден. JS только добавляет мягкую анимацию. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

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

.js .draw-frame .date-badge__frame,
.js .draw-frame .venue-badge__frame {
  opacity: 1;
}

.draw-frame__path {
  fill: none;
  stroke: var(--date-red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.js .draw-frame .draw-frame__path {
  stroke-dasharray: 1120;
  stroke-dashoffset: 1120;
}

.js .draw-frame.is-visible {
  animation: frame-focus-pulse 1450ms ease 1780ms both;
}

.js .draw-frame.is-visible .draw-frame__path {
  animation: draw-svg-frame 1650ms linear 160ms both;
}

.js .photo-reveal {
  transform: translateY(22px) scale(0.985);
}

.js .photo-reveal.is-visible {
  animation: photo-soft-focus 2200ms ease 850ms both;
  transition-duration: 900ms;
}

.js .float-reveal {
  transform: translateY(24px) scale(0.96);
}

.js .float-reveal.is-visible {
  transform: translateY(0) scale(1);
  transition-duration: 900ms;
}

.js .palette-reveal .palette__color {
  opacity: 0;
  transform: translateY(14px) scale(0.82);
}

.js .palette-reveal.is-visible .palette__color {
  animation: pop-color 620ms cubic-bezier(0.18, 0.85, 0.25, 1.2) both;
}

.js .palette-reveal.is-visible .palette__color:nth-child(2) {
  animation-delay: 110ms;
}

.js .palette-reveal.is-visible .palette__color:nth-child(3) {
  animation-delay: 220ms;
}

.js .palette-reveal.is-visible .palette__color:nth-child(4) {
  animation-delay: 330ms;
}

.js .pulse-reveal.is-visible {
  animation: soft-pulse 1600ms ease 500ms 2;
}

@keyframes draw-svg-frame {
  0% {
    stroke-dashoffset: 1120;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes photo-soft-focus {
  0% {
    transform: translateY(0) scale(1);
  }

  42% {
    transform: translateY(0) scale(1.018);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes frame-focus-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  45% {
    transform: translateY(0) scale(1.055);
  }

  70% {
    transform: translateY(0) scale(0.992);
  }
}

@keyframes pop-color {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.82);
  }

  70% {
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes type-digit {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(0) scale(1.035);
  }
}

@keyframes loader-line {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(125%);
  }

  100% {
    transform: translateX(230%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .program-sequence .program-step,
  .js .program-sequence .program-title,
  .js .program-sequence .program-item,
  .js .program-sequence .program-name,
  .js .program-time .type-char,
  .js .program-line,
  .js .draw-frame .date-badge__frame,
  .js .draw-frame .venue-badge__frame,
  .js .draw-frame .draw-frame__path,
  .js .palette-reveal .palette__color,
  .js .pulse-reveal.is-visible {
    opacity: 1;
    transform: none;
    clip-path: none;
    animation: none;
    filter: none;
    stroke-dashoffset: 0;
  }
}
