/* ===== VARIABLES ===== */
:root {
  --green: #1B5E20;
  --green-light: #2E7D32;
  --gold: #D4AF37;
  --gold-light: #E8C968;
  --cream: #FDF8F0;
  --cream-dark: #F5EDE0;
  --brown: #2C1810;
  --brown-light: #5D4037;
  --white: #FFFFFF;

  --font-arabic: 'Amiri', serif;
  --font-main: 'Cormorant Garamond', serif;
}

/* ===== LOADING & STATUS SCREENS ===== */
.loading-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--cream);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gold-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.inactive-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--cream);
}

.inactive-box {
  text-align: center;
  padding: 40px 24px;
}

.inactive-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.inactive-box h2 {
  font-family: var(--font-main);
  font-size: 24px;
  color: var(--brown);
  margin-bottom: 8px;
}

.inactive-box p {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--brown-light);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--cream);
  color: var(--brown);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

#invitation {
  max-width: 480px;
  margin: 0 auto;
}

/* ===== DECORATIVE PATTERNS ===== */
.pattern-top,
.pattern-bottom {
  height: 32px;
  position: relative;
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
}

.pattern-top::before,
.pattern-bottom::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-light) 15%,
    var(--gold) 50%,
    var(--gold-light) 85%,
    transparent 100%
  );
}

.pattern-top::before { bottom: 0; }
.pattern-bottom::before { top: 0; }

.pattern-top::after,
.pattern-bottom::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-light) 25%,
    var(--gold) 50%,
    var(--gold-light) 75%,
    transparent 100%
  );
  opacity: 0.4;
}

.pattern-top::after { bottom: 6px; }
.pattern-bottom::after { top: 6px; }

/* Center diamond on pattern lines */
.pattern-top,
.pattern-bottom {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.pattern-bottom {
  align-items: flex-start;
}

.pattern-diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.pattern-top .pattern-diamond { margin-bottom: -4px; }
.pattern-bottom .pattern-diamond { margin-top: -4px; }

/* ===== SECTIONS ===== */
.section {
  padding: 24px 24px;
  text-align: center;
  position: relative;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gold shimmer */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== BISMILLAH SECTION ===== */
.section-bismillah {
  padding-top: 12px;
  padding-bottom: 0;
}

.geometric-frame {
  max-width: 500px;
  margin: 0 auto;
  padding: 8px 16px;
  position: relative;
}

/* Geometric corner decorations */
.geometric-frame::before,
.geometric-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--gold);
  border-style: solid;
}

.geometric-frame::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.geometric-frame::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.bismillah-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.bismillah-text {
  font-family: var(--font-arabic);
  font-size: 48px;
  fill: var(--gold);
  font-weight: 700;
}

/* ===== INVITATION SECTION ===== */
.section-invitation {
  padding-top: 0;
  padding-bottom: 8px;
}

.ornament {
  width: 120px;
  height: 2px;
  margin: 0 auto 8px;
  position: relative;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}

.ornament-bottom {
  margin: 8px auto 0;
}

.salom-text {
  font-family: var(--font-main);
  font-size: 22px;
  color: var(--green);
  margin-bottom: 12px;
  font-weight: 600;
  font-style: italic;
}

.invitation-label {
  font-family: var(--font-main);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.invitation-text {
  font-family: var(--font-main);
  font-size: 24px;
  font-weight: 500;
  color: var(--brown);
  line-height: 1.5;
  margin-bottom: 16px;
}

.guest-name {
  color: var(--green);
  font-weight: 700;
  font-size: 28px;
}

.invitation-sub {
  font-family: var(--font-main);
  font-size: 17px;
  color: var(--brown-light);
  line-height: 1.8;
  font-weight: 500;
}

/* ===== COUPLE SECTION ===== */
.section-couple {
  padding: 8px 24px 16px;
}

.couple-frame {
  max-width: 320px;
  margin: 0 auto;
  position: relative;
  padding: 20px 20px;
}

/* Border styles */
.islamic-border {
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: 16px;
}

.islamic-border::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  opacity: 0.5;
}

/* Arch border (default) */
.islamic-border::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
  background: var(--cream);
  border-bottom: 2px solid var(--gold);
  border-radius: 0 0 50% 50%;
}

/* Double border */
.border-double .islamic-border {
  border-width: 1px;
  border-radius: 4px;
}
.border-double .islamic-border::before {
  inset: 4px;
  border-radius: 2px;
  border-width: 1px;
  opacity: 0.8;
}
.border-double .islamic-border::after {
  display: none;
}

