/*
Theme Name: Wedding Invitation
Theme URI: https://wedding.po-plan.ru
Author: po-plan
Description: Свадебное приглашение Елизаветы и Ивана — 15.08.2026. Кастомная тема с Florisel script, плавными анимациями и Yandex картой.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: wedding
*/

/* ============================================
   V1 · LIGHT BOTANICAL  (брендбук-палитра, наши шрифты)
   Florisel — имена · Lora — тайтлы · Raleway — текст
   ============================================ */

@font-face {
  font-family: 'Florisel';
  src: url('assets/fonts/Floriselscript.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* брендбук */
  --c-bg:        #f6f7ec;
  --c-bg-soft:   #ede8d6;
  --c-paper:     #ffffff;
  --c-ink:       #4b4b4b;
  --c-ink-soft:  #7a7466;
  --c-violet:    #917da5;
  --c-beige:     #a8916b;        /* тёплый беж — для акцентов в карточках main page */
  --c-lavender:  #c8b9d7;
  --c-peach:     #f4c8a4;
  --c-green:     #c1d1b4;
  --c-pink:      #f6c8ca;
  --c-sky:       #c9deef;
  --c-gold-1:    #b8924a;
  --c-gold-2:    #e8c97b;
  --c-line:      rgba(145, 125, 165, 0.18);

  /* fonts */
  --f-serif:  'Lora', 'Times New Roman', serif;
  --f-sans:   'Raleway', system-ui, sans-serif;
  --f-script: 'Florisel', cursive;

  /* layout */
  --pad-y: clamp(70px, 9vw, 130px);
  --pad-x: clamp(20px, 5vw, 80px);
  --max:   1320px;
  --radius: 18px;

  /* easing tokens (премиум-кривые) */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);    /* expo-out */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* circ-in-out */
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--c-gold-1) var(--c-bg);
}
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; text-decoration: none; }


/* ============ SELECTION + SCROLLBAR ============ */
::selection {
  background: rgba(184, 146, 74, 0.35);
  color: var(--c-ink);
}
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold-1));
  border-radius: 10px;
  border: 2px solid var(--c-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--c-gold-1); }


/* ============ NOISE OVERLAY ============ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}


/* ============ PRELOADER ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 0 var(--pad-x);
  background: rgba(15, 14, 12, 0.55);
  backdrop-filter: blur(32px) saturate(1.25);
  -webkit-backdrop-filter: blur(32px) saturate(1.25);
  transition: opacity 0.9s var(--ease-in-out), visibility 0.9s var(--ease-in-out);
}
.preloader.is-hiding {
  opacity: 0;
  visibility: hidden;
}

/* дата, заливается слева направо — белым */
.preloader__date {
  display: inline-block;
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.5em;
  line-height: 1.2;
  padding: 0.1em 0.1em;
  white-space: nowrap;
  text-transform: uppercase;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 45%,
    rgba(255, 255, 255, 0.35) 55%,
    rgba(255, 255, 255, 0.15) 100%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pre-fill 1.5s var(--ease-out) 0.2s forwards;
}
@keyframes pre-fill {
  from { background-position: 100% 0; }
  to   { background-position: 0% 0; }
}


/* ============ REVEAL ============ */
/* секции — мягкий opacity fade всей секции */
[data-reveal] {
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-reveal].is-revealed {
  opacity: 1;
}

/* волна снизу: каждый ребёнок поднимается со своей задержкой
   длина пути 70px, длительность 2.6s — заметно и плавно */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity 2.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 2.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-stagger].is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}
[data-stagger].is-revealed > *:nth-child(1) { transition-delay: 0s; }
[data-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.35s; }
[data-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.70s; }
[data-stagger].is-revealed > *:nth-child(4) { transition-delay: 1.05s; }
[data-stagger].is-revealed > *:nth-child(5) { transition-delay: 1.40s; }

/* карточки — все вместе, без stagger, как один блок (по просьбе: ровно как другие) */
.cards > * {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity 2.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 2.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.cards.is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}
/* перебиваем nth-child задержки из [data-stagger] — все одновременно */
.cards.is-revealed > *:nth-child(1),
.cards.is-revealed > *:nth-child(2),
.cards.is-revealed > *:nth-child(3),
.cards.is-revealed > *:nth-child(4) {
  transition-delay: 0s;
}


/* ============ HELPERS ============ */
.eyebrow {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--c-violet);
}


