/* =====================================================
   Wedding invite — Георгий + Олеся
   Palette:
     --bg     #FFF3D5  cream background
     --green  #606C38  leafy / accent green
     --red    #930507  hearts / accent red

   Fonts:
     - Headings: Marck Script (cursive)
     - Body / form: system-ui / sans-serif (print)
   ===================================================== */

:root {
  --bg: #FFF3D5;
  --green: #606C38;
  --red: #930507;
  --ink: #2d2a22;
  --paper: #fffbef;

  --font-script: 'Marck Script', 'Caveat', cursive;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* ===== Leafy borders along the whole page ===== */
.border-leaves {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 110px;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}
.border-leaves--left  { left: 0;  }
.border-leaves--right { right: 0; }

/* ===== Page container ===== */
.page {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 18px 60px;
}

/* ===== Common section title (cursive) ===== */
.section-title {
  font-family: var(--font-script);
  color: var(--green);
  font-size: 64px;
  text-align: center;
  margin: 36px 0 22px;
  letter-spacing: 1px;
  font-weight: 400;
  line-height: 1;
}
.section-title--inverse {
  color: var(--bg);
  background: var(--red);
  display: inline-block;
  padding: 4px 24px;
  border-radius: 4px;
  margin: 24px auto 18px;
  font-size: 26px;
  line-height: 1.1;
  max-width: 100%;
}

.divider {
  text-align: center;
  color: var(--green);
  letter-spacing: 4px;
  margin: 18px 0;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  text-align: center;
  padding: 30px 0 10px;
}
/* Sparkles & little hearts around the names */
.hero__sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkle { position: absolute; width: 22px; opacity: 0.9; }
.sparkle.s1  { top: 30px;  left: 14px;  width: 22px; }
.sparkle.s2  { top: 20px;  right: 18px; width: 18px; }
.sparkle.s3  { top: 90px;  left: 28px;  width: 14px; }
.sparkle.s4  { top: 78px;  right: 32px; width: 20px; }
.sparkle.s5  { top: 150px; left: 18px;  width: 16px; }
.sparkle.s6  { top: 160px; right: 14px; width: 22px; }
.sparkle.s7  { top: 210px; left: 36px;  width: 12px; }
.sparkle.s8  { top: 220px; right: 40px; width: 14px; }
.sparkle.s9  { top: 56px;  left: 60px;  width: 10px; }
.sparkle.s10 { top: 66px;  right: 66px; width: 10px; }

.mini-heart { position: absolute; width: 14px; opacity: 0.95; pointer-events: none; }
.mini-heart.h1 { top: 50px;  left: 50px;  width: 12px; }
.mini-heart.h2 { top: 60px;  right: 48px; width: 14px; transform: rotate(-12deg); }
.mini-heart.h3 { top: 130px; left: 8px;   width: 16px; transform: rotate(8deg); }
.mini-heart.h4 { top: 120px; right: 8px;  width: 12px; transform: rotate(-6deg); }
.mini-heart.h5 { top: 195px; left: 56px;  width: 14px; transform: rotate(10deg); }

.hero__title {
  font-family: var(--font-script);
  color: var(--green);
  font-size: 72px;
  line-height: 1;
  margin: 10px 0 22px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}
.hero__title .hero__name { display: block; }
.hero__plus, .hero__equals {
  display: block;
  font-size: 46px;
  color: var(--red);
  line-height: 1;
  margin: 4px 0;
}

/* Hero photo — rectangular, large-format slot */
.hero__photo-frame {
  width: min(360px, 92%);
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border: 3px solid var(--red);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(147, 5, 7, 0.18);
  overflow: hidden;
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--green);
  color: var(--green);
  font-family: var(--font-script);
  font-size: 24px;
  background: var(--paper);
  cursor: pointer;
  user-select: none;
  /* transition: transform 0.15s ease, background 0.2s ease; */
}
.hero__cta:hover { background: #fff7d8; }
.hero__cta:active { transform: scale(0.97); }
.hero__cta.is-playing {
  background: var(--green);
  color: var(--bg);
}
.hero__cta.is-playing .hero__play {
  background: var(--bg);
  color: var(--green);
}
.hero__play {
  background: var(--green);
  color: var(--bg);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding-left: 2px;
}

/* =====================================================
   GREETING + CALENDAR
   ===================================================== */
.greeting { text-align: center; padding-top: 28px; }
.greeting__arrow { color: var(--green); font-size: 30px; margin-bottom: 8px; }
.greeting__title {
  font-family: var(--font-script);
  color: var(--red);
  font-size: 48px;
  margin: 6px 0 16px;
  font-weight: 400;
  line-height: 1.05;
}
.greeting__text {
  margin: 12px 18px;
  font-size: 15px;
  color: var(--ink);
}

.calendar {
  position: relative;
  margin: 30px auto 0;
  padding: 30px 18px 18px;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: var(--paper);
  width: min(360px, 92%);
  border-top: 0;
}
.calendar::before {
  content: '';
  position: absolute;
  left: -2px; right: -2px; top: -14px;
  height: 16px;
  background-image: radial-gradient(circle at 8px 8px, var(--red) 4px, transparent 5px);
  background-size: 16px 16px;
  background-repeat: repeat-x;
}
.calendar__bow {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}
.calendar__title {
  font-family: var(--font-script);
  color: var(--red);
  font-size: 42px;
  margin: 0 0 10px;
  text-align: center;
  font-weight: 400;
}
.calendar__grid {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  text-align: center;
}
.calendar__grid th {
  color: var(--red);
  font-weight: 600;
  padding-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.calendar__grid td { padding: 5px 0; }
.calendar__day--marked {
  position: relative;
  color: var(--red);
  font-weight: 700;
}
.calendar__heart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 26px;
  opacity: 0.85;
  pointer-events: none;
}

/* =====================================================
   LOCATION — tablepeople sketch sits behind the text;
   no red overlay shape anymore.
   ===================================================== */
.location { position: relative; padding-top: 20px; }
.location__lights {
  width: 100%;
  margin-bottom: -8px;
}

.location__card {
  position: relative;
  margin: 18px auto;
  width: min(420px, 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 12px;
}
.location__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
.location__text {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 280px;
  padding: 10px 14px;
  background: rgba(255, 243, 213, 0.78);
  border-radius: 10px;
  backdrop-filter: blur(1px);
}
.location__text p { margin: 0 0 10px; }
.location__btn {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 12px;
  border: 1.5px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  background: var(--bg);
  font-family: var(--font-body);
}

/* =====================================================
   TIMING
   ===================================================== */
.timing { padding-top: 10px; }
.timing__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  padding: 0 6px;
  /* default: visible. JS adds .is-hidden, then removes it when in view. */
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.timing__row--reverse { flex-direction: row-reverse; text-align: right; }
.timing__icon {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.timing__icon--rings   { width: 120px; }
.timing__icon--candles { width: 95px; height: 130px; }
.timing__icon--cake    { width: 105px; }

.timing__info { display: flex; flex-direction: column; }
.timing__label {
  font-family: var(--font-script);
  color: var(--red);
  font-size: 26px;
  line-height: 1;
}
.timing__time {
  font-family: var(--font-script);
  color: var(--ink);
  font-size: 40px;
  line-height: 1.1;
  margin: 2px 0;
}
.timing__note {
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-body);
}

/* Edge-to-center animation: hidden state is applied by JS only after the
   element exists, so users with JS-off / errors still see the text. */
[data-animate].is-hidden { opacity: 0; }
[data-animate].is-hidden[data-animate="from-left"]  { transform: translateX(-110vw); }
[data-animate].is-hidden[data-animate="from-right"] { transform: translateX( 110vw); }

/* =====================================================
   WISHES — blob-shaped
   ===================================================== */
.wishes { position: relative; text-align: center; padding-top: 10px; }
.wishes__num {
  display: inline-block;
  font-family: var(--font-script);
  color: var(--red);
  font-size: 30px;
  margin-bottom: 6px;
}
.wishes__present {
  display: block;
  width: 120px;
  margin: 6px auto 10px;
  mix-blend-mode: multiply;
}
/* === Wish cards === */
.wish-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 24px;
}
.wish-card__inner {
  width: 100%;
  font-size: 13.5px;
  line-height: 1.5;
}
.wish-card__inner p { margin: 0 0 12px; }

/* Wavy-oval cards: red outline only, no fill */
.wish-card--wavy {
  width: 280px;
  height: 250px;
  padding: 38px 34px;
  background: url('../assets/decor/wavy-oval.svg') center/100% 100% no-repeat;
  color: var(--ink);
  flex-shrink: 0;
}
.wish-card--wavy .wish-card__inner { font-size: 14px; }

/* Card + companion cat in a row */
.wish-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px auto;
  max-width: 100%;
}
.wish-row--cat-right { justify-content: flex-start; margin-left: 0;   margin-right: auto; }
.wish-row--cat-left  { justify-content: flex-end;   margin-left: auto; margin-right: 0;   margin-top: -10px; }
.wish-row__cat {
  width: 180px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  flex-shrink: 0;
}

