/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */

/* Base state: hidden */
.anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--delay, 0s);
}

/* Triggered state: visible */
.anim.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dividers: fade only, no shift */
.anim-fade {
  opacity: 0;
  transition: opacity 0.8s ease;
  transition-delay: var(--delay, 0s);
}
.anim-fade.is-visible {
  opacity: 1;
}

/* Hero image: scale + fade on load */
@keyframes heroImageIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-illustration {
  animation: heroImageIn 0.9s ease forwards;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .anim, .anim-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-illustration {
    animation: none;
  }
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fef9f7;
  font-family: 'Caveat', cursive;
  font-weight: 400;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   PAGE
───────────────────────────────────────── */

.page {
  display: flex;
  justify-content: center;
  width: 100%;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 100px;
  width: 100%;
  max-width: 900px;
  min-width: 1px;
  padding: 0 20px;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  width: 100%;
}

/* Desktop: overlaid absolutely on top of the illustration */
.hero-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 24px;
  line-height: 30px;
  color: #3163a0;
  white-space: nowrap;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 100%;
}

.hero-image-wrapper {
  flex-shrink: 0;
  width: 482px;
  max-width: 100%;
}

.hero-illustration {
  display: block;
  width: 100%;
  height: auto;
}

.hero-title {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-subtitle {
  font-size: 32px;
  line-height: 40px;
  color: #3163a0;
  width: 100%;
}

.hero-name {
  font-size: 83px;
  line-height: 80px;
  color: #d26746;
  width: 100%;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 267px;
  height: 54px;
  background: transparent;
  color: #3163a0;
  border: 1px solid #3163a0;
  border-radius: 16px;
  font-family: 'Caveat', cursive;
  font-size: 25px;
  line-height: normal;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
  margin-top: 16px;
  flex-shrink: 0;
}

.hero-btn:hover {
  background: rgba(49, 99, 160, 0.06);
}

/* ─────────────────────────────────────────
   DIVIDER
───────────────────────────────────────── */

.divider {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 380px;
}

.divider img {
  width: 100%;
  height: 22px;
}

/* ─────────────────────────────────────────
   MESSAGE
───────────────────────────────────────── */

.message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.message-icon {
  width: 86px;
  height: 86px;
  flex-shrink: 0;
}

.message-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: #3163a0;
  text-align: center;
  width: 100%;
}

.message-heading {
  font-size: 62px;
  line-height: 56px;
  width: 100%;
}

.message-body {
  font-size: 32px;
  line-height: 40px;
  max-width: 536px;
  width: 100%;
}

.fireworks-btn {
  margin-top: 8px;
  background: transparent;
  color: #3163a0;
  border: 1px solid #3163a0;
  border-radius: 16px;
  height: 54px;
  padding: 0 32px;
  font-family: 'Caveat', cursive;
  font-size: 25px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.fireworks-btn:hover {
  background: #3163a0;
  color: #fff;
}

/* ─────────────────────────────────────────
   CALENDAR
───────────────────────────────────────── */

.calendar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 30px 0 60px;
  flex-shrink: 0;
}

.calendar-month {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
  white-space: nowrap;
}

.calendar-dates {
  position: relative;
  display: flex;
  align-items: center;
  gap: 45px;
  flex-shrink: 0;
}

.calendar-date {
  font-size: 47px;
  line-height: 60px;
  color: rgba(49, 99, 160, 0.5);
  text-align: center;
  width: 56px;
  display: block;
  flex-shrink: 0;
}

.calendar-date--active {
  color: #d26746;
}

/* Heart — exact Figma coords (desktop) */
.heart-wrapper {
  position: absolute;
  width:  113px;
  height: 106px;
  left:   278px;
  top:    -18.55px;
  pointer-events: none;
}

.heart-img {
  display: block;
  width:  100%;
  height: 100%;
}

/* ─────────────────────────────────────────
   LOCATION
───────────────────────────────────────── */

.location {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: 100%;
  flex-shrink: 0;
}

.location-title {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
}

.location-map {
  width: 100%;
  max-width: 700px;
  display: block;
  height: auto;
}

.location-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
  color: #3163a0;
  width: 100%;
}

.location-info-sub {
  font-size: 32px;
  line-height: 40px;
}

.location-info-name {
  font-size: 62px;
  line-height: 78px;
  color: #d26746;
}

.location-info-addr {
  font-size: 32px;
  line-height: 40px;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 17px;
  border: 1px solid #3163a0;
  border-radius: 16px;
  font-family: 'Caveat', cursive;
  font-size: 25px;
  line-height: normal;
  color: #3163a0;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
  width: 267px;
  height: 54px;
  flex-shrink: 0;
}

.location-btn:hover {
  background: rgba(49, 99, 160, 0.06);
}

