/* ===== Переменные и сброс ===== */
:root {
  --bg: #faf5ef;
  --bg-alt: #f1e9df;
  --ink: #2a2723;
  --muted: #6e655b;
  --accent: #a98c6b;
  --line: #d8ccbd;
  --dark: #1c1a17;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Контейнеры и секции ===== */
.container { width: min(1100px, 90%); margin: 0 auto; }
.container.narrow { width: min(680px, 90%); }

.section { padding: clamp(64px, 10vw, 120px) 0; }

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 46px);
  text-align: center;
  line-height: 1.2;
  letter-spacing: .5px;
}

.section__subtitle {
  text-align: center;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 13px;
  margin-top: 12px;
}

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: 40px;
  transition: .3s ease;
}

.btn--outline {
  margin-top: 24px;
  padding: 14px 34px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--bg); }

.btn--submit {
  display: block;
  margin: 36px auto 0;
  padding: 18px 60px;
  color: #fff;
  background: var(--dark);
}
.btn--submit:hover { background: var(--accent); transform: translateY(-2px); }
.btn--submit:disabled { opacity: .6; cursor: default; transform: none; }

/* ===== Обложка ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(28,26,23,.35), rgba(28,26,23,.45)),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  padding: 40px 20px;
}

.hero__pretitle {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: clamp(11px, 2vw, 14px);
  margin-bottom: 28px;
  opacity: .9;
}

.hero__names {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 11vw, 110px);
  line-height: 1.05;
  letter-spacing: 1px;
}
.hero__names span { display: block; font-size: .5em; font-style: italic; color: #e7d6bf; margin: 6px 0; }

.hero__date {
  margin-top: 28px;
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 30px);
  letter-spacing: 8px;
}

.hero__scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  animation: scroll 1.6s infinite;
}
@keyframes scroll { 0%{opacity:1;transform:translateY(0)} 100%{opacity:0;transform:translateY(14px)} }

/* ===== Приглашение ===== */
.invite { text-align: center; }
.script {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 6vw, 48px);
  color: var(--accent);
  margin-bottom: 26px;
}
.invite__text {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--muted);
  font-family: var(--serif);
  line-height: 1.7;
}
.divider { margin: 40px auto 0; color: var(--line); font-size: 26px; }

/* ===== Таймер ===== */
.countdown-section { background: var(--bg-alt); }
.countdown {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 50px);
  flex-wrap: wrap;
}
.countdown__item { text-align: center; min-width: 64px; }
.countdown__num {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1;
  color: var(--ink);
}
.countdown__label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== Программа дня ===== */
.timeline {
  margin: 56px auto 0;
  max-width: 620px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 90px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 18px 0;
  position: relative;
}
.timeline__time {
  font-family: var(--serif);
  font-size: 24px;
  text-align: right;
  color: var(--accent);
}
.timeline__body { position: relative; padding-left: 10px; }
.timeline__body::before {
  content: "";
  position: absolute;
  left: -28px; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline__body h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.timeline__body p { color: var(--muted); font-size: 15px; }

/* ===== Локация ===== */
.location-section { background: var(--bg-alt); }
.location {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.location__info h3 { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.location__addr { color: var(--accent); letter-spacing: 1px; margin: 8px 0 16px; }
.location__info p { color: var(--muted); }
.location__map {
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(40,34,28,.12);
}
.location__map iframe { width: 100%; height: 100%; border: 0; }

/* ===== Детали ===== */
.details {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.details__card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 38px 28px;
  text-align: center;
  transition: transform .3s ease;
}
.details__card:hover { transform: translateY(-6px); }
.details__icon { font-size: 38px; margin-bottom: 14px; }
.details__card h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; margin-bottom: 10px; }
.details__card p { color: var(--muted); font-size: 15px; }

/* ===== Форма RSVP ===== */
.rsvp-section .section__title { font-size: clamp(24px, 4vw, 38px); margin-bottom: 48px; }
.rsvp-form { display: flex; flex-direction: column; gap: 30px; }
.field { border: none; }
.field__label {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 14px;
  font-weight: 500;
}
.field__input {
  width: 100%;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  padding: 10px 2px;
  transition: border-color .3s;
}
.field__input:focus { outline: none; border-color: var(--accent); }
.field__input--spaced { margin-top: 16px; }
textarea.field__input { border: 1px solid var(--line); border-radius: 10px; resize: vertical; }

.radio, .check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
}
.radio input, .check input {
  width: 20px; height: 20px;
  accent-color: var(--dark);
  cursor: pointer;
  flex-shrink: 0;
}

.form-status {
  text-align: center;
  margin-top: 6px;
  font-size: 16px;
  min-height: 24px;
}
.form-status.ok { color: #4b7a4b; }
.form-status.err { color: #b1503f; }

/* ===== Подвал ===== */
.footer {
  background: var(--dark);
  color: var(--bg);
  text-align: center;
  padding: 70px 20px;
}
.footer__names { font-family: var(--serif); font-size: clamp(28px, 6vw, 46px); }
.footer__date { letter-spacing: 4px; text-transform: uppercase; font-size: 13px; margin-top: 10px; color: #c9bba8; }
.footer__heart { color: var(--accent); font-size: 22px; margin-top: 18px; }

/* ===== Анимация появления ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Адаптив ===== */
@media (max-width: 820px) {
  .location { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .timeline::before { left: 70px; }
  .timeline__item { grid-template-columns: 70px 1fr; gap: 18px; }
  .timeline__time { font-size: 20px; }
  .btn--submit { width: 100%; padding: 18px; }
}
