/* Adaad landing page (style campaign, 2026-10-31). The app's palette and
   type, laid out for a first visit on any screen: a centred column that
   widens to two and four columns, type that scales with the window. */

/* Colours come from the shared tokens (/mobile/tokens.css); these are the
   page's own names for them, plus the two it alone uses (the dark band). */
:root {
  --bg: var(--bg-base); --bg-alt: var(--bg-inset); --surface: var(--bg-elev); --surface-2: var(--bg-elev-2);
  --ink: var(--text-base); --muted: var(--text-muted); --dim: var(--text-dim);
  --line: var(--border-warm); --line-2: var(--border-warm-2); --shadow: var(--shadow-card-hover);
  --band: #2a2521; --band-ink: #f5ede4;
}
:root[data-theme="dark"] { --band: #120f0d; }

* { box-sizing: border-box; }
html { font-size: clamp(16px, 15.2px + 0.25vw, 18px); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
html[lang="ar"] body { font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; line-height: 1.75; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.25; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; font-weight: 600; }
html[lang="ar"] h1, html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.45; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
/* The page's built-in text is English; Arabic replaces it before it shows. */
.i18n-pending [data-k] { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--surface); padding: .5rem 1rem;
  border-radius: 8px; z-index: 50; }
.skip:focus { top: 1rem; }
[data-lucide] { width: 1.15em; height: 1.15em; stroke-width: 2; }
html[dir="rtl"] [data-lucide="arrow-right"], html[dir="rtl"] [data-lucide="chevron-right"] { transform: scaleX(-1); }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* ---- Brand ---- */
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.brand-word { font-family: 'IBM Plex Sans Arabic', sans-serif; font-weight: 700; font-size: 1.55rem; color: var(--ink);
  line-height: 1; padding-bottom: .3rem; border-bottom: 3px solid var(--emerald); }
.brand-word.small { font-size: 1.2rem; }

/* ---- Buttons: the app's three roles ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding-inline: 1.35rem; border-radius: 12px; font: inherit; font-weight: 600;
  font-size: .95rem; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.4rem; padding-inline: 1rem; font-size: .85rem; }
.btn-primary { background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 6px 16px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-light { background: var(--band-ink); color: var(--band); }
.btn-light:hover { background: #fff; }
.btn-outline-light { color: var(--band-ink); border-color: color-mix(in srgb, var(--band-ink) 45%, transparent); }
.btn-outline-light:hover { background: color-mix(in srgb, var(--band-ink) 10%, transparent); }
.btn[disabled] { opacity: .6; cursor: wait; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.text-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; padding: .4rem .5rem; border-radius: 8px; }
.text-btn:hover { color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom: 1px solid var(--line); }
.top-bar { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.top-links { display: flex; gap: 1.6rem; margin-inline-start: 1.5rem; }
.top-links a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.top-links a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
@media (max-width: 760px) { .top-links { display: none; } }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem);
  background:
    radial-gradient(60% 70% at 85% 10%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 65%),
    radial-gradient(50% 60% at 10% 90%, color-mix(in srgb, var(--emerald) 9%, transparent) 0%, transparent 60%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--accent); opacity: .11;
  -webkit-mask: var(--pattern-star) 0 0 / 64px 64px repeat, linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-composite: source-in;
  mask: var(--pattern-star) 0 0 / 64px 64px repeat, linear-gradient(to bottom, #000, transparent 85%);
  mask-composite: intersect; }
.hero-grid { position: relative; display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; font-size: .88rem; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.35rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; max-width: 22ch; }
html[lang="ar"] h1 { line-height: 1.4; max-width: 20ch; }
.lead { color: var(--muted); font-size: clamp(1rem, .95rem + .3vw, 1.15rem); margin-top: 1.1rem; max-width: 40rem; }
.hero .cta-row { margin-top: 1.8rem; }
.fine { color: var(--dim); font-size: .86rem; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.fine a { color: var(--accent); text-decoration: none; font-weight: 500; }
.fine a:hover { text-decoration: underline; }

/* The illustrative screen card */
.hero-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: clamp(1.2rem, 1rem + 1vw, 1.75rem); display: grid; gap: 1.05rem; }
.demo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.demo-label { font-size: .75rem; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
html[lang="ar"] .demo-label { text-transform: none; letter-spacing: 0; font-size: .82rem; }
.demo-name { font-weight: 700; font-size: 1.15rem; margin-top: .15rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip-ok { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, transparent); }
.chip-warn { color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.chip-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.ratio-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--muted); margin-bottom: .4rem; }
.ratio-num { font-weight: 600; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ratio-num small { color: var(--dim); font-weight: 400; }
.bar { position: relative; height: .5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--v); border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), color-mix(in srgb, var(--emerald) 70%, var(--gold))); }
html[dir="rtl"] .bar span { background: linear-gradient(270deg, var(--emerald), color-mix(in srgb, var(--emerald) 70%, var(--gold))); }
.bar.over span { background: var(--bad); }
.hero-card figcaption { font-size: .82rem; color: var(--dim); border-top: 1px solid var(--line); padding-top: .9rem; }

