/* === FONTS === */
@font-face {
  font-family: 'Mix';
  src: url('https://fonts.tildacdn.com/mix/Mix-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mix';
  src: url('https://fonts.tildacdn.com/mix/Mix-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CirceRounded';
  src: url('https://fonts.tildacdn.com/circerounded/CirceRounded-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CirceRounded';
  src: url('https://fonts.tildacdn.com/circerounded/CirceRounded-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

@media screen and (min-width: 641px) {
  html {
    font-size: 20px;
  }
}

@media screen and (min-width: 960px) {
  html {
    font-size: 22px;
  }
}

body {
  font-family: 'Mix', Arial, sans-serif;
  font-weight: 400;
  color: #000;
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

/* === PAGE WRAPPER === */
.invitation {
  width: 100%;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.invitation--visible {
  opacity: 1;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  width: 100%;
  height: 115vh;
  min-height: 550px;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.9) 80%, #ffffff 100%);
  z-index: 5;
  pointer-events: none;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../assets/img/bg-flowers.png') center bottom / cover no-repeat;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0.3));
  z-index: 1;
}

.hero__ornament-rotating {
  position: absolute;
  width: 110vw;
  max-width: 800px;
  opacity: 0.8;
  animation: rotate-reverse 100s linear infinite;
  z-index: 2;
  top: 50%;
  left: 50%;
  pointer-events: none;
}

.hero__ornament-rotating--secondary {
  width: 95vw;
  max-width: 680px;
  opacity: 0.65;
  animation: rotate-ornament 200s linear infinite;
}

/* Hero text overlay */
.hero__text {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 60vw;
  max-width: 350px;
  animation: hero-breathe 8s ease-in-out infinite;
}

.hero__label {
  display: block;
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: clamp(0.75rem, 3vw, 1.125rem);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2a2a2a;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(255,255,255,0.9);
}

.hero__title {
  font-family: 'Marck Script', cursive;
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255,255,255,0.9);
}

/* Hero age digits (50) */
.hero__age {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0px;
  margin: 6px 0;
}

.hero__digit {
  height: clamp(70px, 25vw, 110px);
  width: auto;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.9));
}

.hero__digit--left {
  /* digit 5 */
}

.hero__digit--right {
  /* digit 0 */
  margin-left: -20px;
}

/* Hero scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: 70px;
  left: 50%;
  z-index: 10;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 700;
  color: #000;
  font-family: 'Mix', Arial, sans-serif;
  line-height: 1;
  opacity: 0.8;
  display: block;
  margin: 0;
  padding: 0;
}

/* === MUSIC CONTROL (Fixed) === */
.music-control {
  position: fixed;
  top: 27px;
  right: 20px;
  z-index: 100;
  --viz-size: 86px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  border-radius: 50%;
  overflow: visible;
  box-shadow: 4px 0 10px rgba(0,0,0,0.2);
  isolation: isolate;
}

.music-control__viz {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--viz-size);
  height: var(--viz-size);
  transform: translate(-50%, -50%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.music-control--playing .music-control__viz {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .music-control__viz { display: none; }
}

.music-control__icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.music-control__icon--hidden {
  display: none;
}

/* === GREETING SECTION === */
.greeting {
  position: relative;
  width: 100%;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 30px;
}

.greeting__decor-branch {
  position: absolute;
  width: 95%;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

.greeting__decor-branch--top {
  top: 0;
  left: 0;
  transform: rotate(0deg);
}

.greeting__decor-branch--bottom {
  bottom: -12px;
  right: 0;
  transform: rotate(180deg);
  opacity: 0.6;
}

.greeting__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 320px;
}

.greeting__heading {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: #2a2a2a;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.greeting__text {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 400;
  color: #262626;
  line-height: 1.65;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.greeting__accent {
  font-family: 'Marck Script', cursive;
  font-size: 2.25rem;
  color: #1a1a1a;
  margin-top: 20px;
  margin-bottom: 10px;
}

.greeting__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 2px 0 14px;
  color: #1a1a1a;
  opacity: 0.85;
}

.greeting__divider::before,
.greeting__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  max-width: 160px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.35));
}

.greeting__divider::after {
  background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.35));
}

.greeting__divider span {
  font-family: 'Marck Script', cursive;
  font-size: 1.5rem;
  line-height: 1;
}