/* ============ BLOCK 1 · HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}

.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  will-change: transform;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.78) contrast(1.05);
  animation: hero-ken 30s var(--ease-in-out) infinite alternate;
}
@keyframes hero-ken {
  from { transform: scale(1.00); }
  to   { transform: scale(1.08); }
}

.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 50% 55%, rgba(31,32,26,0.4), rgba(0,0,0,0) 70%),
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.05) 35%, rgba(31,32,26,0.55) 100%);
}

.hero__content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 var(--pad-x);
  max-width: 1100px;
}

/* hero — три элемента поднимаются СНИЗУ ВВЕРХ ПОСЛЕДОВАТЕЛЬНО */
.hero__top,
.hero__names,
.hero__date {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity 2.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 2.6s cubic-bezier(0.22, 1, 0.36, 1);
}
body.is-loaded .hero__top   { opacity: 1; transform: translateY(0); transition-delay: 0s; }
body.is-loaded .hero__names { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
body.is-loaded .hero__date  { opacity: 1; transform: translateY(0); transition-delay: 1.2s; }

.hero__top {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86);
  margin-bottom: clamp(28px, 4vw, 44px);
}

/* hero names — Florisel + градиент белый→золото на родителе (анимация на этом же блоке как unit) */
.hero__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(68px, 13vw, 180px);
  line-height: 1.05;
  padding: 0.08em 0.05em;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3e6c8 60%, #e8c97b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 40px rgba(0,0,0,0.35);
}
.hero__name {
  display: inline-block;
  line-height: 1.05;
}

.hero__date {
  margin-top: clamp(24px, 3.5vw, 40px);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.45em;
  color: #fff;
}



/* ============ BLOCK 2 · GREETING ============ */
.greeting {
  padding: clamp(40px, 5vw, 70px) var(--pad-x);
  background: var(--c-bg);
  text-align: center;
}
.greeting__inner {
  max-width: 600px;
  margin: 0 auto;
}
.greeting__floral {
  display: block;
  width: 600px;
  max-width: 100%;
  height: auto;
  margin: 0 auto clamp(16px, 2vw, 24px);
  opacity: 0.6;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
.greeting__hello {
  font-family: var(--f-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.15;
  margin-bottom: clamp(18px, 2.2vw, 28px);
  color: var(--c-ink);
}
.greeting__text {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  color: var(--c-ink-soft);
  margin-bottom: clamp(18px, 2.2vw, 26px);
}
.greeting__date {
  display: inline-block;
  font-family: var(--f-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.2;
  padding: 0.1em 0.08em;
  letter-spacing: 0.06em;
  margin: 0;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2) 50%, var(--c-gold-1));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ============ BLOCK 3 · DETAILS ============ */
.details {
  width: 100%;
  background: var(--c-bg-soft);
  padding: var(--pad-y) var(--pad-x);
}
.details__inner {
  max-width: var(--max);
  margin: 0 auto;
}
.details__head {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.details__title {
  margin-top: 14px;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.details__title-em {
  font-style: italic;
  font-weight: 400;
  color: var(--c-gold-1);
}

.details__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: stretch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(14px, 1.6vw, 20px);
  align-content: stretch;
}
.card {
  background: var(--c-paper);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--c-line);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 20px 40px -28px rgba(75,75,75,0.18);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 28px 50px -28px rgba(75,75,75,0.25);
}
.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(168, 145, 107, 0.14);
  color: var(--c-beige);
}
.card__icon svg { width: 22px; height: 22px; }
.card__body { width: 100%; min-width: 0; }
.card__label {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-beige);
  margin-bottom: 10px;
}
.card__text {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
  color: var(--c-ink);
}
.card__text span { font-weight: 600; color: var(--c-beige); }

.swatches { margin-top: 14px; display: flex; gap: 8px; }
.swatches span {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}


/* venue */
.venue {
  position: relative;
  width: 100%;
  min-height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(75,75,75,0.35);
  isolation: isolate;
}
.venue__video {
  position: absolute; inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  animation: video-zoom 30s var(--ease-in-out) infinite alternate;
}
@keyframes video-zoom {
  from { transform: scale(1.00); }
  to   { transform: scale(1.06); }
}
.venue__shade-tl {
  position: absolute;
  top: 0; left: 0;
  width: 55%; height: 45%;
  z-index: 1;
  background: radial-gradient(
    ellipse at top left,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.3)  35%,
    rgba(0,0,0,0)    75%
  );
  pointer-events: none;
}
.venue__logo {
  position: absolute;
  top: clamp(18px, 2.5vw, 28px);
  left: clamp(18px, 2.5vw, 28px);
  width: clamp(90px, 11vw, 140px);
  height: clamp(64px, 8vw, 100px);
  z-index: 2;
}
.venue__logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.55));
}

