/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── New palette ── */
  --royal-blue:   #1a3580;
  --blue-mid:     #2a4db0;
  --blue-dark:    #0c1e55;
  --blue-deeper:  #070f2e;
  --gold:         #d4a832;
  --gold-light:   #f0cc60;
  --gold-dim:     #9a7820;
  --silver:       #c4cedd;
  --silver-light: #edf0f7;
  --silver-dim:   #8896b0;
  --black:        #10121a;
  --white:        #ffffff;

  /* ── Saved original palette (swap back here if needed) ──
  --cream:       #fdf8f2;
  --blush:       #e8c4b0;
  --gold:        #c8a97a;
  --gold-light:  #e8d5b0;
  --dark:        #3a2e28;
  --muted:       #7a6a60;
  ── */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--silver-light);
  color: var(--blue-dark);
  font-weight: 300;
  -webkit-overflow-scrolling: touch;
}

/* Sparkle canvas sits over everything, pointer-events off */
#sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transform: translateZ(0);
}

/* =====================
   Typography helpers
   ===================== */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--blue-dark);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 1rem auto 2rem;
}

.divider span:first-child,
.divider span:last-child {
  display: block;
  width: 80px;
  height: 1px;
  background: var(--gold);
}

.diamond {
  color: var(--gold);
  font-size: 0.6rem;
}

/* =====================
   Hero
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(
      160deg,
      var(--blue-deeper) 0%,
      var(--royal-blue)  55%,
      var(--blue-mid)    100%
    );
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Star canvas fills the hero behind content */
#star-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0);
}

/* Decorative rings */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(212, 168, 50, 0.2);
}
.hero::after {
  width: 920px; height: 920px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(196, 206, 221, 0.12);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.pre-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--gold-light);
  letter-spacing: 0.14em;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.amp {
  font-style: italic;
  color: var(--gold);
}

.hero-last-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: -0.2rem;
  margin-bottom: 1rem;
}

.wedding-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.22em;
  color: var(--silver);
  margin-top: 1rem;
  text-transform: uppercase;
}

.divider.hero-divider span:first-child,
.divider.hero-divider span:last-child {
  background: rgba(212, 168, 50, 0.45);
}

.tagline {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--silver);
  letter-spacing: 0.06em;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =====================
   Countdown
   ===================== */
.countdown-section {
  background:
    linear-gradient(135deg, var(--blue-deeper) 0%, var(--black) 100%);
  color: var(--white);
  text-align: center;
  padding: 5rem 2rem;
  border-top: 2px solid var(--gold-dim);
  border-bottom: 2px solid var(--gold-dim);
}

.countdown-section h2 {
  color: var(--gold-light);
  margin-bottom: 2.5rem;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.count-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.count-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 30px rgba(212, 168, 50, 0.4);
}

.count-label {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-top: 0.5rem;
}

/* =====================
   Our Story
   ===================== */
.story-section {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.story-section h2 {
  color: var(--royal-blue);
}

.story-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.9;
  color: var(--blue-dark);
}

/* =====================
   Photos
   ===================== */
.photos-section {
  padding: 5rem 2rem 6rem;
  background: linear-gradient(to bottom, var(--silver-light), #dde3ef);
  text-align: center;
}

.photos-section h2 {
  color: var(--royal-blue);
}

.photos-hint {
  font-size: 0.78rem;
  color: var(--silver-dim);
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
}

.photos-hint code {
  background: rgba(26, 53, 128, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
  color: var(--blue-mid);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #d8dff0;
  border: 1px dashed var(--silver);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  color: var(--silver-dim);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.placeholder-icon {
  font-size: 2rem;
  opacity: 0.45;
}

.photo-caption {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--silver-dim);
  margin-top: 0.7rem;
}

/* =====================
   Details
   ===================== */
.details-section {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--silver-light);
}

.details-section h2 {
  color: var(--royal-blue);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.detail-card {
  padding: 2.5rem 2rem;
  border: 1px solid rgba(26, 53, 128, 0.2);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 4px 24px rgba(26, 53, 128, 0.08);
}

.detail-card h3 {
  color: var(--royal-blue);
}

.detail-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.detail-card p {
  font-size: 0.9rem;
  color: var(--blue-dark);
  line-height: 2;
  letter-spacing: 0.02em;
}

/* =====================
   RSVP
   ===================== */
.rsvp-section {
  padding: 6rem 2rem;
  text-align: center;
  background: linear-gradient(to bottom, var(--blue-deeper), var(--royal-blue));
}

.rsvp-section h2 {
  color: var(--gold-light);
}

.rsvp-section .divider span:first-child,
.rsvp-section .divider span:last-child {
  background: rgba(212, 168, 50, 0.45);
}

.rsvp-section .diamond {
  color: var(--gold-light);
}

.rsvp-registry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.embed-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rsvp-frame-wrap,
.registry-frame-wrap {
  width: 100%;
}

.rsvp-sub {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--silver);
  letter-spacing: 0.05em;
  max-width: 420px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
  min-height: 5.4rem; /* keeps both columns the same height before the iframe */
}

.rsvp-frame-wrap iframe,
.registry-frame-wrap iframe {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 800px) {
  .rsvp-registry-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================
   Livestream
   ===================== */
.livestream-section {
  padding: 6rem 2rem;
  text-align: center;
  background: linear-gradient(to bottom, var(--royal-blue), var(--blue-deeper));
}

.livestream-section h2 {
  color: var(--gold-light);
}

.livestream-section .divider span:first-child,
.livestream-section .divider span:last-child {
  background: rgba(212, 168, 50, 0.45);
}

.livestream-section .diamond {
  color: var(--gold-light);
}

.livestream-sub {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--silver);
  letter-spacing: 0.05em;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.livestream-frame-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.livestream-frame-wrap iframe {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* =====================
   Footer
   ===================== */
footer {
  background: var(--blue-deeper);
  border-top: 2px solid var(--gold-dim);
  color: var(--silver);
  text-align: center;
  padding: 3rem 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.footer-sub {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--silver-dim);
  margin-top: 0.5rem;
}

/* =====================
   Responsive tweaks
   ===================== */
@media (max-width: 600px) {
  .countdown {
    gap: 1.2rem;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
}
