/* ============================================================
   ПАЛИТРА И БАЗОВЫЕ ПЕРЕМЕННЫЕ
   Хотите сменить цвета — меняйте значения здесь.
============================================================ */
:root {
  --bg-top: #fff8f4;
  --bg-mid: #fdeef2;
  --bg-bot: #f7e7f0;

  --blush: #f7d9e3;
  --rose: #d98ca3;
  --rose-deep: #c06a86;
  --gold: #c9a06b;
  --gold-soft: #e7d3b1;

  --ink: #5b4750;
  --ink-soft: #927d88;
  --white: #fffdfc;

  --card: rgba(255, 255, 255, 0.62);
  --card-border: rgba(216, 140, 163, 0.28);
  --shadow: 0 18px 50px -22px rgba(176, 95, 125, 0.45);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Caveat", "Comic Sans MS", cursive;
  --sans: "Montserrat", "Segoe UI", system-ui, sans-serif;

  --maxw: 720px;
}

/* ============================================================
   СБРОС И ОБЩЕЕ
============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.65;
  background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bot) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

b {
  font-weight: 500;
  color: var(--rose-deep);
}

/* ============================================================
   ПЛАВАЮЩИЕ ЛЕПЕСТКИ (фон)
============================================================ */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8vh;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, var(--blush), var(--rose));
  opacity: 0;
  filter: blur(0.2px);
  animation: petal-fall linear infinite;
  will-change: transform, opacity;
}

@keyframes petal-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.75;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(112vh) translateX(var(--drift, 40px)) rotate(420deg);
    opacity: 0;
  }
}

/* ============================================================
   ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ============================================================
   HERO — ЭКРАН ПРИВЕТСТВИЯ
============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 80px;
}

.hero__glow {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(80vw, 640px);
  height: min(80vw, 640px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(247, 217, 227, 0.85) 0%, rgba(247, 217, 227, 0) 68%);
  filter: blur(8px);
  animation: glow-pulse 7s ease-in-out infinite;
  z-index: -1;
}

@keyframes glow-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

.hero__inner {
  max-width: 640px;
}

.hero__eyebrow {
  font-family: var(--script);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--rose);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.hero__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 1.05;
  letter-spacing: 1px;
  color: var(--ink);
  text-shadow: 0 2px 30px rgba(216, 140, 163, 0.25);
}

.hero__jubilee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px 0 8px;
  /* база для em у детей — линии сдвигаются пропорционально размеру цифры */
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.hero__line {
  display: block;
  width: clamp(40px, 14vw, 90px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  /* выравниваем линии по оптическому центру цифры (значение подобрано замером) */
  transform: translateY(0.226em);
}

.hero__age {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: 1em;
  line-height: 1;
  color: var(--gold);
}

.hero__subtitle {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  font-style: italic;
  color: var(--ink-soft);
}

.hero__date {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--rose-deep);
  margin-top: 14px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 15px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 14px 30px -10px rgba(192, 106, 134, 0.7);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px -10px rgba(192, 106, 134, 0.85);
}

.hero__cta svg {
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__mouse {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid var(--rose);
  border-radius: 14px;
  position: relative;
  opacity: 0.7;
}

.hero__mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--rose);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; }
}

