/* Nūr: a well-typeset book that happens to teach. Paper and ink, one green, a clay mark.
   Colours and faces are the app's own (src/theme/tokens.js). */
@font-face { font-family: Newsreader; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-vf-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Newsreader; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-vf-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Newsreader; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(/fonts/newsreader-vf-latin-wght-italic.woff2) format("woff2-variations"); }
@font-face { font-family: "Scheherazade New"; font-weight: 400; font-display: swap;
  src: url(/fonts/scheherazade-new-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Scheherazade New"; font-weight: 700; font-display: swap;
  src: url(/fonts/scheherazade-new-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-089F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --bg: #fbfaf6; --wash: #f2f0e9; --ink: #1b1b18; --muted: #65625a;
  --line: #e7e4da; --line-strong: #8c887c;
  --accent: #0e5a47; --on-accent: #ffffff; --mark: #a03f27;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --wash: #1b1b19; --ink: #eceae3; --muted: #a29f95;
    --line: #292825; --line-strong: #77746a;
    --accent: #62be9e; --on-accent: #0a1712; --mark: #ee9074;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --wash: #1b1b19; --ink: #eceae3; --muted: #a29f95;
  --line: #292825; --line-strong: #77746a;
  --accent: #62be9e; --on-accent: #0a1712; --mark: #ee9074;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.125rem/1.65 Newsreader, Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
}
.ar { font-family: "Scheherazade New", "Geeza Pro", "Noto Naskh Arabic", serif; font-weight: 400; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.15rem; }
.mark {
  width: 2.1rem; height: 2.1rem; border-radius: 0.6rem; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}
.mark .ar { font-size: 1.15rem; line-height: 1; font-weight: 700; transform: translateY(0.1rem); }
.top nav { display: flex; gap: 1.25rem; font-size: 1rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.75rem 1.2rem; border-radius: 0.8rem;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; text-decoration: none;
}
.btn:hover { opacity: 0.9; }
.btn svg { width: 1.1rem; height: 1.1rem; }

.soon {
  display: inline-flex; align-items: center; padding: 0.7rem 1.15rem; border-radius: 0.8rem;
  border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 1rem;
}

/* Landing */
.hero { padding: 4.5rem 0 4rem; text-align: center; }
.hero .word { display: block; font-size: clamp(6rem, 24vw, 10rem); line-height: 1; color: var(--accent); margin-bottom: 2rem; }
.hero h1 { margin: 0 auto 1rem; max-width: 16em; font-weight: 500; font-size: clamp(2.1rem, 6vw, 3.1rem); line-height: 1.12; letter-spacing: -0.015em; }
.hero p { margin: 0 auto 2rem; max-width: 30em; color: var(--muted); font-size: 1.25rem; line-height: 1.5; }
.hero .small { margin: 1rem auto 0; font-size: 0.95rem; }

.features { display: grid; gap: 2.5rem; padding: 3rem 0; border-top: 1px solid var(--line); }
.feature h2 { margin: 0 0 0.4rem; font-weight: 600; font-size: 1.35rem; line-height: 1.3; }
.feature p { margin: 0; color: var(--muted); }
.feature .ar { color: var(--ink); font-size: 1.3em; }
@media (min-width: 44rem) { .features { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.free {
  margin: 0 0 3rem; padding: 1.4rem 1.5rem; border-radius: 1rem; background: var(--wash);
  border-left: 3px solid var(--mark);
}
.free p { margin: 0; }

.reading { padding: 3rem 0 1rem; border-top: 1px solid var(--line); }
.reading h2 { margin: 0 0 1.25rem; font-size: 1.05rem; font-weight: 600; color: var(--muted); }

.card { display: block; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 1rem; color: inherit; text-decoration: none; }
.card:hover { border-color: var(--line-strong); }
.card .kicker { display: block; color: var(--mark); font-size: 0.95rem; margin-bottom: 0.3rem; }
.card h3 { margin: 0 0 0.4rem; font-weight: 600; font-size: 1.4rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); }
.card + .card { margin-top: 1rem; }

footer { margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
footer a { color: var(--muted); }

/* Blog index */
.page-title { padding: 3rem 0 2rem; }
.page-title h1 { margin: 0 0 0.5rem; font-weight: 500; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -0.015em; }
.page-title p { margin: 0; color: var(--muted); font-size: 1.2rem; }

/* Article */
.article-head { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.25rem; }
.article-head .kicker { color: var(--mark); font-size: 1rem; margin: 0 0 0.75rem; }
.article-head h1 { margin: 0 0 1rem; font-weight: 500; font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.12; letter-spacing: -0.015em; }
.article-head .lede { margin: 0 0 1rem; color: var(--muted); font-size: 1.3rem; line-height: 1.5; }
.article-head .meta { margin: 0; font-size: 0.95rem; color: var(--muted); }

.prose { max-width: 38rem; }
.prose h2 { margin: 2.6rem 0 0.8rem; font-weight: 600; font-size: 1.6rem; line-height: 1.25; }
.prose h3 { margin: 1.8rem 0 0.5rem; font-weight: 600; font-size: 1.25rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--line-strong); }
.prose strong { font-weight: 650; }
.prose .ar { font-size: 1.45em; line-height: 1.2; }
.prose .letters { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 1rem 1.25rem; margin: 0 0 1.25rem; border-radius: 0.8rem; background: var(--wash); }
.prose .letters span { white-space: nowrap; }
.prose .letters .ar { font-size: 1.9rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 1rem; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.note { padding: 1rem 1.25rem; border-radius: 0.8rem; background: var(--wash); border-left: 3px solid var(--mark); font-size: 1.05rem; }

.cta { margin: 3rem 0 0; padding: 1.75rem; border-radius: 1.1rem; background: var(--accent); color: var(--on-accent); }
.cta h2 { margin: 0 0 0.4rem; font-weight: 600; font-size: 1.45rem; }
.cta p { margin: 0 0 1.25rem; opacity: 0.92; }
.cta .btn { background: var(--on-accent); color: var(--accent); }

@media (max-width: 30rem) {
  .hero { padding: 3rem 0 3rem; }
  .top nav { gap: 1rem; }
}
@media print {
  .top nav, .cta, footer { display: none; }
  body { background: #fff; color: #000; }
}

.app-note { max-width: 38rem; margin: 0 0 2.25rem; padding: 1.1rem 1.3rem; border-radius: 0.9rem; background: var(--wash); border-left: 3px solid var(--accent); font-size: 1.05rem; }
.app-note p { margin: 0; }
.app-note strong { color: var(--accent); }
