/* ==========================================================================
   Polish v2 — cinematic emerald hero, RSVP note, line icons, envelope finish.
   Loaded after polish.css.
   ========================================================================== */

/* ---------- Opened-envelope RSVP note ---------- */
.revealed-rsvp-note {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sage-dark);
  letter-spacing: 0.3px;
}
.revealed-rsvp-note strong {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  white-space: nowrap;
}

/* ---------- Hero: deep emerald night ---------- */
.hero-section {
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(212, 175, 55, 0.16), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(94, 114, 90, 0.35), transparent 60%),
    linear-gradient(180deg, #16221a 0%, #1f2e23 48%, #101a13 100%);
  background-attachment: scroll;
  padding-top: 120px;
  padding-bottom: 90px;
  overflow: hidden;
}
/* Slowly rotating 8-point star tessellation */
.hero-section::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(1200px, 150vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("assets/hero-star.svg") center / contain no-repeat;
  opacity: 0.2;
  animation: heroStarSpin 140s linear infinite;
  z-index: 0;
  pointer-events: none;
}
@keyframes heroStarSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* Soft light rays from above */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: conic-gradient(from 180deg at 50% -10%, transparent 0deg, rgba(243, 229, 171, 0.10) 14deg, transparent 28deg, rgba(243, 229, 171, 0.07) 40deg, transparent 56deg, rgba(243, 229, 171, 0.09) 70deg, transparent 90deg);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
          mask-image: linear-gradient(180deg, #000, transparent 75%);
  pointer-events: none;
  z-index: 1;
  animation: rayBreath 9s ease-in-out infinite alternate;
}
@keyframes rayBreath { from { opacity: 0.55; } to { opacity: 1; } }
.hero-overlay { background: radial-gradient(ellipse at center, transparent 40%, rgba(8, 14, 10, 0.55) 100%); z-index: 1; }

