:root {
  --color-page: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #f8f6f2;
  --color-surface-muted: #f9f7f4;
  --color-border: #ebdec8;
  --color-text: #4b3717;
  --color-text-soft: #7e5a21;
  --color-text-muted: #b1833e;
  --color-accent: #cba265;
  --color-accent-dark: #ae8d6a;
  --color-brown-900: #5c3c37;
  --color-brown-800: #734d47;
  --color-shadow: rgba(75, 55, 23, 0.12);
  --page-max-width: 402px;
  --radius-card: 20px;
  --radius-soft: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  background:
    radial-gradient(circle at top, #fff8ef 0%, #f4eee4 45%, #efe6d5 100%);
  color: var(--color-text);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

::selection {
  background: transparent;
}

body.intro-active {
  overflow: hidden;
}

body.loading-active {
  overflow: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: #f8f6f2;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
}

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

.loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.loader__text {
  margin: 0 0 24px;
  font-family: "Great Vibes", cursive;
  font-size: 2.1rem;
  color: #7e5a21;
  text-align: center;
  white-space: nowrap;
}

.loader__bar-container {
  width: 100%;
  height: 12px;
  background: #ddd5c6;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.loader__bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  background: #b1833e;
  transition: width 0.3s ease-out;
}

.loader__percentage {
  margin: 12px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #7e5a21;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

video {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.page-shell {
  width: min(100%, var(--page-max-width));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--color-page);
  box-shadow: 0 24px 80px rgba(75, 55, 23, 0.14);
  overflow: clip;
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.opening::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ffffff;
  opacity: 1;
  transition: opacity 3100ms linear;
}

.opening.is-playing::before {
  opacity: 0;
}

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

.opening__tap-zone {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, var(--page-max-width));
  max-width: var(--page-max-width);
  height: 100dvh;
  min-height: 100svh;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  overflow: hidden;
}

.opening.is-playing .opening__cursor {
  opacity: 0;
}

.opening__frame {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.opening__cursor {
  position: absolute;
  left: 50%;
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 30px));
  width: 92px;
  height: 92px;
  transform: translateX(-50%);
  opacity: 1;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.opening__cursor-dot,
.opening__cursor-ring,
.opening__cursor-finger {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.opening__cursor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.18);
  animation: opening-tap 1.9s ease-in-out infinite;
}

.opening__cursor-ring {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  opacity: 0;
}

.opening__cursor-ring--one {
  animation: opening-ripple 1.9s ease-out infinite;
}

.opening__cursor-ring--two {
  animation: opening-ripple 1.9s ease-out 0.55s infinite;
}

.opening__cursor-finger {
  width: 26px;
  height: 38px;
  border-radius: 16px 16px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 242, 242, 0.98) 100%);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.06);
  transform: translate(-20%, -122%) rotate(20deg);
  transform-origin: 60% 100%;
  animation: opening-finger 1.9s ease-in-out infinite;
}

.opening__cursor-finger::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -11px;
  width: 16px;
  height: 20px;
  border-radius: 999px 999px 10px 10px;
  background: inherit;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.05);
}

@keyframes opening-ripple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }

  12% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.6);
  }
}

@keyframes opening-tap {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  22% {
    transform: translate(-50%, -50%) scale(0.72);
  }

  36% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes opening-finger {
  0%,
  100% {
    transform: translate(-20%, -122%) rotate(20deg) scale(1);
  }

  18% {
    transform: translate(-16%, -108%) rotate(14deg) scale(0.97);
  }

  34% {
    transform: translate(-20%, -122%) rotate(20deg) scale(1);
  }
}

.section {
  position: relative;
}

.section__inner {
  padding: 0 18px;
}

.section--warm {
  background: var(--color-surface-soft);
}

.section--accent {
  background: var(--color-accent);
}

.section--photo {
  background: #fffbf2;
}

.section-title {
  margin: 0 0 18px;
  font-family: "Great Vibes", cursive;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  color: #7e5a21;
}

.section-title--light {
  color: #7e5a21;
}

.section-subtitle {
  margin: 0 0 28px;
  font-size: 1.1rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(75, 55, 23, 0.72);
}

.lead-text {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
  color: var(--color-text-soft);
}

.hero {
  position: relative;
  min-height: 800px;
  background: #1f1b17;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 33, 28, 0.35);
}

.hero__content {
  position: relative;
  z-index: 1;
  min-height: 800px;
  padding: 78px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  text-indent: 0.26em;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.3);
}

