/* ═══════════════════════════════════════════════════════════════
   SECTIONS — popup-карточки, countdown, details, gallery,
   RSVP, dresscode, footer
   ═══════════════════════════════════════════════════════════════ */

section { padding: 7rem 2rem; }

.section-tag {
  font-size: 0.6rem; letter-spacing: 5px; text-transform: uppercase;
  color: var(--sage); text-align: center; margin-bottom: 1rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 300;
  text-align: center; color: var(--charcoal);
  margin-bottom: 1rem;
}
.section-line {
  width: 40px; height: 1px; background: var(--gold);
  margin: 0 auto 3rem;
}

/* ─── POPUP CARDS — кремово-белое матовое стекло ─── */
.countdown-section,
.details,
.gallery,
.rsvp,
.dresscode {
  max-width: 1024px;
  margin: 3rem auto;
  border-radius: 18px;
  border: 1px solid rgba(201,169,110,0.40);
  box-shadow:
    0 4px  14px rgba(120,90,40,0.10),
    0 24px 60px rgba(120,90,40,0.18);
  position: relative;
  overflow: hidden;
  background: rgba(255,252,247,0.88);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  color: var(--text);
}
.details, .gallery, .rsvp, .dresscode { padding: 5rem 3rem; }

/* ─── Countdown ─── */
.countdown-section {
  padding: 4.5rem 3rem;
  text-align: center;
  border-top:    1px solid rgba(212,190,158,0.15);
  border-bottom: 1px solid rgba(212,190,158,0.15);
}
/* ─── Invite block — приглашение перед таймером ─── */
.invite-block {
  max-width: 640px;
  margin: 0 auto clamp(2rem, 3vw, 3.5rem);
  text-align: center;
}
.invite-heading {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  color: var(--charcoal);
  margin-bottom: clamp(0.9rem, 1.4vw, 1.5rem);
  letter-spacing: 0.5px;
}
.invite-body {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.75;
  color: var(--text);
  margin: 0 auto clamp(1.4rem, 2.2vw, 2.2rem);
  max-width: 560px;
}
.invite-call {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(0.6rem, 0.85vw, 0.72rem);
  letter-spacing: clamp(2px, 0.45vw, 4px);
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: clamp(0.7rem, 1.1vw, 1.1rem);
  line-height: 1.7;
}
.invite-date {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: clamp(2px, 0.4vw, 4px);
  /* Металлический золотой градиент */
  background: linear-gradient(135deg,
    var(--gold-light) 0%,
    var(--gold)       40%,
    var(--gold-deep)  70%,
    var(--gold)       100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(168,140,90,0.30));
}
.countdown-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-style: italic;
  color: var(--taupe);
  margin-bottom: 2.5rem;
  letter-spacing: 1px;
}
.countdown {
  display: flex; justify-content: center; gap: 3rem;
  flex-wrap: wrap;
}
.countdown-item {
  display: flex; flex-direction: column; align-items: center;
}
.countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
}
.countdown-unit {
  font-size: 0.6rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--taupe);
  margin-top: 0.5rem;
}
.countdown-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); align-self: center;
}

/* Section заголовки внутри popup-карточек — тёмные на кремовом */
.countdown-section .section-tag,
.details .section-tag,
.gallery .section-tag,
.rsvp .section-tag,
.dresscode .section-tag {
  color: var(--gold-deep);
}
.countdown-section .section-title,
.details .section-title,
.gallery .section-title,
.rsvp .section-title,
.dresscode .section-title {
  color: var(--charcoal);
}

