/* ECRE landing page. No external fonts, scripts or trackers. */
:root {
  --bg: #0b1b2b;
  --bg-2: #10263b;
  --surface: #ffffff;
  --surface-2: #f4f7fa;
  --text: #13212f;
  --muted: #52606d;
  --line: #dde4ea;
  --accent: #0f9d8f;
  --accent-strong: #0b7c71;
  --accent-on-dark: #3dd6c4;
  --warn-bg: #fff6e5;
  --warn-line: #f0c36d;
  --radius: 14px;
  --max: 1120px;
  --font-latin: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-latin);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-arabic); line-height: 1.85; }

a { color: var(--accent-strong); }
a:hover { color: var(--accent); }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }

.skip-link { position: absolute; inset-inline-start: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { inset-inline-start: 1rem; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }

/* Header */
.site-header { background: var(--bg); color: #fff; position: sticky; top: 0; z-index: 5; border-bottom: 1px solid rgba(255,255,255,0.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand img { width: 30px; height: 30px; }
.brand small { font-weight: 400; color: #9fb3c8; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav a { color: #c9d6e2; text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: #fff; }
.nav .lang { border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 0.2rem 0.8rem; color: #fff; }
@media (max-width: 820px) { .nav a:not(.lang) { display: none; } }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #17436a 0%, transparent 60%), var(--bg); color: #fff; padding-block: 5rem 4.5rem; }
html[dir="rtl"] .hero { background: radial-gradient(1200px 500px at 15% -10%, #17436a 0%, transparent 60%), var(--bg); }
.eyebrow { display: inline-block; font-size: 0.85rem; color: var(--accent-on-dark); border: 1px solid rgba(61,214,196,0.4); border-radius: 999px; padding: 0.25rem 0.85rem; margin-block-end: 1.25rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.15; margin: 0 0 1.25rem; max-width: 20ch; }
html[lang="ar"] .hero h1 { line-height: 1.35; }
.hero p.lead { font-size: 1.2rem; color: #c9d6e2; max-width: 60ch; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-block; padding: 0.75rem 1.35rem; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent-on-dark); color: #06231f; }
.btn-primary:hover { background: #6be3d5; color: #06231f; }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.status-note { margin-block-start: 2rem; font-size: 0.95rem; color: #9fb3c8; max-width: 70ch; }
.status-note strong { color: #ffd88a; }

/* Sections */
section { padding-block: 4.5rem; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 62ch; margin-block-end: 2.5rem; }
.section-head .kicker { color: var(--accent-strong); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
html[lang="ar"] .section-head .kicker { letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.25; margin: 0.35rem 0 0.9rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.section-head p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
section.alt .card { background: #fff; }
.card p { margin: 0; color: var(--muted); }
.card .tag { display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-strong); background: #e6f6f4; border-radius: 6px; padding: 0.1rem 0.5rem; margin-block-end: 0.75rem; direction: ltr; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; position: relative; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--bg); color: var(--accent-on-dark); font-weight: 700; margin-block-end: 0.75rem; }
.steps p { margin: 0; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.checklist li { padding-inline-start: 1.9rem; position: relative; }
.checklist li::before { position: absolute; inset-inline-start: 0; top: 0.05em; font-weight: 700; }
.checklist.done li::before { content: "✓"; color: var(--accent-strong); }
.checklist.open li::before { content: "!"; color: #b7791f; width: 1.2rem; text-align: center; }

.callout { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-block-start: 1.5rem; }
.callout p { margin: 0; }

.scenario { border-inline-start: 4px solid var(--accent); }
.label { display: inline-block; font-size: 0.8rem; font-weight: 700; color: #7a5a00; background: #fff1c2; border-radius: 6px; padding: 0.15rem 0.55rem; margin-block-end: 0.75rem; }

table.simple { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.simple th, table.simple td { text-align: start; padding: 0.7rem 0.75rem; border-block-end: 1px solid var(--line); vertical-align: top; }
table.simple th { color: var(--muted); font-weight: 600; }

.cta { background: var(--bg); color: #fff; border-radius: var(--radius); padding: 2.5rem; display: grid; gap: 1.5rem; grid-template-columns: 1fr auto; align-items: center; }
.cta p { color: #c9d6e2; margin: 0.25rem 0 0; }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }

.mono-ltr { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }

/* Footer */
.site-footer { background: var(--bg); color: #9fb3c8; padding-block: 2.5rem; font-size: 0.92rem; }
.site-footer a { color: #c9d6e2; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* White paper page */
.doc { max-width: 78ch; margin-inline: auto; padding-block: 3rem 5rem; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; }
.doc h2 { margin-block-start: 2.5rem; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
.doc h3 { margin-block-start: 1.75rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.93rem; display: block; overflow-x: auto; margin-block: 1.25rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 0.5rem 0.65rem; text-align: start; vertical-align: top; }
.doc th { background: var(--surface-2); }
.doc pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; overflow-x: auto; font-size: 0.88rem; }
.doc pre code { background: none; padding: 0; }
.doc [dir="rtl"], .doc .rtl { font-family: var(--font-arabic); line-height: 1.9; }
.doc-banner { background: var(--surface-2); border-block-end: 1px solid var(--line); padding-block: 0.9rem; font-size: 0.95rem; color: var(--muted); }

@media print {
  .site-header, .site-footer, .doc-banner { display: none; }
  body { font-size: 11pt; }
  .doc { max-width: none; padding: 0; }
}

/* Utilities (no inline styles, so the CSP can forbid them) */
.mt { margin-block-start: 1.25rem; }
.muted { color: var(--muted); }
.m0 { margin: 0; }
.card .tag.tag-text { font-family: inherit; direction: inherit; font-size: 0.85rem; }
