/* OneAayah marketing site — colours and type match the app (see Al-Quran-UI/docs/brand.md) */

/* ------------------------------------------------------------ Fonts (self-hosted, no third-party requests) */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/Inter-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../assets/fonts/Lora-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Uthmanic Hafs";
  src: url("../assets/fonts/UthmanicHafs-v22.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------ Tokens */
:root {
  color-scheme: light;
  --paper: #f3ead6;
  --paper-deep: #e9dfc6;
  --surface: #fbf6ea;
  --surface-raised: #fffdf6;
  --ink: #2b2416;
  --ink-soft: #4d4335;
  --muted: #7a6c55;
  --line: #dccfb3;
  --accent: #2f6b4f;
  --accent-hover: #26593f;
  --accent-soft: #dfeadf;
  --on-accent: #ffffff;
  --gold: #b08d3c;
  --gold-soft: #f0e3bf;
  --shadow: 0 1px 2px rgb(60 40 10 / 0.08), 0 12px 32px -16px rgb(60 40 10 / 0.35);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-arabic: "Uthmanic Hafs", "Amiri Quran", "Scheherazade New", "Noto Naskh Arabic", serif;

  --container: 72rem;
  --radius: 1rem;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #14120f;
    --paper-deep: #0f0e0b;
    --surface: #1d1a15;
    --surface-raised: #24201a;
    --ink: #ebe3d2;
    --ink-soft: #cfc5b0;
    --muted: #9d927b;
    --line: #322d25;
    --accent: #6fb391;
    --accent-hover: #86c4a5;
    --accent-soft: #1f2f27;
    --on-accent: #0f1a14;
    --gold: #d2b46a;
    --gold-soft: #2e2818;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -16px rgb(0 0 0 / 0.7);
}

/* ------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-title { text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 44rem; margin-inline: auto; margin-bottom: 2.5rem; font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem; color: var(--gold); font-weight: 600; margin-bottom: 0.75rem; }
.arabic { font-family: var(--font-arabic); direction: rtl; unicode-bidi: isolate; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.1rem; border-radius: 0.8rem;
  font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-lg { min-height: 3.1rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-raised); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--paper-deep); color: var(--ink); }

/* ------------------------------------------------------------ Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: block; width: 2.5rem; height: 2.5rem; }
.brand-mark img.logo-dark, .footer-logo img.logo-dark { display: none; }
:root[data-theme="dark"] .brand-mark img.logo-dark, :root[data-theme="dark"] .footer-logo img.logo-dark { display: block; }
:root[data-theme="dark"] .brand-mark img.logo-light, :root[data-theme="dark"] .footer-logo img.logo-light { display: none; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.site-nav > a:not(.btn) { padding: 0.5rem 0.75rem; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; border-radius: 0.6rem; }
.site-nav > a:not(.btn):hover { background: var(--paper-deep); color: var(--ink); }
.site-nav .btn { margin-left: 0.5rem; }
.theme-toggle { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-left: 0.25rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 0.6rem; cursor: pointer; }
.theme-toggle:hover { background: var(--paper-deep); color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.nav-toggle { display: none; margin-left: auto; width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); background: var(--surface); border-radius: 0.6rem; flex-direction: column; justify-content: center; gap: 5px; align-items: center; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0.25rem; padding: 0.75rem 1rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .site-nav .btn { margin: 0.25rem 0 0; }
  .theme-toggle { margin-left: auto; margin-right: 0.5rem; }
  .nav-toggle { margin-left: 0; }
}

/* ------------------------------------------------------------ Hero */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.fineprint { font-size: 0.85rem; color: var(--muted); }

.mushaf-page {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem 1.5rem; box-shadow: var(--shadow);
  background-image: radial-gradient(rgb(120 90 40 / 0.05) 0.6px, transparent 0.6px), radial-gradient(rgb(120 90 40 / 0.04) 0.6px, transparent 0.6px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
  transform: rotate(-1.2deg);
}
.mushaf-page::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 10px; border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(to right, rgb(0 0 0 / 0.12), transparent); pointer-events: none; }
.mushaf-header { display: flex; align-items: center; gap: 0.75rem; justify-content: center; }
.ornament-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--gold)); max-width: 6rem; }
.ornament-line:last-child { background: linear-gradient(to left, transparent, var(--gold)); }
.surah-name { font-size: 1.5rem; color: var(--accent); }
.mushaf-meta { text-align: center; font-family: var(--font-serif); text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.62rem; color: var(--muted); margin: 0.2rem 0 1rem; }
.mushaf-text { font-size: 1.55rem; line-height: 2.2; text-align: justify; color: var(--ink); margin: 0; }
.ayah-mark { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin: 0 0.15em; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 0.55em; vertical-align: middle; }
.mushaf-translation { margin: 1rem 0 0; text-align: center; font-family: var(--font-serif); font-size: 0.9rem; color: var(--ink-soft); }
.mushaf-page-number { margin: 1.25rem 0 0; text-align: center; font-family: var(--font-serif); font-size: 0.8rem; color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .mushaf-page { transform: none; }
}

