:root {
  --ink: #39401e;           /* основной оливковый */
  --ink-soft: #6b7350;      /* приглушённый оливковый */
  --gold: #c9a86a;          /* золотистый акцент */
  --gold-dark: #a88a52;
  --paper: #f7f2e8;         /* фон-бумага */
  --paper-alt: #efe7d6;     /* фон секций */
  --line: #d8cdb4;
  --serif: 'Cormorant', Georgia, serif;
  --sans: 'Montserrat', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(201, 168, 106, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(107, 115, 80, 0.08), transparent 50%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 640px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(34, 38, 17, 0.55), rgba(34, 38, 17, 0.65)),
    linear-gradient(135deg, #39401e, #6b7350);
  padding: 80px 24px;
  overflow: hidden;
}

.hero__inner { max-width: 720px; position: relative; z-index: 1; }

.hero__label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 28px;
}

.hero__names {
  font-size: clamp(44px, 10vw, 92px);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.04em;
}

.hero__names .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 300;
}

.hero__date {
  font-family: var(--sans);
  font-size: clamp(15px, 3vw, 20px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin: 34px 0 0;
  color: #f3ecd9;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  z-index: 1;
}

.hero__scroll::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: scroll 1.8s infinite;
}

@keyframes scroll {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--paper-alt); }

.section__eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-align: center;
  margin: 0 0 20px;
}

.section__title {
  text-align: center;
  font-size: clamp(32px, 6vw, 48px);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 28px;
}

.section__text {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.7;
  text-align: center;
  color: var(--ink-soft);
  margin: 0 auto 16px;
  max-width: 560px;
}

/* ---------- Calendar ---------- */
.calendar {
  max-width: 340px;
  margin: 48px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(57, 64, 30, 0.14);
  overflow: hidden;
}

.calendar__header {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 16px;
}

.calendar__month {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.calendar__year { font-size: 24px; font-weight: 600; }

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar__weekdays span {
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.calendar__grid span {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
}

.calendar__grid span.muted { color: #cfc6b2; }

.calendar__grid span.marked {
  position: relative;
  color: #fff;
  background: var(--gold);
  border-radius: 50%;
  margin: 4px;
  box-shadow: 0 6px 14px rgba(201, 168, 106, 0.5);
  font-weight: 700;
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.countdown__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
  min-width: 86px;
  text-align: center;
}

.countdown__num {
  display: block;
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.countdown__label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Venue ---------- */
.venue-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(57, 64, 30, 0.08);
  margin-top: 40px;
}

.venue-card__icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

.venue-card__name {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
}

.venue-card__address {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.venue-card__note {
  font-size: 16px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

/* ---------- Timeline ---------- */
.timeline {
  margin-top: 44px;
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}

.timeline__item {
  position: relative;
  padding: 0 0 32px 28px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
}

.timeline__time {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  font-weight: 600;
  text-transform: uppercase;
}

.timeline__title {
  font-size: 22px;
  font-weight: 600;
  margin: 4px 0 4px;
}

.timeline__address {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Gift / envelope ---------- */
.gift__icon {
  display: block;
  margin: 0 auto 24px;
}

.gift__text {
  font-size: 21px;
  max-width: 520px;
}

/* ---------- Seating notice ---------- */
.seating-card {
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 44px 32px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(201, 168, 106, 0.14);
}

.seating-card__title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.seating-card__text {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Dress code colors ---------- */
.colors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px 32px;
  margin-top: 40px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 96px;
}

.color-swatch__dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(57, 64, 30, 0.18);
}

.color-swatch__name {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Avoid colors (перечёркнутые) ---------- */
.dresscode-avoid__note {
  margin-top: 48px;
  font-style: italic;
}

.colors--avoid {
  margin-top: 28px;
}

.color-swatch--avoid .color-swatch__dot {
  position: relative;
  overflow: hidden;
  opacity: 0.75;
  filter: saturate(0.55);
  box-shadow: 0 4px 10px rgba(57, 64, 30, 0.1);
}

.color-swatch--avoid .color-swatch__dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  height: 3px;
  background: #8a8a8a;
  border-radius: 2px;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.color-swatch--avoid .color-swatch__name {
  color: #9a9a8f;
}

/* ---------- Closing ---------- */
.closing {
  position: relative;
  overflow: hidden;
  padding: 120px 24px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(34, 38, 17, 0.6), rgba(34, 38, 17, 0.72)),
    linear-gradient(135deg, #39401e, #6b7350);
}

.closing .container {
  position: relative;
  z-index: 1;
}

.closing__names {
  font-size: clamp(34px, 7vw, 60px);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 0 24px;
  letter-spacing: 0.04em;
}

.closing__text {
  font-size: 22px;
  line-height: 1.7;
  margin: 0 0 28px;
  color: #f3ecd9;
}

.closing__date {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

/* ---------- Not found state ---------- */
.missing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.missing p { font-size: 22px; color: var(--ink-soft); }

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__label,
.hero__names,
.hero__date,
.hero__scroll {
  opacity: 0;
  animation: heroFade 0.9s ease forwards;
}

.hero__names { animation-delay: 0.15s; }
.hero__date  { animation-delay: 0.3s; }
.hero__scroll { animation-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__label,
  .hero__names,
  .hero__date,
  .hero__scroll {
    opacity: 1;
    animation: none;
  }

  .hero__scroll::after { animation: none; }

  .flower { animation: none; }
}

/* ---------- Flower decorations ---------- */
.flower {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  will-change: transform;
}

.flower--hero {
  width: clamp(160px, 34vw, 360px);
  right: -40px;
  bottom: -30px;
  opacity: 0.7;
  animation: flowerFloat 9s ease-in-out infinite;
}

.flower--hero-tl {
  width: clamp(160px, 34vw, 360px);
  left: -40px;
  top: -30px;
  opacity: 0.7;
  animation: flowerFloatMirrored 9s ease-in-out infinite;
}

.flower--footer {
  width: clamp(160px, 30vw, 320px);
  left: -40px;
  top: 0;
  opacity: 0.5;
  animation: flowerFloat 11s ease-in-out infinite reverse;
}

.flower--footer-br {
  width: clamp(160px, 30vw, 320px);
  right: -40px;
  bottom: 0;
  opacity: 0.5;
  animation: flowerFloatMirrored 11s ease-in-out infinite reverse;
}

@keyframes flowerFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(4deg); }
}

@keyframes flowerFloatMirrored {
  0%, 100% { transform: translateY(0) rotate(0deg) scaleX(-1); }
  50%      { transform: translateY(-18px) rotate(-4deg) scaleX(-1); }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }

  .hero__label { letter-spacing: 0.32em; }
  .hero__date { letter-spacing: 0.22em; }
  .section__eyebrow { letter-spacing: 0.3em; }

  .section__text { font-size: 18px; }
  .closing__text { font-size: 18px; }

  .countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .countdown__item { min-width: 0; padding: 16px 8px; }

  .flower--hero-tl { top: 0; }
  .flower--footer-br { bottom: -30px; }
}
