/* app.css — Discover Your Ayah shared styles for daily / duas / names / tasbih
   Matches index.html design tokens exactly. */

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

:root {
  --gold:        #34d399;
  --gold-light:  #6ee7b7;
  --gold-pale:   #a7f3d0;
  --cream:       #d1fae5;
  --dark:        #020d08;
  --dark-mid:    #051a0f;
  --navy:        #0a2418;
  --muted:       #059669;
  --muted-gold:  #047857;
  --border:      rgba(52,211,153,0.3);
  --border-soft: rgba(52,211,153,0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--cream);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(52,211,153,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(2,13,8,0.8) 0%, transparent 50%),
    repeating-linear-gradient(30deg, transparent, transparent 80px, rgba(52,211,153,0.012) 80px, rgba(52,211,153,0.012) 81px),
    repeating-linear-gradient(-30deg, transparent, transparent 80px, rgba(52,211,153,0.012) 80px, rgba(52,211,153,0.012) 81px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  z-index: 101;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 4px; left: 0; right: 0;
  z-index: 100;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(2,13,8,0.92);
  backdrop-filter: blur(14px);
}
.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 2px;
  transition: color 0.2s, background 0.2s;
  font-family: 'Cinzel', serif;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a.active { color: var(--gold); background: rgba(52,211,153,0.08); }

/* ── LAYOUT ── */
main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 100px;
}
.page-ornament {
  text-align: center;
  color: rgba(201,168,76,0.55);
  font-size: 1.5rem;
  margin-bottom: 14px;
}
.page-eyebrow {
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.page-title {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 10px;
}
.page-title em { font-style: italic; color: var(--gold-light); }
.page-sub {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(209,250,229,0.5);
  line-height: 1.7;
  margin-bottom: 44px;
}

/* ── CARDS ── */
.card {
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  background: rgba(255,255,255,0.02);
  padding: 32px 26px;
  margin-bottom: 20px;
  transition: border-color 0.25s, background 0.25s;
}
.card:hover { border-color: var(--border); }
.card.featured { border-color: var(--gold); background: rgba(52,211,153,0.06); }
.card-label {
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  text-align: center;
}

/* ── AYAH DISPLAY ── */
.ayah-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--cream);
  line-height: 1.72;
  text-align: center;
  margin-bottom: 16px;
}
.ayah-ref {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: 4px;
}
.ayah-reflection {
  font-size: 0.9rem;
  color: rgba(209,250,229,0.6);
  line-height: 1.75;
  text-align: center;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
}
.arabic {
  font-size: 1.55rem;
  color: var(--gold-pale);
  line-height: 2.1;
  text-align: center;
  direction: rtl;
  margin-bottom: 18px;
  font-family: 'Amiri', 'Scheherazade New', serif;
}
.translit {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(110,231,183,0.75);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 12px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--gold);
  border: none;
  padding: 13px 30px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn:hover { background: var(--gold-light); }
.btn.ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(52,211,153,0.06); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn:disabled { opacity: 0.4; cursor: default; }

/* ── STREAK ── */
.streak-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
}
.streak-item { text-align: center; }
.streak-num {
  font-family: 'Cinzel', serif;
  font-size: 1.9rem;
  color: var(--gold-light);
  line-height: 1.1;
}
.streak-word {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 5px;
}

/* ── PREMIUM LOCK ── */
.premium-lock {
  border: 1px dashed var(--border);
  border-radius: 2px;
  padding: 26px 22px;
  text-align: center;
  background: rgba(52,211,153,0.03);
}
.premium-lock p {
  font-size: 0.82rem;
  color: rgba(209,250,229,0.55);
  line-height: 1.7;
  margin-bottom: 16px;
}
.premium-badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  color: var(--dark);
  background: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 8px;
  text-transform: uppercase;
}

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.64rem; color: var(--muted); text-decoration: none; letter-spacing: 0.08em; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.06em; }

/* ── MODAL (restore access) ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2,13,8,0.85);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--dark-mid);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 34px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.modal h3 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.4rem; color: var(--cream); margin-bottom: 10px; }
.modal p { font-size: 0.8rem; color: rgba(209,250,229,0.55); line-height: 1.65; margin-bottom: 18px; }
.modal input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--cream);
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: 'Lato', sans-serif;
  margin-bottom: 14px;
  outline: none;
}
.modal input:focus { border-color: var(--gold); }
.modal-close {
  background: none; border: none;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  margin-top: 12px;
  text-transform: uppercase;
}
.modal-close:hover { color: var(--gold-light); }
.modal-status { font-size: 0.75rem; margin-top: 10px; min-height: 18px; }
.modal-status.ok { color: #6ee7b7; }
.modal-status.err { color: #f87171; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-up { opacity: 0; animation: fadeUp 0.8s ease forwards; }

@media (max-width: 600px) {
  main { padding: 112px 18px 80px; }
  .card { padding: 26px 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── HAMBURGER MENU (mobile only) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--gold-light);
  transition: all 0.22s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-dropdown {
  display: none;
  position: fixed;
  top: 57px;
  right: 16px;
  z-index: 199;
  background: rgba(2,13,8,0.98);
  border: 1px solid var(--border);
  border-radius: 4px;
  backdrop-filter: blur(14px);
  min-width: 200px;
  overflow: hidden;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(209,250,229,0.65);
  text-decoration: none;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover,
.nav-dropdown a.active { background: rgba(52,211,153,0.08); color: var(--gold-light); }
