/* ═══════════════════════════════════════════════════════════
   Қыз ұзату той — стили приглашения
   Палитра: слоновая кость + золото + приглушённый шалфей
   ═══════════════════════════════════════════════════════════ */

:root {
  --cream: #f7f1e7;
  --cream-deep: #efe6d6;
  --ivory: #fdfaf4;
  --gold: #b8985a;
  --gold-soft: #cdb37e;
  --gold-deep: #9a7c44;
  --sage: #6f7f66;
  --sage-deep: #4d5a45;
  --ink: #3a352c;
  --ink-soft: #6b6455;
  --line: rgba(184, 152, 90, 0.35);
  --shadow: 0 18px 50px -24px rgba(77, 60, 30, 0.4);

  /* Playfair Display + PT Serif — с полной поддержкой казахских букв */
  --font-display: 'Playfair Display', 'PT Serif', 'Times New Roman', serif;
  --font-script: 'Playfair Display', 'PT Serif', serif;
  --font-body: 'Montserrat', 'PT Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(205, 179, 126, 0.12), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(111, 127, 102, 0.1), transparent 45%),
    var(--cream);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Орнаментальные разделители ─── */
.ornament {
  height: 46px;
  width: min(320px, 70%);
  margin: 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* Симметричный золотой флёр */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='46' viewBox='0 0 320 46'%3E%3Cg fill='none' stroke='%23b8985a' stroke-width='1.4'%3E%3Cpath d='M10 23 H120'/%3E%3Cpath d='M200 23 H310'/%3E%3Cpath d='M120 23 C138 8 150 8 160 23 C170 38 182 38 200 23'/%3E%3Cpath d='M120 23 C138 38 150 38 160 23 C170 8 182 8 200 23'/%3E%3C/g%3E%3Cg fill='%23b8985a'%3E%3Ccircle cx='160' cy='23' r='3.2'/%3E%3Ccircle cx='10' cy='23' r='2.4'/%3E%3Ccircle cx='310' cy='23' r='2.4'/%3E%3C/g%3E%3C/svg%3E");
}
.ornament--top { margin-bottom: 1.4rem; }
.ornament--bottom { margin-top: 1.4rem; transform: scaleY(-1); }

.floral {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.4rem;
  line-height: 1;
}

/* ═══════════ HERO ═══════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
  position: relative;
  background:
    linear-gradient(180deg, rgba(253, 250, 244, 0.6), rgba(247, 241, 231, 0.85)),
    radial-gradient(circle at 50% 30%, rgba(205, 179, 126, 0.22), transparent 55%);
}

.hero__frame {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(2.2rem, 6vw, 4rem) clamp(1.5rem, 6vw, 3.5rem);
  max-width: 560px;
  width: 100%;
  position: relative;
  background: rgba(253, 250, 244, 0.5);
  backdrop-filter: blur(2px);
  box-shadow: var(--shadow);
  animation: fadeUp 1.2s ease both;
}
.hero__frame::before,
.hero__frame::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--gold);
}
.hero__frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.hero__frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.hero__eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gold-deep);
  margin-bottom: 1.5rem;
}

.hero__names { margin: 0.5rem 0 1rem; }
.hero__bride {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(3.2rem, 12vw, 5.4rem);
  color: var(--sage-deep);
  line-height: 1.05;
  display: block;
  letter-spacing: 0.01em;
}
/* Мягкое золотое мерцание имени (с безопасным откатом) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__bride {
    background: linear-gradient(100deg, var(--sage-deep) 25%, var(--gold) 45%, var(--gold-soft) 50%, var(--gold) 55%, var(--sage-deep) 75%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 7s linear infinite;
  }
}

.hero__sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.hero__hostline {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.8rem;
}
.hero__hostline span { color: var(--gold-deep); font-weight: 600; }

.hero__date {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.hero__day {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 500;
  color: var(--gold-deep);
  line-height: 1;
}
.hero__month-year {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  text-transform: capitalize;
}
.hero__year { color: var(--gold-deep); letter-spacing: 0.14em; }

/* Подсказка прокрутки */
.scroll-hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-hint span {
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 3px;
  animation: scrollDot 1.6s infinite;
}

/* ═══════════ ОБЩИЕ СЕКЦИИ ═══════════ */
.section {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6rem) 1.5rem;
  text-align: center;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 5.5vw, 2.7rem);
  color: var(--sage-deep);
  margin-bottom: 1.6rem;
  position: relative;
}
.section__title::after {
  content: '';
  display: block;
  width: 54px;
  height: 1px;
  background: var(--gold);
  margin: 0.9rem auto 0;
}