.greeting__date {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: #000;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.greeting__venue {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.125rem;
  font-weight: 400;
  font-style: italic;
  color: #262626;
  margin-bottom: 4px;
}

.greeting__address {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #4b4b4b;
  margin-bottom: 4px;
}

.greeting__music-hint {
  position: relative;
  z-index: 5;
  text-align: center;
  color: #4b4b4b;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  line-height: 1.4;
  padding: 0 40px;
  max-width: 253px;
  margin-top: 30px;
}

/* === SECTION DIVIDER === */
.divider {
  height: 35px;
  width: 100%;
}

/* === PHOTO SLIDER === */
.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.slider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.9) 80%, #ffffff 100%);
  z-index: 5;
  pointer-events: none;
}

.slider::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.9) 80%, #ffffff 100%);
  z-index: 5;
  pointer-events: none;
}

.slider__container {
  width: 100%;
}

.slider__image {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* === DIRECTIONS SECTION === */
.directions {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 30px 30px 30px 30px;
}

.directions__decor {
  position: absolute;
  opacity: 0.6;
  z-index: 1;
  width: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.directions__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 300px;
}

.directions__title {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.directions__text {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #4a4a4a;
  line-height: 1.65;
  letter-spacing: 0.3px;
}

/* === MAP SECTION === */
.map-section {
  width: 100%;
  text-align: center;
  padding: 15px 20px 45px;
  background: #fff;
}

.map-section__container {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px;
  border-radius: 8px;
  overflow: hidden;
}

.map-section__button {
  display: inline-block;
  padding: 14px 40px;
  color: #000;
  font-family: 'Lora', 'Times New Roman', serif;
  font-weight: 400;
  font-size: 0.875rem;
  text-transform: uppercase;
  text-decoration: none;
  background-image: linear-gradient(0.129turn, #f3d3c7 19%, #f3d3c7 46%, #f3d3c7 90%);
  border: 1px solid #ededed;
  border-radius: 30px;
  box-shadow: 0 15px 30px -10px rgba(68,68,68,0.2);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: 0.5px;
}

.map-section__button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.map-section__iframe {
  width: 100%;
  height: 385px;
  border: none;
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  -moz-filter: grayscale(100%);
  -ms-filter: grayscale(100%);
  -o-filter: grayscale(100%);
}

/* === CALENDAR SECTION === */
.calendar {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fff;
  padding: 40px 20px 50px;
}

.calendar__line {
  width: 100px;
  height: 1px;
  background: #000;
  margin-bottom: 40px;
}

.calendar__content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.calendar__month {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.625rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.calendar__table {
  border-collapse: collapse;
  margin: 0 auto;
}

.calendar__table th {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: #999;
  text-transform: uppercase;
  padding: 4px 8px;
  letter-spacing: 1px;
}

.calendar__table td {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #262626;
  padding: 6px 8px;
  text-align: center;
  min-width: 30px;
}

.calendar__day--active {
  position: relative;
  font-weight: 600;
  color: #262626;
}

.calendar__flower {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 39px;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

/* === PROGRAM SECTION (timeline) === */
.program {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  padding: 60px 20px 70px;
}

.program__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.program__line-top {
  width: 80px;
  height: 1px;
  background: #1a1a1a;
}

.program__title {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 2px;
  margin-top: 28px;
  margin-bottom: 0;
  text-align: center;
  text-transform: uppercase;
}

.program__timeline {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 50px;
  position: relative;
}

/* Линия таймлайна слева (единый вид для mobile/desktop) */
.program__timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.2);
  transform: none;
}

/* 2-колоночная сетка: [точка] [контент] */
.program__entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  padding: 20px 0;
  position: relative;
  z-index: 2;
}

.program__dot {
  grid-column: 1;
  grid-row: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1a1a1a;
  justify-self: center;
  position: relative;
  z-index: 3;
}

/* Контент справа от линии */
.program__entry-body {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 14px;
  min-width: 0;
}

/* На всех экранах не зеркалим чётные элементы */
.program__entry:nth-child(even) .program__entry-body {
  grid-row: 1;
  grid-column: 2;
  flex-direction: row;
  padding-left: 14px;
  padding-right: 0;
  min-width: 0;
}


.program__photo {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.program__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.program__entry:nth-child(even) .program__info {
  align-items: flex-start;
}

.program__time {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 1px;
  line-height: 1;
}

.program__event {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 400;
  color: #2f2f2f;
  letter-spacing: 0.3px;
}

@media screen and (max-width: 640px) {
  .program__photo {
    width: 72px;
    height: 72px;
  }
}

/* === HOST SECTION === */
.host {
  position: relative;
  width: 100%;
  padding: 40px 20px 60px;
  background: linear-gradient(to bottom, #ffffff 0%, #ffffff 55%, #fbf9fb 100%);
  display: flex;
  justify-content: center;
}

.host__card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 30px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.host__label {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #4b4b4b;
  margin-bottom: 10px;
}

.host__name {
  font-family: 'Marck Script', cursive;
  font-size: 2.1rem;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.host__phone {
  font-family: 'Mix', Arial, sans-serif;
  font-size: 1.1rem;
  color: #000;
  text-decoration: none;
  letter-spacing: 0.4px;
}

.host__phone:hover {
  opacity: 0.8;
}

/* === FINAL MESSAGE === */
.farewell {
  position: relative;
  width: 100%;
  padding: 30px 20px 500px;
  background: #fff url('../assets/img/flowers-bottom.png') center bottom / cover no-repeat;
  display: flex;
  justify-content: center;
}

.farewell__card {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 26px 24px 28px;
  text-align: center;
}

.farewell__card::before {
  content: '';
  display: block;
  width: 140px;
  height: 1px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.35), transparent);
}

.farewell__text {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: #2a2a2a;
  line-height: 1.7;
  letter-spacing: 0.2px;
}

/* === DRESS CODE SECTION === */
.dresscode {
  position: relative;
  width: 100%;
  padding: 20px 20px 60px;
  background: #fff;
  display: flex;
  justify-content: center;
}

.dresscode__card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 30px;
  text-align: center;
}

.dresscode__label {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #4b4b4b;
  margin-bottom: 10px;
}

.dresscode__text {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.05rem;
  color: #262626;
  line-height: 1.6;
  margin-bottom: 18px;
}

.dresscode__beads {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.dresscode__beads::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  background: rgba(0,0,0,0.12);
  transform: translateY(-50%);
}

.dresscode__bead {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  box-shadow: inset -4px -6px 10px rgba(0,0,0,0.08),
              0 6px 30px rgba(0,0,0,0.12),
              var(--bead-glow, 0 0 0 rgba(0,0,0,0));
  animation: bead-sway 3.6s ease-in-out infinite;
}


.dresscode__bead--1 {
  background: #b3c191;
  --bead-glow: 0 0 52px 18px rgba(179, 193, 145, 0.5);
  animation-delay: 0s;
}

.dresscode__bead--2 {
  background: #8fa6b5;
  --bead-glow: 0 0 52px 18px rgba(143, 166, 181, 0.5);
  animation-delay: 0.5s;
}

.dresscode__bead--3 {
  background: #f6d0c5;
  --bead-glow: 0 0 52px 18px rgba(246, 208, 197, 0.5);
  animation-delay: 0.9s;
}

.dresscode__bead--4 {
  background: #ea908f;
  --bead-glow: 0 0 52px 18px rgba(234, 144, 143, 0.5);
  animation-delay: 1.3s;
}

@keyframes bead-sway {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* === COUNTDOWN === */
.countdown {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fdfcfe;
  box-shadow:
    0 -14px 28px rgba(251, 249, 251, 0.85),
    0 -40px 80px rgba(251, 249, 251, 0.95);
}

.countdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(
    to top,
    rgba(251, 249, 251, 0) 0%,
    rgba(251, 249, 251, 0.5) 40%,
    rgba(251, 249, 251, 0.9) 80%,
    #fbf9fb 100%
  );
  z-index: 2;
  pointer-events: none;
}

.countdown__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.countdown__heading {
  position: relative;
  z-index: 3;
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: #2a2a2a;
  letter-spacing: 0.5px;
  margin-bottom: 30px;
  text-align: center;
}

.countdown__content {
  position: relative;
  z-index: 3;
  text-align: center;
}

.countdown__timer {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: baseline;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
}

.countdown__number {
  font-family: 'Mix', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: #000;
  letter-spacing: 1px;
  line-height: 1;
}

.countdown__label {
  font-family: 'Mix', Arial, sans-serif;
  font-size: 0.75rem;
  color: #4b4b4b;
  text-transform: lowercase;
  margin-top: 6px;
}

.countdown__separator {
  font-size: 1.5rem;
  color: #b2b2b2;
  line-height: 1;
  padding-top: 0;
}

/* === RSVP FORM === */
.rsvp {
  position: relative;
  width: 100%;
  padding: 40px 20px;
  overflow: visible;
  background: #fff;
}

.rsvp__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.rsvp__title {
  position: relative;
  z-index: 2;
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: #2a2a2a;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 30px;
}

.rsvp__content {
  position: relative;
  z-index: 2;
  max-width: 320px;
  margin: 0 auto;
  overflow: visible;
}

.rsvp__form {
  font-family: 'Lora', 'Times New Roman', serif;
}

.rsvp__field {
  margin-bottom: 20px;
}

.rsvp__label {
  font-family: inherit;
  font-size: 0.875rem;
  color: #000;
  margin-bottom: 8px;
  display: block;
}

.rsvp__hint {
  font-family: inherit;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.rsvp__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #000;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.rsvp__input::placeholder {
  font-family: inherit;
}

.rsvp__input:focus {
  border-color: #000;
}

.rsvp__radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsvp__radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  color: #000;
  line-height: 1.4;
}

.rsvp__radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #d6d6d6;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}

.rsvp__radio input[type="radio"]:checked {
  border-color: #000;
}

.rsvp__radio input[type="radio"]:checked::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #000;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.rsvp__submit {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 25px;
  background-image: linear-gradient(0.129turn, #f3d3c7 19%, #f3d3c7 46%, #f3d3c7 90%);
  border: 1px solid #ededed;
  border-radius: 30px;
  box-shadow: 0 15px 30px -10px rgba(68,68,68,0.2);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: 0.5px;
}

.rsvp__submit:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* === RSVP SUCCESS === */
.rsvp__success {
  position: relative;
  text-align: center;
  padding: 60px 20px;
  overflow: visible;
  min-height: 200px;
}

.rsvp__success-title {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  animation: success-appear 0.6s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.rsvp__success-note {
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 1rem;
  color: #2f2f2f;
  animation: success-appear 0.6s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

@keyframes success-appear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.glitter {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.glitter span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0;
  box-shadow:
    0 0 15px rgba(255, 255, 255, 0.9),
    0 0 25px rgba(255, 255, 255, 0.7),
    0 0 35px rgba(255, 255, 255, 0.5),
    inset 0 0 8px rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Разлет в разные стороны */
.glitter span:nth-child(1) {
  background: #FFD700;
  animation: explode 1.8s ease-out forwards;
}
.glitter span:nth-child(2) {
  background: #ea908f;
  animation: explode 1.8s ease-out forwards;
  animation-delay: 0.05s;
}
.glitter span:nth-child(3) {
  background: #f6d0c5;
  animation: explode 2s ease-out forwards;
  animation-delay: 0.02s;
}
.glitter span:nth-child(4) {
  background: #FFD700;
  animation: explode 1.7s ease-out forwards;
  animation-delay: 0.08s;
}
.glitter span:nth-child(5) {
  background: #8fa6b5;
  animation: explode 1.9s ease-out forwards;
}
.glitter span:nth-child(6) {
  background: #b3c191;
  animation: explode 2.1s ease-out forwards;
  animation-delay: 0.04s;
}
.glitter span:nth-child(7) {
  background: #FFD700;
  animation: explode 1.8s ease-out forwards;
  animation-delay: 0.06s;
}
.glitter span:nth-child(8) {
  background: #ea908f;
  animation: explode 2s ease-out forwards;
  animation-delay: 0.01s;
}
.glitter span:nth-child(9) {
  background: #f6d0c5;
  animation: explode 1.75s ease-out forwards;
  animation-delay: 0.07s;
}
.glitter span:nth-child(10) {
  background: #8fa6b5;
  animation: explode 1.85s ease-out forwards;
  animation-delay: 0.03s;
}
.glitter span:nth-child(11) {
  background: #FFD700;
  animation: explode 2s ease-out forwards;
}
.glitter span:nth-child(12) {
  background: #b3c191;
  animation: explode 1.9s ease-out forwards;
  animation-delay: 0.05s;
}
.glitter span:nth-child(13) {
  background: #ea908f;
  animation: explode 1.95s ease-out forwards;
  animation-delay: 0.02s;
}
.glitter span:nth-child(14) {
  background: #FFD700;
  animation: explode 1.8s ease-out forwards;
  animation-delay: 0.06s;
}
.glitter span:nth-child(15) {
  background: #f6d0c5;
  animation: explode 2.05s ease-out forwards;
  animation-delay: 0.04s;
}

.rsvp__success-title,
.rsvp__success-note {
  position: relative;
  z-index: 1;
}

/* Анимации разлета в разные стороны */
@keyframes explode {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
  }
  100% {
    transform: translate(
      calc(-50% + var(--x)),
      calc(-50% + var(--y))
    ) scale(0.8) rotate(720deg);
    opacity: 0;
  }
}

/* Индивидуальные траектории для каждой частицы */
.glitter span:nth-child(1) { --x: 0px; --y: -120px; } /* вверх */
.glitter span:nth-child(2) { --x: 50px; --y: -110px; } /* вверх-вправо */
.glitter span:nth-child(3) { --x: 95px; --y: -70px; } /* вправо-вверх */
.glitter span:nth-child(4) { --x: 120px; --y: -20px; } /* вправо */
.glitter span:nth-child(5) { --x: 110px; --y: 40px; } /* вправо-вниз */
.glitter span:nth-child(6) { --x: 80px; --y: 90px; } /* вниз-вправо */
.glitter span:nth-child(7) { --x: 30px; --y: 115px; } /* вниз */
.glitter span:nth-child(8) { --x: -30px; --y: 120px; } /* вниз */
.glitter span:nth-child(9) { --x: -80px; --y: 95px; } /* вниз-влево */
.glitter span:nth-child(10) { --x: -110px; --y: 50px; } /* влево-вниз */
.glitter span:nth-child(11) { --x: -125px; --y: 0px; } /* влево */
.glitter span:nth-child(12) { --x: -115px; --y: -45px; } /* влево-вверх */
.glitter span:nth-child(13) { --x: -90px; --y: -85px; } /* вверх-влево */
.glitter span:nth-child(14) { --x: -50px; --y: -115px; } /* вверх-влево */
.glitter span:nth-child(15) { --x: 0px; --y: -130px; } /* вверх */


/* === ANIMATIONS === */
@keyframes rotate-ornament {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate-reverse {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes hero-breathe {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -8px); }
  60% { transform: translate(-50%, -4px); }
}

/* Scroll animation helper */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll--visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE: TABLET & DESKTOP (>640px) === */
@media screen and (min-width: 641px) {
  body {
    background: #f0eded;
  }

  .invitation {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
  }

  .music-control {
    position: fixed;
    top: 15px;
    right: 30px;
    width: 50px;
    height: 50px;
    --viz-size: 120px;
  }

  .hero {
    height: 100vh;
    min-height: 580px;
  }

  .hero__bg {
    background-position: 52% 18%;
  }

  .hero__overlay {
    background: none;
  }

  .hero__scroll-hint {
    display: none;
  }

  .hero__ornament-rotating {
    width: 600px;
  }

  .hero__ornament-rotating--secondary {
    width: 500px;
  }

  .hero__text {
    width: 300px;
    max-width: 300px;
  }

  .greeting {
    min-height: 440px;
  }

  .greeting__music-hint {
    font-size: 0.85rem;
    max-width: 350px;
  }

  .greeting__content {
    max-width: 380px;
  }

  .map-section__iframe {
    height: 400px;
  }

  .countdown__number {
    font-size: 2.75rem;
  }

  .rsvp__content {
    max-width: 400px;
  }

  .program {
    padding: 50px 16px 60px;
  }

  .program__timeline {
    margin-top: 36px;
  }
}

@media screen and (min-width: 960px) {
  .invitation {
    max-width: 540px;
  }

  .hero__ornament-rotating {
    width: 700px;
  }

  .hero__ornament-rotating--secondary {
    width: 600px;
  }

  .hero__text {
    width: 350px;
    max-width: 350px;
  }

  .greeting {
    min-height: 400px;
  }

  .greeting__music-hint {
    font-size: 0.9rem;
  }

  .countdown__timer {
    gap: 15px;
  }

  .countdown__number {
    font-size: 3rem;
  }

  .directions__content {
    max-width: 360px;
  }
}

/* Hide scrollbar */
::-webkit-scrollbar {
  width: 0;
  background: transparent;
}