/* ─── Details ─── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; max-width: 900px; margin: 0 auto;
}
.detail-card {
  text-align: center; padding: 3rem 2rem;
  border: 1px solid rgba(201,169,110,0.35);
  border-radius: 4px;
  background: rgba(255,252,247,0.95);
  color: var(--text);
  transition: transform 0.4s, box-shadow 0.4s;
  box-shadow: 0 2px 8px rgba(120,90,40,0.06);
}
.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(120,90,40,0.18);
}
.detail-icon {
  font-size: 2rem; margin-bottom: 1.5rem;
  display: block;
}
.detail-logo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.75rem;
  display: block;
  border: 3px solid var(--gold);
  box-shadow:
    0 4px 18px rgba(120,90,40,0.25),
    0 0 0 5px rgba(255,252,247,0.9);
  transition: transform 0.4s;
}
.detail-card:hover .detail-logo { transform: scale(1.06); }
.detail-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.8rem;
}
.detail-card p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.8;
}
.detail-card .detail-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-style: italic;
  color: var(--gold-deep); margin-top: 0.5rem;
}

/* ─── Карточка с фоновым фото (напр. ЗАГС) ─── */
.detail-card.has-photo {
  position: relative;
  background-size: cover;
  background-position: center;
  border-color: rgba(255,252,247,0.35);
  overflow: hidden;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5rem;
}
.detail-card.has-photo::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(20,14,8,0.82) 0%,
    rgba(20,14,8,0.60) 45%,
    rgba(20,14,8,0.84) 100%);
  z-index: -1;
}
.detail-card.has-photo h3,
.detail-card.has-photo p,
.detail-card.has-photo .detail-time {
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 2px 10px rgba(0,0,0,0.6);
}
.detail-card.has-photo .detail-time { color: var(--gold-light); }

/* ─── Gallery — 3 фото: photo_1 большое слева, photo_2/3 справа ─── */
.gallery-grid {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-auto-rows: clamp(210px, 30vw, 300px);
  gap: clamp(0.5rem, 1vw, 0.9rem);
}
.gallery-cell {
  border-radius: 2px; overflow: hidden;
  position: relative;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s;
}
.gallery-cell:hover { transform: scale(1.02); }
.gallery-cell.tall { grid-row: span 2; }
.gallery-cell.wide { grid-column: span 2; }
.gallery-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-cell:hover img { transform: scale(1.05); }
.gallery .gallery-placeholder {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 0.95rem;
  color: rgba(120,100,75,0.4);
}

/* ─── RSVP ─── */
.rsvp { position: relative; }
.rsvp-form {
  max-width: 500px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.6rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--taupe);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300; font-size: 0.95rem;
  padding: 0.8rem 0;
  border: none; border-bottom: 1px solid rgba(201,169,110,0.40);
  background: transparent;
  color: var(--charcoal);
  outline: none; transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-bottom-color: var(--gold);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(120,100,75,0.50);
}
.form-group select option {
  color: var(--text);
  background: var(--cream);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.rsvp-btn {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300; font-size: 0.72rem;
  letter-spacing: 4px; text-transform: uppercase;
  padding: 1.1rem 3rem; margin-top: 1rem;
  border: 1px solid var(--gold-deep);
  background: transparent;
  color: var(--gold-deep);
  cursor: pointer;
  transition: all 0.4s;
}
.rsvp-btn:hover {
  background: var(--gold-deep);
  color: var(--cream);
}
#rsvp-msg { color: var(--taupe) !important; }

/* ─── Dresscode ─── */
.dresscode { text-align: center; }
.palette {
  display: flex; justify-content: center; gap: 1.2rem;
  margin-top: 2rem; flex-wrap: wrap;
}
.palette-swatch {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid rgba(255,252,247,0.95);
  box-shadow: 0 2px 10px rgba(120,90,40,0.15);
  transition: transform 0.3s;
}
.palette-swatch:hover { transform: scale(1.15); }
.dresscode-note {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1.05rem;
  color: var(--text);
  margin-top: 2rem;
  max-width: 500px; margin-left: auto; margin-right: auto;
}

/* ─── Footer ─── */
footer {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--ivory);
  color: var(--text-light);
  border-top: 1px solid rgba(201,169,110,0.25);
}
footer .footer-names {
  font-family: 'Aquarelle', 'ScriptThinpen', 'Marck Script', cursive;
  font-size: 2.5rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}
footer p {
  font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--taupe);
}
footer .footer-heart {
  color: var(--gold-deep); font-size: 1.2rem;
  margin: 1rem 0;
}

/* ─── Fade-in observer ─── */
.fade-section {
  opacity: 0; transform: translateY(40px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-section.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  section { padding: 5rem 1.5rem; }
  .countdown { gap: 1.5rem; }
  .countdown-section,
  .details, .gallery, .rsvp, .dresscode {
    margin: 1.5rem 1rem;
    border-radius: 12px;
    padding: 3.5rem 1.5rem;
  }
  .details-grid { grid-template-columns: 1fr; }
}