.venue__actions {
  position: absolute;
  z-index: 2;
  left: clamp(14px, 2vw, 22px);
  right: clamp(14px, 2vw, 22px);
  bottom: clamp(14px, 2vw, 22px);
  display: flex;
  gap: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px;
  box-shadow:
    0 14px 40px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-glass {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border-radius: 100px;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.btn-glass svg { width: 16px; height: 16px; }
.btn-glass:hover { background: rgba(255,255,255,0.18); }
.btn-glass--solid {
  background: rgba(255,255,255,0.94);
  color: var(--c-ink);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.btn-glass--solid:hover {
  background: #ffffff;
  transform: translateY(-1px);
}


/* ============ BLOCK 4 · MAP ============ */
.map {
  background: var(--c-bg);
  padding: 0;
}
.map__wrap {
  width: 100%;
  height: clamp(520px, 78vh, 760px);
  overflow: hidden;
  position: relative;
}
.map__wrap iframe {
  display: block;
  width: 100%; height: 100%;
  border: 0;
  pointer-events: none;        /* по умолчанию iframe не получает события — колесо не зумит карту */
  transition: filter 0.4s var(--ease-out);
}
.map__guard {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: clamp(20px, 3vw, 36px);
  font: inherit;
}
.map__hint {
  display: inline-block;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-ink);
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.map__wrap:hover .map__hint {
  opacity: 1;
  transform: translateY(0);
}
.map__wrap.is-active .map__guard { display: none; }
.map__wrap.is-active iframe { pointer-events: auto; }


/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .details__grid    { grid-template-columns: 1fr; }
  .venue            { min-height: 0; aspect-ratio: 4/5; max-width: 600px; margin: 0 auto; width: 100%; }
  .cards            { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  /* на мобиле карточки в один столбец И по высоте контента — без растяжения */
  .cards            { grid-template-columns: 1fr; grid-auto-rows: auto; align-items: start; }
  .card             { align-self: start; }
  .venue            { aspect-ratio: 4/5; }
}
@media (max-width: 560px) {
  /* hero на мобиле — всё крупнее ~на 30% */
  .hero__top        { letter-spacing: 0.35em; font-size: 14px; margin-bottom: 36px; }
  .hero__names      { font-size: 90px; }
  .hero__date       { letter-spacing: 0.35em; font-size: 18px; margin-top: 32px; }

  .btn-glass        { letter-spacing: 0.15em; padding: 12px 14px; }
  .btn-glass span   { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__bg img,
  .venue__video,
  .preloader__date  { animation: none !important; }
  .hero__name       { opacity: 1; transform: none; transition: none; }
  [data-reveal], [data-stagger] > * { opacity: 1; transform: none; transition: none; }
}


/* ============================================
   PAGE: ПОСЛЕ СВАДЬБЫ
   ============================================ */

.section-title {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin: 14px 0 0;
}
.section-title__em {
  font-style: italic;
  color: var(--c-gold-1);
  font-weight: 400;
}


/* ============ HERO «После праздника» ============ */
.after-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}
.after-hero__bg { position: absolute; inset: 0; z-index: 0; }
.after-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.55) contrast(1.05) grayscale(0.2);
}
.after-hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 55%, rgba(31,32,26,0.35), rgba(0,0,0,0) 70%),
    linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(31,32,26,0.4) 100%);
}
.after-hero__content {
  position: relative; z-index: 1;
  text-align: center;
  padding: clamp(60px, 9vw, 100px) var(--pad-x);
  max-width: 900px;
}
.after-hero__top {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86);
  margin-bottom: clamp(22px, 3vw, 36px);
}
.after-hero__title {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: clamp(38px, 6vw, 84px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(20px, 3vw, 36px);
  color: #fff;
}
.after-hero__sub {
  display: inline-block;
  font-family: var(--f-script);
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.4;
  padding: 0.12em 0.08em;
  background: linear-gradient(180deg, #ffffff 0%, #f3e6c8 60%, #e8c97b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ============ 1. БЛАГОДАРНОСТЬ ============ */
.thanks {
  padding: clamp(36px, 4.5vw, 56px) var(--pad-x);
  background: var(--c-bg);
  text-align: center;
}
.thanks__inner { max-width: 920px; margin: 0 auto; }
.thanks__lead {
  max-width: 580px;
  margin: clamp(14px, 2vw, 22px) auto clamp(28px, 3.5vw, 40px);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  color: var(--c-ink-soft);
}

/* кастомный плеер с постером + кнопка плей в центре */
.thanks-player {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(75,75,75,0.4);
}
.thanks-player__video {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.thanks-player__btn {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}
.thanks-player__btn::after {
  /* лёгкое затемнение поверх постера */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 35%, rgba(0,0,0,0.35) 100%);
  z-index: 0;
  pointer-events: none;
}
.thanks-player__btn-circle {
  position: relative;
  z-index: 1;
  width: clamp(72px, 9vw, 100px);
  height: clamp(72px, 9vw, 100px);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2));
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 8px rgba(255,255,255,0.12);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.thanks-player__btn:hover .thanks-player__btn-circle {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 12px rgba(255,255,255,0.18);
}
.thanks-player__btn svg {
  position: absolute;
  z-index: 2;
  width: clamp(26px, 3vw, 34px);
  height: clamp(26px, 3vw, 34px);
  color: #fff;
  margin-left: 5px; /* оптическая центровка треугольника */
}
.thanks-player.is-playing .thanks-player__btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ============ 2. ПОЗДРАВЛЕНИЯ ============ */
.cong {
  padding: clamp(40px, 5vw, 64px) var(--pad-x);
  background: var(--c-bg-soft);
  text-align: center;
}
.cong__inner { max-width: 1180px; margin: 0 auto; }
.cong__lead {
  max-width: 600px;
  margin: clamp(18px, 2.5vw, 26px) auto clamp(28px, 3.5vw, 40px);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  color: var(--c-ink-soft);
}

/* CTA "Оставить поздравление" */
.cong__actions {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 60px);
}
.cong-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-violet);
  border: 1px solid var(--c-violet);
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(145, 125, 165, 0.5);
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.cong-cta:hover {
  background: #7c6890;
  border-color: #7c6890;
  transform: translateY(-2px);
  box-shadow: 0 20px 36px -10px rgba(145, 125, 165, 0.55);
}
.cong-cta svg { width: 18px; height: 18px; }

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 12, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: modal-bg-in 0.3s var(--ease-out);
}
.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--c-paper);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 48px);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.5);
  animation: modal-in 0.4s var(--ease-out);
}
@keyframes modal-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  background: rgba(168, 145, 107, 0.1);
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--c-ink);
  cursor: pointer;
  transition: background 0.25s var(--ease-out);
}
.modal__close:hover { background: rgba(168, 145, 107, 0.2); }
.modal__title {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 28px);
  margin: 0 0 8px;
  color: var(--c-ink);
  padding-right: 40px;
}
.modal__sub {
  font-family: var(--f-sans);
  font-size: 13px;
  color: var(--c-ink-soft);
  margin: 0 0 24px;
  padding-right: 40px;
}