.hero-container {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-width: 900px;
  padding: 20px 8px;
  color: #f4f0e8;
}
.hero-section .bismillah-arabic {
  color: #f3e5ab;
  font-size: clamp(2rem, 5.2vw, 3rem);
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.45));
}
.hero-section .bismillah-translation { color: rgba(244, 240, 232, 0.62); }
.hero-section .quran-verse {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 18px;
  max-width: 700px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-section .arabic-quote { color: #fbf4de; }
.hero-section .english-quote { color: rgba(244, 240, 232, 0.82); }
.hero-section .quran-verse cite { color: #e5c888; }
.hero-section .sub-greeting { color: #e5c888; letter-spacing: 6px; }
.hero-section .couple-names { font-size: clamp(3rem, 9.5vw, 6.6rem); font-weight: 500; line-height: 1.02; margin: 6px 0 14px; }
.hero-section .name-groom,
.hero-section .name-bride {
  background: linear-gradient(180deg, #fffaf0 0%, #f3e5ab 55%, #d9b45a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.45));
}
.hero-section .name-ampersand { font-size: 1.05em; padding: 0 0.12em; filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.55)); }
.hero-section .invitation-text { color: rgba(244, 240, 232, 0.8); font-size: 1.15rem; }
.hero-section .wedding-tag { border-color: rgba(229, 200, 136, 0.7); }
.hero-section .tag-accent { color: #f3e5ab; }
.hero-section .meta-text strong { color: #fbf4de; }
.hero-section .meta-text small { color: rgba(229, 200, 136, 0.85); }
.hero-section .meta-divider { color: rgba(229, 200, 136, 0.5); }
.hero-section .countdown-unit {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(229, 200, 136, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.hero-section .btn-ghost-gold,
.hero-section .btn-outline-sage {
  color: #f3e5ab;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(229, 200, 136, 0.6);
}
.hero-section .btn-ghost-gold:hover,
.hero-section .btn-outline-sage:hover { background: rgba(229, 200, 136, 0.14); color: #fff; }
.hero-section .scroll-indicator { color: rgba(229, 200, 136, 0.8); }
.hero-section .mouse-icon { border-color: rgba(229, 200, 136, 0.7); }
.hero-section .gold-ornament .line { background: linear-gradient(90deg, transparent, #e5c888, transparent); }
.hero-section .gold-ornament .star { color: #f3e5ab; }

/* Hero entrance choreography */
.hero-section .bismillah-wrapper,
.hero-section .quran-verse,
.hero-section .invitation-lead,
.hero-section .hero-meta,
.hero-section .countdown-container,
.hero-section .hero-buttons { opacity: 0; }
.hero-section .bismillah-wrapper   { animation: heroRise 1.2s var(--ease-lux) 0.1s forwards; }
.hero-section .quran-verse         { animation: heroRise 1.2s var(--ease-lux) 0.35s forwards; }
.hero-section .invitation-lead     { animation: heroRise 1.3s var(--ease-lux) 0.6s forwards; }
.hero-section .hero-meta           { animation: heroRise 1.2s var(--ease-lux) 0.9s forwards; }
.hero-section .countdown-container { animation: heroRise 1.2s var(--ease-lux) 1.1s forwards; }
.hero-section .hero-buttons        { animation: heroRise 1.2s var(--ease-lux) 1.3s forwards; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(34px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Line icons replacing emoji ---------- */
.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.meta-icon { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(229, 200, 136, 0.55); color: #e5c888; background: rgba(212, 175, 55, 0.08); }
.meta-icon .ico { width: 22px; height: 22px; }
.vf-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--gold-dark); }
.vf-icon .ico { width: 24px; height: 24px; }
.btn .ico { margin-right: 8px; }
.audio-btn .ico, .envelope-audio-pill .ico { width: 16px; height: 16px; vertical-align: -0.25em; }

/* ---------- Countdown showcase: gold-edged emerald tiles ---------- */
.countdown-glass-card {
  background: linear-gradient(180deg, #ffffff, #fbf8ef);
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 50px 90px -50px rgba(28, 42, 31, 0.5), 0 0 0 8px rgba(255, 255, 255, 0.6), 0 0 0 9px rgba(212, 175, 55, 0.3);
}
.countdown-box .box-digit-wrap {
  background: linear-gradient(160deg, #3a4f3d, #1c2a1f);
  border: 1px solid rgba(229, 200, 136, 0.55);
  box-shadow: 0 16px 30px -16px rgba(28, 42, 31, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.countdown-box .box-number {
  background: var(--gold-foil);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ---------- Invitation card: shimmer + 3D tilt hook ---------- */
.flyer-card-frame { position: relative; will-change: transform; }
.flyer-card-frame a { display: block; position: relative; overflow: hidden; border-radius: 10px; }
.flyer-card-frame a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 243, 201, 0.45) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: cardShine 7s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes cardShine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* ---------- RSVP note showpiece ---------- */
.rsvp-note-section {
  padding: clamp(70px, 10vw, 130px) 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.12), transparent 60%), var(--color-cream);
}
.rsvp-note {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) clamp(24px, 6vw, 64px) clamp(40px, 7vw, 64px);
  border-radius: 200px 200px 28px 28px; /* Moorish arch crown */
  background: linear-gradient(180deg, #fffdf6, #f8f2e2);
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.7), 0 0 0 11px rgba(212, 175, 55, 0.35), 0 50px 90px -45px rgba(28, 42, 31, 0.55);
}
.rsvp-note .section-tag { display: block; margin-bottom: 6px; }
.rsvp-note-title { font-family: var(--font-script); font-weight: 400; font-size: clamp(3rem, 9vw, 4.6rem); line-height: 1.1; color: var(--ink); }
.rsvp-note-date { margin: 10px 0 6px; }
.rsvp-note-before { display: block; font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; color: var(--text-muted); }
.rsvp-note-date strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2.3rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--gold-foil);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: foilSweep 7s ease-in-out infinite;
}
.rsvp-note-text { font-size: 1rem; color: var(--text-body); max-width: 44ch; margin: 14px auto 0; }

/* ---------- Envelope: light bloom when the card is revealed ---------- */
.envelope-stage { position: relative; }
.envelope-stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 140vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.4);
  background: radial-gradient(circle, rgba(255, 243, 201, 0.85) 0%, rgba(212, 175, 55, 0.25) 35%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease-lux), transform 1.6s var(--ease-lux);
  z-index: 0;
}
.envelope-wrapper.is-revealed .envelope-stage::before { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
.envelope-stage > * { position: relative; z-index: 1; }

/* ---------- Nav tidy ---------- */
.nav-links .nav-rsvp-btn { white-space: nowrap; }
@media (max-width: 768px) {
  .hero-section { padding: 104px 16px 70px; }
  .hero-section::before { top: 36%; }
  .meta-icon { width: 40px; height: 40px; }
  .rsvp-note { border-radius: 140px 140px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-section::before, .hero-section::after, .flyer-card-frame a::after { animation: none; }
  .hero-section .bismillah-wrapper, .hero-section .quran-verse, .hero-section .invitation-lead,
  .hero-section .hero-meta, .hero-section .countdown-container, .hero-section .hero-buttons { opacity: 1; animation: none; }
}

/* Seal-break spark burst (spawned by polish.js) */
.seal-spark {
  position: fixed;
  z-index: 10000;
  width: var(--sz);
  height: var(--sz);
  margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d6 0%, #d4af37 60%, transparent 72%);
  pointer-events: none;
  animation: sealSpark 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes sealSpark {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 40px)) scale(0.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .seal-spark { display: none; } }

/* ---------- Navbar: dark glass over the emerald hero, ivory once scrolled ---------- */
.navbar:not(.scrolled) {
  background: linear-gradient(180deg, rgba(16, 26, 19, 0.72), rgba(16, 26, 19, 0));
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.navbar:not(.scrolled) .nav-links a:not(.nav-rsvp-btn) { color: #f4f0e8; }
.navbar:not(.scrolled) .logo-initials { filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5)); }
.navbar:not(.scrolled) .mobile-toggle span { background: #f3e5ab; }
.navbar:not(.scrolled) .envelope-nav-btn,
.navbar:not(.scrolled) .audio-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f3e5ab;
  border-color: rgba(229, 200, 136, 0.55);
}
@media (max-width: 768px) {
  .navbar:not(.scrolled) .nav-links a:not(.nav-rsvp-btn) { color: var(--text-dark); } /* dropdown stays ivory */
}
