/* ==========================================================================
   MA Learn × Majid Angawi — DESIGN SYSTEM V4 · base + components
   Canonical URL : https://malearnsa.com/brand/ma-v4.css   (imports tokens.css)
   Version       : 4.0.0 · 2026-08-31
   Drop-in for any new page:
     <link rel="stylesheet" href="https://malearnsa.com/brand/ma-v4.css">
   Pages that only need the variables link tokens.css alone.
   ========================================================================== */
@import url('tokens.css');

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body); background: var(--bg); color: var(--ink);
  font-size: var(--fs-body); line-height: var(--lh-body);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent); color: var(--on-accent); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.tnum { font-variant-numeric: tabular-nums; }

/* ── Light field ─────────────────────────────────────────────────────── */
.glow-wrap { position: relative; }
.glow-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; background: var(--glow-hero); }

/* ── Layout ──────────────────────────────────────────────────────────── */
.wrap { width: var(--wrap-w); margin-inline: auto; position: relative; z-index: 1; }
.sec { padding-block: var(--sec-y); position: relative; text-align: center; }
.sec-tight { padding-block: var(--sec-y-tight) !important; }
.sec-start { text-align: start; }

/* ── Type ────────────────────────────────────────────────────────────── */
.disp { font-family: var(--disp); font-weight: 700; line-height: var(--lh-disp); letter-spacing: var(--track-disp); }
h1.disp, .h1 { font-size: var(--fs-h1); }
h2.disp, .h2 { font-size: var(--fs-h2); }
h3.disp, .h3 { font-size: var(--fs-h3); }
.hl { color: var(--accent-hot); }
.hl-lav { color: var(--lav); }
.lead { color: var(--muted); font-size: var(--fs-lead); }
.sec-h2 { max-width: 820px; margin-inline: auto; }
.sec-lead { max-width: 680px; margin: 22px auto 0; }
.label { font-size: var(--fs-label); font-weight: 800; color: var(--faint); }
.micro { font-size: var(--fs-micro); font-weight: 700; color: var(--faint); }
.en { font-weight: 800; color: var(--ink); }   /* Latin term inside Arabic copy */

