/* Modern — deep maroon dark-mode with gold accents, Playfair Display + Montserrat.
   Flagship-feeling: full-bleed hero (video-first, photo fallback), scroll-reveal
   sections. Default template theme; client.yaml `theme` (Dua Hati+) overrides
   --color-bg/--color-text/--color-accent via _shared/partials/brand_tokens.html.j2. */
:root {
  --color-bg: #1C0B10;
  --color-text: var(--color-ivory);
  --color-accent: var(--color-gold);
  --color-surface: var(--color-maroon);
  --color-surface-soft: rgba(250, 246, 240, 0.06);
  --color-border-soft: rgba(201, 162, 39, 0.3);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

#main-content { max-width: 780px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  background: radial-gradient(circle at 50% 30%, var(--color-surface) 0%, var(--color-bg) 75%);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__photo, .hero__video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28, 11, 16, 0.15) 0%, rgba(28, 11, 16, 0.55) 55%, rgba(28, 11, 16, 0.92) 100%);
}
.hero__monogram {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 4rem; color: var(--color-accent);
  background: radial-gradient(circle at 50% 40%, var(--color-surface) 0%, var(--color-bg) 80%);
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero__flourish { font-family: var(--font-flourish); font-size: 2rem; color: var(--color-accent); margin: 0 0 0.25rem; }
.hero__names {
  font-family: var(--font-heading); font-weight: 700; font-size: 3.2rem; margin: 0 0 1rem;
  letter-spacing: 0.01em; text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero__amp { color: var(--color-accent); font-style: italic; }
.hero__greeting { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; margin-bottom: 2.25rem; }
.hero__scroll-cue {
  position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  color: var(--color-accent); font-size: 1.25rem; opacity: 0.75; z-index: 1;
  animation: dh-bob 2.2s ease-in-out infinite;
}
@keyframes dh-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.countdown { display: flex; justify-content: center; gap: 1.5rem; margin: 0 auto; }
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 3.5rem; }
.countdown__num { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; color: var(--color-accent); }
.countdown__label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }

/* ---------- Sections & scroll-reveal ---------- */
.section { padding: 4rem 0; border-top: 1px solid var(--color-border-soft); }
.section__heading {
  font-family: var(--font-heading); font-weight: 600; font-size: 1.9rem; text-align: center;
  margin: 0 0 2.25rem; color: var(--color-text);
}
.section__heading::after {
  content: ""; display: block; width: 48px; height: 2px; margin: 0.85rem auto 0; background: var(--color-accent);
}

/* Progressive enhancement: only animate once JS confirms it can flip the
   `is-visible` class back on — no-JS visitors get the fully visible page. */
.js .section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.js .section.is-visible { opacity: 1; transform: translateY(0); }

.story-timeline__item { margin-bottom: 2rem; text-align: center; }
.story-timeline__date { font-size: 0.8rem; color: var(--color-accent); letter-spacing: 0.08em; text-transform: uppercase; }
.story-timeline__title { font-family: var(--font-heading); font-size: 1.3rem; margin: 0.3rem 0; }
.story-timeline__text { margin: 0; opacity: 0.85; }

.events-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.event-card {
  background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: 4px;
  padding: 1.75rem; text-align: center;
}
.event-card__label { font-family: var(--font-heading); color: var(--color-accent); margin: 0 0 0.6rem; font-size: 1.15rem; }
.event-card__date, .event-card__venue, .event-card__address { margin: 0.25rem 0; }
.event-card__links { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.1rem; }

.btn {
  display: inline-block; padding: 0.7rem 1.5rem; border-radius: 2px; text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.85; }
.btn--outline { background: transparent; border-color: var(--color-accent); color: var(--color-text); }
.btn--accent { background: var(--color-accent); color: var(--color-ink); border-color: var(--color-accent); }

.schedule-list { list-style: none; padding: 0; max-width: 440px; margin: 0 auto; }
.schedule-list__item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px dashed var(--color-border-soft); }
.schedule-list__time { font-weight: 600; min-width: 5rem; color: var(--color-accent); }
.dress-code { text-align: center; margin-top: 2.25rem; }
.dress-code__swatches { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.5rem; }
.dress-code__swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--color-border-soft); display: inline-block; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.gallery-grid__item { border: none; padding: 0; background: none; cursor: pointer; aspect-ratio: 1; overflow: hidden; border-radius: 2px; }
.gallery-grid__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery-grid__item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; background: rgba(10,4,6,0.95); display: flex; align-items: center;
  justify-content: center; z-index: 100;
}
.lightbox__img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: none; color: var(--color-ivory); font-size: 2rem; cursor: pointer;
}
.lightbox__close { top: 1rem; right: 1.5rem; color: var(--color-accent); }
.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }

