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

/* ── DESIGN TOKENS ── */
:root {
  --cream:   #fdf8f2;
  --gold:    #c9a96e;
  --gold-lt: #e8d5b0;
  --brown:   #5c3d2e;
  --text:    #3a2a1e;
  --muted:   #8a7060;
  --white:   #ffffff;
  --shadow:  rgba(92, 61, 46, 0.13);
  --radius:  16px;
  --section: 40px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('background.webp') center top / cover no-repeat;
  z-index: -1;
}

/* ── TYPOGRAPHY ── */
.script {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  font-style: italic;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .75rem;
  color: var(--gold);
  font-style: normal;
}

.section-heading {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 400;
  color: var(--brown);
  margin-bottom: 8px;
}

/* ── ORNAMENT DIVIDER ── */
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  margin: 16px 0;
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1 1 60px;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-lt));
}
.ornament::after { background: linear-gradient(to left, transparent, var(--gold-lt)); }

/* ── SECTIONS ── */
section {
  position: relative;
  padding: var(--section) 24px;
  background: transparent;
}

/* ── CONTENT CARDS (frosted cream) ── */
.section-inner,
.gallery-section-inner,
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(253, 248, 242, 0.82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 18px;
  padding: 40px 36px;
}

/* ── SCROLL FADE-IN ── */
.fade-in {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 48px;
  background: transparent;
}

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

.hero-label        { animation: fadeIn .9s ease .1s both; letter-spacing: .35em; font-size: .7rem; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.hero-names        { animation: fadeUp .8s ease .4s both; font-size: clamp(3.4rem, 12vw, 7.5rem); font-weight: 400; line-height: 1.1; color: var(--brown); margin-bottom: 10px; }
.hero-names + .hero-amp { animation: fadeIn .6s ease .8s both; }
.hero-amp          { font-size: clamp(1.8rem, 6vw, 3.5rem); color: var(--gold); line-height: 1; margin: 4px 0 10px; }
.hero-names.second { animation: fadeUp .8s ease 1s both; }
.hero-date         { animation: fadeIn .8s ease 1.3s both; font-size: clamp(1rem, 3.5vw, 1.5rem); color: var(--muted); letter-spacing: .15em; margin-top: 18px; }
.hero-photo        { animation: fadeUp .9s ease 1.6s both; }

.hero-photo {
  width: min(320px, 80vw);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px auto 0;
  box-shadow: 0 14px 44px var(--shadow);
  border: 3px solid var(--white);
  outline: 1px solid var(--gold-lt);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ════════════════════════════════════════
   DETAILS
════════════════════════════════════════ */
#details { text-align: center; }

.details-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: 0 4px 22px var(--shadow);
  border-top: 3px solid var(--gold);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .2s;
}
.detail-card.visible { opacity: 1; transform: translateY(0); }
.detail-card:hover   { box-shadow: 0 8px 32px rgba(92, 61, 46, .18); }

.detail-card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.detail-card h3 {
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.detail-card p     { font-size: .95rem; color: var(--brown); font-weight: 600; }
.detail-card .sub  { font-size: .82rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
.map-link {
  display: inline-block;
  margin-top: 8px;
  font-size: .78rem;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-lt);
  transition: color .2s, border-color .2s;
}
.map-link:hover { color: var(--brown); border-color: var(--brown); }

/* ════════════════════════════════════════
   COUNTDOWN
════════════════════════════════════════ */
#countdown { text-align: center; }

.timer {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 32px);
  margin-top: 32px;
  flex-wrap: wrap;
}
.timer-block { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.timer-num {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  font-family: 'Palatino Linotype', Palatino, serif;
}
.timer-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--muted);
  margin-top: 6px;
}

/* ════════════════════════════════════════
   DRESS CODE
════════════════════════════════════════ */
#dresscode { text-align: center; }

.palette-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 10px;
}
.palette-gender { display: flex; flex-direction: column; gap: 12px; }
.palette-gender-title { font-size: 1rem; font-weight: 600; letter-spacing: .05em; text-align: center; }
.palette { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.swatch  { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swatch-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 3px 10px var(--shadow);
  transition: transform .2s;
}
.swatch-circle:hover { transform: scale(1.1); }
.swatch-label { font-size: .62rem; color: var(--muted); white-space: nowrap; }

@media (min-width: 600px) {
  .palette-wrap { flex-direction: row; justify-content: center; }
  .palette-gender { flex: 1; max-width: 320px; }
}

/* ════════════════════════════════════════
   GALLERY / PHOTO CAROUSEL
════════════════════════════════════════ */
#gallery { text-align: center; }

.photo-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}

.photo-stack {
  position: relative;
  width: min(300px, 82vw);
  height: min(400px, 109vw);
  cursor: pointer;
  user-select: none;
}