/* ─── Приветствие ─── */
.greeting__text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto 1.4rem;
  line-height: 1.9;
}
.greeting__line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  color: var(--gold-deep);
}

/* ─── Таймер ─── */
.countdown { background: linear-gradient(180deg, transparent, rgba(239, 230, 214, 0.5), transparent); }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 3vw, 1.4rem);
  max-width: 520px;
  margin: 0 auto;
}
.countdown__cell {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(0.9rem, 3vw, 1.6rem) 0.4rem;
  box-shadow: var(--shadow);
}
.countdown__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 600;
  color: var(--gold-deep);
  line-height: 1;
}
.countdown__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown__done {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--sage-deep);
}

/* ─── Детали ─── */
.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.detail-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}
.detail-card:hover { transform: translateY(-6px); }
.detail-card__icon { font-size: 1.9rem; margin-bottom: 0.6rem; }
.detail-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--sage-deep);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.detail-card p { font-size: 0.98rem; }
.detail-card__muted { color: var(--ink-soft); font-size: 0.86rem; margin-top: 0.25rem; }

/* ─── Карта ─── */
.map__address {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.map__frame {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  background: var(--cream-deep); /* мягкий фон, пока карта грузится */
  min-height: 200px;
}
.map__frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: sepia(0.12) saturate(0.9); }
.map__buttons { display: flex; gap: 0.8rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }

/* ─── Кнопки ─── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 2.1rem;
  border-radius: 40px;
  cursor: pointer;
  border: 1px solid var(--gold);
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn--solid { background: var(--gold); color: var(--ivory); font-weight: 500; }
.btn--solid:hover { background: var(--gold-deep); }
.btn--solid:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--gold-deep); }
.btn--ghost:hover { background: var(--gold); color: var(--ivory); }

/* ─── Формы ─── */
.form { max-width: 500px; margin: 1.8rem auto 0; text-align: left; }
.rsvp__hint {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.form__row { margin-bottom: 1.3rem; }
.form__row > label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form input[type='text'],
.form input[type='number'],
.form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.25s ease;
}
.form input:focus,
.form textarea:focus { outline: none; border-color: var(--gold); }
.form textarea { resize: vertical; }

.form__choices { display: flex; flex-direction: column; gap: 0.6rem; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: var(--ivory);
  transition: all 0.25s ease;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 300;
}
.choice:hover { border-color: var(--gold-soft); }
.choice input { accent-color: var(--gold); width: 18px; height: 18px; }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(184, 152, 90, 0.08); }

.form__status { margin-top: 1rem; font-size: 0.95rem; min-height: 1.3rem; text-align: center; }
.form__status.ok { color: var(--sage-deep); }
.form__status.err { color: #b5544b; }

/* ─── Загрузка файлов ─── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.2rem 1.2rem;
  border: 1.5px dashed var(--gold-soft);
  border-radius: 10px;
  background: var(--ivory);
  cursor: pointer;
  text-align: center;
  transition: all 0.25s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--gold); background: rgba(184, 152, 90, 0.06); }
.dropzone__icon { font-size: 2rem; }
.dropzone__text { font-size: 0.98rem; color: var(--ink-soft); }
.dropzone__hint { font-size: 0.78rem; color: var(--ink-soft); opacity: 0.7; }

.upload__list { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.upload__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.88rem;
}
.upload__item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__item .size { color: var(--ink-soft); font-size: 0.78rem; }
.upload__item .remove { cursor: pointer; color: #b5544b; background: none; border: 0; font-size: 1.1rem; line-height: 1; }
.upload__bar { height: 3px; background: var(--cream-deep); border-radius: 3px; overflow: hidden; margin-top: 0.5rem; }
.upload__bar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.3s ease; }

.form #uploadSubmit { display: block; margin: 0 auto; }
.form #rsvpSubmit { display: block; margin: 0 auto; }

/* ═══════════ ПОДВАЛ ═══════════ */
.footer {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(239, 230, 214, 0.55));
}
.footer__names {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--sage-deep);
  margin: 0.6rem 0;
}
.footer__text { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-soft); }
.footer__date {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ═══════════ МУЗЫКА ═══════════ */
.music-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(253, 250, 244, 0.85);
  color: var(--gold-deep);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}
