/* ---- Переменные: правь палитру здесь ---- */
:root {
  --bg: #f6f1ea;
  --ink: #3a3a38;
  --muted: #8b8781;
  --accent: #5b6d5b;
  --line: #e2d9cf;
  --card: rgba(255, 255, 255, .82);
  --radius: 14px;
  --col: 480px; /* ширина контентной колонки */
}

/* Свои шрифты положи в assets/fonts/ и раскомментируй.
@font-face {
  font-family: 'Cormorant';
  src: url('assets/fonts/cormorant.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
}

/* Широкий фон на десктопе. Положи картинку в assets/bg.jpg */
@media (min-width: 768px) {
  body {
    background:
      linear-gradient(rgba(246, 241, 234, .55), rgba(246, 241, 234, .55)),
      url('assets/bg.jpg') center / cover no-repeat fixed,
      var(--bg);
  }
}

main {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 20px 60px;
}

@media (min-width: 768px) {
  main {
    background: var(--card);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 60px rgba(0, 0, 0, .07);
  }
}

/* ---- Типографика ---- */
h1, h2, h3 { font-weight: 400; letter-spacing: .02em; }

h2 {
  font-size: 26px;
  margin: 0 0 16px;
  text-align: center;
}

h3 { font-size: 19px; margin: 0 0 6px; }

p { margin: 0 0 14px; }

.muted { color: var(--muted); font-size: 15px; }

.link { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---- Блоки ---- */
.block {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.block:last-of-type { border-bottom: none; }

.cover {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.cover__pre {
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.cover__names {
  font-size: 46px;
  line-height: 1.15;
  margin: 0;
}

.cover__names span { color: var(--accent); font-size: 28px; }

.cover__date { letter-spacing: .18em; font-size: 15px; margin: 0; }

/* ---- Тайминг ---- */
.timeline { list-style: none; padding: 0; margin: 0; text-align: left; }

.timeline li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.timeline li:last-child { border-bottom: none; }

.timeline__time { color: var(--accent); min-width: 56px; font-variant-numeric: tabular-nums; }

/* ---- Локации ---- */
.place { margin-bottom: 26px; }
.place:last-child { margin-bottom: 0; }

/* ---- Палитра дресс-кода ---- */
.palette { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }

.palette span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid var(--line);
}

/* ---- Форма ---- */
form { text-align: left; margin-top: 22px; }

.field { display: block; margin-bottom: 18px; }

.field > span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* меньше 16px — iOS зумит страницу при фокусе */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-appearance: none;
}

input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--accent); }

textarea { resize: vertical; }

.choice { border: none; padding: 0; margin: 0 0 18px; }

.choice legend { font-size: 14px; color: var(--muted); margin-bottom: 8px; }

.choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.choice input { accent-color: var(--accent); width: 18px; height: 18px; }

button[type="submit"] {
  width: 100%;
  padding: 15px;
  font: inherit;
  font-size: 16px;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity .2s;
}

button[type="submit"]:disabled { opacity: .5; cursor: default; }

.form-error { color: #b4544a; font-size: 14px; margin-top: 12px; }

.thanks { padding: 20px 0; }

.footer {
  padding: 40px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---- Появление блоков при скролле ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
