/* ===== Палитра и базовые токены ===== */
:root {
  --ivory: #faf7f2;
  --cream: #f3ede4;
  --sand: #e8dfd3;
  --blush: #e9d6d0;
  --rose: #b98b82;
  --rose-deep: #9a6f67;
  --ink: #4a423d;
  --ink-soft: #7b716a;
  --line: rgba(122, 105, 95, .25);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Marck Script", "Cormorant Garamond", cursive;
  --sans: "Montserrat", system-ui, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; text-align: center; position: relative; }
.container.narrow { max-width: 640px; }
.section { position: relative; padding: clamp(80px, 12vw, 140px) 0; }

/* ===== Типографика ===== */
.eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.script {
  font-family: var(--script);
  font-size: clamp(36px, 6vw, 52px);
  color: var(--rose);
  margin: 0 0 28px;
  line-height: 1.2;
}
.title {
  font-weight: 300;
  font-size: clamp(34px, 5.4vw, 52px);
  letter-spacing: .02em;
  margin: 0 0 12px;
  line-height: 1.15;
}
.sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin: 0 0 44px;
}
.lead {
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 300;
  color: var(--ink);
  margin: 0 0 20px;
}

.divider { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 30px auto; color: var(--rose); }
.divider span { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--rose)); }
.divider span:last-child { transform: scaleX(-1); }
.divider i { font-style: normal; font-size: 20px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: -4%;
  background-size: cover;
  background-position: center 72%;
  filter: sepia(.08);
  z-index: -2;
  animation: slowZoom 24s var(--ease) infinite alternate;
}
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 45%, rgba(250,247,242,.78) 0%, rgba(250,247,242,.35) 100%),
    linear-gradient(180deg, rgba(250,247,242,.25) 0%, rgba(250,247,242,0) 40%, rgba(250,247,242,.15) 75%, var(--ivory) 100%);
}
.hero__content { text-align: center; padding: 0 20px; }
.names {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 11vw, 120px);
  line-height: 1;
  margin: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .12em .25em;
}
.names__amp {
  font-family: var(--script);
  color: var(--rose);
  font-size: .72em;
  transform: translateY(.06em);
}
.hero__date {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: .32em;
  margin: 0 0 8px;
}
.hero__date em { font-style: normal; color: var(--rose); }
.hero__place {
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  margin: 0;
}
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid var(--ink-soft); border-radius: 14px;
  opacity: .6;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px;
  width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--ink-soft);
  animation: scrollDot 2.2s var(--ease) infinite;
}

/* ===== Invite ===== */
.invite { background: var(--ivory); }

/* ===== Фото-полосы (фон с фотографией) ===== */
.photo-band { overflow: hidden; isolation: isolate; }
.photo-band__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover;
  background-position: center 60%;
  background-attachment: fixed;
}
.photo-band__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    var(--ivory) 0%,
    rgba(250,247,242,.55) 25%,
    rgba(250,247,242,.55) 75%,
    var(--ivory) 100%);
}
.photo-band__veil--strong {
  background: linear-gradient(180deg,
    var(--ivory) 0%,
    rgba(250,247,242,.8) 18%,
    rgba(250,247,242,.8) 82%,
    var(--cream) 100%);
}

/* ===== Countdown ===== */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 640px;
  margin: 0 auto;
}
.countdown__item { padding: 6px 4px; position: relative; }
.countdown__item + .countdown__item::before {
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 1px; background: var(--line);
}
.countdown__num {
  display: block;
  font-weight: 300;
  font-size: clamp(42px, 9vw, 76px);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown__label {
  display: block; margin-top: 10px;
  font-family: var(--sans); font-weight: 300;
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* ===== Details ===== */
.details { background: var(--ivory); }
.details__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.card {
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 180px 180px 14px 14px;
  padding: 56px 24px 40px;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(122,95,85,.35); }
.card__icon { width: 44px; height: 44px; margin: 0 auto 18px; }
.card__icon svg { width: 100%; height: 100%; fill: none; stroke: var(--rose); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card h3 {
  font-family: var(--sans); font-weight: 300;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 12px;
}
.card__big { font-size: 28px; line-height: 1.2; margin: 0 0 4px; }
.card__small { font-style: italic; color: var(--ink-soft); margin: 0; }

/* ===== Gallery ===== */
.gallery { background: linear-gradient(180deg, var(--ivory), var(--cream)); }
.gallery__row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: clamp(12px, 3vw, 32px);
  align-items: end;
}
.arch {
  margin: 0;
  border-radius: 999px 999px 10px 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4.4;
  background: var(--sand);
  box-shadow: 0 30px 50px -30px rgba(90,70,60,.45);
}
.arch--tall { aspect-ratio: 3 / 5; }
.arch img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(.9) brightness(1.04) sepia(.08);
  transition: transform 1.4s var(--ease);
}
.arch:hover img { transform: scale(1.04); }
.quote {
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--ink-soft);
  margin: 56px 0 0;
}

