/* =========================================================
   Access to Justice Education Initiative — a2jeducation.org
   ---------------------------------------------------------
   Colours come from the A2JEI logo. To tweak the look,
   change the values in :root below.
   ========================================================= */

/* ---------- Fonts (self-hosted: no Google tracking) ---------- */
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/figtree-latin-800-normal.woff2") format("woff2"); }

:root {
  --navy: #142C55;        /* logo navy */
  --navy-800: #10244A;
  --navy-900: #0B1A36;
  --gold: #BD9121;        /* logo gold */
  --gold-light: #D8AE45;
  --slate: #79818D;       /* logo grey */
  --ink: #18223A;
  --text: #3A4458;
  --paper: #F7F4EE;       /* warm off-white */
  --line: #E4DFD4;
  --white: #FFFFFF;

  --radius: 18px;
  --nav-h: 76px;
  --max: 1160px;
  --shadow: 0 20px 50px -20px rgba(11, 26, 54, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.015em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
section[id], footer[id] { scroll-margin-top: calc(var(--nav-h) - 1px); }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--navy-900); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-size: .92rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 1.1em; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 36px; height: 3px; background: var(--gold); border-radius: 2px; }
.eyebrow-gold { color: var(--gold-light); }

.lead { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 700; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: var(--white); box-shadow: 0 10px 24px -10px rgba(20,44,85,.6); }
.btn-navy:hover { background: var(--navy-800); }
.btn-gold { background: var(--gold); color: var(--navy-900); box-shadow: 0 10px 28px -10px rgba(189,145,33,.7); }
.btn-gold:hover { background: var(--gold-light); }
.btn-sm { padding: 9px 18px; font-size: .95rem; }
.btn-lg { padding: 18px 34px; font-size: 1.15rem; }

.text-link {
  font-weight: 700; color: var(--navy); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}
.text-link::after { content: "→"; transition: transform .2s ease; }
a:hover .text-link::after, .text-link:hover::after { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  transition: background .3s ease, box-shadow .3s ease;
}
.nav-inner { height: 100%; width: min(100% - 40px, var(--max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-brand img { height: 40px; width: auto; transition: opacity .3s ease, transform .3s ease; }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a:not(.btn) {
  text-decoration: none; font-weight: 600; font-size: .98rem; color: rgba(255,255,255,.85);
  position: relative; padding: 6px 0; transition: color .2s ease;
}
.nav-menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-menu a:not(.btn):hover::after, .nav-menu a.active::after { transform: scaleX(1); }
.nav-menu a:not(.btn):hover { color: var(--white); }
.nav-lang { border: 1.5px solid rgba(255,255,255,.4); border-radius: 8px; padding: 4px 9px !important; font-size: .82rem !important; letter-spacing: .08em; }
.nav-lang::after { display: none; }

/* On the hero: transparent bar, logo hidden (the hero IS the logo) */
.site-nav:not(.scrolled) .nav-brand img { opacity: 0; transform: translateY(-6px); pointer-events: none; }
/* After scrolling: solid white bar */
.site-nav.scrolled { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line), 0 8px 30px -18px rgba(11,26,54,.35); }
.site-nav.scrolled .nav-menu a:not(.btn) { color: var(--text); }
.site-nav.scrolled .nav-menu a:not(.btn):hover, .site-nav.scrolled .nav-menu a.active { color: var(--navy); }
.site-nav.scrolled .nav-lang { border-color: var(--line); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2.5px; background: var(--white); border-radius: 2px; margin: 5px 0; transition: transform .25s ease, opacity .25s ease, background .3s; }
.site-nav.scrolled .nav-toggle span, .site-nav.open .nav-toggle span { background: var(--navy); }
.site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, #1B3A6E 0%, var(--navy) 38%, var(--navy-900) 100%);
  padding: calc(var(--nav-h) + 20px) 24px 110px;
}
.hero-glow {
  position: absolute; width: 900px; height: 900px; left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(216,174,69,.28) 0%, rgba(216,174,69,.08) 35%, transparent 65%);
  animation: breathe 7s ease-in-out infinite;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 25%, #000 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 25%, #000 80%);
}
.hero-logo { margin: 0; position: relative; z-index: 1; width: min(560px, 82vw); }
.hero-logo img { width: 100%; filter: drop-shadow(0 24px 60px rgba(0,0,0,.35)); animation: rise 1.2s cubic-bezier(.2,.8,.2,1) both; }
.hero-scroll {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 48px; border: 2px solid rgba(255,255,255,.45); border-radius: 20px; z-index: 1;
}
.hero-scroll span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: var(--gold-light); animation: scrollcue 1.8s ease-in-out infinite; }
.hero-scroll:hover { border-color: var(--white); }