/* в модалке убираем у формы свою рамку — внешний контейнер уже даёт */
.modal .cong-form {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  max-width: none;
}

/* форма */
.cong-form {
  max-width: 640px;
  margin: 0 auto clamp(40px, 5vw, 60px);
  background: var(--c-paper);
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  padding: clamp(24px, 3.5vw, 40px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 30px 60px -30px rgba(75,75,75,0.18);
  text-align: left;
}
.cong-form__row { margin-bottom: 22px; }
.cong-field { display: block; }
.cong-field__label {
  display: block;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-violet);
  margin-bottom: 12px;
}
.cong-field input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--f-sans);
  font-size: 16px;
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: 12px;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.cong-field input[type="text"]:focus {
  outline: none;
  border-color: var(--c-violet);
  background: #fff;
}

/* === АВАТАР-КРАПЕР === */
.avatar-uploader {
  display: flex;
  align-items: center;
  gap: 22px;
}
.avatar-uploader__circle {
  position: relative;
  flex: 0 0 auto;
  width: 120px; height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-bg);
  cursor: grab;
  user-select: none;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,0.2);
  touch-action: none;
}
.avatar-uploader__circle:active { cursor: grabbing; }
.avatar-uploader__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--ap, 50% 50%);
  display: none;
  pointer-events: none;
}
.avatar-uploader__circle.is-filled .avatar-uploader__img { display: block; }
.avatar-uploader__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--c-violet);
}
.avatar-uploader__circle.is-filled .avatar-uploader__placeholder { display: none; }
.avatar-uploader__placeholder svg { width: 36px; height: 36px; }
.avatar-uploader__side {
  flex: 1;
  min-width: 0;
}
.avatar-uploader__btn {
  display: inline-block;
  padding: 10px 18px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-violet);
  background: rgba(145, 125, 165, 0.10);
  border: 1px solid rgba(145, 125, 165, 0.35);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.avatar-uploader__btn:hover {
  background: rgba(145, 125, 165, 0.18);
  border-color: var(--c-violet);
}
.avatar-uploader__hint {
  margin: 10px 0 0;
  font-family: var(--f-sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--c-ink-soft);
}

