/* =====================================================================
   ПРИГЛАШЕНИЕ НА СВАДЬБУ — стили
   Эстетика: editorial romantic floral
   ===================================================================== */

:root {
  /* Палитра */
  --cream:      #FBF7F0;
  --cream-2:    #F5EDE2;
  --blush:      #EFD9D1;
  --rose:       #C98B7E;
  --rose-deep:  #A8685C;
  --sage:       #9CA88B;
  --sage-deep:  #6E7D5E;
  --gold:       #BFA46F;
  --ink:        #4A413B;
  --ink-soft:   #837871;

  /* Типографика */
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --script:  "Caveat", cursive;
  --sans:    "Montserrat", system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--display);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #fff 0%, var(--cream) 45%, var(--cream-2) 100%);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Текстурный зерновой оверлей ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================ ТИПОГРАФИКА ===================== */
.eyebrow,
.section__eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.script-accent {
  font-family: var(--script);
  font-size: 2.1rem;
  color: var(--rose);
  line-height: 1;
}
.script-accent--lg { font-size: 2.8rem; }

.section__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.3rem);
  letter-spacing: 0.01em;
}

.section__sub {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* Декоративная метка-листик в заголовках секций */
.section__head { text-align: center; margin-bottom: 3.2rem; }
.leaf-mark {
  display: block; width: 40px; height: 40px; margin: 0 auto 1.1rem;
  background: var(--sage);
  -webkit-mask: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C7 6 4 11 12 22 20 11 17 6 12 2Z' fill='black'/%3E%3Cpath d='M12 5v15' stroke='white' stroke-width='1'/%3E%3C/svg%3E");
          mask: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C7 6 4 11 12 22 20 11 17 6 12 2Z' fill='black'/%3E%3Cpath d='M12 5v15' stroke='white' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 0.8;
}

/* ============================== LAYOUT ======================== */
.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 11vw, 8rem) clamp(1.4rem, 5vw, 3rem);
}

/* ============================== HERO ========================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.hero__inner { position: relative; z-index: 2; }

.eyebrow { margin-bottom: 1.6rem; }

.couple {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
}
.couple__name { display: block; }
.couple__amp {
  display: block;
  font-family: var(--script);
  color: var(--rose);
  font-size: 0.42em;
  margin: 0.1em 0;
  font-weight: 500;
}

.hero__rule {
  display: flex; align-items: center; justify-content: center;
  gap: 0.8rem; margin: 1.8rem auto 1.4rem; max-width: 320px;
}
.hero__rule span {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero__rule::before, .hero__rule::after {
  content: "✦"; color: var(--gold); font-size: 0.7rem;
}

.hero__date {
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--ink);
}
.hero__dow {
  display: block; font-style: italic; font-family: var(--display);
  text-transform: none; letter-spacing: 0.02em;
  font-size: 1.25rem; color: var(--ink-soft); margin-top: 0.5rem;
}

/* Веточки в углах */
.sprig { position: absolute; color: var(--sage-deep); pointer-events: none; }
.sprig--tl {
  top: -10px; left: -20px; width: 220px; height: 220px;
  transform: rotate(180deg) scaleX(-1); opacity: 0.55;
}
.sprig--br {
  bottom: -10px; right: -20px; width: 220px; height: 220px; opacity: 0.55;
}

/* Подсказка прокрутки */
.scroll-hint {
  position: absolute; bottom: 2.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 1px solid var(--rose);
  border-radius: 20px; display: grid; place-items: center;
}
.scroll-hint span {
  width: 4px; height: 8px; border-radius: 4px; background: var(--rose);
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(-7px); opacity: 0; }
  40% { opacity: 1; }
  80%, 100% { transform: translateY(8px); opacity: 0; }
}

