/* Alumniyat Learning — v2 identity from design-brief-v2.json (2026-08-09)
   American collegiate ed-tech: primary #004F9C · accent #FDB813 · text #2B2D42
   bg #FDFDFD · surface #EBEFF3 · muted #A9B4C2
   Source Sans 3 (display) + Open Sans (body). Signature: the diagonal —
   pennant slashes, clipped photo edges, skewed section breaks. */

:root {
  --primary: #004F9C;
  --primary-dark: #003C77;
  --accent: #FDB813;
  --text: #2B2D42;
  --bg: #FDFDFD;
  --surface: #EBEFF3;
  --muted: #A9B4C2;
  --muted-dark: #6B7688;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --font-display: "Source Sans 3", "Source Sans Pro", Roboto, Arial, sans-serif;
  --font-body: "Open Sans", Roboto, Arial, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Source Sans 3", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 900; margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted-dark); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* Signature: the pennant slash — a skewed gold mark under display headings */
.slash-head { position: relative; padding-bottom: .45em; }
.slash-head::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 8px; background: var(--accent);
  transform: skewX(-18deg);
}
.mark {
  background: linear-gradient(104deg, transparent 0 4%, var(--accent) 4% 96%, transparent 96%);
  padding: 0 .18em;
  margin-right: -.14em;
}

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary);
  color: #fff; padding: .5rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Arabic / RTL — content vocabulary, styled cleanly like any course material */
[dir="rtl"], .rtl { direction: rtl; text-align: right; }
.arabic { font-family: var(--font-arabic); font-size: 1.3em; line-height: 1.9; }

/* Header */
.site-header {
  background: rgba(253, 253, 253, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--surface);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 66px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px;
  background: var(--primary); color: #fff; border-radius: 9px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 900;
  position: relative; overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; right: -7px; bottom: -7px;
  width: 18px; height: 18px; background: var(--accent);
  transform: skewX(-18deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-weight: 700; }
.brand-text small { color: var(--muted-dark); font-size: .72rem; }
.site-nav { position: relative; }
.nav-toggle-box { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; font-size: 1.5rem; cursor: pointer; padding: .25rem .6rem; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--primary); }
/* .nav-links a outranks .btn-primary — restate button colors inside the nav */
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }
.inline-form { display: inline; }
.linklike {
  background: none; border: none; padding: 0; font: inherit; font-weight: 600;
  font-size: .95rem; color: var(--text); cursor: pointer;
}
.linklike:hover { color: var(--primary); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    flex-direction: column; align-items: stretch; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: .75rem 1rem; min-width: 220px;
  }
  .nav-links li { padding: .35rem 0; }
  .nav-toggle-box:checked ~ .nav-links { display: flex; }
}

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  border-radius: 8px; padding: .68rem 1.4rem;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 79, 156, .25); }
.btn-secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--muted); }
.btn-secondary:hover { background: #E0E6ED; }
.btn-sm { padding: .42rem 1rem; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .btn, .card { transition: none; } .btn-primary:hover { transform: none; } }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.display {
  font-size: clamp(2.3rem, 5.5vw, 3.7rem);
  font-weight: 900; letter-spacing: -.02em; margin: 0 0 .45em;
}
.hero .lede { font-size: 1.15rem; max-width: 34rem; color: var(--text); }
.hero-parent { color: var(--muted-dark); font-size: .9rem; margin-top: 1.6rem; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); color: var(--primary);
  font-weight: 700; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .14em; margin-bottom: 1rem;
  border-left: 4px solid var(--accent); padding-left: .6rem;
}
.hero-figure { position: relative; }
.hero-photo {
  width: 100%; display: block; border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  box-shadow: var(--shadow);
}
.hero-figure::after {
  /* gold slash echoing the clipped edge */
  content: ""; position: absolute; left: 4%; bottom: 2%;
  width: 34%; height: 10px; background: var(--accent);
  transform: skewY(-4deg) skewX(-18deg);
}
.float-badge {
  position: absolute; top: 1rem; left: -0.75rem;
  background: #fff; border-radius: 8px; box-shadow: var(--shadow);
  padding: .55rem .9rem; font-weight: 600; font-size: .88rem;
  border-left: 4px solid var(--accent);
}

/* Sections + diagonal breaks */
.section { padding: 2.6rem 0; }
.section-alt {
  background: var(--surface);
  clip-path: polygon(0 2.2rem, 100% 0, 100% calc(100% - 2.2rem), 0 100%);
  padding: 4.2rem 0;
}
.section-art { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; max-height: 340px; clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%); }

/* Cards */
.grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 1.6rem 0; }
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .45rem;
  border-top: 3px solid transparent;
  transition: transform .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); border-top-color: var(--accent); }
