/* ============================================================
   BRITISH CURRICULUM 101 — Global Design System
   Stack: Pure CSS, no framework
   Palette: Carbon Dark + Ruby Red + Gold
   Fonts: Outfit (headings) + DM Sans (body)
   ============================================================ */

/* --- Google Fonts ------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* --- Design Tokens ---------------------------------------- */
:root {
  /* Colors */
  --bg: #121212;
  --surface: #1a1a1a;
  --surface-2: #212121;
  --border: #2a2a2a;
  --border-2: #333333;

  --text: #e1e1e1;
  --text-muted: #888888;
  --text-dim: #555555;

  --ruby: #e63946;
  --ruby-dim: rgba(230, 57, 70, 0.15);
  --ruby-glow: rgba(230, 57, 70, 0.25);
  --gold: #d4a017;
  --gold-dim: rgba(212, 160, 23, 0.12);
  --gold-glow: rgba(212, 160, 23, 0.2);

  /* Path / Journey */
  --path-color: rgba(230, 57, 70, 0.5);
  --path-node: #e63946;
  --path-node-done: #d4a017;

  /* Typography */
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* Layout */
  --max-w: 1100px;
  --nav-h: 56px;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-normal: 200ms ease;
}

/* --- Reset & Base ----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
  /* Lenis handles smooth scroll */
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide scrollbar for Lenis but keep functionality */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

ul,
ol {
  list-style: none;
}

/* --- Typography ------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 65ch;
}

/* Utility: text highlight */
.highlight-ruby {
  color: var(--ruby);
}

.highlight-gold {
  color: var(--gold);
}

/* --- Layout Utilities ------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section {
  padding-block: var(--sp-20);
}

.section--lg {
  padding-block: var(--sp-32);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Navigation ------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background-color: rgba(18, 18, 18, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav__inner {
  height: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav__logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ruby);
  display: inline-block;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  position: relative;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav__link.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.18);
}

.nav__link--cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ruby);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--ruby);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}

.nav__link--cta:hover {
  background: var(--ruby);
  color: #fff;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.nav__hamburger span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform var(--t-normal), opacity var(--t-normal);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) var(--sp-6);
  z-index: 99;
  flex-direction: column;
  gap: var(--sp-4);
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile .nav__link {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }
}

/* --- Cards ------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}

.card--hover {
  transition: border-color var(--t-normal), background var(--t-normal);
}

.card--hover:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}

.card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ruby);
  background: var(--ruby-dim);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: var(--r-sm);
  padding: 2px var(--sp-2);
  margin-bottom: var(--sp-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card__tag--gold {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: rgba(212, 160, 23, 0.2);
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--ruby);
  color: #fff;
  border-color: var(--ruby);
}

.btn--primary:hover {
  background: #cc2f3b;
  border-color: #cc2f3b;
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}

.btn--secondary:hover {
  border-color: var(--text-muted);
  background: var(--surface);
}

.btn--gold {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
}

.btn--gold:hover {
  background: #c09010;
  border-color: #c09010;
}

/* --- Dividers & Structure --------------------------------- */
.section-label {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ruby);
  margin-bottom: var(--sp-3);
}

.section-title {
  margin-bottom: var(--sp-5);
}

.section-body {
  color: var(--text-muted);
  margin-bottom: var(--sp-8);
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--sp-8);
}

/* --- Journey / Path Component ----------------------------- */
/* 
  The "path" visual: a vertical line running along the left side 
  of the journey section with circular milestone nodes.
*/
.journey {
  position: relative;
  padding-top: var(--sp-12);
}

.journey__track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.journey__track-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--ruby), var(--gold));
  height: 0%;
  /* animated by GSAP */
  transition: none;
  /* let GSAP handle */
}

.milestone {
  position: relative;
  padding-left: 56px;
  margin-bottom: var(--sp-20);
  opacity: 0;
  /* starts hidden, GSAP reveals */
}