/* ── Eyebrow ─────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 20px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 800; color: var(--muted); background: var(--wash); margin-bottom: 28px;
}
.eyebrow .num { background: var(--accent); color: var(--on-accent); font-weight: 900; border-radius: var(--r-pill); padding: 2px 12px; font-size: .78rem; }
.eyebrow.lav-e .num { background: var(--lav); color: var(--on-lav); }

/* ── Chips ───────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  padding: 9px 20px; font-size: .86rem; font-weight: 700; color: var(--muted); background: var(--wash);
}
.chip b, .chip .hl { color: var(--accent-hot); font-weight: 900; }
.chip-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-solid b { color: var(--on-accent); }
.chip-live { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
.chip-lav { background: var(--lav-soft-bg); border-color: var(--lav-line); color: var(--lav); }

/* ── Tags (tiny status pills) ────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-pill);
  padding: 5px 16px; font-size: .74rem; font-weight: 900; line-height: 1.4;
  background: var(--accent-soft); color: var(--accent-hot);
}
.tag-solid { background: var(--accent); color: var(--on-accent); }
.tag-lav { background: var(--lav-soft-bg); color: var(--lav); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-neutral { background: var(--wash-2); color: var(--muted); }

/* ── Meta line ───────────────────────────────────────────────────────── */
.meta-line { color: var(--faint); font-weight: 700; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 0; justify-content: center; align-items: center; }
.meta-line .sep { margin-inline: 14px; color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--body); font-weight: 800; font-size: 1.02rem; cursor: pointer;
  border: none; border-radius: var(--r-pill); padding: 16px 38px; text-decoration: none; line-height: 1.4;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), background var(--dur-med);
}
.btn-primary { background: var(--grad-accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { transform: var(--lift); box-shadow: var(--shadow-accent-hover); }
.btn-ghost { background: var(--wash-2); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { transform: var(--lift); background: rgba(248,240,230,.09); }
.btn-lav { background: var(--grad-lav-card); color: var(--on-lav); }
.btn-lav:hover { transform: var(--lift); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: 18px; }
.btn-quiet:hover { color: var(--ink); }
.btn-big { padding: 19px 46px; font-size: 1.12rem; }
.btn-sm { padding: 10px 24px; font-size: .88rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3.6vw, 38px); }
.card-xl { border-radius: var(--r-xl); }
.card-accent { background: var(--grad-accent-card); color: var(--on-accent); border: none; }
.card-accent .c-muted { color: #6b3115; }
.card-lav { background: var(--grad-lav-card); color: var(--on-lav); border: none; }
.card-lav .c-muted { color: #4a4070; }
.card-hover { transition: transform var(--dur-slow) var(--ease), border-color var(--dur-med), box-shadow var(--dur-slow); }
.card-hover:hover { transform: var(--lift-card); border-color: var(--accent-line); box-shadow: var(--shadow-raised); }

/* ── Stat pill ───────────────────────────────────────────────────────── */
.stat-pill { border: 1.5px solid var(--line-strong); border-radius: var(--r-lg); padding: 16px 28px; background: var(--wash); display: inline-block; }
.stat-pill .n { font-family: var(--disp); font-weight: 700; font-size: 1.7rem; color: var(--accent-hot); line-height: 1.2; }
.stat-pill .l { color: var(--muted); font-size: .78rem; font-weight: 700; }

/* ── Media slots ─────────────────────────────────────────────────────── */
.img-slot { border-radius: var(--r-lg); overflow: hidden; border: 1.5px solid var(--line); position: relative; background: var(--media); }
.img-slot img, .img-slot video { width: 100%; height: 100%; object-fit: cover; }
.img-cap {
  position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 2;
  background: var(--scrim); backdrop-filter: blur(6px); color: var(--muted);
  border-radius: var(--r-pill); padding: 5px 16px; font-size: .72rem; font-weight: 700;
}
.ph-slot {
  border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: rgba(248,240,230,.025);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--faint); font-size: .8rem; font-weight: 700; padding: 18px; min-height: 150px;
}
.video-embed { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1.5px solid var(--line-strong); aspect-ratio: 16/9; background: var(--media); box-shadow: 0 24px 70px -30px rgba(255,106,60,.35); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.field { display: grid; gap: 8px; text-align: start; }
.field > label { font-size: var(--fs-label); font-weight: 700; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; background: var(--bg-2); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 13px 16px; font-family: var(--body); font-size: var(--fs-sm); font-weight: 600;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: rgba(150,137,122,.65); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.field[data-state="error"] .input { border-color: var(--danger); }
.field .helper { font-size: var(--fs-label); color: var(--faint); }
.field[data-state="error"] .helper { color: var(--danger); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-hot); width: 18px; height: 18px; }

/* ── Choice card (radio-as-card — cohort picker, plan picker) ────────── */
.choice { display: flex; align-items: center; gap: 14px; background: var(--wash); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; cursor: pointer; transition: border-color var(--dur-fast), background var(--dur-fast); text-align: start; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.choice.is-full { opacity: .55; cursor: not-allowed; }

/* ── Accordion ───────────────────────────────────────────────────────── */
.acc-list { display: grid; gap: 12px; text-align: start; }
details.acc { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--dur-med); }
details.acc[open] { border-color: var(--accent-line); }
details.acc.acc-lav[open] { border-color: var(--lav-line); }
details.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 20px 24px; font-weight: 800; font-size: .98rem; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc .num { flex: none; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-hot); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .85rem; }
details.acc.acc-lav .num { background: var(--lav-soft-bg); color: var(--lav); }
details.acc .t { flex: 1; line-height: 1.5; }
details.acc .fx { flex: none; width: 32px; height: 32px; border-radius: 12px; background: var(--wash-2); display: flex; align-items: center; justify-content: center; color: var(--accent-hot); font-weight: 900; font-size: 1.1rem; transition: transform var(--dur-med) var(--ease); }
details.acc.acc-lav .fx { color: var(--lav); }
details.acc[open] summary .fx { transform: rotate(45deg); }
details.acc .body { padding: 0 24px 22px; color: var(--muted); font-size: .92rem; }
.row-list { list-style: none; display: grid; gap: 6px; }
.row-list li { display: flex; align-items: center; gap: 12px; background: rgba(248,240,230,.03); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 16px; color: var(--muted); font-size: .88rem; font-weight: 600; text-align: start; }
.row-list li .pl { flex: none; color: var(--accent-hot); font-size: .7rem; }

/* ── Header / sticky bar ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 60; backdrop-filter: blur(14px); background: var(--scrim-bar); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; text-align: start; }
.top .logo { height: 30px; width: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: .85rem; font-weight: 700; color: var(--muted); text-decoration: none; transition: color var(--dur-med); }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links { display: none; } }
.sticky {
  position: fixed; bottom: 14px; inset-inline: 14px; z-index: 80; max-width: 660px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(29,22,16,.92); backdrop-filter: blur(16px); border: 1.5px solid var(--line-strong); border-radius: var(--r-lg);
  padding: 12px 12px 12px 20px; transform: translateY(140%); transition: transform var(--dur-slow) var(--ease); text-align: start;
}
.sticky.on { transform: translateY(0); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding-block: 34px; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--faint); font-size: .8rem; font-weight: 700; text-decoration: none; }
.foot-links a:hover { color: var(--muted); }
.foot-copy { color: var(--faint); font-size: .74rem; }

/* ── Hairline ────────────────────────────────────────────────────────── */
.hairline { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-5); }
.hairline-accent { border-top-color: var(--accent-deep); opacity: .6; }

/* ── Reveal on scroll ────────────────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(26px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.rv.in { opacity: 1; transform: none; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top, .sticky, .no-print { display: none !important; }
  .rv { opacity: 1 !important; transform: none !important; }
  .sec { padding-block: 40px; }
  .page-break { break-before: page; }
}