/* ========================= ОБРАТНЫЙ ОТСЧЁТ ==================== */
.countdown { text-align: center; }
.countdown .section__eyebrow { margin-top: 0.4rem; }
.countdown__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.6rem, 2vw, 2rem); max-width: 720px; margin: 0 auto;
}
.cd {
  position: relative; padding: 1.6rem 0.5rem;
  border: 1px solid rgba(191,164,111,0.35);
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}
.cd__num {
  display: block; font-family: var(--display); font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
}
.cd__label {
  display: block; margin-top: 0.7rem; font-family: var(--sans);
  font-size: 0.62rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ====================== ПРИГЛАШЕНИЕ / ТЕКСТ =================== */
.invite { text-align: center; }
.invite__inner { max-width: 680px; margin: 0 auto; }
.invite .script-accent { margin-bottom: 1.2rem; }
.invite__text {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-style: italic; line-height: 1.65; color: var(--ink);
}

/* ========================== НАША ИСТОРИЯ ===================== */
.story {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: center;
}
.story__photo { position: relative; }
.story__photo img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 2px; filter: saturate(0.92);
  box-shadow: 0 30px 60px -30px rgba(74,65,59,0.45);
}
.story__photo::after {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(255,255,255,0.55); pointer-events: none; border-radius: 2px;
}
.sprig--story {
  width: 150px; height: 150px; bottom: -46px; right: -32px;
  color: var(--rose); opacity: 0.7; z-index: 2;
}
.story__body { margin-top: 1.2rem; font-size: 1.2rem; }

/* ========================== ПРОГРАММА ДНЯ ==================== */
.timeline { list-style: none; max-width: 620px; margin: 0 auto; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--gold), transparent);
  transform: translateX(-50%);
}
.tl-item {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1.2rem; padding: 1.3rem 0;
}
.tl-item__dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--rose);
  box-shadow: 0 0 0 5px var(--cream);
}
.tl-item__time {
  font-family: var(--display); font-weight: 600;
  font-size: 1.7rem; color: var(--rose-deep);
}
.tl-item__body { }
.tl-item__title { font-size: 1.35rem; font-weight: 500; }
.tl-item__note { font-family: var(--sans); font-weight: 300; font-size: 0.8rem;
  color: var(--ink-soft); letter-spacing: 0.02em; }
/* чередование сторон */
.tl-item:nth-child(odd)  .tl-item__time { text-align: right; }
.tl-item:nth-child(odd)  .tl-item__body { text-align: left; }
.tl-item:nth-child(even) .tl-item__time { order: 3; text-align: left; }
.tl-item:nth-child(even) .tl-item__body { order: 1; text-align: right; }

/* ============================ ГАЛЕРЕЯ ======================== */
.gallery__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 12px; gap: 16px;
}
.gallery__item {
  overflow: hidden; border-radius: 2px; position: relative;
  box-shadow: 0 18px 40px -28px rgba(74,65,59,0.5);
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s ease;
  filter: saturate(0.9);
}
.gallery__item:hover img { transform: scale(1.06); filter: saturate(1.05); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
  pointer-events: none;
}

/* ============================ ДРЕСС-КОД ====================== */
.dresscode { text-align: center; }
.dresscode__inner { max-width: 620px; margin: 0 auto; }
.dresscode .section__sub { margin: 1rem auto 2rem; }
.palette { display: flex; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }
.palette span {
  width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 0 8px 20px -8px rgba(74,65,59,0.5), inset 0 0 0 1px rgba(255,255,255,0.5);
  transition: transform 0.4s var(--ease);
}
.palette span:hover { transform: translateY(-6px) scale(1.05); }

/* ============================= ЛОКАЦИЯ ======================= */
.venue__inner {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: clamp(1.6rem, 5vw, 3.5rem); align-items: center;
}
.venue__name { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 500; }
.venue__addr { font-style: italic; color: var(--ink-soft); margin: 0.6rem 0 1rem; }
.venue__note {
  font-family: var(--sans); font-weight: 300; font-size: 0.85rem;
  color: var(--ink-soft); line-height: 1.7; margin-bottom: 1.8rem;
  padding-left: 1rem; border-left: 2px solid var(--blush);
}
.venue__map {
  border-radius: 2px; overflow: hidden;
  box-shadow: 0 25px 50px -28px rgba(74,65,59,0.5);
  border: 1px solid rgba(191,164,111,0.35);
}
.venue__map iframe { width: 100%; height: 360px; border: 0; display: block;
  filter: grayscale(0.25) sepia(0.12); }