.milestone__node {
  position: absolute;
  left: -12px;
  /* center on the 1px track */
  top: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-normal), background var(--t-normal);
  z-index: 2;
}

.milestone__node-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background var(--t-normal);
}

.milestone.is-visible .milestone__node {
  border-color: var(--ruby);
}

.milestone.is-visible .milestone__node-inner {
  background: var(--ruby);
}

.milestone__year {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ruby);
  margin-bottom: var(--sp-2);
}

.milestone__title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-3);
  line-height: 1.25;
}

.milestone__body {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--sp-5);
}

.milestone__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

/* --- Comparison Table ------------------------------------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th {
  font-family: var(--font-head);
  font-weight: 600;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 2px solid var(--border-2);
  color: var(--text);
  background: var(--surface);
}

.compare-table th:first-child {
  border-radius: var(--r-sm) 0 0 0;
}

.compare-table th:last-child {
  border-radius: 0 var(--r-sm) 0 0;
}

.compare-table td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-muted);
  line-height: 1.5;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tr:hover td {
  background: var(--surface);
}

.compare-table .cell-feature {
  font-weight: 500;
  color: var(--text);
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Check / Cross icons in table */
.check {
  color: #4caf50;
  font-size: 1rem;
}

.cross {
  color: var(--ruby);
  font-size: 1rem;
}

/* --- Accordion (FAQ) -------------------------------------- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.accordion+.accordion {
  margin-top: var(--sp-3);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: var(--sp-4);
  transition: background var(--t-fast);
}

.accordion__trigger:hover {
  background: var(--surface-2);
}

.accordion__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  color: var(--text-muted);
  transition: transform var(--t-normal);
}

.accordion.open .accordion__icon {
  transform: rotate(45deg);
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion.open .accordion__body {
  max-height: 600px;
}

.accordion__content {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.75;
}

.accordion__content p+p {
  margin-top: var(--sp-4);
}

.myth-verdict {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-3);
}

.myth-verdict--false {
  background: var(--ruby-dim);
  color: var(--ruby);
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.myth-verdict--true {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.myth-verdict--warning {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(212, 160, 23, 0.2);
}

/* --- SVG Map (requirements page) -------------------------- */
.map-wrapper {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.map-country {
  fill: var(--surface-2);
  stroke: var(--border-2);
  stroke-width: 0.5;
  cursor: pointer;
  transition: fill var(--t-normal);
}

.map-country.highlighted {
  fill: rgba(230, 57, 70, 0.2);
  stroke: var(--ruby);
  stroke-width: 1;
}

.map-country:hover {
  fill: rgba(230, 57, 70, 0.12);
}

.country-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: var(--sp-6);
  overflow-y: auto;
  transform: translateX(100%);
  /* GSAP handles the animation */
}

.country-panel__close {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
  cursor: pointer;
  transition: color var(--t-fast);
}

.country-panel__close:hover {
  color: var(--text);
}

.country-panel__flag {
  font-size: 2rem;
  margin-bottom: var(--sp-3);
}

.country-panel h3 {
  font-size: 1.3rem;
  margin-bottom: var(--sp-4);
}

.requirement-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}

.requirement-item:last-child {
  border-bottom: none;
}

.requirement-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--ruby);
  margin-top: 1px;
}

.requirement-item__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.requirement-item__text strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