/* Third card stays as a filled rounded rectangle */
.wish-card--rect {
  width: min(340px, 92%);
  margin: 18px auto;
  border-radius: 28px;
  padding: 24px 22px;
  background: var(--red);
  color: var(--bg);
  box-shadow: 0 6px 20px rgba(147, 5, 7, 0.18);
}
.wish-card--center { margin-left: auto; margin-right: auto; }

.wish-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.wish-card__btn {
  display: inline-block;
  padding: 7px 12px;
  border: 1.5px solid var(--bg);
  border-radius: 4px;
  color: var(--bg);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-family: var(--font-body);
  background: rgba(255,255,255,0.06);
  transition: background 0.15s ease;
}
.wish-card__btn:hover { background: rgba(255,255,255,0.18); }

/* =====================================================
   DRESS CODE
   ===================================================== */
.dress { text-align: center; padding-top: 20px; }
.dress__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dress__sketch {
  width: 90px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  opacity: 0.95;
}
.dress__sketch--right { /* no flip — costume is upright */ }
.dress__text { font-size: 14.5px; margin: 0 6px; color: var(--ink); }
.dress__palette {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}
.swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.dress__inspire {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 18px;
  border: 1.5px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.dress__inspire:hover {
  background: var(--red);
  color: var(--bg);
}

/* =====================================================
   MEMORIES
   ===================================================== */
.memories {
  text-align: center;
  padding: 26px 18px;
  margin: 30px auto;
  width: min(360px, 94%);
  border: 2px solid var(--red);
  border-radius: 6px;
  background: var(--paper);
  position: relative;
}
.memories::before, .memories::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 16px;
  background-image: linear-gradient(90deg, var(--red) 50%, transparent 50%);
  background-size: 20px 16px;
}
.memories::before { top: -16px; }
.memories::after  { bottom: -16px; transform: scaleY(-1); }
.memories__text { font-size: 14.5px; color: var(--ink); }
.memories__btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border: 1.5px solid var(--red);
  color: var(--red);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  background: var(--bg);
  border-radius: 4px;
  font-family: var(--font-body);
}