/* ------------------------------------------------------------ Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-grid-3 { grid-template-columns: repeat(3, 1fr); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.section-alt .feature { background: var(--surface-raised); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.feature-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
@media (max-width: 900px) { .feature-grid, .feature-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid, .feature-grid-3 { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-reverse > :first-child { order: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-reverse > :first-child { order: 2; } }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.5rem; }
.checklist li { padding-left: 1.75rem; position: relative; color: var(--ink-soft); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

.theme-swatches { display: grid; gap: 0.9rem; }
.swatch { border-radius: var(--radius); padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid transparent; box-shadow: var(--shadow); }
.swatch .arabic { font-size: 1.8rem; }
.swatch small { font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.swatch-parchment { background: #f3ead6; color: #2b2416; border-color: #dccfb3; }
.swatch-parchment small { color: #7a6c55; }
.swatch-light { background: #ffffff; color: #1c1f23; border-color: #e2e3df; }
.swatch-light small { color: #6b7079; }
.swatch-dark { background: #14120f; color: #ebe3d2; border-color: #322d25; }
.swatch-dark small { color: #9d927b; }

/* ------------------------------------------------------------ Chat demo */
.chat-demo { display: grid; gap: 0.75rem; }
.chat-q { justify-self: end; max-width: 85%; background: var(--accent); color: var(--on-accent); padding: 0.7rem 1rem; border-radius: 1.1rem 1.1rem 0.35rem 1.1rem; font-weight: 500; }
.chat-a { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); font-family: var(--font-serif); font-size: 0.95rem; }
.chat-a p { margin: 0; }
.chat-cite { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; font-family: var(--font-sans); font-size: 0.75rem; }
.chat-cite span { background: var(--gold-soft); color: var(--ink-soft); border-radius: 0.5rem; padding: 0.25rem 0.55rem; }

/* ------------------------------------------------------------ CTA band */
.cta-band { background: var(--accent-soft); border-block: 1px solid var(--line); }
.cta-inner { text-align: center; display: grid; justify-items: center; gap: 0.5rem; }
.cta-arabic { font-size: 1.9rem; color: var(--accent); margin: 0 0 0.25rem; }

/* ------------------------------------------------------------ Footer */
.site-footer { padding: 2.5rem 0 3rem; font-size: 0.9rem; }
.footer-logo img { display: block; width: 180px; max-width: 60vw; height: auto; margin-bottom: 0.75rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr auto; gap: 1.5rem 3rem; align-items: start; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-inner nav a { text-decoration: none; }
.footer-inner .muted { font-size: 0.8rem; margin: 0.35rem 0 0; }
.copyright { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; margin: 0; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Legal pages */
.legal { max-width: 46rem; padding-top: 3rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal .updated { color: var(--muted); font-size: 0.9rem; }