@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes breathe { 0%,100% { opacity: .85; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.07); } }
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ---------- About ---------- */
.about-head { max-width: 820px; margin-bottom: 56px; }
.about-body { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.team { margin-top: 2.2em; padding-top: 1.5em; border-top: 1px solid var(--line); }
.team-label { font-size: .8rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: .9em; }
.team ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.team li { display: flex; flex-direction: column; border-left: 3px solid var(--gold); padding-left: 12px; line-height: 1.35; }
.team li strong { color: var(--ink); font-size: 1.02rem; }
.team li span { color: var(--slate); font-size: .9rem; margin-top: 3px; }
@media (max-width: 480px) { .team ul { grid-template-columns: 1fr; } }
.pillars { display: grid; gap: 18px; }
.pillar {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px 22px; position: relative; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(189,145,33,.08); }
.pillar-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--navy); color: var(--white); display: grid; place-items: center; margin-bottom: 14px; }
.pillar-icon svg { width: 30px; height: 30px; }
.pillar p { margin-bottom: .8em; }

/* ---------- Report ---------- */
.report { background: var(--paper); overflow: hidden; }
.report::before { /* soft gold arc */
  content: ""; position: absolute; left: -200px; top: 50%; width: 620px; height: 620px; transform: translateY(-50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(189,145,33,.14), transparent 65%); pointer-events: none;
}
.report-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(40px, 7vw, 96px); align-items: center; position: relative; }
.report-cover { perspective: 1400px; }
.report-cover img {
  width: 100%; border-radius: 6px 14px 14px 6px;
  box-shadow: -2px 0 0 rgba(0,0,0,.08) inset, 0 40px 70px -25px rgba(11,26,54,.55), 0 12px 24px -12px rgba(11,26,54,.35);
  transform: rotateY(8deg) rotateX(2deg); transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.report-cover:hover img { transform: rotateY(0) rotateX(0) translateY(-6px); }
.subtitle { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; color: var(--navy); margin-top: -.2em; margin-bottom: 1.3em; line-height: 1.35; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0 34px; padding: 0; }
.stats div { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; }
.stats dt { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stats dd { margin: 6px 0 0; font-size: .84rem; line-height: 1.3; color: var(--slate); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cite { margin-top: 22px; font-size: .95rem; }
.cite summary { cursor: pointer; font-weight: 700; color: var(--navy); width: fit-content; }
.cite p { margin-top: 10px; padding: 14px 16px; background: var(--white); border-radius: 10px; border: 1px solid var(--line); }

/* ---------- Course ---------- */
.course { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-900) 100%); color: rgba(255,255,255,.82); overflow: hidden; }
.course h2, .course h3 { color: var(--white); }
.course .lead { color: rgba(255,255,255,.9); }
.course-glow { position: absolute; right: -250px; top: -250px; width: 800px; height: 800px; border-radius: 50%; background: radial-gradient(circle, rgba(216,174,69,.22), transparent 60%); pointer-events: none; }
.course-head { max-width: 860px; position: relative; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 28px 0 0; }
.chips li { border: 1.5px solid rgba(216,174,69,.55); color: var(--gold-light); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: .93rem; }
.chips li:first-child { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }

.modules { list-style: none; padding: 0; margin: 60px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.module {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius);
  padding: 26px 22px 24px; transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.module:hover { transform: translateY(-6px); background: rgba(255,255,255,.09); border-color: rgba(216,174,69,.6); }
.module-num { display: block; font-size: 2.6rem; font-weight: 800; color: var(--gold-light); line-height: 1; margin-bottom: 18px; letter-spacing: -.02em; }
.module h3 { font-size: 1.12rem; margin-bottom: .6em; }
.module p { font-size: .93rem; line-height: 1.5; margin: 0; color: rgba(255,255,255,.72); }
.module-intro .module-num { color: rgba(255,255,255,.35); }

.course-foot { margin-top: 56px; display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; position: relative; }
.threads { max-width: 620px; }
.threads-label { font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 12px; }
.threads ul { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.threads li { color: var(--white); font-weight: 600; display: flex; align-items: center; gap: 9px; }
.threads li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.threads .more { font-size: .95rem; color: rgba(255,255,255,.6); margin: 0; }
.enrol { text-align: center; }
.enrol-note { font-size: .85rem; color: rgba(255,255,255,.5); margin: 12px 0 0; }

/* ---------- Partners ---------- */
.partners-head { text-align: center; margin-bottom: 56px; }
.partners-head .eyebrow { justify-content: center; }
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.partner {
  display: flex; flex-direction: column; text-decoration: none; color: var(--text);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.partner:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.partner-logo { height: 120px; display: flex; align-items: center; justify-content: center; background: var(--paper); border-radius: 12px; margin-bottom: 22px; padding: 18px 22px; position: relative; }
.partner-logo img { max-height: 66px; max-width: 100%; width: auto; object-fit: contain; }
.partner-logo img.logo-tall { max-height: 96px; }
.logo-fallback { display: none; font-weight: 800; font-size: 1.8rem; color: var(--navy); letter-spacing: .04em; }
.partner-logo.logo-missing img { display: none; }
.partner-logo.logo-missing .logo-fallback { display: block; }
.partner-role { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .5em; }
.partner h3 { font-size: 1.2rem; }
.partner p:not(.partner-role) { font-size: .96rem; flex: 1; }
.partner .text-link { align-self: flex-start; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.72); padding: 90px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 220px 1fr 1.25fr; gap: clamp(32px, 5vw, 70px); align-items: start; }
.footer-brand img { width: 200px; }
.footer-big { color: var(--white); font-size: 1.3rem; font-weight: 600; line-height: 1.4; }
.mail { color: var(--gold-light); font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(216,174,69,.4); word-break: break-all; }
.mail:hover { border-color: var(--gold-light); }
.footer-land p:last-child { font-size: .95rem; line-height: 1.65; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.12); margin-top: 60px; padding-top: 24px; font-size: .88rem; color: rgba(255,255,255,.5); }
.footer-bottom p { margin: 0; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Scroll-reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .modules { grid-template-columns: repeat(3, 1fr); }
  .module-intro { grid-column: span 3; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: 10px 20px 24px; box-shadow: 0 20px 40px -20px rgba(11,26,54,.4);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .25s ease;
  }
  .site-nav.open { background: var(--white); }
  .site-nav.open .nav-menu { transform: none; opacity: 1; visibility: visible; }
  .site-nav.open .nav-brand img { opacity: 1; transform: none; }
  .nav-menu a:not(.btn) { color: var(--text) !important; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-lang { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; padding: 14px 4px !important; font-size: .98rem !important; }
  .nav-menu .btn { margin-top: 18px; justify-content: center; }
  .about-body, .report-grid { grid-template-columns: 1fr; }
  .report-cover { max-width: 340px; }
  .partner-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .modules { grid-template-columns: 1fr; }
  .module-intro { grid-column: auto; }
  .nav-brand img { height: 32px; }
  .course-foot { flex-direction: column; align-items: stretch; }
  .enrol .btn { width: 100%; justify-content: center; }
  .stats dt { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