/* ---- Sections ---- */
.section { padding-block: clamp(3rem, 2.4rem + 3vw, 5.5rem); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 + .features, .section h2 + .steps, .section h2 + .principles { margin-top: clamp(1.6rem, 1.3rem + 1vw, 2.5rem); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem;
  margin-bottom: clamp(1.4rem, 1.2rem + 1vw, 2.2rem); }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.f-icon { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 12px; margin-bottom: 1rem;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.feature p { color: var(--muted); font-size: .94rem; margin-top: .5rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; }
.step-num { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; margin-bottom: .9rem;
  background: var(--emerald); color: #fff; font-weight: 700; font-size: .95rem; }
.steps p { color: var(--muted); font-size: .94rem; margin-top: .45rem; }

/* ---- Live check ---- */
.check-grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
@media (min-width: 900px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check-form { display: flex; gap: .6rem; margin-top: 1.5rem; max-width: 30rem; }
.check-form input { flex: 1; min-width: 0; min-height: 2.9rem; padding-inline: 1rem; border-radius: 12px; font: inherit;
  font-size: max(16px, 1rem); font-family: 'IBM Plex Mono', 'IBM Plex Sans', monospace; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); }
.check-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.check-result:empty { display: none; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; box-shadow: var(--shadow); display: grid; gap: 1rem; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.result-tk { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--muted); font-size: .85rem; }
.result-name { font-weight: 700; font-size: 1.15rem; }
.result-meta { font-size: .82rem; color: var(--dim); }
.notice { border-radius: 14px; padding: 1rem 1.1rem; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: .92rem; }

/* ---- Lessons ---- */
.lessons { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.lesson { display: flex; gap: .9rem; align-items: flex-start; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; transition: border-color .15s ease, transform .15s ease; }
.lesson:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); }
.lesson-num { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 10px;
  background: color-mix(in srgb, var(--emerald) 12%, transparent); color: var(--emerald); font-weight: 700; font-size: .9rem; }
.lesson-title { font-weight: 600; line-height: 1.4; }
.lesson-meta { font-size: .8rem; color: var(--dim); margin-top: .2rem; }

/* ---- Term of the day ---- */
.term-card { max-width: 46rem; margin-inline: auto; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(1.6rem, 1.3rem + 2vw, 2.6rem); box-shadow: var(--shadow); }
.term-card .kicker { color: var(--gold); margin-bottom: .6rem; }
.term-card h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); font-weight: 700; }
.term-card p { color: var(--muted); margin-top: .75rem; }
.term-limits { font-size: .88rem; color: var(--gold) !important; }

/* ---- Principles ---- */
.principles { display: grid; gap: 1.4rem 2.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.principle { display: flex; gap: 1rem; align-items: flex-start; }
.principle > [data-lucide], .principle > svg { flex: none; width: 1.5rem; height: 1.5rem; color: var(--emerald); margin-top: .2rem; }
.principle p { color: var(--muted); font-size: .94rem; margin-top: .35rem; }

/* ---- Closing band and footer ---- */
.closing { background: var(--band); color: var(--band-ink); padding-block: clamp(3rem, 2.4rem + 3vw, 5rem); position: relative; overflow: hidden; }
.closing::after { content: ""; position: absolute; inset-inline-end: -6rem; top: -6rem; width: 22rem; height: 22rem; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent) 0%, transparent 65%); pointer-events: none; }
.closing-inner { position: relative; display: grid; gap: 1rem; justify-items: start; }
.closing h2 { color: var(--band-ink); }
.closing p { color: color-mix(in srgb, var(--band-ink) 75%, transparent); font-size: 1.05rem; max-width: 36rem; }
.closing .cta-row { margin-top: .6rem; }
.foot { border-top: 1px solid var(--line); padding-block: 2rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot p { color: var(--dim); font-size: .86rem; flex: 1 1 18rem; }
.foot-links { display: flex; gap: 1.2rem; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 480px) {
  .cta-row .btn { flex: 1 1 100%; }
  .check-form { flex-direction: column; }
  .top-actions .btn-sm { padding-inline: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature, .lesson, .btn { transition: none; }
}