/* Simple border */
.border-simple .islamic-border {
  border-width: 1px;
  border-radius: 0;
}
.border-simple .islamic-border::before {
  display: none;
}
.border-simple .islamic-border::after {
  display: none;
}

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

.groom-name,
.bride-name {
  font-family: var(--font-main);
  font-size: 40px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
}

.heart-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0;
}

.heart-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.heart-line:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.heart-icon {
  font-family: var(--font-main);
  font-size: 28px;
  color: var(--gold);
  font-weight: 600;
}

.invitation-after {
  font-family: var(--font-main);
  font-size: 17px;
  color: var(--brown-light);
  line-height: 1.8;
  margin-top: 20px;
  font-weight: 500;
}

/* ===== DATE SECTION ===== */
.section-date {
  background:
    radial-gradient(circle at 20% 50%, rgba(27, 94, 32, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
    var(--cream);
  padding: 16px 24px 24px;
}

.date-ornament {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  position: relative;
}

/* Eight-pointed star (Islamic motif) */
.date-ornament::before,
.date-ornament::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
}

.date-ornament::before {
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
}

.date-ornament::after {
  clip-path: polygon(50% 0%, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0% 50%, 35% 35%);
  transform: rotate(22.5deg);
  opacity: 0.4;
}

.date-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 12px;
  font-weight: 600;
}

.date-text {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 4px;
}

.date-day {
  font-size: 16px;
  color: var(--brown-light);
  font-weight: 500;
  margin-bottom: 8px;
}

.date-time {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 32px;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.countdown-number {
  font-family: var(--font-main);
  font-size: 44px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  transition: transform 0.3s ease;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

.countdown-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brown-light);
  margin-top: 6px;
  font-weight: 600;
}

.countdown-separator {
  font-size: 32px;
  color: var(--gold);
  font-weight: 300;
  margin-bottom: 18px;
}

/* ===== VENUE SECTION ===== */
.section-venue {
  padding: 20px 24px;
}

.venue-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.venue-name {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 4px;
}

.venue-address {
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--brown-light);
  margin-bottom: 10px;
  font-weight: 500;
}

.venue-link {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--green);
  text-decoration: underline;
  font-weight: 600;
  margin-top: 4px;
}

/* ===== DUA SECTION ===== */
.section-dua {
  padding: 20px 24px 24px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(27, 94, 32, 0.03) 50%, transparent 100%);
}

.dua-frame {
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 20px;
  border-top: 1px solid var(--gold-light);
  border-bottom: 1px solid var(--gold-light);
  position: relative;
}

/* Small diamond decorations on border */
.dua-frame::before,
.dua-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}

.dua-frame::before { top: -5px; }
.dua-frame::after { bottom: -5px; }

.dua-arabic {
  font-family: var(--font-arabic);
  font-size: 22px;
  line-height: 2;
  color: var(--green);
  margin-bottom: 16px;
  font-weight: 700;
}

.dua-translation {
  font-family: var(--font-main);
  font-size: 15px;
  color: var(--brown-light);
  line-height: 1.8;
  font-style: italic;
  font-weight: 500;
}

.dua-source {
  font-family: var(--font-main);
  font-size: 13px;
  color: var(--gold);
  margin-top: 8px;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 24px 32px;
  text-align: center;
}

.footer-ornament {
  width: 80px;
  height: 1px;
  margin: 0 auto 24px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-family {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--brown-light);
  margin-bottom: 16px;
  line-height: 1.8;
  font-weight: 500;
}

.footer-family strong {
  color: var(--green);
  font-size: 18px;
}

.footer-text {
  font-family: var(--font-main);
  font-size: 16px;
  color: var(--brown-light);
  margin-bottom: 8px;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
  .section {
    padding: 28px 40px;
  }

  .bismillah-text {
    font-size: 56px;
  }

  .invitation-text {
    font-size: 30px;
  }

  .guest-name {
    font-size: 34px;
  }

  .groom-name,
  .bride-name {
    font-size: 52px;
  }

  .date-text {
    font-size: 34px;
  }

  .countdown-number {
    font-size: 56px;
  }

  .couple-frame {
    max-width: 360px;
    padding: 24px 28px;
  }

  .dua-arabic {
    font-size: 26px;
  }
}

/* ===== ISLAMIC GEOMETRIC BACKGROUND PATTERN ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  background-image:
    repeating-conic-gradient(
      var(--green) 0% 25%,
      transparent 0% 50%
    );
  background-size: 40px 40px;
}

/* Download button */
.download-section {
  text-align: center;
  padding: 16px 24px 24px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 280px;
  padding: 14px 24px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:active {
  opacity: 0.8;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--cream);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}