/* drop-зона видео */
.cong-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 18px;
  background: var(--c-bg);
  border: 1.5px dashed rgba(145, 125, 165, 0.45);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.cong-drop:hover,
.cong-drop.is-drag {
  border-color: var(--c-violet);
  background: rgba(145, 125, 165, 0.06);
}
.cong-drop.is-filled {
  border-style: solid;
  background: rgba(145, 125, 165, 0.08);
}
.cong-drop__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(145, 125, 165, 0.14);
  color: var(--c-violet);
}
.cong-drop__icon svg { width: 18px; height: 18px; }
.cong-drop__title {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--c-ink);
}
.cong-drop__hint {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-ink-soft);
}
.cong-drop__preview {
  display: none;
  margin-top: 4px;
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--c-violet);
  font-weight: 500;
  word-break: break-all;
}
.cong-drop.is-filled .cong-drop__preview { display: block; }
.cong-drop.is-filled .cong-drop__hint { display: none; }

.cong-form__actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}
.cong-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c-violet);
  border: 1px solid var(--c-violet);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.cong-submit:hover { background: #7c6890; border-color: #7c6890; transform: translateY(-1px); }
.cong-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.cong-submit__spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cong-spin 0.8s linear infinite;
}
.cong-submit.is-loading .cong-submit__spinner { display: inline-block; }
.cong-submit.is-loading .cong-submit__text { opacity: 0.5; }
@keyframes cong-spin { to { transform: rotate(360deg); } }

.cong-form__feedback {
  margin-top: 16px;
  font-family: var(--f-sans);
  font-size: 13px;
  text-align: center;
  min-height: 1.2em;
}
.cong-form__feedback.is-error { color: #b85a4a; }
.cong-form__feedback.is-success { color: var(--c-gold-1); }

.cong-form__progress {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cong-form__progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(145, 125, 165, 0.12);
  border-radius: 100px;
  overflow: hidden;
}
.cong-form__progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--c-gold-1), var(--c-gold-2));
  border-radius: 100px;
  transition: width 0.25s ease;
}
.cong-form__progress-label {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-violet);
  min-width: 42px;
  text-align: right;
}


/* === КАРТОЧКА-ПОСТ (премиум, 3D tilt) === */
.cong-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
  text-align: left;
  perspective: 1400px;   /* для 3D-tilt дочерних карточек */
}
.cong-empty {
  grid-column: 1 / -1;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--c-ink-soft);
  text-align: center;
  padding: 60px 20px;
}

.post-card {
  position: relative;
  background: var(--c-paper);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 1px 0 rgba(0,0,0,0.02),
    0 18px 40px -22px rgba(75,75,75,0.22);
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transform:
    rotateX(var(--tx-rx, 0deg))
    rotateY(var(--tx-ry, 0deg))
    translateZ(0);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out);
  animation: cong-card-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform;
}

/* верхний тонкий золотой акцент */
.post-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--c-gold-2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  z-index: 3;
}
/* магнитный «блик» света за курсором */
.post-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--gx, 50%) var(--gy, 50%),
    rgba(255, 248, 220, 0.22),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  z-index: 2;
  mix-blend-mode: soft-light;
}
.post-card:hover {
  border-color: rgba(232, 201, 123, 0.45);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 30px 60px -20px rgba(184, 146, 74, 0.25),
    0 50px 100px -30px rgba(75,75,75,0.3),
    0 0 0 1px rgba(232,201,123,0.25);
}
.post-card:hover::before { opacity: 1; }
.post-card:hover .post-card__shine { opacity: 1; }

