/* ============================================
   ВСЕ СТИЛИ САЙТА
   ============================================ */

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

:root {
  --cream: #F5F0E8;
  --cream-light: #FAF7F2;
  --burgundy: #8B2635;
  --burgundy-dark: #6B1D29;
  --burgundy-light: #A83245;
  --gold: #C9A96E;
  --gold-light: #D4BA85;
  --text-dark: #2C1810;
  --text-medium: #5A4035;
  --text-light: #8A7060;
  --heart-pink: #C4485B;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ====== SECTION 1: HERO ====== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;        /* контент к низу */
  padding-bottom: 18vh;              /* отступ от низа */
  text-align: center;
  overflow: hidden;
  background: #111;
}

/* === Двухслойный фон ===
   Слой 1 (.hero-bg-blur) — увеличенная и размытая копия фото,
   занимает всю ширину экрана. Виден только по бокам, когда
   само фото (вертикальное) уже всей высоты экрана.

   Слой 2 (.hero-bg) — само фото с правильной пропорцией,
   по центру, не обрезает лица. */

.hero-bg-blur {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center center;
  filter: blur(28px) brightness(0.55) saturate(1.05);
  transform: scale(1.15);  /* убрать «мягкие края» от blur */
  z-index: 0;
}

.hero-bg {
  position: absolute;
  /* Фото в центре, ограничено по ширине пропорцией портрета.
     На мобильном — на всю ширину. На широком экране —
     по центру, узкое (вертикальный портрет 4:5). */
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: calc(100vh * 0.83);  /* пропорция 5:6 (близко к фото) */
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  z-index: 1;
  transition: opacity 0.8s;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.30) 40%,
    rgba(0, 0, 0, 0.65) 75%,
    rgba(0, 0, 0, 0.85) 100%
  );
}
.hero-content {
  position: relative;
  top: 50px;
  z-index: 3;
  color: white;
}
.hero-script {
  font-family: 'Great Vibes', cursive;
  font-size: 100px;
  color: #fff;
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 1.2s ease 0.3s forwards;
  text-shadow:
    0 2px 30px rgba(0, 0, 0, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.45);
}
.hero-names {
  font-family: 'Great Vibes', serif;
  font-size: 60px;
  letter-spacing: 5px;
  color: rgba(255,255,255,0.92);
  margin-top: 18px;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  opacity: 0;
  animation: fadeUp 1s ease 1.3s forwards;
}
.hero-scroll .arr {
  width: 18px; height: 18px;
  border-right: 1.5px solid rgba(255,255,255,0.5);
  border-bottom: 1.5px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%,20%,50%,80%,100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(8px); }
  60% { transform: rotate(45deg) translateY(4px); }
}

/* ====== ОБЩИЕ СЕКЦИИ ====== */
.t-sec {
  width: 100%;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}
.t-box {
  max-width: 480px;
  margin: 0 auto;
}
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}
.stitle {
  font-family: 'Great Vibes', cursive;
  font-size: 45px;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
}
.ssub {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 25px;
}

/* ====== SECTION 2: CALENDAR ====== */
.cal-sec { text-align: center; padding: 70px 20px 80px; }
.cal-intro {
  font-family: 'Cormorant Garamond', serif;
  font-size: 25px;
  font-style: italic;
  color: var(--text-medium);
  line-height: 1.85;
  margin-bottom: 10px;
}
.cal-datebig {
  font-family: 'Montserrat', sans-serif;
  font-size: 25px;
  font-weight: 500;
  color: var(--burgundy);
  letter-spacing: 3px;
  margin-bottom: 35px;
}
.cal-month {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 18px;
  letter-spacing: 2px;
}
.cal-g {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 310px;
  margin: 0 auto;
}
.cal-h {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--text-light);
  padding: 8px 0;
  text-align: center;
}
.cal-d {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: var(--text-medium);
  padding: 10px 0;
  text-align: center;
  position: relative;
}
.cal-d.emp { visibility: hidden; }
.cal-d.hrt {
  color: white;
  font-weight: 600;
  z-index: 1;
}
.cal-d.hrt::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: var(--heart-pink);
  clip-path: path('M17 30 C17 30 1 21 1 11 A6.2 6.2 0 0 1 17 7.5 A6.2 6.2 0 0 1 33 11 C33 21 17 30 17 30Z');
  animation: hPulse 2s ease-in-out infinite;
}
@keyframes hPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50% { transform: translate(-50%,-50%) scale(1.08); }
}

