/* =============================================
   AURELIA — Digital Wedding Invitation
   Theme: Soft Luxury, Premium, Modern Islamic
   ============================================= */

:root {
  --bg: #F7F4EE;
  --primary: #2F3A34;
  --secondary: #8A7F74;
  --accent: #C9A86A;
  --accent-light: #E8D9B8;
  --white: #FFFFFF;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
  --radius: 12px;
  --transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =============================================
   LOADING SCREEN
   ============================================= */

#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
}

.loader-ornament {
  font-size: 2rem;
  color: var(--accent);
  animation: pulse-gold 1.5s ease-in-out infinite;
  display: block;
  margin-bottom: 16px;
}

.loader-text {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
}

.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto;
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  animation: loader-progress 2s ease forwards;
}

@keyframes loader-progress {
  to { width: 100%; }
}

@keyframes pulse-gold {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* =============================================
   COVER SECTION
   ============================================= */

.cover-section {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(47, 58, 52, 0.15) 0%,
    rgba(47, 58, 52, 0.25) 40%,
    rgba(47, 58, 52, 0.85) 100%
  );
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 28px 48px;
  text-align: center;
  color: var(--white);
}

.cover-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
  animation: fadeUp 1s ease 0.3s both;
}

.cover-names {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 12px;
  animation: fadeUp 1s ease 0.5s both;
}

.amp {
  font-size: 2rem;
  font-style: italic;
  color: var(--accent-light);
}

.cover-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  animation: fadeUp 1s ease 0.7s both;
}

.cover-guest {
  margin-bottom: 28px;
  animation: fadeUp 1s ease 0.9s both;
}

.guest-label {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent-light);
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(201, 168, 106, 0.6);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 28px;
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeUp 1s ease 1.1s both;
}

.btn-open:hover, .btn-open:active {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   MAIN CONTENT
   ============================================= */

#main-content.hidden {
  display: none;
}

/* =============================================
   SECTIONS — BASE
   ============================================= */

.section {
  padding: 60px 0;
}

.section-inner {
  padding: 0 28px;
  text-align: center;
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 16px;
}

.ornament-divider {
  margin: 16px 0;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
}

/* =============================================
   PROLOGUE
   ============================================= */

.prologue-section {
  background: var(--primary);
}

.prologue-section .section-inner {
  padding: 0 32px;
}

.arabic-basmala {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--accent-light);
  text-align: center;
  margin-bottom: 20px;
  line-height: 2;
  direction: rtl;
}

.prologue-greeting {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}

.prologue-section .ornament-divider {
  color: rgba(201, 168, 106, 0.5);
}

.prologue-text {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}

/* =============================================
   QURAN VERSE
   ============================================= */

.verse-section {
  background: var(--bg);
}

.verse-source {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 20px;
}

.arabic-verse {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 2;
  direction: rtl;
  color: var(--primary);
  margin-bottom: 20px;
}

.verse-translation {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.9;
  color: var(--secondary);
  border-left: 2px solid var(--accent);
  padding-left: 16px;
  text-align: left;
}

/* =============================================
   COUPLE
   ============================================= */

.couple-section {
  background: var(--white);
}

.couple-card {
  margin-bottom: 8px;
}

.photo-frame {
  width: 160px;
  height: 213px;
  margin: 0 auto 16px;
  overflow: hidden;
  position: relative;
}

.photo-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent);
  z-index: 1;
  pointer-events: none;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}

.photo-frame:hover .portrait-img {
  transform: scale(1.04);
}

.groom-name, .bride-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 6px;
}

.couple-parents {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 4px;
}

.couple-parents-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--secondary);
  line-height: 1.7;
}

.couple-and {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent);
  margin: 20px 0;
}

/* =============================================
   COUNTDOWN
   ============================================= */

.countdown-section {
  background: var(--primary);
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(201,168,106,0.1);
  border-radius: 50%;
}

.countdown-section::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(201,168,106,0.08);
  border-radius: 50%;
}

.countdown-section .section-eyebrow {
  color: rgba(201,168,106,0.7);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  transition: transform 0.3s ease;
}

.countdown-num.flip {
  transform: scale(1.1);
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
}

.countdown-dot {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.5;
  padding-bottom: 14px;
}

/* =============================================
   EVENT CARDS
   ============================================= */

.event-section {
  background: var(--bg);
}

.event-card {
  border: 1px solid var(--accent-light);
  background: var(--white);
  padding: 36px 24px;
  position: relative;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid var(--accent-light);
  z-index: -1;
}

.event-type {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.event-ornament {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.5;
}

.event-date {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 4px;
}

.event-time {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--secondary);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.event-divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 16px;
  opacity: 0.4;
}

.event-venue {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 4px;
}

.event-address {
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.btn-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 10px 20px;
  transition: all var(--transition);
}

.btn-location:hover, .btn-location:active {
  background: var(--primary);
  color: var(--white);
}

/* =============================================
   GALLERY
   ============================================= */

.gallery-section {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 24px;
}

.gallery-item {
  overflow: hidden;
  background: var(--bg);
}

.gallery-item:first-child {
  grid-column: 1 / -1;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 9 / 12;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s ease;
  display: block;
}

.gallery-item:first-child .gallery-img {
  aspect-ratio: 9 / 10;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.04);
}

/* =============================================
   CLOSING
   ============================================= */

.closing-section {
  background: var(--primary);
}

.closing-section .ornament-divider {
  color: rgba(201,168,106,0.5);
  margin-bottom: 24px;
}

.closing-text {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.9;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
}

.closing-greeting {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}

.closing-signed {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.closing-names {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 300;
  font-style: italic;
  color: var(--accent-light);
}

/* =============================================
   RSVP
   ============================================= */

.rsvp-section {
  background: var(--bg);
}

.rsvp-sub {
  font-size: 0.78rem;
  color: var(--secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  font-weight: 300;
}

.btn-rsvp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 28px;
  transition: all var(--transition);
}

.btn-rsvp:hover, .btn-rsvp:active {
  background: #1DAA54;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.25);
}

/* =============================================
   FOOTER
   ============================================= */

.footer-section {
  background: var(--primary);
  padding: 36px 28px;
  text-align: center;
  border-top: 1px solid rgba(201,168,106,0.15);
}

.footer-crafted {
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 6px;
}

.footer-brand {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-socials a {
  color: rgba(255,255,255,0.4);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.footer-socials a:hover {
  color: var(--accent);
}

/* =============================================
   MUSIC BUTTON
   ============================================= */

.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.music-btn.visible {
  display: flex;
}

.music-btn:hover {
  background: var(--accent);
  color: var(--primary);
  transform: scale(1.05);
}

.music-btn.playing::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: music-ring 1.5s ease-out infinite;
}

.music-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-ripple {
  display: none;
}

@keyframes music-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.reveal-delay-1.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-2 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.reveal-delay-2.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-3 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.45s, transform 0.7s ease 0.45s;
}

.reveal-delay-3.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   FADE-UP KEYFRAME
   ============================================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   RESPONSIVE DESKTOP
   ============================================= */

@media (min-width: 480px) {
  body {
    box-shadow: 0 0 60px rgba(0,0,0,0.08);
  }
}

/* =============================================
   LIGHTBOX
   ============================================= */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}

#lightbox.open {
  display: flex;
}

#lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(201,168,106,0.25);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