.gift-section__message { text-align: center; opacity: 0.85; max-width: 480px; margin: 0 auto 2rem; }
.gift-section__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.gift-card { background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: 4px; padding: 1.5rem; text-align: center; }
.gift-card__bank { font-family: var(--font-heading); font-weight: 600; margin: 0; color: var(--color-accent); }
.gift-card__name { opacity: 0.75; margin: 0.3rem 0; font-size: 0.9rem; }
.gift-card__copy {
  border: 1px dashed var(--color-accent); background: none; color: var(--color-text); border-radius: 2px;
  padding: 0.55rem 1rem; cursor: pointer; font-family: var(--font-body);
}
.gift-card__qr-img { width: 150px; height: 150px; object-fit: contain; background: var(--color-ivory); border-radius: 4px; padding: 0.5rem; }

.rsvp-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 440px; margin: 0 auto; }
.rsvp-form__field { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; }
.rsvp-form__field input, .rsvp-form__field select, .rsvp-form__field textarea {
  padding: 0.7rem 0.85rem; border: 1px solid var(--color-border-soft); border-radius: 2px;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--color-surface-soft); color: var(--color-text);
}
.rsvp-form__field input::placeholder, .rsvp-form__field textarea::placeholder { color: rgba(250,246,240,0.45); }
.rsvp-form__field select option { background: var(--color-bg); color: var(--color-text); }
.rsvp-form__field input:focus, .rsvp-form__field select:focus, .rsvp-form__field textarea:focus {
  outline: none; border-color: var(--color-accent);
}
.rsvp-form__honeypot { position: absolute; left: -9999px; }
.rsvp-form__status { text-align: center; color: var(--color-accent); font-weight: 600; }

.wishes-list__item { border-bottom: 1px solid var(--color-border-soft); padding: 0.85rem 0; }
.wishes-list__name { font-weight: 600; margin: 0; color: var(--color-accent); }
.wishes-list__message { margin: 0.25rem 0 0; opacity: 0.85; }

.calendar-cta { text-align: center; padding: 2rem 0; }

.site-footer { text-align: center; padding-top: 2.5rem; opacity: 0.65; }
.site-footer__logo { width: 32px; height: 32px; object-fit: contain; }
.site-footer__credit { font-size: 0.75rem; margin: 0.6rem 0 0; letter-spacing: 0.04em; }

.music-toggle {
  position: fixed; bottom: 1.25rem; right: 1.25rem; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--color-border-soft); background: var(--color-accent); color: var(--color-ink);
  font-size: 1.3rem; cursor: pointer; z-index: 50;
}

.lang-toggle {
  position: fixed; top: 1.25rem; right: 1.25rem; border: 1px solid var(--color-accent); background: var(--color-bg);
  color: var(--color-text); border-radius: 2px; padding: 0.4rem 1rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em; cursor: pointer; z-index: 50;
}

.teaser-overlay, .thank-you-overlay {
  position: fixed; inset: 0; background: var(--color-bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem; z-index: 60;
}
/* `hidden` and `display:flex` above are equal-specificity (class vs. UA attribute
   selector) — without this compound selector, source order lets `flex` win and
   the overlay stays visible even with the `hidden` attribute set. */
.lightbox[hidden], .teaser-overlay[hidden], .thank-you-overlay[hidden] { display: none; }
.teaser-overlay__flourish, .thank-you-overlay__flourish { font-family: var(--font-flourish); font-size: 2.25rem; color: var(--color-accent); }
.teaser-overlay__names, .thank-you-overlay__names { font-family: var(--font-heading); font-size: 2.5rem; margin: 0.5rem 0 1.5rem; }
.teaser-overlay__note { opacity: 0.8; max-width: 380px; }
.thank-you-overlay__photo { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; margin-bottom: 1.25rem; border: 2px solid var(--color-accent); }
.thank-you-overlay__message { max-width: 420px; opacity: 0.85; }

@media (max-width: 480px) {
  .hero__names { font-size: 2.3rem; }
  .hero__flourish { font-size: 1.6rem; }
  .countdown { gap: 0.75rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