@keyframes cong-card-in {
  0%   {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(8px);
  }
  60%  {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
.cong-grid .post-card:nth-child(1) { animation-delay: 0s;    }
.cong-grid .post-card:nth-child(2) { animation-delay: 0.10s; }
.cong-grid .post-card:nth-child(3) { animation-delay: 0.20s; }
.cong-grid .post-card:nth-child(4) { animation-delay: 0.30s; }
.cong-grid .post-card:nth-child(5) { animation-delay: 0.40s; }
.cong-grid .post-card:nth-child(6) { animation-delay: 0.50s; }
.cong-grid .post-card:nth-child(n+7) { animation-delay: 0.55s; }

.post-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  position: relative;
  z-index: 1;
}
.post-card__avatar {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-bg);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px rgba(168, 145, 107, 0.35),
    0 6px 16px rgba(0,0,0,0.08);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.post-card:hover .post-card__avatar {
  transform: scale(1.06);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--c-gold-2),
    0 12px 28px rgba(232, 201, 123, 0.4);
}
.post-card__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--ap, 50% 50%);
}
.post-card__meta {
  flex: 1;
  min-width: 0;
}
.post-card__name {
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-ink);
  line-height: 1.2;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card__date {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-ink-soft);
  margin: 0;
}
.post-card__pill {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-violet);
  padding: 4px 10px;
  background: rgba(145, 125, 165, 0.12);
  border-radius: 100px;
  white-space: nowrap;
}

.post-card__media {
  position: relative;
  background: #000;
  aspect-ratio: 9/16;
  max-height: 540px;
  overflow: hidden;
}
.post-card__media video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.post-card__foot {
  padding: 14px 18px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-card__sig {
  font-family: var(--f-script);
  font-size: 22px;
  line-height: 1;
  padding: 0.1em 0;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ============ 3. ГАЛЕРЕЯ ============ */
.gallery {
  padding: clamp(40px, 5vw, 64px) var(--pad-x);
  background: var(--c-bg);
  text-align: center;
}
.gallery__inner { max-width: 1320px; margin: 0 auto; }
.gallery__lead {
  max-width: 600px;
  margin: clamp(18px, 2.5vw, 26px) auto clamp(40px, 5.5vw, 60px);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  color: var(--c-ink-soft);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 220px;
  gap: clamp(8px, 1vw, 14px);
}
.gallery-grid > *:nth-child(4n+1) { grid-row: span 2; }
.gallery-grid > *:nth-child(7n+3) { grid-row: span 2; }
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 18px -10px rgba(75,75,75,0.25);
  display: block;
  background: var(--c-bg-soft);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-grid--placeholder .gallery-item--placeholder {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(145,125,165,0.06), rgba(145,125,165,0.06) 10px, transparent 10px, transparent 20px),
    linear-gradient(135deg, var(--c-bg-soft), var(--c-paper));
  border: 1px dashed rgba(145,125,165,0.25);
  text-align: center;
  padding: 16px;
  border-radius: 14px;
}
.gallery-item__hint {
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}


/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 14, 12, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 60px);
}
.lightbox[hidden] { display: none; }
.lightbox__close {
  position: absolute;
  top: clamp(16px, 2vw, 28px);
  right: clamp(16px, 2vw, 28px);
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease-out);
}
.lightbox__close:hover { background: rgba(255,255,255,0.1); }
.lightbox__inner {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  display: grid;
  place-items: center;
}
.lightbox__inner img,
.lightbox__inner video {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  display: block;
}


/* ============ BACK ============ */
.after-foot {
  padding: 40px 20px;
  text-align: center;
  background: var(--c-ink);
}
.after-foot__link {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px;
  transition: background 0.3s var(--ease-out);
  display: inline-block;
}
.after-foot__link:hover { background: rgba(255,255,255,0.08); }


/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .avatar-uploader     { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .avatar-uploader__circle { margin: 0 auto; }
  .gallery-grid        { grid-auto-rows: 180px; grid-template-columns: repeat(2, 1fr); }
  .gallery-grid > *:nth-child(4n+1) { grid-row: span 1; }
  .gallery-grid > *:nth-child(7n+3) { grid-row: span 1; }
}