.location-btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   TIMING
───────────────────────────────────────── */

.timing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.timing-title {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
}

/* Timing body: aspect-ratio preserves the wave SVG proportions */
.timing-body {
  position: relative;
  width: 100%;
  max-width: 860px;
  aspect-ratio: 860 / 1503;
}

/* The wavy line SVG fills the container */
.timing-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

/* Show/hide lines per breakpoint */
.timing-line--mobile { display: none; }
.timing-line--desktop { display: block; }

/* Event text blocks — absolutely positioned by % */
.timing-event {
  position: absolute;
  color: #3163a0;
}

.timing-time {
  font-size: 62px;
  line-height: 78px;
  color: #d26746;
}

.timing-desc {
  font-size: 32px;
  line-height: 44px;
}

/* Desktop positions (container: 860 × 1503) */
.timing-event--1 { top: 3.5%;  left: 28.7%; width: 42.6%; }
.timing-event--2 { top: 24.3%; left:  6.2%; width: 38.1%; }
.timing-event--3 { top: 50.6%; left: 46.4%; width: 32%;   }
.timing-event--4 { top: 80.6%; left: 17.7%; width: 25.5%; }


/* ─────────────────────────────────────────
   DETAILS
───────────────────────────────────────── */

.details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.details-title {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
}

.details-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.details-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 36px 0;
}

.details-item + .details-item {
  border-top: none;
}

.details-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.details-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: #3163a0;
  max-width: 540px;
  width: 100%;
}

.details-heading {
  font-size: 38px;
  line-height: 48px;
}

.details-body {
  font-size: 32px;
  line-height: 40px;
}

/* ─────────────────────────────────────────
   FORM
───────────────────────────────────────── */

.form-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.form-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: #3163a0;
  width: 100%;
}

.form-title {
  font-size: 62px;
  line-height: 78px;
}

.form-subtitle {
  font-size: 28px;
  line-height: 32px;
  max-width: 600px;
}

.guest-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 600px;
  background: #FFFEFD;
  border-radius: 20px;
  padding: 30px 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 0;
  border-bottom: 1px solid #EAEFF6;
}

.form-field:first-child {
  padding-top: 0;
}

.form-field:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}


.form-field-label {
  font-size: 22px;
  line-height: 24px;
  color: #3163a0;
}

.form-field-desc {
  font-size: 22px;
  line-height: 24px;
  color: #3163a0;
}

.form-input {
  width: 100%;
  padding: 10px 28px;
  border: 1px solid #3163a0;
  border-radius: 16px;
  background: transparent;
  font-family: 'Caveat', cursive;
  font-size: 24px;
  line-height: 26px;
  color: #3163a0;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: rgba(49, 99, 160, 0.51);
}

.form-input:focus {
  border-color: #3163a0;
  box-shadow: 0 0 0 2px rgba(49, 99, 160, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-textarea--sm {
  min-height: unset;
  height: calc(2 * 26px + 20px); /* 2 lines + padding */
  resize: none;
}

.form-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Horizontal layout for radio (attendance) */
.form-options--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 40px;
}

.form-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Hide native inputs */
.form-option input[type="radio"],
.form-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom indicator base */
.form-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid #3163a0;
  display: inline-block;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.form-check--radio {
  border-radius: 50%;
}

.form-check--box {
  border-radius: 5px;
}

/* Checked state — radio and checkbox: solid blue fill + checkmark */
.form-option input[type="radio"]:checked + .form-check--radio,
.form-option input[type="checkbox"]:checked + .form-check--radio {
  background: #3163a0 url("check for checkboxes.svg") center / 14px 14px no-repeat;
  border-color: #3163a0;
}

.form-option-text {
  font-size: 22px;
  line-height: 24px;
  color: #3163a0;
}

.form-submit {
  margin-top: 26px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  background: #3163a0;
  color: #fff;
  border: none;
  border-radius: 16px;
  font-family: 'Caveat', cursive;
  font-size: 25px;
  line-height: normal;
  cursor: pointer;
  transition: background 0.2s ease;
}

.form-submit:hover {
  background: #255090;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-error {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  line-height: 28px;
  color: #c0392b;
  text-align: center;
}

/* ─────────────────────────────────────────
   EXTRA / ДОПОЛНИТЕЛЬНО
───────────────────────────────────────── */

.extra {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.extra-title {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
}

.extra-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 36px 0;
}

.extra-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.extra-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: #3163a0;
  max-width: 540px;
  width: 100%;
}

.extra-heading {
  font-size: 38px;
  line-height: 48px;
}

.extra-body {
  font-size: 32px;
  line-height: 40px;
}

.extra-body--accent {
  font-size: 38px;
  line-height: 48px;
  margin-top: 14px;
}