/* ====== SECTION 3: TIMELINE ====== */
.tl-sec { padding: 70px 20px 80px; text-align: center; }
.tl-canvas {
  position: relative;
  max-width: 420px;
  margin: 40px auto 0;
  padding: 10px 0;
}

/* Изогнутая «ниточка» по центру, как на референсе */
.tl-thread {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.tl-thread .cline {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 15s ease;
  opacity: 0.85;
}
.tl-sec.vis .tl-thread .cline { stroke-dashoffset: 0; }

/* Блок одного события: иконка с одной стороны, текст с другой */
.tl-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 130px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tl-sec.vis .tl-row { opacity: 1; transform: translateY(0); }
.tl-sec.vis .tl-row:nth-of-type(2) { transition-delay: 0.4s; }
.tl-sec.vis .tl-row:nth-of-type(3) { transition-delay: 0.9s; }
.tl-sec.vis .tl-row:nth-of-type(4) { transition-delay: 1.4s; }

.tl-icon {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.tl-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Акценты внутри иконок — мелкие декоративные точки бордовыми */
.tl-icon .accent { fill: var(--burgundy); stroke: none; }

.tl-text { text-align: center; padding: 0 6px; }
.tl-row.right .tl-icon { grid-column: 3; justify-self: start; }
.tl-row.right .tl-text { grid-column: 1; }
.tl-row.left .tl-icon  { grid-column: 1; justify-self: end; }
.tl-row.left .tl-text  { grid-column: 3; }

.tl-t {
  font-family: 'Montserrat',sans-serif;
  font-size: 25px;
  font-weight: 600;
  color: var(--burgundy);
  letter-spacing: 1px;
}
.tl-l {
  font-family: 'Cormorant Garamond',serif;
  font-size: 25px;
  font-style: italic;
  color: var(--text-medium);
  margin-top: 4px;
  line-height: 1.4;
}

@media (max-width: 420px) {
  .tl-canvas { max-width: 360px; }
  .tl-row { grid-template-columns: 1fr 40px 1fr; min-height: 115px; }
  .tl-icon { width: 75px; height: 75px; }
  .tl-t { font-size: 19px; }
  .tl-l { font-size: 14px; }
}

/* ====== SECTION 4: WISHES ====== */
.wish-sec { padding: 70px 20px 80px; text-align: center; }
.wish-txt {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--text-medium);
  line-height: 1.9;
  max-width: 400px;
  margin: 0 auto;
  font-style: italic;
}
.wish-ico {
  font-size: 36px;
  margin-bottom: 20px;
  display: inline-block;
  animation: wFloat 3s ease-in-out infinite;
}
@keyframes wFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.wish-div {
  width: 50px; height: 1px;
  background: var(--gold);
  margin: 25px auto;
  opacity: 0.5;
}

/* ====== SECTION 5: COUNTDOWN ====== */
.cd-sec {
  padding: 70px 20px;
  text-align: center;
  background: var(--burgundy);
  color: white;
}
.cd-sec .stitle { color: var(--gold-light); }
.cd-sec .ssub { color: rgba(255,255,255,0.5); }
.cd-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}
.cd-i { text-align: center; }
.cd-n {
  font-family: 'Cormorant Garamond',serif;
  font-size: 44px;
  font-weight: 300;
  color: white;
  line-height: 1;
}
.cd-lb {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 6px;
}
.cd-dot {
  font-family: 'Cormorant Garamond',serif;
  font-size: 36px;
  color: var(--gold-light);
  padding-top: 4px;
}