/* --- Grade Tier Badges ------------------------------------ */
.grade-tier {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.grade-badge {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.grade-badge--elite {
  color: var(--gold);
}

.grade-badge--merit {
  color: var(--text);
}

.grade-badge--grant {
  color: var(--text-muted);
}

/* --- Quick-Start Wizard ----------------------------------- */
.wizard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  max-width: 700px;
}

.wizard__steps {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.wizard__step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wizard__step-dot.active {
  background: var(--ruby);
  border-color: var(--ruby);
  color: #fff;
}

.wizard__step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.wizard__panel {
  display: none;
}

.wizard__panel.active {
  display: block;
}

.wizard__question {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.wizard__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.wizard__option {
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.wizard__option:hover {
  border-color: var(--ruby);
  color: var(--text);
}

.wizard__option.selected {
  border-color: var(--ruby);
  background: var(--ruby-dim);
  color: var(--ruby);
}

.wizard__result {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-top: var(--sp-4);
}

.wizard__result-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

/* --- Hero ------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.hero__kicker {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ruby);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.hero__kicker::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--ruby);
}

.hero__title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-2);
}

.hero__title .line {
  display: block;
  overflow: hidden;
  /* for word-reveal animation */
}

.hero__title .line span {
  display: block;
  /* GSAP will translate Y from 100% to 0 */
}

.hero__sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 55ch;
  margin-bottom: var(--sp-8);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Subtle grid texture for hero bg */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
}

/* --- Stat strip ------------------------------------------- */
.stat-strip {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-block: var(--sp-16);
}

.stat-item {
  flex: 1;
  padding: var(--sp-5) var(--sp-6);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat-item:last-child {
  border-right: none;
}

.stat-item__num {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-item__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .stat-strip {
    flex-wrap: wrap;
  }

  .stat-item {
    flex: 1 1 50%;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
}

/* --- Page entry banner (sub-pages) ------------------------ */
.page-banner {
  padding-top: calc(var(--nav-h) + var(--sp-16));
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-16);
  position: relative;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.2;
}

.page-banner__inner {
  position: relative;
  z-index: 1;
}

/* --- Footer ----------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-10);
  margin-top: var(--sp-20);
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
  position: relative;
  padding-bottom: 2px;
}

.footer__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--ruby);
  transition: width var(--t-normal);
  border-radius: 2px;
}

.footer__link:hover {
  color: var(--text);
}

.footer__link:hover::after {
  width: 100%;
}

.footer__link.active {
  color: var(--text);
  font-weight: 600;
}

.footer__link.active::after {
  width: 100%;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: var(--sp-5);
  text-align: left;
}

/* Footer made-by credit */
.footer__credit {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: var(--sp-2);
  text-align: left;
}

.footer__credit a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.footer__credit a:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Hero attribution — inline trailing '— Yassin Ragab' beside the title */
.hero__title-wrap {
  display: block;
  position: relative;
}

.hero__attribution {
  /* Sits on its own line but styled to look like a small trailing caption */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ruby);
  font-style: italic;
  margin-top: calc(var(--sp-2) * -0.5);
  margin-bottom: var(--sp-4);
  opacity: 0.85;
}

.hero__attribution a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t-fast);
}

.hero__attribution a:hover {
  opacity: 0.65;
}

/* Toast notification — top-right slide in/out */
.toast {
  position: fixed;
  top: calc(var(--nav-h) + var(--sp-4));
  right: var(--sp-5);
  z-index: 9999;
  background: #1e2a1e;
  border: 1px solid rgba(76, 175, 80, 0.35);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  max-width: 340px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateX(calc(100% + var(--sp-5) + 20px));
  opacity: 0;
  pointer-events: none;
}

.toast.is-visible {
  pointer-events: auto;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #4caf50;
  margin-top: 1px;
}

.toast__body h4 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: #e8f5e9;
  margin-bottom: 3px;
}

.toast__body p {
  font-size: 0.8rem;
  color: rgba(232, 245, 233, 0.7);
  margin: 0;
  max-width: none;
  line-height: 1.5;
}

.toast__close {
  margin-left: auto;
  flex-shrink: 0;
  color: rgba(232, 245, 233, 0.4);
  cursor: pointer;
  transition: color var(--t-fast);
  line-height: 1;
  font-size: 1.1rem;
  padding: 0 0 0 var(--sp-2);
}

.toast__close:hover {
  color: rgba(232, 245, 233, 0.9);
}