/* =====================================================
   ANKETA (form)
   ===================================================== */
.anketa { text-align: center; padding-top: 18px; }
.anketa__tagline {
  font-family: var(--font-script);
  color: var(--red);
  font-size: 26px;
  margin: 4px 0;
}
.anketa__heading {
  position: relative;
  display: inline-block;
  padding-left: 50px;
}
.anketa__dove {
  position: absolute;
  left: -60px;
  top: 18px;
  width: 100px;
  mix-blend-mode: multiply;
}
.anketa__intro {
  font-size: 14.5px;
  margin: 0 14px 16px;
  color: var(--ink);
}

.anketa__form {
  text-align: left;
  max-width: 380px;
  margin: 0 auto;
  padding: 0 6px;
  font-family: var(--font-body);
}
.field { display: block; margin: 14px 0; padding: 0; border: 0; }
.field__label {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
  font-weight: 500;
}
.field input[type="text"],
.field input[type="tel"],
.field textarea,
.field__inline-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--green);
  padding: 6px 2px;
  outline: none;
}
.field textarea { resize: vertical; }
.field__inline-input { margin-top: 6px; }

.drinks-field { position: relative; }
.drinks-field__icon {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 150px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.radio, .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  margin: 4px 0;
  cursor: pointer;
}
.radio input, .checkbox input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}

.anketa__submit {
  display: block;
  width: 160px;
  margin: 18px auto 0;
  padding: 10px 16px;
  background: var(--green);
  color: var(--bg);
  border: 0;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.anketa__submit:hover { background: #4f5a2e; }
.anketa__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.anketa__status {
  text-align: center;
  font-size: 14px;
  min-height: 22px;
  margin-top: 10px;
}
.anketa__status.is-success { color: var(--green); }
.anketa__status.is-error   { color: var(--red); }

/* =====================================================
   FAREWELL
   ===================================================== */
.farewell { text-align: center; padding: 30px 0 50px; }
.farewell__title {
  font-family: var(--font-script);
  color: var(--red);
  font-size: 64px;
  margin: 0 0 14px;
  font-weight: 400;
}
.farewell__sketch {
  width: min(800px, 100%);
  margin: 0 auto;
  mix-blend-mode: multiply;
}

/* =====================================================
   Responsive tweaks
   ===================================================== */
@media (max-width: 380px) {
  .hero__title { font-size: 58px; }
  .sparkle    { transform: scale(0.85); }
  .mini-heart { transform: scale(0.85); }
  .farewell__sketch { width: 95%; }
  .section-title { font-size: 52px; }
  .section-title--inverse { font-size: 32px; }
  .calendar { width: 96%; }
  .border-leaves { width: 70px; }
  .location__card { min-height: 260px; padding: 24px 6px; }
  .location__text { font-size: 13px; max-width: 220px; }
  .anketa__dove { left: -40px; width: 60px; }
  .drinks-field__icon { width: 56px; }
  .wish-card--wavy  { width: 210px; height: 180px; padding: 30px 28px; }
  .wish-card--rect  { width: 95%; }
  .wish-card__inner { font-size: 12.5px; }
  .wish-row__cat    { width: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .timing__row { transition: none !important; transform: none !important; opacity: 1 !important; }
  [data-animate].is-hidden { opacity: 1; transform: none; }
}