.hero__title {
  margin: 34px 0 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(4.5rem, 20vw, 6rem);
  line-height: 0.88;
  font-weight: 400;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.16);
}

.hero__title-line,
.hero__title-ampersand {
  display: block;
}

.hero__title-ampersand {
  margin: 10px 0 8px;
  font-size: 0.82em;
  line-height: 0.9;
}

.hero__date-block {
  margin-top: auto;
  display: grid;
  gap: 2px;
  justify-items: center;
  filter: drop-shadow(0 0 22px rgba(0, 0, 0, 0.34));
}

.hero__date-label {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffffff;
}

.hero__date {
  font-size: 1.6rem;
  line-height: 1.1;
  font-weight: 700;
  color: #ffffff;
}

.hero__scroll {
  margin-top: 16px;
  padding: 12px;
}

.hero__scroll-arrow {
  display: block;
  width: 18px;
  height: 18px;
  border-right: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(45deg);
}

.invitation,
.hall-notice {
  padding-top: 48px;
  padding-bottom: 0;
  background: #f8f6f2;
}

.hall-notice__closing {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  margin-left: -18px;
  margin-right: -18px;
  width: calc(100% + 36px);
  height: 400px;
  padding: 0 18px;
  background: url("../Images/Backgrond_3.jpg") center / cover no-repeat;
}

.hall-notice__closing .invitation__message {
  margin: 0;
  max-width: 100%;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.flowers-message {
  padding-bottom: 0;
}

.invitation__message {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.6;
  text-align: center;
  color: var(--color-text-soft);
}

.invitation__date {
  display: block;
  margin-top: 24px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.8rem, 18vw, 5.2rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  color: #7e5a21;
}

.gallery {
  margin-top: 36px;
  background: #f8f6f2;
}

.gallery__viewport {
  overflow: hidden;
  padding: 0 18px;
}

.gallery__track {
  display: flex;
  gap: 16px;
  touch-action: pan-y;
  will-change: transform;
}

.gallery__slide {
  flex: 0 0 72%;
}

.gallery__card {
  width: 100%;
  min-height: 336px;
  border-radius: 18px;
  overflow: hidden;
  background: #eadbc8;
  box-shadow: 0 16px 40px rgba(75, 55, 23, 0.15);
}

.gallery__image {
  width: 100%;
  height: 336px;
  object-fit: cover;
  object-position: center;
}

.gallery__viewport.is-dragging {
  cursor: grabbing;
}

.countdown {
  margin-top: 0;
  background: url("../Images/Backgrond_1.jpg") center top / 100% 100% no-repeat;
}

.countdown__inner {
  padding: 36px 18px 48px;
}

.countdown__header {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.countdown__header .section-title {
  margin-bottom: 2px;
}

.countdown__subtitle {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text-soft);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 24px;
}

.countdown__item {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.countdown__value {
  font-size: clamp(2.3rem, 10vw, 3.15rem);
  line-height: 1;
  color: var(--color-text-soft);
}

.countdown__label {
  font-size: 1rem;
  line-height: 1.2;
  color: rgba(126, 90, 33, 0.62);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: 0 14px 36px var(--color-shadow);
}

.venue {
  padding: 28px 18px 36px;
}

.venue-card {
  padding: 20px;
  border-radius: 10px;
}

.venue-card__top {
  display: grid;
  gap: 10px;
}

.venue-card__address {
  margin: 0;
  display: grid;
  gap: 4px;
  text-align: center;
  font-style: normal;
}

.venue-card__name,
.venue-card__street,
.venue-card__city,
.venue-card__time-range {
  margin: 0;
}

.venue-card__name,
.venue-card__street {
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--color-text-soft);
}

.venue-card__city {
  font-size: 1rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.37);
}

.venue-card__divider {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(
    90deg,
    rgba(126, 90, 33, 0) 0%,
    rgba(126, 90, 33, 0.72) 50%,
    rgba(126, 90, 33, 0) 100%
  );
}

.venue-card__image,
.venue-card__map-image {
  width: 100%;
  border-radius: 18px;
}

.venue-card__details {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  justify-items: center;
}

.venue-card__date {
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--color-text-soft);
}

.venue-card__time-range {
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
  color: var(--color-text-soft);
}

