@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Lato:wght@300;400&family=Great+Vibes&display=swap');

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

:root {
  --cream: #FDFBF7;
  --beige: #F5EFE0;
  --brown: #8B6F47;
  --dark-brown: #5C4033;
  --gold: #C9A84C;
  --gold-light: #e8c96a;
  --gold-dark: #a07830;
  --green: #6B7C5C;
  --text: #3E2C1C;
  --light-text: #7A6652;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ── Petal Canvas ── */
#petal-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 100;
}

/* ── Section Base ── */
section {
  position: relative; z-index: 1;
  padding: 90px 20px;
  display: flex; flex-direction: column; align-items: center;
}

/* ── Bismillah ── */
.bismillah {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--gold);
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 16px;
}
.bismillah-arabic {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.6;
  direction: rtl;
  text-shadow: 0 2px 12px rgba(201,168,76,0.25);
}

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 360px; margin: 22px auto;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}
.divider::after { background: linear-gradient(to left, transparent, var(--gold)); }
.divider span { color: var(--gold); font-size: 1.1rem; }

/* ── Section Title ── */
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--dark-brown);
  text-align: center;
  letter-spacing: 0.04em;
}
.section-sub {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
  margin-top: 8px;
}

/* ══════════════════════════════
   1. HERO
══════════════════════════════ */
#hero {
  min-height: 100vh;
  justify-content: center;
  background: url('images/Gemini_Generated_Image_uymw52uymw52uymw-clean.png') center center / cover no-repeat;
  text-align: center;
  gap: 0;
  padding: 60px 20px;
  transition: opacity 0.8s ease, max-height 0.8s ease;
}
#hero.hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.hero-content-card {
  background: rgba(253, 251, 247, 0.92);
  border: 1px solid rgba(201,168,76,0.45);
  border-radius: 2px;
  padding: clamp(36px, 6vw, 64px) clamp(32px, 6vw, 72px);
  max-width: 500px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    0 0 0 6px rgba(201,168,76,0.08),
    0 20px 60px rgba(92,64,51,0.18),
    inset 0 0 40px rgba(201,168,76,0.04);
  position: relative;
}
.hero-content-card::before,
.hero-content-card::after {
  content: '';
  position: absolute;
  width: 40px; height: 40px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.5;
}
.hero-content-card::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.hero-content-card::after  { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3.2rem, 11vw, 6.5rem);
  font-weight: 400;
  color: var(--dark-brown);
  line-height: 1.1;
  margin: 12px 0 6px;
  text-shadow: 0 2px 16px rgba(92,64,51,0.12);
}
.hero-names span { color: var(--gold); }

.hero-sub {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--light-text);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 44px;
  border: 1.5px solid var(--gold);
  color: var(--dark-brown);
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.35s ease;
  border-radius: 1px;
}
.btn-open::before { content: '✉'; font-size: 0.9rem; }
.btn-open:hover {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 6px 24px rgba(201,168,76,0.35);
  transform: translateY(-2px);
}

/* ══════════════════════════════
   2. INVITATION CARD
══════════════════════════════ */
#invitation {
  background: url('images/Gemini_Generated_Image_uymw52uymw52uymw-clean.png') center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}
#invitation .invite-card {
  position: relative;
  z-index: 1;
}

.invite-card {
  background: var(--cream);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 2px;
  padding: clamp(36px, 6vw, 64px) clamp(28px, 6vw, 64px);
  max-width: 580px; width: 100%;
  text-align: center;
  box-shadow:
    0 2px 0 rgba(201,168,76,0.3),
    0 20px 60px rgba(139,111,71,0.12);
  position: relative;
}
.invite-card::before, .invite-card::after {
  content: '❧';
  position: absolute;
  font-size: 1.6rem;
  color: rgba(201,168,76,0.5);
}
.invite-card::before { top: 14px; left: 18px; }
.invite-card::after  { bottom: 14px; right: 18px; transform: rotate(180deg); }

.invite-label {
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.person-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  font-weight: 400;
  color: var(--dark-brown);
  line-height: 1;
}
.person-detail {
  font-size: 0.8rem;
  color: var(--light-text);
  line-height: 2;
  margin-top: 8px;
  letter-spacing: 0.03em;
}
.with-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--gold);
  margin: 24px 0;
  letter-spacing: 0.1em;
}
.invite-date {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--brown);
  text-transform: uppercase;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(201,168,76,0.25);
}

/* ══════════════════════════════
   3. FUNCTION DETAILS
══════════════════════════════ */
#function {
  background: var(--cream);
  position: relative;
}
#function::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 80%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.3), transparent);
}