/* ====== SECTION 6: LOCATION ====== */
.loc-sec { padding: 70px 20px 80px; }
.loc-sec .stitle, .loc-sec .ssub { text-align: center; }
.loc-split {
  display: flex;
  gap: 0;
  max-width: 800px;
  margin: 30px auto 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.loc-info {
  flex: 1;
  padding: 40px 30px;
  background: var(--cream-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loc-c { font-family:'Montserrat',sans-serif; font-size:11px; letter-spacing:2px; text-transform:uppercase; color:var(--text-light); margin-bottom:8px; }
.loc-n { font-family:'Great Vibes',cursive; font-size:30px; color:var(--burgundy); margin-bottom:12px; }
.loc-a { font-family:'Cormorant Garamond',serif; font-size:16px; color:var(--text-medium); line-height:1.7; margin-bottom:15px; }
.loc-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--burgundy);
  color: white;
  text-decoration: none;
  font-family: 'Montserrat',sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all 0.3s;
  align-self: flex-start;
}
.loc-btn:hover { background: var(--burgundy-dark); transform: translateY(-2px); }
.loc-map { flex: 1; min-height: 350px; }
.loc-map iframe { width:100%; height:100%; border:none; }
@media (max-width:680px) {
  .loc-split { flex-direction: column; }
  .loc-map { min-height: 280px; }
}

/* ====== SECTION 7: DRESS CODE ====== */
.dc-sec { padding: 70px 20px 80px; text-align: center; }
.dc-note {
  font-family:'Cormorant Garamond',serif;
  font-size: 25px;
  color: var(--text-medium);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 25px;
}
.dc-pal { display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }
.dc-sw {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--cream-light);
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.dc-sw:hover { transform: scale(1.15); }
.dc-warn {
  font-family:'Montserrat',sans-serif;
  font-size: 17px;
  color: var(--text-light);
  margin-top: 25px;
  letter-spacing: 1px;
}

/* ====== SECTION 8: GUEST FORM ====== */
.fm-sec { padding: 70px 20px 90px; text-align: center; }
.fm-intro {
  font-family:'Cormorant Garamond',serif;
  font-size: 25px;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 35px;
}
.gf { max-width: 380px; margin: 0 auto; text-align: left; }
.fg { margin-bottom: 18px; }
.fl {
  font-family:'Montserrat',sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 7px;
  display: block;
}
.fi {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  background: var(--cream-light);
  font-family:'Cormorant Garamond',serif;
  font-size: 16px;
  color: var(--text-dark);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.3s;
}
.fi:focus { border-color: var(--burgundy); }
.fi::placeholder { color: #c5bdb5; }

.rg { display:flex; flex-direction:column; gap:10px; margin-top:5px; }
.ro {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family:'Cormorant Garamond',serif;
  font-size: 17px;
  color: var(--text-medium);
}
.ro input[type="radio"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.ro input[type="radio"]:checked { border-color: var(--burgundy); }
.ro input[type="radio"]:checked::after {
  content:'';
  position: absolute;
  top: 3px; left: 3px;
  width: 10px; height: 10px;
  background: var(--burgundy);
  border-radius: 50%;
}

/* ====== Универсальный раскрывающийся блок ======
   (использовался pair-block, теперь нужен и для детей,
   и для «Другое» в напитках; заодно чиним баг с обрезанием) */
.exp-block {
  /* grid-rows + opacity — современный приём для плавного
     раскрытия БЕЗ max-height-костыля, который раньше резал
     содержимое (например, поле «Кем приходится»). */
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.45s ease,
              opacity 0.35s ease,
              margin 0.35s ease;
  margin-top: 0;
}
.exp-block.show {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 15px;
}
.exp-block > .exp-inner {
  overflow: hidden;       /* спрятать «недораскрытое» содержимое */
  min-height: 0;
}
.exp-inner {
  border-top: 1px solid #e8e0d8;
  padding-top: 18px;
}
.exp-lbl {
  font-family:'Montserrat',sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 12px;
}
.exp-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Textarea — пусть растёт по вертикали */
.fi-area {
  resize: vertical;
  min-height: 70px;
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.5;
}

/* ====== Чекбоксы (напитки) ====== */
.chk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
@media (max-width: 480px) {
  .chk-grid { grid-template-columns: 1fr; }
}
.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: var(--text-medium);
  line-height: 1.3;
}
.chk input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chk input[type="checkbox"]:checked {
  border-color: var(--burgundy);
  background: var(--burgundy);
}
.chk input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  width: 5px; height: 9px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
}

/* ====== Список детей ====== */
#kidsList { display: flex; flex-direction: column; gap: 12px; }
.kid-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 8px;
  animation: kidIn 0.3s ease;
}
@keyframes kidIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kid-fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.kid-fields .fg { margin-bottom: 0; }
.kid-del {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}
.kid-del:hover {
  background: var(--burgundy);
  color: white;
}

