/* ============================================================
   SANRA — Human Factors for the AI Age
   Training Portal Stylesheet
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eef7;
  --muted: #93a0b6;
  --accent: #3d7bff;
  --accent-soft: rgba(61, 123, 255, 0.14);
  --cyan: #5ce1e6;
  --ok: #3ddc97;
  --warn: #ffb454;
  --radius: 16px;
  --max: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--cyan); }

img, svg { display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #1d3fa0);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff; letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(61, 123, 255, 0.35);
}
.brand-text { line-height: 1.15; }
.brand-name { font-weight: 800; letter-spacing: 2.5px; font-size: 15px; }
.brand-tag { font-size: 10.5px; color: var(--muted); letter-spacing: 0.4px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); padding: 8px 10px; cursor: pointer; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 12px;
  font-weight: 650; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.22s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 24px rgba(61, 123, 255, 0.35); }
.btn-primary:hover { background: #2f6bf0; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(61, 123, 255, 0.45); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -260px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 620px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(61, 123, 255, 0.22), transparent 65%);
  filter: blur(10px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
}
.hero .wrap { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--cyan); background: rgba(92, 225, 230, 0.07);
  border: 1px solid rgba(92, 225, 230, 0.22);
  padding: 7px 16px; border-radius: 100px; margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
h1 {
  font-size: clamp(38px, 6vw, 64px); font-weight: 800; line-height: 1.08;
  letter-spacing: -1.8px; max-width: 15ch; margin-bottom: 24px;
}
h1 .grad { background: linear-gradient(100deg, #fff 20%, var(--accent) 60%, var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lede { font-size: 18.5px; color: var(--muted); max-width: 56ch; margin-bottom: 36px; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip {
  font-size: 13.5px; color: var(--muted); font-weight: 550;
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 16px; border-radius: 100px;
}
.chip b { color: var(--text); font-weight: 700; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-bottom: 18px; }
.section-lede { color: var(--muted); font-size: 17px; max-width: 62ch; margin-bottom: 44px; }

/* ---------- Whitespace quadrant ---------- */
.quad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 10px; }
.quad {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 28px; transition: all 0.25s ease;
}
.quad h3 { font-size: 17.5px; margin-bottom: 8px; }
.quad p { font-size: 14.5px; color: var(--muted); }
.quad .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 4px 11px; border-radius: 100px; margin-bottom: 14px; }
.quad.crowded .tag { color: var(--warn); background: rgba(255, 180, 84, 0.1); border: 1px solid rgba(255, 180, 84, 0.25); }
.quad.open {
  border-color: rgba(92, 225, 230, 0.45); background: linear-gradient(160deg, rgba(61,123,255,0.12), rgba(92,225,230,0.06));
  box-shadow: 0 0 0 1px rgba(92,225,230,0.2), 0 12px 44px rgba(61,123,255,0.18);
}
.quad.open .tag { color: var(--cyan); background: rgba(92, 225, 230, 0.1); border: 1px solid rgba(92, 225, 230, 0.35); }
.quad .owner { font-size: 12.5px; color: var(--muted); margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.quad.open .owner { color: var(--cyan); border-top-color: rgba(92,225,230,0.25); }

/* ---------- Course card ---------- */
.course-card {
  border: 1px solid var(--border-strong); border-radius: 22px; overflow: hidden;
  background: linear-gradient(165deg, rgba(61,123,255,0.1), rgba(255,255,255,0.02) 40%);
  display: grid; grid-template-columns: 1.35fr 1fr;
}
.course-card-body { padding: 46px; }
.course-code { font-size: 13px; font-weight: 750; letter-spacing: 2px; color: var(--cyan); margin-bottom: 12px; }
.course-card h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.6px; line-height: 1.2; margin-bottom: 16px; }
.course-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.mod-list { list-style: none; margin-bottom: 30px; }
.mod-list li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; color: var(--text); }
.mod-list li:last-child { border-bottom: none; }
.mod-num { font-size: 12px; font-weight: 800; color: var(--accent); min-width: 30px; font-variant-numeric: tabular-nums; }
.course-card-side {
  background: rgba(0,0,0,0.25); border-left: 1px solid var(--border);
  padding: 46px 40px; display: flex; flex-direction: column; gap: 0;
}
.fact { padding: 18px 0; border-bottom: 1px solid var(--border); }
.fact:last-child { border-bottom: none; }
.fact-label { font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.fact-value { font-size: 16.5px; font-weight: 650; }

/* ---------- Cards grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 30px; transition: all 0.25s ease;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(61,123,255,0.3); margin-bottom: 18px;
}
.card h3 { font-size: 17.5px; margin-bottom: 9px; }
.card p { font-size: 14.5px; color: var(--muted); }

/* ---------- Accordion (curriculum) ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc-item + .acc-item { border-top: 1px solid var(--border); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 18px; text-align: left;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 24px 28px; font-family: var(--font); transition: background 0.2s;
}
.acc-head:hover { background: var(--surface-2); }
.acc-num {
  font-size: 13px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums;
  border: 1px solid rgba(61,123,255,0.35); background: var(--accent-soft);
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
}
.acc-title { flex: 1; }
.acc-title h3 { font-size: 17px; margin-bottom: 3px; }
.acc-title span { font-size: 13px; color: var(--muted); }
.acc-chevron { color: var(--muted); transition: transform 0.3s; flex-shrink: 0; }
.acc-item.open .acc-chevron { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.acc-body-inner { padding: 4px 28px 30px 88px; }
.acc-body h4 { font-size: 12px; font-weight: 750; letter-spacing: 1.4px; text-transform: uppercase; color: var(--cyan); margin: 18px 0 9px; }
.acc-body ul { padding-left: 19px; color: var(--muted); font-size: 14.5px; }
.acc-body li { margin-bottom: 6px; }
.acc-body li::marker { color: var(--accent); }
.hf-note {
  margin-top: 18px; padding: 15px 18px; border-radius: 12px; font-size: 14px;
  background: rgba(92,225,230,0.06); border: 1px solid rgba(92,225,230,0.2); color: var(--text);
}
.hf-note b { color: var(--cyan); }

/* ---------- Table ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 620px; }
thead th {
  text-align: left; padding: 16px 22px; font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--muted); background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--border);
}
tbody td { padding: 17px 22px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted); }
tbody td:first-child { color: var(--text); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface); }

/* ---------- Quiz ---------- */
.quiz { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 34px; }
.q-block { padding: 22px 0; border-bottom: 1px solid var(--border); }
.q-block:last-of-type { border-bottom: none; }
.q-text { font-weight: 650; margin-bottom: 14px; font-size: 15.5px; }
.q-text .q-num { color: var(--accent); margin-right: 8px; }
.q-opts { display: grid; gap: 9px; }
.q-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 11px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.18); cursor: pointer;
  font-size: 14.5px; color: var(--muted); transition: all 0.18s;
}
.q-opt:hover { border-color: var(--border-strong); color: var(--text); }
.q-opt input { accent-color: var(--accent); }
.q-opt.correct { border-color: rgba(61,220,151,0.55); background: rgba(61,220,151,0.08); color: var(--text); }
.q-opt.incorrect { border-color: rgba(255,90,90,0.5); background: rgba(255,90,90,0.07); }
.q-explain { display: none; margin-top: 12px; font-size: 13.5px; color: var(--muted); padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.q-block.answered .q-explain { display: block; }
.quiz-result {
  display: none; margin-top: 26px; padding: 22px 26px; border-radius: 14px; text-align: center;
  background: linear-gradient(160deg, rgba(61,123,255,0.16), rgba(92,225,230,0.07));
  border: 1px solid rgba(92,225,230,0.3);
}
.quiz-result.show { display: block; }
.quiz-result .score { font-size: 34px; font-weight: 800; color: var(--cyan); }
.quiz-result p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* ---------- Outcomes ---------- */
.outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.outcome {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--surface); font-size: 14.5px;
}
.outcome .tick {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(61,220,151,0.12); border: 1px solid rgba(61,220,151,0.35); color: var(--ok); font-size: 13px; font-weight: 800;
}

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--border); border-radius: 13px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 19px 24px; font-weight: 650; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 20px; color: var(--muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; padding: 90px 24px; border-radius: 26px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, rgba(61,123,255,0.2), rgba(11,17,32,0.9) 55%);
  border: 1px solid rgba(61,123,255,0.35);
}
.cta-band::before {
  content: ""; position: absolute; top: -140px; left: 50%; transform: translateX(-50%);
  width: 640px; height: 340px; background: radial-gradient(ellipse, rgba(92,225,230,0.18), transparent 65%);
}
.cta-band h2 { position: relative; }
.cta-band p { position: relative; color: var(--muted); max-width: 52ch; margin: 0 auto 32px; font-size: 16.5px; }
.cta-band .btn { position: relative; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 54px 0 40px; background: #05080f; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.foot-grid h4 { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot-grid ul { list-style: none; }
.foot-grid li { margin-bottom: 9px; font-size: 14px; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { color: var(--muted); font-size: 13.5px; margin-top: 12px; max-width: 34ch; }
.foot-legal { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: #5b6679; }

/* ---------- Reveal animation (only hidden when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .course-card { grid-template-columns: 1fr; }
  .course-card-side { border-left: none; border-top: 1px solid var(--border); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .acc-body-inner { padding-left: 28px; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: rgba(7,11,20,0.97); border-bottom: 1px solid var(--border); padding: 16px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 9px 0; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .quad-grid, .outcomes, .foot-grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding: 76px 0 64px; }
  .course-card-body, .course-card-side { padding: 30px 24px; }
  .quiz { padding: 22px; }
}


/* ---------- Course catalogue tiles ---------- */
.courses-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.course-tile {
  display: flex; flex-direction: column; padding: 28px 26px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.course-tile:hover { transform: translateY(-4px); border-color: rgba(61,123,255,0.45); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.course-tile h3 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.22; margin-bottom: 14px; }
.course-tile > p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.course-tile .mod-list { margin-bottom: 24px; }
.course-tile .chips { margin-bottom: 26px; }
.course-tile .btn { margin-top: auto; align-self: flex-start; }
.tile-flag { font-size: 11px; font-weight: 750; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ok); background: rgba(61,220,151,0.08); border: 1px solid rgba(61,220,151,0.3); padding: 4px 12px; border-radius: 100px; margin-left: 10px; vertical-align: middle; }
@media (max-width: 900px) { .courses-grid { grid-template-columns: 1fr; } }
