/* ===== Переменные ===== */
:root {
  --blue-bg:    #cdddee;   /* фон с узором */
  --blue-soft:  #e3edf6;
  --blue-line:  #b9c9dc;
  --ink:        #2f3e4d;   /* основной текст */
  --ink-soft:   #6a7a89;   /* приглушённый текст */
  --card:       #ffffff;
  --accent:     #aebfd4;   /* кнопки, акценты */
  --accent-dk:  #8da0b8;
  --radius:     18px;
  --maxw:       600px;

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-script: 'Marck Script', cursive;
  --font-sans:   'Montserrat', system-ui, sans-serif;
}

/* ===== Базовое ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--blue-bg);
  background-image: url('/media/bg.jpg');
  background-size: 420px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

/* ===== Шапка ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: rgba(174, 191, 212, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(47, 62, 77, 0.15);
}
.header__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
}
.burger {
  width: 30px; height: 22px;
  background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0;
}
.burger span {
  display: block; height: 3px; border-radius: 3px;
  background: #fff;
  transition: transform .25s, opacity .25s;
}
.burger.is-open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* ===== Меню ===== */
.nav {
  position: fixed;
  top: 56px; left: 0; right: 0;
  z-index: 49;
  display: flex; flex-direction: column;
  background: rgba(227, 237, 246, 0.98);
  box-shadow: 0 8px 18px rgba(47, 62, 77, 0.18);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.nav.is-open { max-height: 320px; }
.nav a {
  padding: 13px 24px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid rgba(185, 201, 220, 0.5);
}
.nav a:last-child { border-bottom: 0; }
.nav a:active { background: var(--blue-soft); }

/* ===== Каркас страницы ===== */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 14px 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px 24px;
  margin: 22px 0;
  box-shadow: 0 10px 26px rgba(47, 62, 77, 0.14);
}

/* ===== Типографика ===== */
.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 2.3rem;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
  margin-bottom: 22px;
}
.section-subtitle {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  margin: 30px 0 14px;
}
.card p {
  font-size: 1rem;
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.quote {
  font-family: var(--font-script);
  font-size: 1.5rem !important;
  color: var(--ink) !important;
  margin: 22px 0 !important;
}
.letter__date {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  text-align: center;
  margin: 18px 0;
  letter-spacing: 0.06em;
}
.muted { color: var(--ink-soft); font-size: 0.85em; }

/* ===== Главный экран ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 14px;
}
.polaroid {
  position: relative;
  background: #fff;
  padding: 12px 12px 0;
  box-shadow: 0 10px 24px rgba(47, 62, 77, 0.22);
  width: 230px;
  transform: rotate(-2deg);
}
.hero__plus + .polaroid { transform: rotate(2deg); }

/* Нарисованные от руки сердечки у фотографий */
.doodle-heart {
  position: absolute;
  width: 50px;
  height: auto;
  z-index: 2;
}
.doodle-heart path {
  fill: none;
  stroke: #7e8a9c;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doodle-heart--1 { top: -24px; left: -33px; transform: rotate(-18deg); }
.doodle-heart--2 { top: 45%;  right: -35px; transform: rotate(14deg); }
.polaroid img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}
.polaroid__caption {
  font-family: var(--font-script);
  font-size: 1.7rem;
  text-align: center;
  padding: 6px 0 14px;
}
.hero__plus {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ink);
  margin: 14px 0;
}
.hero__formula {
  font-family: var(--font-script);
  font-size: 2rem;
  margin: 22px 0 10px;
}
.heart {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  vertical-align: -0.14em;
}
.heart path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linejoin: round;
}
.hero__slogan {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 8px 16px;
}
.hero__date {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 26px;
}

/* ===== Таймер ===== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.countdown__cell {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 10px 6px;
  min-width: 58px;
  text-align: center;
}
.countdown__num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1;
}
.countdown__label {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: lowercase;
}

/* ===== Просьба подтвердить ===== */
.rsvp-notice {
  padding: 20px 24px;
  text-align: center;
}
.rsvp-notice p {
  margin-bottom: 0;
  font-size: 1.02rem;
  color: var(--ink);
}
.rsvp-notice b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

/* ===== Форма ===== */
.form__intro { font-style: italic; }

.field { display: block; margin: 18px 0; }
.field__label {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 7px;
}
.field__label b { color: #c97c86; }

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  padding: 11px 13px;
  border: 1.5px solid var(--blue-line);
  border-radius: 10px;
  background: #fbfcfe;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-dk);
  box-shadow: 0 0 0 3px rgba(174, 191, 212, 0.35);
}
textarea { resize: vertical; }

.q {
  border: 0;
  margin: 20px 0;
}
.q legend {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 9px;
}
.q legend b { color: #c97c86; }

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 7px 0;
  border: 1.5px solid var(--blue-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background .15s, border-color .15s;
}
.opt:has(input:checked) {
  background: var(--blue-soft);
  border-color: var(--accent-dk);
}
.opt input { accent-color: var(--accent-dk); width: 18px; height: 18px; flex-shrink: 0; }

.subfield { margin-top: 8px; }

.btn {
  display: block;
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 30px;
  padding: 14px;
  margin-top: 26px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(141, 160, 184, 0.5);
  transition: transform .12s, background .2s;
}
.btn:hover { background: var(--accent-dk); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: default; }

.form__status {
  text-align: center;
  margin-top: 16px;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.form__status.is-ok { color: #4f8a5b; font-weight: 500; }
.form__status.is-err { color: #c0584f; font-weight: 500; }

/* ===== Расписание ===== */
.timeline { margin-top: 6px; }
.tl-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--blue-soft);
}
.tl-item:last-child { border-bottom: 0; }
.tl-time {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 64px;
  color: var(--ink);
}
.tl-body { text-align: left; }
.tl-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
}
.tl-place {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 2px 0 8px;
}
.tl-desc {
  font-size: 0.92rem !important;
  text-align: left !important;
  color: var(--ink-soft) !important;
  margin: 0 !important;
}

/* ===== Карты ===== */
.location { margin: 22px 0; }
.location .script-title { margin-bottom: 18px; }
.location__item {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(47, 62, 77, 0.14);
  margin-bottom: 22px;
}
.location__item:last-child { margin-bottom: 0; }
.location__label {
  padding: 16px 20px 14px;
  text-align: center;
}
.location__title {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.2rem;
}
.location__addr {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 3px;
}
.location iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

/* ===== Футер ===== */
.footer {
  text-align: center;
  padding: 30px 0 40px;
}
.footer__hearts {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--ink);
}
.footer__text {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ===== Адаптив ===== */
@media (max-width: 380px) {
  .countdown__cell { min-width: 52px; }
  .countdown__num { font-size: 1.5rem; }
  .card { padding: 28px 16px; }
  .script-title { font-size: 2rem; }
  .tl-item { gap: 10px; }
  .tl-time { width: 54px; font-size: 1.2rem; }
}

@media (min-width: 620px) {
  .hero__slogan { font-size: 1.7rem; }
  .location iframe { height: 400px; }
}