/* --- Animate helpers (pre-animation states) --------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
}

[data-reveal-left] {
  opacity: 0;
  transform: translateX(-32px);
}

[data-reveal-scale] {
  opacity: 0;
  transform: scale(0.95);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

  [data-reveal],
  [data-reveal-left],
  [data-reveal-scale],
  .milestone {
    opacity: 1 !important;
    transform: none !important;
  }

  .journey__track-fill {
    height: 100% !important;
  }
}

/* --- Table Mobile Responsiveness --- */
.compare-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--sp-8);
}
.compare-table {
  min-width: 700px;
}

/* --- Page Summarizer (Global) --- */
.summary-fab {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ruby);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(230, 57, 70, 0);
  z-index: 1000;
  cursor: pointer;
  transition: all var(--t-normal);
}
.summary-fab:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--ruby);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 12px var(--ruby-glow);
  color: var(--text);
  background: var(--ruby);
}
.summary-fab svg { width: 22px; height: 22px; }

.summary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.summary-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.summary-card {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
}
.summary-overlay.open .summary-card {
  transform: translateY(0);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.summary-header h2 { font-size: 1.25rem; font-weight: 700; color: var(--ruby); }
.summary-header .badge {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 6px;
  background: var(--ruby-dim);
  color: var(--ruby);
  border-radius: 4px;
}

.summary-content { margin-bottom: var(--sp-8); }
.summary-item {
  display: flex;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  opacity: 0;
  transform: translateX(-10px);
}
.summary-overlay.open .summary-item {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.5s var(--t-normal);
}
.summary-item:nth-child(1) { transition-delay: 0.1s; }
.summary-item:nth-child(2) { transition-delay: 0.2s; }
.summary-item:nth-child(3) { transition-delay: 0.3s; }

.summary-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--gold);
  margin-top: 4px;
}
.summary-item p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  max-width: 100%;
}

.summary-close {
  width: 100%;
  padding: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-weight: 600;
  transition: all var(--t-fast);
}
.summary-close:hover {
  background: var(--ruby);
  border-color: var(--ruby);
}

@media (max-width: 480px) {
  .summary-fab { bottom: var(--sp-4); right: var(--sp-4); }
  .summary-card { padding: var(--sp-6); }
}

/* --- Pathway Cards --- */
.pathway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
  text-align: left;
}
.pathway-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.pathway-card--eng::before   { background: var(--ruby); }
.pathway-card--med::before   { background: #4caf50; }
.pathway-card--biz::before   { background: var(--gold); }
.pathway-card--law::before   { background: #9c88e0; }
.pathway-card--arts::before  { background: #e91e63; }
.pathway-card--universal::before { background: linear-gradient(90deg, var(--ruby), var(--gold)); }

.pathway-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
}
.pathway-card__icon svg { width: 20px; height: 20px; }

.pathway-card h3 { font-size: 1.15rem; margin-bottom: var(--sp-3); }
.pathway-card p  { font-size: 0.875rem; margin-bottom: var(--sp-4); }

.subject-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.subject-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  color: var(--text);
}
.subject-item__level {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px var(--sp-2);
  border-radius: 3px;
  flex-shrink: 0;
}
.level-al { background: var(--ruby-dim); color: var(--ruby); }
.level-as { background: var(--gold-dim); color: var(--gold); }
.level-opt { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.subject-name { font-weight: 500; flex: 1; }
.subject-note { font-size: 0.75rem; color: var(--text-muted); }

.pathway-meta {
  display: flex; gap: var(--sp-3); flex-wrap: wrap;
  margin-top: var(--sp-3);
}
.meta-chip {
  font-size: 0.75rem;
  padding: 2px var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-12);
}
.universal-card {
  grid-column: 1 / -1;
}
.universal-subjects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 640px) {
  .universal-subjects { grid-template-columns: 1fr; }
}