.card h3 { margin: 0; font-weight: 700; }
.card-kicker {
  font-family: var(--font-display); color: var(--primary); font-weight: 700;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
}
.card-native { font-family: var(--font-arabic); color: var(--muted-dark); }
.card-footer { margin-top: auto; padding-top: .6rem; }
.step-circle {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--primary); color: #fff; border-radius: 10px;
  font-family: var(--font-display); font-weight: 900; font-size: 1.25rem;
  margin-bottom: .5rem; transform: skewX(-6deg);
}
.step-circle > span { transform: skewX(6deg); }
.badge {
  display: inline-block; background: var(--surface); color: var(--text);
  font-size: .75rem; font-weight: 700; border-radius: 6px; padding: .18rem .65rem;
}
.badge-accent { background: var(--accent); color: var(--text); }
.badge-draft { background: #FFF3CD; color: #7a6400; }

/* Flash messages */
.flash {
  margin: .8rem 0; padding: .7rem 1rem; border-radius: 8px;
  background: var(--surface); border-inline-start: 4px solid var(--primary);
}
.flash-success { border-color: #2E7D32; }
.flash-error { border-color: #C62828; }
.flash-warning { border-color: var(--accent); }

/* Forms */
form.stacked label { display: block; font-weight: 700; font-family: var(--font-display); margin: .95rem 0 .25rem; }
form.stacked input[type="text"], form.stacked input[type="email"],
form.stacked input[type="password"], form.stacked textarea, form.stacked select {
  width: 100%; padding: .62rem .8rem; font: inherit; color: var(--text);
  border: 1px solid var(--muted); border-radius: 8px; background: #fff;
}
form.stacked input:focus, form.stacked textarea:focus, form.stacked select:focus {
  border-color: var(--primary); outline: 3px solid rgba(0, 79, 156, .2);
}
.helptext { display: block; color: var(--muted-dark); font-size: .85rem; }
.errorlist { color: #C62828; list-style: none; padding: 0; margin: .2rem 0; font-size: .9rem; }
.form-narrow { max-width: 460px; }

/* Progress */
.progress { background: var(--surface); border-radius: 999px; height: 10px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #1668B5); border-radius: 999px; }

/* Lesson READ/WATCH tabs + checklist */
.mode-tabs { display: flex; gap: .5rem; margin: 1rem 0; }
.mode-tab {
  display: inline-block; padding: .55rem 1.3rem; border-radius: 8px 8px 0 0;
  font-family: var(--font-display); font-weight: 700; text-decoration: none;
  color: var(--muted-dark); background: var(--surface);
  border-bottom: 3px solid transparent;
}
.mode-tab.active { color: var(--primary); background: #fff; border-bottom-color: var(--accent); box-shadow: var(--shadow); }
.lesson-checklist li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lesson-state { width: 1.6rem; text-align: center; font-weight: 700; color: var(--primary); }
.video-wrap { max-width: 54rem; }

/* Lesson blocks */
.lesson-body { max-width: 46rem; }
.block { margin: 1.4rem 0; }
.block-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; }
.block-label {
  font-family: var(--font-display); color: var(--primary); font-weight: 700;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem;
  border-left: 3px solid var(--accent); padding-left: .5rem;
}
.translit { color: var(--muted-dark); font-style: italic; }
.vocab-table { width: 100%; border-collapse: collapse; }
.vocab-table td, .vocab-table th { padding: .5rem .6rem; border-bottom: 1px solid var(--surface); vertical-align: top; text-align: left; }
.vocab-table .arabic { font-size: 1.25em; }
.dialogue-line { display: grid; grid-template-columns: auto 1fr; gap: .6rem; padding: .4rem 0; }
.dialogue-speaker { font-weight: 700; color: var(--primary); }
.dialogue-tr { direction: ltr; text-align: left; color: var(--muted-dark); font-size: .92rem; }

/* Assessment taking */
.quiz-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.timer {
  font-variant-numeric: tabular-nums; font-family: var(--font-display);
  font-weight: 900; font-size: 1.15rem; color: var(--primary);
  background: #fff; border-radius: 8px; padding: .35rem 1rem; box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}
.timer-warn { color: #7a6400; }
.timer-danger { color: #C62828; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .timer-danger { animation: none; } }
.passage {
  background: var(--surface); border-left: 4px solid var(--primary);
  border-radius: 8px; padding: .9rem 1.1rem; margin-bottom: 1rem;
  font-size: 1.05rem; line-height: 1.85;
}
.question-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.4rem; margin: 1.2rem 0; border: none; }
.question-prompt { font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; }
.choice { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .6rem; border-radius: 8px; }
.choice:hover { background: var(--surface); }
.choice input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.choice label { cursor: pointer; flex: 1; }
.section-scores { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 1.2rem 0; }
.score-tile {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .9rem 1rem; border-top: 3px solid var(--accent);
}
.score-tile strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 900; color: var(--primary); }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--surface); }
.table th { background: var(--primary); color: #fff; font-family: var(--font-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 640px) { .table { display: block; overflow-x: auto; } }

/* Footer */
.site-footer { background: var(--text); color: #D8DCE6; margin-top: 3.5rem; padding: 2.4rem 0; }
.site-footer strong { color: #fff; font-family: var(--font-display); }
.site-footer .muted { color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; }
.footer-inner nav { display: flex; flex-direction: column; gap: .35rem; }
.footer-inner a { color: #D8DCE6; text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }

/* Utility */
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0; align-items: center; }
.breadcrumbs { font-size: .88rem; color: var(--muted-dark); margin: 1rem 0 0; }
.breadcrumbs a { color: var(--muted-dark); }
.list-plain { list-style: none; padding: 0; }
.list-plain li { padding: .45rem 0; border-bottom: 1px solid var(--surface); }
.check { color: #2E7D32; font-weight: 700; }
.stats-band { display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2rem; color: var(--muted-dark); font-size: .95rem; }
.stats-band strong { display: block; color: var(--primary); font-size: 1.35rem; font-family: var(--font-display); font-weight: 900; }