.music-toggle:hover { background: var(--gold); color: var(--ivory); }
.music-toggle.playing .music-icon { animation: spin 3s linear infinite; }

/* ═══════════ АНИМАЦИИ ═══════════ */
/* Контент виден по умолчанию; прячем для анимации только если работает JS */
.reveal { transition: opacity 0.9s ease, transform 0.9s ease; }
.js .reveal { opacity: 0; transform: translateY(28px); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: 220% center; } }
@keyframes fall { 0% { transform: translateY(-10vh) rotate(0); } 100% { transform: translateY(112vh) rotate(360deg); } }
@keyframes pulseRing { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 152, 90, 0.55); } 50% { box-shadow: 0 0 0 9px rgba(184, 152, 90, 0); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ═══════════ ЛЕПЕСТКИ ═══════════ */
.petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.petal {
  position: absolute;
  top: -10vh;
  color: var(--gold-soft);
  will-change: transform;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* ═══════════ КАЛЕНДАРЬ ═══════════ */
.cal {
  max-width: 360px;
  margin: 0 auto;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.3rem;
  box-shadow: var(--shadow);
}
.cal__month {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--sage-deep);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.cal__dow {
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  padding-bottom: 0.3rem;
}
.cal__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  color: var(--ink);
  border-radius: 50%;
}
.cal__day--empty { visibility: hidden; }
.cal__day--target {
  background: var(--gold);
  color: var(--ivory);
  font-weight: 600;
  animation: pulseRing 2.6s ease-in-out infinite;
}
.cal__actions { display: flex; gap: 0.7rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ═══════════ ПРОГРАММА (таймлайн) ═══════════ */
.timeline { max-width: 520px; margin: 1.8rem auto 0; text-align: left; }
.tl-item { display: flex; gap: 1rem; padding-bottom: 1.5rem; position: relative; }
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.4rem;
  bottom: -0.15rem;
  width: 1px;
  background: var(--line);
}
.tl-mark {
  width: 11px;
  height: 11px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--cream);
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.tl-time {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold-deep);
  min-width: 3.2rem;
  font-size: 1.05rem;
}
.tl-body h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--sage-deep); }
.tl-body p { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }

/* ═══════════ УСИЛЕННЫЕ ЭФФЕКТЫ ═══════════ */
.floral { transition: transform 0.6s ease; animation: floatY 6s ease-in-out infinite; }
.section__title::after { transition: width 0.6s ease; }
.reveal.visible .section__title::after { width: 54px; }
.btn { position: relative; overflow: hidden; }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px var(--gold-deep); }
.detail-card { transition: transform 0.4s ease, box-shadow 0.4s ease; }
.detail-card:hover { transform: translateY(-6px); box-shadow: 0 22px 45px -22px rgba(77, 60, 30, 0.5); }
.countdown__cell { transition: transform 0.4s ease; }
.countdown__cell:hover { transform: translateY(-4px); }

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

/* ═══════════ АДАПТИВ ═══════════ */
.music-toggle { top: calc(1.1rem + env(safe-area-inset-top, 0px)); }

@media (max-width: 600px) {
  .section { padding: clamp(2.8rem, 11vw, 4rem) 1.2rem; }
  .map__frame { aspect-ratio: 4 / 3; }
  .details__grid { gap: 1rem; }
  .map__buttons .btn { flex: 1 1 42%; text-align: center; }
}

@media (max-width: 420px) {
  .hero { padding: 2.2rem 0.85rem; }
  .hero__frame { padding: 1.9rem 1.1rem; }
  .hero__bride { font-size: clamp(2.7rem, 15vw, 3.6rem); }
  .hero__hostline { font-size: 0.72rem; letter-spacing: 0.08em; }
  .countdown__grid { gap: 0.4rem; }
  .countdown__cell { padding: 1rem 0.15rem; border-radius: 5px; }
  .countdown__num { font-size: clamp(1.5rem, 10vw, 2.1rem); }
  .countdown__label { font-size: 0.58rem; letter-spacing: 0.06em; }
  .section__title { margin-bottom: 1.3rem; }
}