.venue-card__map {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.venue-card__map-link {
  position: relative;
  padding-bottom: 8px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.venue-card__map-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(174, 141, 106, 0.5);
}

.schedule {
  padding-top: 36px;
  padding-bottom: 48px;
  background: url("../Images/Backgrond_1.jpg") center top / 100% 100% no-repeat;
}

.schedule .section-title {
  margin-bottom: 9px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 26px;
  margin: 34px auto 0;
  max-width: 280px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--color-text-muted);
  transform: translateX(-50%);
}

.timeline__item {
  position: relative;
  width: calc(50% - 18px);
  display: grid;
  gap: 4px;
}

.timeline__item::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 15px;
  height: 1px;
  background: var(--color-text-muted);
}

.timeline__item--left {
  text-align: right;
}

.timeline__item--left::after {
  right: -24px;
}

.timeline__item--right {
  margin-left: auto;
  text-align: left;
}

.timeline__item--right::after {
  left: -24px;
}

.timeline__time {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.timeline__event {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--color-text-muted);
}

.dress-code {
  background: var(--color-page);
}

.dress-code__media {
  position: relative;
  width: calc(100% + 36px);
  margin: 0 -18px;
}

.dress-code__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 18px 24px;
}

.dress-code__overlay .section-title {
  margin-bottom: 6px;
}

.dress-code__text {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.45;
  text-align: center;
  color: var(--color-text);
  max-width: 350px;
}

.dress-code__image {
  width: 100%;
  max-width: none;
  margin: 0;
  height: auto;
  object-fit: contain;
  object-position: top center;
}

.wishes {
  padding: 52px 0;
  background: linear-gradient(180deg, var(--color-brown-800) 0%, var(--color-brown-900) 100%);
}

.wishes__background {
  position: absolute;
  inset: 0;
  background: url("../Images/Backgrond_2.png") center / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

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

.wishes-card {
  margin-top: 22px;
  padding: 22px 18px 18px;
  border-radius: 10px;
}

.wishes-card__text {
  margin: 0 0 18px;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--color-text);
}

.wishes-form {
  display: grid;
  gap: 14px;
}

.wishes-form__textarea {
  width: 100%;
  min-height: 118px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.wishes-form__textarea::placeholder {
  color: var(--color-text-muted);
}

.wishes-form__button {
  min-height: 47px;
  border: 0;
  border-radius: 5px;
  background: #cca469;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.wishes-form__status {
  min-height: 20px;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(75, 55, 23, 0.84);
}

.footer {
  position: relative;
  min-height: 528px;
  background: url("../Images/Backgrond_1.jpg") center top / 100% 100% no-repeat;
}

.footer__content {
  position: relative;
  min-height: 528px;
  padding: 56px 26px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: center;
}

.footer__headline,
.footer__date {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: #bcb7af;
}

.footer__headline {
  margin-top: 60px;
}

.footer__date {
  margin-top: 6px;
}


.footer__names {
  padding-top: 30px;
  font-family: "Great Vibes", cursive;
  font-size: clamp(4.5rem, 20vw, 4rem);
  line-height: 0.88;
  color: #bcb7af;
}

.footer__name-line,
.footer__name-ampersand {
  display: block;
}

.footer__name-ampersand {
  margin: 10px 0 8px;
  font-size: 0.82em;
  line-height: 0.9;
}

.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;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll--scale {
  transform: translate3d(0, 18px, 0) scale(0.96);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
}

.reveal-on-scroll.is-revealed:not(.reveal-on-scroll--scale) {
  transform: translate3d(0, 0, 0);
}

.reveal-on-scroll.reveal-on-scroll--scale.is-revealed {
  transform: translate3d(0, 0, 0) scale(1);
}

.music-toggle {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 950;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(75, 55, 23, 0.88);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.music-toggle::before {
  content: "♪";
}

.music-toggle.is-muted::before {
  content: "♫";
  opacity: 0.55;
}

.music-toggle:active {
  transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

@media (min-width: 403px) {
  body {
    padding: 0 14px 36px;
  }

  .opening__tap-zone {
    box-shadow: 0 24px 80px rgba(75, 55, 23, 0.14);
  }
}

@media (max-width: 340px) {
  .hero__content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section__inner,
  .gallery {
    padding-left: 14px;
    padding-right: 14px;
  }

  .countdown__grid {
    gap: 10px;
  }
}