/* Кнопка «Добавить ребёнка» */
.add-btn {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  background: transparent;
  border: 1.5px dashed var(--gold);
  border-radius: 8px;
  color: var(--burgundy);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.add-btn:hover {
  background: var(--cream-light);
  border-color: var(--burgundy);
}
.add-btn .add-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--burgundy);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.sub-btn {
  width: 100%;
  padding: 14px 30px;
  background: var(--burgundy);
  color: white;
  border: none;
  font-family:'Montserrat',sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s;
  margin-top: 25px;
}
.sub-btn:hover {
  background: var(--burgundy-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(139,38,53,0.3);
}
.sub-btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.fm-err {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--burgundy);
  text-align: center;
  margin-top: 15px;
  min-height: 20px;
}
.fm-ok { display:none; text-align:center; padding:20px 0; }
.fm-ok.show { display: block; }
.fm-ok .ck {
  width:60px; height:60px;
  border: 2px solid var(--burgundy);
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--burgundy);
  font-size: 26px;
  animation: pop 0.5s ease;
}
@keyframes pop { 0%{transform:scale(0);opacity:0} 100%{transform:scale(1);opacity:1} }

/* ====== FOOTER ====== */
.ft-sec { text-align: center; padding: 60px 20px 80px; }
.ft-nm {
  font-family: 'Great Vibes', cursive;
  font-size: 42px;
  color: var(--burgundy);
}
/* Имена обычным курсивом, а амперсанд другим шрифтом —
   чтобы не путать с прописной "Е" в Great Vibes */
.ft-nm .amp {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 32px;
  color: var(--gold);
  margin: 0 6px;
  vertical-align: 4px;
}
.ft-dt { font-family:'Montserrat',sans-serif; font-size:11px; letter-spacing:3px; color:var(--text-light); margin-top:10px; }
.ft-hr { margin-top:20px; font-size:22px; display:inline-block; animation: hb 1.5s infinite; }
@keyframes hb { 0%,100%{transform:scale(1)} 15%{transform:scale(1.15)} 30%{transform:scale(1)} 45%{transform:scale(1.1)} }
.ft-orn { color:var(--gold); font-size:18px; letter-spacing:10px; opacity:0.5; margin-bottom:15px; }

/* ====== PETALS ====== */
.ptl {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 50% 0 50% 50%;
  opacity: 0;
  z-index: 50;
  pointer-events: none;
  animation: pf linear forwards;
}
@keyframes pf {
  0% { opacity:0; transform:translateY(-10vh) rotate(0) translateX(0); }
  10% { opacity:0.45; }
  90% { opacity:0.15; }
  100% { opacity:0; transform:translateY(105vh) rotate(720deg) translateX(80px); }
}

@media (max-width:500px) {
  .hero-script { font-size:50px; }
  .stitle { font-size:32px; }
  .cd-n { font-size:36px; }
  .cd-dot { font-size:28px; }
  .cd-row { gap:12px; }
  .tl-t { font-size:19px; }
  .ft-nm { font-size: 36px; }
  .ft-nm .amp { font-size: 26px; }
}