.stack-card {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 4px solid var(--white);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .16);
  transition: transform .55s cubic-bezier(.34, 1.1, .64, 1),
              opacity   .45s ease;
  will-change: transform, opacity;
}
.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.stack-card[data-pos="front"] { transform: rotate(0deg)   translateY(0)   scale(1);    z-index: 3; opacity: 1; }
.stack-card[data-pos="mid"]   { transform: rotate(3.5deg) translateY(16px) scale(0.96); z-index: 2; opacity: .78; }
.stack-card[data-pos="back"]  { transform: rotate(-2.5deg) translateY(30px) scale(0.92); z-index: 1; opacity: .55; }
.stack-card[data-pos="hidden"]{ transform: rotate(0deg)   translateY(8px)  scale(0.88); z-index: 0; opacity: 0; pointer-events: none; }

.carousel-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-lt);
  background: var(--white);
  color: var(--gold);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover  { background: var(--gold); color: var(--white); transform: scale(1.05); }
.carousel-btn:active { transform: scale(.96); }

.carousel-dots { display: flex; gap: 8px; align-items: center; }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-lt);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.dot.active { background: var(--gold); transform: scale(1.4); }

/* ════════════════════════════════════════
   GIFTS
════════════════════════════════════════ */
#gifts { text-align: center; }

/* ════════════════════════════════════════
   RSVP
════════════════════════════════════════ */
#rsvp { text-align: center; }

.rsvp-deadline { font-size: .85rem; color: var(--muted); margin-top: 6px; }

.rsvp-existing {
  max-width: 520px;
  margin: 20px auto 0;
  padding: 14px 18px;
  background: rgba(184, 146, 74, 0.1);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: .92rem;
  color: var(--brown);
  text-align: left;
}

.decline-message {
  background: rgba(184, 146, 74, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
  text-align: center;
  font-style: italic;
  color: var(--brown);
  font-size: .95rem;
  line-height: 1.7;
}

.rsvp-form { max-width: 520px; margin: 36px auto 0; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gold-lt);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: .95rem;
  font-family: Georgia, serif;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, .15);
}
.form-group textarea { resize: vertical; min-height: 90px; }

.radio-group   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-option  { position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 1.5px solid var(--gold-lt);
  border-radius: 12px;
  cursor: pointer;
  background: var(--white);
  transition: all .2s;
  text-transform: none;
  letter-spacing: 0;
  font-size: .9rem;
  color: var(--brown);
}
.radio-option label .r-icon { font-size: 1.6rem; }
.radio-option input[type="radio"]:checked + label {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fdf4e7, #fef9f0);
  box-shadow: 0 3px 14px rgba(201, 169, 110, .25);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #b8924a);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-family: Georgia, serif;
  letter-spacing: .08em;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  margin-top: 8px;
}
.btn-submit:hover  { opacity: .9; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

.form-success {
  display: none;
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, #f9f4ec, #fdf8f2);
  border-radius: var(--radius);
  border: 1.5px solid var(--gold-lt);
}
.form-success .success-icon { font-size: 3rem; margin-bottom: 14px; }
.form-success h3 { font-size: 1.4rem; color: var(--brown); margin-bottom: 8px; }
.form-success p  { color: var(--muted); font-size: .95rem; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  background: var(--brown);
  color: var(--gold-lt);
  text-align: center;
  padding: 36px 24px;
  font-size: .82rem;
  letter-spacing: .08em;
}
footer .footer-names { font-size: 1.4rem; color: var(--gold); margin-bottom: 8px; }
footer .footer-note  { margin-top: 10px; opacity: .6; }

#eggTrigger {
  cursor: pointer;
  transition: color .2s;
}
#eggTrigger:hover { color: #fff; }

/* ════════════════════════════════════════
   ПАСХАЛКА OVERLAY
════════════════════════════════════════ */
.egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 18, 10, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.egg-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.egg-box {
  position: relative;
  background: rgba(253, 248, 242, 0.97);
  border-radius: 22px;
  padding: 40px 36px 32px;
  max-width: 420px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: translateY(30px) scale(0.95);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.egg-overlay.open .egg-box { transform: translateY(0) scale(1); }

.egg-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.egg-close:hover { background: var(--cream); color: var(--brown); }

.egg-label {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.egg-title {
  font-size: 2rem;
  color: var(--brown);
  margin-bottom: 18px;
}
.egg-photo {
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(92,61,46,.22);
  margin-bottom: 20px;
  border: 3px solid var(--gold-lt);
}
.egg-text {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 18px;
}
.egg-secret {
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: .12em;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 560px) {
  :root { --section: 56px; }

  .section-inner,
  .gallery-section-inner,
  .hero-inner { padding: 28px 20px; }

  .details-cards {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100%;
  }
  .detail-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 16px;
    padding: 16px 20px;
  }
  .detail-card .icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
    width: 2.4rem;
    text-align: center;
  }
  .detail-card-text { flex: 1; }
  .detail-card h3    { font-size: .65rem; }
  .detail-card p     { font-size: .95rem; }
  .detail-card .sub  { font-size: .8rem; }
  .radio-group { grid-template-columns: 1fr; }
}

/* ── GUEST GREETING (personalized invitation) ── */
.guest-greeting {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 20px;
  text-align: center;
  letter-spacing: .02em;
}
.guest-greeting strong { color: var(--brown); font-style: normal; }