/* ============================================================
   КОНТЕНТ
============================================================ */
.content {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Текст приглашения */
.invite {
  text-align: center;
  padding: 30px 0 10px;
}

.invite__ornament {
  font-size: 2rem;
  color: var(--rose);
  opacity: 0.7;
  margin-bottom: 12px;
}

.invite p {
  font-size: clamp(1.02rem, 2.6vw, 1.18rem);
  margin: 0 auto 18px;
  max-width: 600px;
}

.invite__hi {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
  color: var(--rose-deep);
  margin-bottom: 22px !important;
}

.invite__accent {
  font-weight: 400;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  padding: 18px 24px;
  border: 1px solid var(--card-border);
}

/* Карточки дат */
.dates {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 4vw, 30px);
  flex-wrap: wrap;
  padding: 40px 0;
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(120px, 34vw, 160px);
  height: clamp(120px, 34vw, 160px);
  background: var(--card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

.date-card:hover {
  transform: translateY(-6px) rotate(-1.5deg);
}

.date-card__day {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  line-height: 1;
  color: var(--rose-deep);
}

.date-card__month {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink);
}

.date-card__year {
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

.dates__amp {
  font-family: var(--script);
  font-size: 1.7rem;
  color: var(--gold);
}

/* ============================================================
   ФОРМА
============================================================ */
.form-section {
  margin: 30px auto 60px;
  padding: clamp(26px, 5vw, 46px);
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.form-section__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  text-align: center;
  color: var(--ink);
}

.form-section__hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 4px 0 30px;
}

.field {
  border: none;
  margin-bottom: 28px;
}

.field__label {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.field__input {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field__input::placeholder {
  color: #c2afb8;
}

.field__input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(217, 140, 163, 0.16);
}

.field__textarea {
  resize: vertical;
  min-height: 90px;
}

.field__error {
  display: none;
  color: var(--rose-deep);
  font-size: 0.85rem;
  margin-top: 8px;
}

.field.is-invalid .field__error {
  display: block;
}

.field.is-invalid .field__input {
  border-color: var(--rose-deep);
}

/* Варианты ответа (кастомные радио-карточки) */
.options {
  display: grid;
  gap: 12px;
}

@media (min-width: 480px) {
  fieldset[data-group="date"] .options,
  fieldset[data-group="company"] .options {
    grid-template-columns: 1fr 1fr;
  }
}

.option {
  position: relative;
  cursor: pointer;
}

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

.option__box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  transition: all 0.3s ease;
  height: 100%;
}

.option__box::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--rose);
  background: transparent;
  transition: all 0.3s ease;
}

.option__emoji {
  font-size: 1.15rem;
}

.option__text {
  font-weight: 400;
  font-size: 0.98rem;
}

.option:hover .option__box {
  border-color: var(--rose);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(192, 106, 134, 0.8);
}

.option input:checked + .option__box {
  border-color: var(--rose);
  background: linear-gradient(135deg, rgba(247, 217, 227, 0.9), rgba(217, 140, 163, 0.28));
  box-shadow: 0 10px 26px -14px rgba(192, 106, 134, 0.9);
}

.option input:checked + .option__box::before {
  background: var(--rose);
  box-shadow: inset 0 0 0 4px var(--white);
}

.option input:focus-visible + .option__box {
  box-shadow: 0 0 0 4px rgba(217, 140, 163, 0.25);
}

/* Кнопка отправки */
.submit {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 17px;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 16px 32px -14px rgba(192, 106, 134, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -14px rgba(192, 106, 134, 0.95);
}

.submit:active {
  transform: translateY(0);
}

.submit.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.submit.is-loading .submit__text {
  opacity: 0;
}

.submit__spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit.is-loading .submit__spinner {
  display: block;
}

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

/* ============================================================
   ЭКРАН БЛАГОДАРНОСТИ
============================================================ */
.thanks {
  text-align: center;
  padding: 20px 10px;
  animation: thanks-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes thanks-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.thanks__heart {
  font-size: 3.4rem;
  animation: heart-beat 1.4s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
  45% { transform: scale(1.12); }
}

.thanks__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 2.8rem);
  color: var(--rose-deep);
  margin: 10px 0;
}

.thanks__text {
  max-width: 440px;
  margin: 0 auto 24px;
  color: var(--ink);
}

.thanks__again {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.thanks__again:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* ============================================================
   ПОДВАЛ
============================================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 30px 24px 50px;
  color: var(--ink-soft);
}

.footer__ornament {
  display: block;
  font-size: 1.4rem;
  color: var(--rose);
  margin-bottom: 10px;
}

.footer p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}

/* ============================================================
   ДОСТУПНОСТЬ: меньше движения при системной настройке
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

  .petals {
    display: none;
  }
}