/* ===== Map ===== */
.map { background: var(--cream); }
.map__frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  height: clamp(300px, 46vw, 440px);
  background: var(--sand);
}
.map__frame iframe {
  width: 100%; height: 100%; border: 0;
  filter: grayscale(.85) sepia(.12) contrast(.95);
}
.map__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 400;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn--ghost { color: var(--ink); border: 1px solid var(--ink-soft); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.btn--solid { color: #fff; background: var(--rose); border: 1px solid var(--rose); width: 100%; margin-top: 12px; }
.btn--solid:hover { background: var(--rose-deep); border-color: var(--rose-deep); }
.btn--solid:disabled { opacity: .6; cursor: default; }

/* ===== RSVP ===== */
.rsvp__form { text-align: left; }
.field { display: block; margin-bottom: 22px; }
.field > span, .choice legend {
  display: block;
  font-family: var(--sans); font-weight: 300;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 20px;
  color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 2px 10px;
  outline: none;
  transition: border-color .3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b98b82' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center;
  cursor: pointer;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input::placeholder, .field textarea::placeholder { color: #b3a89f; font-style: italic; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--rose); }
.field.is-invalid input { border-bottom-color: #c0776b; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.choice { border: 0; padding: 0; margin: 0 0 26px; }
.choice legend { padding: 0; }
.choice__opt { display: inline-flex; align-items: center; margin: 6px 22px 6px 0; cursor: pointer; font-size: 20px; }
.choice__opt input {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin: 0 10px 0 0;
  border: 1px solid var(--rose); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
}
.choice__opt input::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); transform: scale(0); transition: transform .25s var(--ease);
}
.choice__opt input:checked::after { transform: scale(1); }
.choice__opt input:focus-visible { outline: 2px solid var(--blush); outline-offset: 3px; }

.form-error { color: #b0675b; font-family: var(--sans); font-size: 13px; text-align: center; margin: 14px 0 0; }
.rsvp__thanks { text-align: center; animation: fadeUp .9s var(--ease) both; }

/* ===== Footer ===== */
.footer { background: var(--cream); padding: 90px 0 70px; }
.footer__love { font-style: italic; font-size: 22px; color: var(--ink-soft); margin: 0 0 10px; }
.names--small { font-size: clamp(40px, 7vw, 64px); }
.footer__date {
  font-family: var(--sans); font-weight: 300;
  font-size: 12px; letter-spacing: .4em; color: var(--ink-soft);
  margin: 24px 0 0;
}

/* ===== Анимации появления ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.gallery__row .reveal:nth-child(2) { transition-delay: .15s; }
.gallery__row .reveal:nth-child(3) { transition-delay: .3s; }
.details__grid .reveal:nth-child(2) { transition-delay: .12s; }
.details__grid .reveal:nth-child(3) { transition-delay: .24s; }

@keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ===== Адаптив ===== */
@media (max-width: 820px) {
  .details__grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
  .gallery__row { grid-template-columns: 1fr 1fr; }
  .gallery__row .arch--tall { grid-column: 1 / -1; grid-row: 1; max-width: 360px; width: 100%; margin: 0 auto; }
  /* fixed-фон не работает на iOS — отключаем */
  .photo-band__bg { background-attachment: scroll; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .countdown__label { letter-spacing: .14em; font-size: 10px; }
  .divider span { width: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
