/* Quran Everywhere — landing page styles.
   Palette mirrors the app (AppColors) so the site and app feel like one product. */

:root {
  --bg: #fffbf0;
  --bg-alt: #fff6e0;
  --surface: #ffffff;
  --border: #ece2c8;
  --text: #1f2937;
  --text-muted: #6b6250;
  --gold: #92712a;
  --gold-strong: #7a5e20;
  --gold-soft: rgba(146, 113, 42, 0.12);
  --shadow: 0 1px 2px rgba(31, 41, 55, 0.06), 0 8px 24px rgba(31, 41, 55, 0.06);
  --radius: 16px;
  --maxw: 1080px;
}

/* Dark palette, shared by the OS-preference fallback and the explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f172a;
    --bg-alt: #131d33;
    --surface: #172137;
    --border: #26324a;
    --text: #e8edf6;
    --text-muted: #a4afc4;
    --gold: #d4a853;
    --gold-strong: #e2ba6a;
    --gold-soft: rgba(212, 168, 83, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
/* An explicit toggle choice always wins over the OS preference. */
:root[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #131d33;
  --surface: #172137;
  --border: #26324a;
  --text: #e8edf6;
  --text-muted: #a4afc4;
  --gold: #d4a853;
  --gold-strong: #e2ba6a;
  --gold-soft: rgba(212, 168, 83, 0.14);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* --- Header / nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--gold-strong); text-decoration: none; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--gold-strong); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-strong); }

/* Icon button (theme toggle) */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex: none;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-strong); }
.icon-btn svg { width: 20px; height: 20px; }
/* Show sun in dark mode, moon in light mode. */
.icon-btn .icon-sun { display: none; }
.icon-btn .icon-moon { display: block; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: block; }
:root[data-theme="dark"] .icon-btn .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .icon-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .icon-moon { display: none; }
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* --- Hero --- */
.hero { padding: 72px 0 56px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-strong);
  background: var(--gold-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.hero .arabic-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--gold-strong);
  font-weight: 600;
  margin: 0 0 20px;
  direction: rtl;
}
.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 30px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-note { margin-top: 16px; font-size: 0.9rem; color: var(--text-muted); }

/* --- Sections --- */
section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); margin: 0; font-size: 1.05rem; }

/* --- Feature grid --- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-strong);
  margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }

/* --- Platforms / download --- */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.platform {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.platform:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-1px); transition: transform 0.12s ease, border-color 0.12s ease; }
.platform .pico,
.platform-details > summary .pico { width: 34px; height: 34px; color: var(--gold-strong); flex: none; }
.platform .pico svg,
.platform-details > summary .pico svg { width: 100%; height: 100%; }
.platform .ptext,
.platform-details > summary .ptext { display: flex; flex-direction: column; line-height: 1.3; }
.platform .ptext strong,
.platform-details > summary .ptext strong { font-size: 1rem; }
.platform .ptext span,
.platform-details > summary .ptext span { font-size: 0.85rem; color: var(--text-muted); }
.platform.disabled { opacity: 0.6; cursor: default; }
.platform.disabled:hover { transform: none; border-color: var(--border); }

/* Android: a card face that expands two beta-join steps in place. */
.platform-details { grid-column: 1 / -1; }
.platform-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.platform-details > summary::-webkit-details-marker { display: none; }
.platform-details > summary:hover { border-color: var(--gold); }
.platform-details > summary .chev { margin-inline-start: auto; color: var(--gold-strong); transition: transform 0.15s ease; }
.platform-details[open] > summary .chev { transform: rotate(180deg); }
.beta-steps {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 24px 20px;
  box-shadow: var(--shadow);
}
.beta-steps ol { margin: 0; padding-inline-start: 22px; }
.beta-steps li { margin: 14px 0; color: var(--text); }
.beta-steps li span { color: var(--text-muted); }

/* Social icon row */
.social { display: flex; gap: 12px; align-items: center; }
.social a {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}
.social a:hover { border-color: var(--gold); color: var(--gold-strong); transform: translateY(-1px); }
.social svg { width: 19px; height: 19px; }

/* --- Arabic block --- */
.rtl-block { direction: rtl; text-align: right; }
.rtl-block .section-head { text-align: center; }
.rtl-block ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rtl-block li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  font-size: 1.05rem;
}
.rtl-block li strong { color: var(--gold-strong); }

/* --- FAQ --- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 22px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-strong); font-size: 1.4rem; font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 18px; color: var(--text-muted); }

/* --- CTA band --- */
.cta-band { text-align: center; }
.cta-band .card { max-width: 720px; margin: 0 auto; padding: 44px 32px; }
.cta-band h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); margin: 0 0 12px; }
.cta-band p { color: var(--text-muted); margin: 0 0 26px; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-muted); font-size: 0.92rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-left { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.footer-brand img { width: 28px; height: 28px; border-radius: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--gold-strong); }
.footer-copy { margin-top: 24px; font-size: 0.85rem; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 52px 0 40px; }
  section { padding: 46px 0; }
}