/* ============================== КНОПКИ ======================= */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 400;
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--rose-deep); text-decoration: none;
  padding: 1rem 2.3rem; border: 1px solid var(--rose);
  border-radius: 2px; position: relative; overflow: hidden;
  transition: color 0.5s var(--ease);
  z-index: 0;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--rose); transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.btn:hover { color: #fff; }
.btn:hover::before { transform: translateY(0); }
.btn--solid { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn--solid::before { background: var(--rose-deep); }

/* =============================== RSVP ======================== */
.rsvp { text-align: center; overflow: hidden; }
.rsvp__inner { max-width: 620px; margin: 0 auto; position: relative; z-index: 2; }
.rsvp .script-accent { margin-bottom: 0.6rem; }
.rsvp .section__sub { margin: 1.1rem auto 2.2rem; }
.rsvp__deadline {
  margin-top: 1.4rem; font-family: var(--sans); font-weight: 300;
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.sprig--rsvp {
  width: 260px; height: 260px; top: -40px; left: -60px;
  color: var(--sage); opacity: 0.4; transform: rotate(20deg);
}

/* ============================== ФУТЕР ======================== */
.footer {
  text-align: center; padding: 4rem 1.5rem 3rem;
  background: linear-gradient(var(--cream-2), var(--blush));
  position: relative;
}
.footer__monogram {
  font-family: var(--script); font-size: 3.4rem; color: var(--rose-deep);
  line-height: 1; margin-bottom: 0.6rem;
}
.footer__date {
  font-family: var(--sans); font-weight: 300; letter-spacing: 0.3em;
  text-transform: uppercase; font-size: 0.78rem; color: var(--ink);
}
.footer__hashtag {
  font-style: italic; color: var(--rose); margin-top: 0.8rem; font-size: 1.15rem;
}
.footer__top {
  display: inline-block; margin-top: 1.6rem; font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none;
}
.footer__top:hover { color: var(--rose-deep); }

/* =========================== ЛЕПЕСТКИ ======================== */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.petal {
  position: absolute; top: -40px; width: 14px; height: 14px;
  background: var(--blush); opacity: 0.7;
  border-radius: 0 100% 0 100%;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translateY(-5vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  100% { transform: translateY(108vh) translateX(40px) rotate(360deg); opacity: 0; }
}

/* ====================== АНИМАЦИИ ПОЯВЛЕНИЯ ==================== */
.reveal, .reveal-group > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in-view, .reveal-group.in-view > * { opacity: 1; transform: none; }
.reveal-group.in-view > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-group.in-view > *:nth-child(2) { transition-delay: 0.3s; }
.reveal-group.in-view > *:nth-child(3) { transition-delay: 0.5s; }
.reveal-group.in-view > *:nth-child(4) { transition-delay: 0.7s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================ АДАПТИВ ========================= */
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story__photo { max-width: 420px; margin: 0 auto; }
  .sprig--story { right: 0; }
  .venue__inner { grid-template-columns: 1fr; }
  .venue__info { text-align: center; }
  .venue__note { border-left: 0; padding-left: 0; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .countdown__grid { grid-template-columns: repeat(2, 1fr); max-width: 360px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 14px; }
  .tl-item { grid-template-columns: 28px 1fr; text-align: left !important; gap: 1rem; }
  .tl-item__time { grid-column: 2; text-align: left !important; order: 2 !important; font-size: 1.4rem; }
  .tl-item__body { grid-column: 2; text-align: left !important; order: 3 !important; }
  .tl-item__dot { grid-row: 1 / span 2; }
  .sprig--tl, .sprig--br { width: 150px; height: 150px; }
}
