:root {
  --burgundy: #3f0308;
  --burgundy-2: #57060c;
  --ivory: #f5eddf;
  --linen: #eadcc8;
  --ink: #211916;
  --muted: #7d6c60;
  --gold: #b99763;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.cover-active {
  overflow: hidden;
  height: 100%;
}
body {
  margin: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--ink);
  background: var(--ivory);
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .08;
  z-index: 5;
  background-image: radial-gradient(circle at 1px 1px, #000 1px, transparent 0);
  background-size: 22px 22px;
}

.cover {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: var(--ivory);
  background:
    radial-gradient(circle at top, rgba(255,255,255,.08), transparent 42%),
    linear-gradient(145deg, #260205, var(--burgundy) 55%, #310306);
  overflow: hidden;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(245,237,223,.18);
  border-radius: 50%;
}
.cover::before { top: -140px; right: -120px; }
.cover::after { bottom: -160px; left: -140px; }

.cover > * { position: relative; z-index: 1; }
.cover__ornament { font-size: 28px; color: var(--gold); margin-bottom: 18px; }
.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: clamp(56px, 12vw, 104px);
  line-height: .82;
  letter-spacing: .02em;
}
h1 span { font-size: .38em; color: var(--gold); font-style: normal; }
.date {
  margin: 28px 0 36px;
  letter-spacing: .34em;
  font-size: 17px;
}
.open-btn, .submit-btn, .map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid rgba(245,237,223,.7);
  border-radius: 999px;
  background: rgba(245,237,223,.08);
  color: var(--ivory);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .25s ease, background .25s ease;
}
.open-btn:hover, .map-btn:hover, .submit-btn:hover { transform: translateY(-2px); background: rgba(245,237,223,.15); }
.cover__hint { font-size: 12px; opacity: .72; margin-top: 16px; }

.site.is-hidden { display: none; }
.site { animation: fadeIn .8s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.container { width: min(1080px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(740px, calc(100% - 40px)); }
.section { padding: 90px 0; }
.section--dark {
  color: var(--ivory);
  background: linear-gradient(135deg, var(--burgundy), #280205);
}
.section h2 {
  font-size: clamp(38px, 7vw, 74px);
  line-height: .95;
  margin-bottom: 26px;
}
p { line-height: 1.75; font-size: 16px; }

.hero { min-height: 76vh; display: grid; place-items: center; text-align: center; }
.hero__text { max-width: 640px; margin: 0 auto; font-size: 18px; }

.details { padding-top: 60px; padding-bottom: 60px; }
.details__grid, .wishes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.detail-card {
  border: 1px solid rgba(75,13,21,.16);
  border-radius: 28px;
  padding: 28px;
  background: rgba(255,255,255,.35);
  text-align: center;
}
.detail-card span { display: block; color: var(--muted); margin-bottom: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; }
.detail-card strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 600; }

.timeline__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(75,13,21,.16);
}
.timeline__item time { color: var(--burgundy); font-weight: 600; letter-spacing: .08em; }
.timeline__item h3 { font-size: 30px; margin-bottom: 6px; }
.timeline__item p { margin: 0; }

.location .map-btn { margin-top: 18px; border-color: rgba(245,237,223,.55); }
.location__address {
  font-size: 18px;
  color: rgba(245,237,223,.86);
  margin-bottom: 22px;
}
.map-embed {
  overflow: hidden;
  border: 1px solid rgba(245,237,223,.28);
  border-radius: 28px;
  height: 320px;
  margin: 26px 0 8px;
  background: rgba(245,237,223,.1);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(.85) sepia(.16);
}

.palette { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.palette span { width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.08); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.note, .small { color: var(--muted); font-size: 14px; }
.wishes__grid { grid-template-columns: repeat(2, 1fr); }
.wishes__grid > div { border: 1px solid rgba(75,13,21,.16); border-radius: 32px; padding: 34px; }

.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.timer div { border: 1px solid rgba(245,237,223,.22); border-radius: 24px; padding: 24px 10px; text-align: center; }
.timer strong { display: block; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(36px, 8vw, 64px); line-height: 1; }
.timer span { color: rgba(245,237,223,.72); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }

.form { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid rgba(75,13,21,.18);
  border-radius: 18px;
  padding: 15px 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255,255,255,.55);
}
textarea { min-height: 96px; resize: vertical; }
.submit-btn { border-color: var(--burgundy); background: var(--burgundy); color: var(--ivory); justify-self: start; }
.form-status { margin: 0; color: var(--burgundy); }

.footer { padding: 80px 0 100px; text-align: center; background: var(--linen); }
.footer h2 { font-size: clamp(42px, 8vw, 84px); margin: 8px 0; }
.footer__date { letter-spacing: .25em; color: var(--muted); }
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(245,237,223,.4);
  background: var(--burgundy);
  color: var(--ivory);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}
.music-toggle.is-muted { opacity: .55; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .section { padding: 70px 0; }
  .details__grid, .wishes__grid, .timer { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 72px 1fr; gap: 16px; }
  .detail-card strong { font-size: 26px; }
}


.wishes__intro { text-align: center; margin-bottom: 30px; }
.wishes__grid h3 { font-size: 34px; margin: 0 0 12px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }


.date-calendar {
  padding-top: 10px;
}

.calendar-card {
  text-align: center;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(75,13,21,.12);
  border-radius: 32px;
  padding: 34px 22px 30px;
}