.detail-cards {
  display: flex; flex-wrap: wrap; gap: 28px;
  justify-content: center;
  margin-top: 48px; width: 100%; max-width: 860px;
}
.detail-card {
  background: linear-gradient(160deg, #fffdf8 0%, #fdf6e8 100%);
  border: none;
  border-radius: 4px;
  padding: 44px 32px 36px;
  flex: 1 1 210px; max-width: 250px;
  text-align: center;
  box-shadow:
    0 2px 0 rgba(201,168,76,0.5),
    0 -1px 0 rgba(201,168,76,0.15),
    0 12px 40px rgba(139,111,71,0.13),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}
.detail-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.detail-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.3), transparent);
}
.detail-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 2px 0 rgba(201,168,76,0.6),
    0 24px 60px rgba(139,111,71,0.2),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
.detail-icon {
  font-size: 2.4rem;
  margin-bottom: 18px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(139,111,71,0.2));
}
.detail-label {
  font-size: 0.55rem;
  letter-spacing: 0.38em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}
.detail-label::before,
.detail-label::after {
  content: '—';
  color: rgba(201,168,76,0.5);
  margin: 0 6px;
}
.detail-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark-brown);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════
   4. COUNTDOWN
══════════════════════════════ */
#countdown {
  background:
    linear-gradient(180deg, #0d0703 0%, #1c0f07 35%, #2b1a0a 65%, #1c0f07 100%);
  color: var(--cream);
  position: relative;
  overflow: hidden;
  padding: 110px 20px 120px;
}
#countdown::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% -5%, rgba(201,168,76,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(180,120,40,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 80%, rgba(180,120,40,0.12) 0%, transparent 45%);
  pointer-events: none;
}
#countdown::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  box-shadow: 0 0 20px rgba(201,168,76,0.6);
}
#countdown .section-title {
  color: var(--cream);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-shadow: 0 0 40px rgba(201,168,76,0.35), 0 2px 6px rgba(0,0,0,0.6);
  position: relative;
}
#countdown .section-sub { color: var(--gold); letter-spacing: 0.45em; opacity: 0.85; }
#countdown .divider::before { background: linear-gradient(to right, transparent, rgba(201,168,76,0.5)); }
#countdown .divider::after  { background: linear-gradient(to left,  transparent, rgba(201,168,76,0.5)); }
#countdown .divider span { color: var(--gold); }

.timer {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 60px;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 0 16px;
}

.timer-box {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 28px 8px 24px;
  text-align: center;
  background: linear-gradient(170deg,
    rgba(255,255,255,0.07) 0%,
    rgba(201,168,76,0.04) 50%,
    rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(201,168,76,0.22);
  overflow: hidden;
  transition: transform 0.4s ease, background 0.4s ease;
  box-shadow:
    inset 0 1px 0 rgba(201,168,76,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 24px 60px rgba(0,0,0,0.5);
}
.timer-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, transparent, var(--gold) 40%, var(--gold-light) 60%, transparent);
  box-shadow: 0 0 16px rgba(201,168,76,0.8), 0 0 4px rgba(201,168,76,1);
}
.timer-box::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.timer-box:hover {
  transform: translateY(-6px);
  background: linear-gradient(170deg,
    rgba(201,168,76,0.12) 0%,
    rgba(201,168,76,0.06) 50%,
    rgba(255,255,255,0.02) 100%);
}

.timer-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 20px rgba(201,168,76,0.7),
    0 0 60px rgba(201,168,76,0.25),
    0 2px 6px rgba(0,0,0,0.5);
  position: relative; z-index: 1;
}
.timer-label {
  font-size: 0.42rem;
  letter-spacing: 0.45em;
  color: rgba(232,201,106,0.45);
  text-transform: uppercase;
  margin-top: 10px;
  position: relative; z-index: 1;
}
.timer-separator {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 300;
  color: rgba(201,168,76,0.3);
  align-self: center;
  flex-shrink: 0;
  margin-bottom: 16px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(201,168,76,0.4);
  animation: sepBlink 1.6s ease-in-out infinite;
}
@keyframes sepBlink {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.85; }
}
.timer-caption {
  margin-top: 48px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-style: italic;
  color: rgba(232,201,106,0.35);
  letter-spacing: 0.15em;
}
.cd-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.1;
}
.cd-orb-1 { width: 350px; height: 350px; background: var(--gold); top: -100px; left: -100px; }
.cd-orb-2 { width: 280px; height: 280px; background: var(--gold); bottom: -80px; right: -80px; }

/* ══════════════════════════════
   5. VENUE
══════════════════════════════ */
#venue {
  background: linear-gradient(160deg, #f0e6cc 0%, #f9f3e8 100%);
  position: relative;
  overflow: hidden;
}
#venue::before {
  content: '🕌';
  position: absolute;
  font-size: 14rem;
  opacity: 0.04;
  bottom: -20px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}