.extra-body a,
.extra-body--accent a {
  color: inherit;
  text-decoration: none;
}

/* ─────────────────────────────────────────
   CLOSING
───────────────────────────────────────── */

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
  padding-bottom: 60px;
}

.closing-title {
  font-size: 62px;
  line-height: 78px;
  color: #3163a0;
  text-align: center;
}

.closing-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: #3163a0;
}

.closing-timer-label {
  font-size: 32px;
  line-height: 44px;
}

.closing-timer-value {
  font-size: 32px;
  line-height: 44px;
  color: #d26746;
}

.closing-img {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
}

/* ─────────────────────────────────────────
   POPUP
───────────────────────────────────────── */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.popup-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.popup-card {
  position: relative;
  background: #fef9f7;
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: #3163a0;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.popup-text {
  font-family: 'Caveat', cursive;
  font-size: 32px;
  line-height: 40px;
  color: #3163a0;
}

/* ═════════════════════════════════════════
   MOBILE  ≤ 639px
═════════════════════════════════════════ */

@media (max-width: 639px) {

  /* Container */
  .container {
    gap: 70px;
  }

  /* Hero bar: out of absolute, into normal flow */
  .hero-bar {
    position: static;
    padding: 16px 0;
    width: 100%;
  }

  /* Hero image */
  .hero-image-wrapper {
    width: 100%;
    max-width: 337.3px;
    overflow: hidden;
  }

  /* Hero titles */
  .hero-name {
    font-size: 64px;
    line-height: 55px;
  }

  /* Hero button: full-width friendly */
  .hero-btn {
    width: 100%;
    max-width: 267px;
  }

  /* Message */
  .message-heading {
    font-size: 48px;
    line-height: 48px;
  }

  .message-body {
    font-size: 28px;
    line-height: 32px;
  }

  .message-text {
    gap: 15px;
  }

  /* Calendar */
  .calendar {
    gap: 31px;
    width: 100%;
    overflow: hidden;
  }

  .calendar-month {
    font-size: 48px;
    line-height: 48px;
  }

  .calendar-dates {
    gap: 14px;
  }

  .calendar-date {
    font-size: 32px;
    line-height: 43px;
  }

  /* Heart — mobile Figma coords */
  .heart-wrapper {
    width:  83.927px;
    height: 78.728px;
    left:   199px;
    top:    -17.05px;
  }

  /* Location */
  .location-title {
    font-size: 48px;
    line-height: 48px;
  }

  .location-info-sub {
    font-size: 24px;
    line-height: 32px;
  }

  .location-info-name {
    font-size: 48px;
    line-height: 56px;
  }

  .location-info-addr {
    font-size: 24px;
    line-height: 32px;
  }

  /* Timing */
  .timing-title {
    font-size: 48px;
    line-height: 48px;
  }

  /* Switch to mobile SVG */
  .timing-line--desktop { display: none; }
  .timing-line--mobile  { display: block; }

  /* Mobile aspect ratio (320 × 1131) */
  .timing-body {
    aspect-ratio: 320 / 1131;
  }

  /* Mobile event positions */
  .timing-event--1 { top:  5.5%; left: 30.9%; width: 69.1%; }
  .timing-event--2 { top: 19.4%; left:  4.7%; width: 52.5%; }
  .timing-event--3 { top: 50.8%; left: 25.3%; width: 63.4%; }
  .timing-event--4 { top: 80.6%; left:  7.8%; width: 34%; }

  /* Mobile font sizes for timing events */
  .timing-time {
    font-size: 38px;
    line-height: 48px;
  }

  .timing-desc {
    font-size: 24px;
    line-height: 32px;
  }


  /* Details */
  .details-title {
    font-size: 48px;
    line-height: 48px;
  }

  .details-heading {
    font-size: 28px;
    line-height: 36px;
  }

  .details-body {
    font-size: 24px;
    line-height: 32px;
  }

  /* Form */
  .form-title {
    font-size: 48px;
    line-height: 48px;
  }

  .form-input {
    padding: 10px 20px;
  }

  /* Extra */
  .extra-title {
    font-size: 48px;
    line-height: 48px;
  }

  .extra-heading {
    font-size: 30px;
    line-height: 38px;
  }

  .extra-body {
    font-size: 24px;
    line-height: 32px;
  }

  .extra-body--accent {
    font-size: 30px;
    line-height: 38px;
  }

  /* Closing */
  .closing-title {
    font-size: 48px;
    line-height: 56px;
  }

  .closing-timer-label,
  .closing-timer-value {
    font-size: 24px;
    line-height: 32px;
  }

  /* Popup */
  .popup-card {
    padding: 40px 24px;
  }

  .popup-text {
    font-size: 28px;
    line-height: 36px;
  }
}