.calendar-date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(44px, 8vw, 78px);
  letter-spacing: .08em;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 24px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 10px 8px;
  justify-items: center;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
}

.calendar-weekday {
  text-transform: lowercase;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .08em;
}

.calendar-day {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #65584f;
  position: relative;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.selected {
  color: var(--ivory);
  font-weight: 600;
  position: relative;
  z-index: 0;
}

.calendar-day.selected::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 14px;
  height: 14px;
  background: var(--burgundy);
  border-radius: 50%;
  transform: translateX(-100%);
  z-index: -1;
  box-shadow: 14px 0 0 var(--burgundy);
}

.calendar-day.selected::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 26px;
  height: 26px;
  background: var(--burgundy);
  transform: translateX(-50%) rotate(45deg) scaleY(1.35);
  border-radius: 4px;
  z-index: -2;
}

.timeline {
  text-align: center;
}

.timeline-horizontal {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 34px;
}

.timeline-step {
  min-width: 0;
}

.timeline-step__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.timeline-line {
  flex: 1;
  height: 1px;
  background: rgba(63,3,8,.4);
}

.timeline-candy {
  position: relative;
  width: 34px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--burgundy-2);
  border-radius: 999px;
}

.timeline-candy::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--burgundy-2);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  transform: translateY(-50%);
}

.timeline-candy::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--burgundy-2);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.timeline-step time {
  display: block;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  margin-bottom: 10px;
}

.timeline-step h3 {
  font-size: clamp(24px, 3vw, 40px);
  line-height: .95;
  margin-bottom: 14px;
}

.timeline-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .timeline-horizontal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .calendar-card {
    padding: 26px 14px 24px;
  }

  .calendar-grid {
    gap: 8px 4px;
    grid-template-columns: repeat(7, minmax(28px, 1fr));
  }

  .calendar-day {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .timeline-horizontal {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .timeline-step {
    text-align: left;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(75,13,21,.16);
  }

  .timeline-step:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .timeline-step__top {
    margin-bottom: 14px;
  }
}

@media (max-width: 760px) {
  .calendar-day.selected::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 14px;
  height: 14px;
  background: var(--burgundy);
  border-radius: 50%;
  transform: translateX(-100%);
  z-index: -1;
  box-shadow: 14px 0 0 var(--burgundy);
}
}

@media (max-width: 760px) {
  .calendar-day.selected::before { top: 2px; width: 12px; height: 12px; transform: translateX(-100%); box-shadow: 12px 0 0 var(--burgundy); }
  .calendar-day.selected::after { top: 8px; width: 22px; height: 22px; }
}


.photo-intro {
  padding-top: 70px;
  padding-bottom: 70px;
}

.photo-intro__grid {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.photo-intro__image,
.dress__photo,
.photo-gallery__item {
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(75,13,21,.14);
  background: rgba(255,255,255,.3);
  box-shadow: 0 24px 70px rgba(33,25,22,.10);
}

.photo-intro__image img,
.dress__photo img,
.photo-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-intro__image {
  aspect-ratio: 4 / 5;
}

.photo-intro__text h2 {
  margin-bottom: 20px;
}

.gallery {
  padding-top: 60px;
  text-align: center;
}

.photo-gallery {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  grid-template-rows: repeat(2, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.photo-gallery__item {
  margin: 0;
  min-height: 260px;
}

.photo-gallery__item--wide {
  grid-row: span 2;
}

.dress__layout {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  margin-bottom: 34px;
}

.dress__content h2 {
  margin-bottom: 18px;
}

.dress-lead {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.15;
  color: var(--burgundy);
  margin: 0 0 18px;
}

.dress-quote {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid rgba(75,13,21,.14);
  border-radius: 26px;
  background: rgba(255,255,255,.35);
  line-height: 1.6;
}

.dress-quote span {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  margin-bottom: 8px;
}

.dress__photo {
  aspect-ratio: 3 / 4;
}

.dress-note {
  text-align: center;
  margin: 0 auto 22px;
}

.palette--center {
  justify-content: center;
}

@media (max-width: 900px) {
  .photo-intro__grid,
  .dress__layout {
    grid-template-columns: 1fr;
  }

  .photo-intro__image {
    max-width: 560px;
    margin: 0 auto;
  }

  .dress__photo {
    max-width: 520px;
    margin: 0 auto;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .photo-gallery__item,
  .photo-gallery__item--wide {
    grid-row: auto;
    aspect-ratio: 4 / 5;
  }
}


.calendar-day.selected {
  color: var(--ivory);
  font-weight: 600;
  position: relative;
  z-index: 0;
}

.heart-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  fill: var(--burgundy);
  z-index: -1;
}

.calendar-day.selected::before,
.calendar-day.selected::after {
  content: none !important;
}

/* Финальная правка тайминга: вместо шестиугольников — понятная горизонтальная конфета */
.timeline-candy {
  display: block;
  width: 54px;
  height: 20px;
  flex: 0 0 54px;
  color: var(--burgundy-2);
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible;
}

.timeline-candy::before,
.timeline-candy::after {
  content: none !important;
}

.timeline-candy path,
.timeline-candy rect {
  fill: currentColor;
}

@media (max-width: 760px) {
  .heart-svg {
    width: 42px;
    height: 42px;
  }

  .timeline-candy {
    width: 48px;
    height: 18px;
    flex-basis: 48px;
  }
}