.venue-card {
  background: var(--cream);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 2px;
  padding: 48px 40px;
  max-width: 500px; width: 100%;
  text-align: center;
  box-shadow:
    0 2px 0 rgba(201,168,76,0.3),
    0 20px 60px rgba(139,111,71,0.1);
  margin-top: 36px;
  position: relative;
}
.venue-card::before, .venue-card::after {
  content: '';
  position: absolute;
  width: 32px; height: 32px;
  border-color: rgba(201,168,76,0.4);
  border-style: solid;
}
.venue-card::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.venue-card::after  { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }

.venue-name {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--dark-brown);
  margin-bottom: 12px;
}
.venue-address {
  font-size: 0.82rem;
  color: var(--light-text);
  line-height: 2;
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}
.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--green) 0%, #4a5c3c 100%);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 1px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(107,124,92,0.3);
}
.btn-map::before { content: '📍'; font-size: 0.9rem; }
.btn-map:hover {
  background: linear-gradient(135deg, var(--dark-brown) 0%, #3a2010 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92,64,51,0.3);
}

/* ══════════════════════════════
   6. THANK YOU
══════════════════════════════ */
#thankyou {
  background: linear-gradient(160deg, #fdfbf7 0%, #f5efe0 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#thankyou::before {
  content: '✦';
  position: absolute;
  font-size: 20rem;
  color: rgba(201,168,76,0.04);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.thankyou-msg {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: var(--light-text);
  max-width: 500px;
  line-height: 2;
  margin: 24px auto;
  letter-spacing: 0.03em;
}
.signature {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  color: var(--dark-brown);
  margin-top: 20px;
  text-shadow: 0 2px 12px rgba(92,64,51,0.1);
}

.floral-border {
  width: 100%; max-width: 420px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 28px auto 0;
}

/* ── Main Content Gate ── */
#main-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s ease 0.4s, max-height 0.1s ease;
}
#main-content.unlocked {
  max-height: 99999px;
  overflow: visible;
  opacity: 1;
}

/* ── Music Toggle ── */
#music-btn {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 999;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a2010, #5C4033);
  border: none;
  color: var(--gold);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(201,168,76,0.3), 0 6px 20px rgba(0,0,0,0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
#music-btn::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  pointer-events: none;
}
#music-btn:hover { transform: scale(1.1); }

.music-icon { font-size: 1.1rem; position: absolute; transition: opacity 0.25s, transform 0.25s; }

/* cross line over note when muted */
.music-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(-45deg);
  transition: width 0.25s ease;
  transform-origin: center;
  box-shadow: 0 0 4px rgba(201,168,76,0.8);
}
#music-btn.muted .music-icon::after {
  width: 140%;
}

.muted-icon { display: none; }

.sound-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 18px; opacity: 0;
  transition: opacity 0.25s;
  position: absolute;
}
.bar {
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
  height: 5px;
  box-shadow: 0 0 4px rgba(201,168,76,0.6);
}

/* playing: show bars, hide note */
#music-btn.playing .music-icon  { opacity: 0; transform: scale(0.4); }
#music-btn.playing .muted-icon  { opacity: 0; transform: scale(0.4); }
#music-btn.playing .sound-bars  { opacity: 1; }
#music-btn.playing .bar:nth-child(1) { animation: barBounce 0.8s ease-in-out infinite 0.0s; }
#music-btn.playing .bar:nth-child(2) { animation: barBounce 0.8s ease-in-out infinite 0.2s; }
#music-btn.playing .bar:nth-child(3) { animation: barBounce 0.8s ease-in-out infinite 0.1s; }
#music-btn.playing .bar:nth-child(4) { animation: barBounce 0.8s ease-in-out infinite 0.3s; }
@keyframes barBounce {
  0%, 100% { height: 4px; }
  50%       { height: 16px; }
}

/* muted: show note with cross line, hide bars */
#music-btn.muted .music-icon  { opacity: 1; transform: scale(1); }
#music-btn.muted .sound-bars  { opacity: 0; }

/* pulse ring when playing */
#music-btn.playing {
  animation: musicPulse 2s ease-in-out infinite;
}
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(201,168,76,0.4), 0 0 10px rgba(201,168,76,0.3), 0 6px 20px rgba(0,0,0,0.45); }
  50%       { box-shadow: 0 0 0 1px rgba(201,168,76,0.7), 0 0 20px rgba(201,168,76,0.5), 0 6px 20px rgba(0,0,0,0.45); }
}

/* ── Scroll Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #hero {
    background-image: url('images/Gemini_Generated_Image_dwhq22dwhq22dwhq.png');
    background-position: center top;
  }
  .detail-card { max-width: 100%; }
  .timer-box { padding: 22px 6px 18px; }
  .timer-separator { font-size: 1.4rem; margin-bottom: 14px; }
  .hero-content-card { padding: 32px 24px; }
}
