/* ============================================================
   PGCE Programme · BioCE CMU — Uniqcret-dark
   Near-black canvas, single teal accent, glass surfaces.
   No raster images: SVG + CSS only.
   ============================================================ */

:root {
  --bg: #0a0c10;
  --bg-2: #0d1016;
  --ink: #e8ecf1;          /* headings */
  --body-c: #c3cad4;       /* body text, >9:1 on bg */
  --muted: #919bab;        /* secondary text, >5:1 on bg */
  --accent: #2dd4bf;
  --accent-deep: #06241f;
  --accent-soft: rgba(45, 212, 191, 0.14);
  --glass: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --radius: 18px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-text: "Inter", system-ui, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body-c);
  background: radial-gradient(110% 55% at 50% 0%, #0d1118 0%, var(--bg) 55%) var(--bg);
  overflow-x: clip; /* horizontal-scroll track + orbs may overflow */
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
svg { display: block; }
[hidden] { display: none !important; }

::selection { background: rgba(45, 212, 191, 0.32); color: #fff; }

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

/* Native anchor jumps (reduced motion / JS or CDN blocked) must clear the
   fixed 72px nav — Lenis applies its own -76px offset on the smooth path. */
[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.6rem; left: 0.6rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
  border-radius: 999px;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* ---------- Atmosphere: SVG grain (not raster) ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* ---------- Layout primitives ---------- */
.container { width: min(1180px, 92vw); margin-inline: auto; }

.section {
  padding: clamp(5.5rem, 11vw, 9rem) 0;
  border-top: 1px solid var(--line-soft); /* thin editorial dividers */
}

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.section-head .lede { margin-top: 1rem; color: var(--muted); font-size: 1.05rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.tint { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }

.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-deep); }
.btn-primary:hover { background: #41e0cc; }

.btn-ghost { background: var(--glass); }

.btn-cta { padding: 0.7rem 1.25rem; background: var(--glass); } /* ≥44px tap target */
.btn-cta:hover { border-color: var(--accent); color: var(--accent); }

.btn-google { background: #fff; border-color: transparent; color: #1f2937; }
.btn-google svg { width: 18px; height: 18px; }
.btn-google[aria-disabled="true"] { cursor: not-allowed; opacity: 0.78; }
.btn-google[aria-disabled="true"]:hover { transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease, -webkit-backdrop-filter 0.4s ease;
}
.nav.is-scrolled {
  background: rgba(10, 12, 16, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: var(--line-soft);
}
.nav-inner {
  height: var(--nav-h);
  width: min(1180px, 92vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a {
  font-size: 0.92rem;
  color: var(--body-c);
  transition: color 0.25s ease;
  /* expand the tap target to ≥44px without shifting the layout */
  padding: 0.75rem 0.5rem;
  margin: -0.75rem -0.5rem;
}
.nav-links a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;  /* fallback for browsers without svh support */
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 72% 8%, rgba(45, 212, 191, 0.07), transparent 55%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform; /* parallax-scrubbed */
}
.orb-a {
  width: 58vmax; height: 58vmax;
  top: -22%; left: -18%;
  background: radial-gradient(circle at 38% 38%, rgba(45, 212, 191, 0.16), transparent 62%);
}
.orb-b {
  width: 44vmax; height: 44vmax;
  top: 24%; right: -20%;
  background: radial-gradient(circle at 45% 45%, rgba(255, 255, 255, 0.05), transparent 60%);
}
.orb-c {
  width: 36vmax; height: 36vmax;
  bottom: -26%; left: 28%;
  background: radial-gradient(circle at 50% 40%, rgba(45, 212, 191, 0.10), transparent 65%);
}
.hero-inner { position: relative; z-index: 2; padding-top: var(--nav-h); }
.hero-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.1rem, 10vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 1.4rem 0 1.6rem;
}
/* mask wrappers give the words a clean clipped reveal; padding keeps descenders */
.word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.word { display: inline-block; will-change: transform; }
.hero-sub {
  max-width: 580px;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--body-c);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue span {
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent), transparent);
  transform-origin: top;
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.25); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Pillars ---------- */
.pillar-stack { display: grid; gap: 3rem; margin-top: 1rem; }
.pillar {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  will-change: transform; /* crossfaded while pinned */
}
/* .pillars--pinned is added by JS on desktop only (motion allowed) */
.pillars--pinned { height: 100vh; height: 100svh; padding: 0; display: flex; align-items: center; }
.pillars--pinned .pillars-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pillars--pinned .pillar-stack { display: grid; place-items: center; width: min(1000px, 92vw); }
.pillars--pinned .pillar { grid-area: 1 / 1; }

/* ---------- How it works ---------- */
.how-viewport { position: relative; }
.how-track { display: grid; gap: 1.25rem; will-change: transform; }
.step-card {
  position: relative;
  padding: 2rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.step-card h3, .feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.55rem;
}
.step-card p, .feature-card p { color: var(--muted); font-size: 0.95rem; }

/* .how--horizontal is added by JS on desktop only */
.how--horizontal { height: 100vh; height: 100svh; padding: 0; overflow: hidden; display: flex; }
.how--horizontal .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.how--horizontal .section-head { margin-bottom: 3rem; }
.how--horizontal .how-track {
  display: flex;
  width: max-content;
  gap: 1.5rem;
  padding-right: 8vw;
}
.how--horizontal .step-card {
  flex: none;
  width: min(400px, 72vw);
  min-height: 290px;
}

/* ---------- Icons ---------- */
.icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  margin-bottom: 1.2rem;
}
.icon svg { width: 22px; height: 22px; }

/* ---------- Lesson preview / player ---------- */
.cinema {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(0.6rem, 1.4vw, 1rem);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(45, 212, 191, 0.06);
}
.player {
  position: relative;
  aspect-ratio: 16 / 9; /* reserves space — no layout shift when the iframe lands */
  border-radius: var(--radius);
  overflow: hidden;
  background: #07090d;
}
.player-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.player-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  background: radial-gradient(80% 80% at 50% 40%, rgba(45, 212, 191, 0.05), transparent 70%);
}
.lock-icon {
  width: 52px; height: 52px;
  color: var(--accent);
  animation: lock-float 3.6s ease-in-out infinite;
}
@keyframes lock-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.lock-text {
  position: relative;
  overflow: hidden;
  padding: 0.2rem 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--body-c);
}
.lock-text::after { /* shimmer sweep — transform only */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.16) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  60%, 100% { transform: translateX(110%); }
}
.player-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 88px; height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: rgba(45, 212, 191, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--accent);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.player-play:hover { transform: translate(-50%, -50%) scale(1.07); background: rgba(45, 212, 191, 0.2); }
.player-play svg { width: 32px; height: 32px; }
.watermark {
  position: absolute;
  z-index: 5;
  left: 6%; top: 8%;
  opacity: 0.28;
  pointer-events: none;       /* never blocks playback controls */
  user-select: none;
  -webkit-user-select: none;
  max-width: 92%;             /* belt-and-braces: wraps instead of clipping */
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.player-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.3rem;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.25rem;
}
.feature-card {
  padding: 1.8rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* ---------- Numbers ---------- */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.stat { padding: 1.6rem 0 1.6rem 1.4rem; border-left: 1px solid var(--line); }
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-label { margin-top: 0.5rem; color: var(--muted); font-size: 0.92rem; }

/* ---------- Curriculum timeline ---------- */
.timeline { position: relative; max-width: 760px; }
.timeline-rail {
  position: absolute;
  left: 10px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.timeline-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--accent), rgba(45, 212, 191, 0.35));
  transform-origin: top; /* draws downward with scaleY scrub */
  border-radius: 2px;
}
.timeline-list { display: grid; gap: 3.2rem; }
.tl-node { position: relative; padding-left: 3.4rem; }
.tl-dot {
  position: absolute;
  left: 1px; top: 0.35rem;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-2);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}
.tl-node.is-lit .tl-dot {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.22);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.tl-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s ease;
}
.tl-node.is-lit .tl-tag { color: var(--accent); }
.tl-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.4rem 0 0.5rem;
}
.tl-body p { color: var(--muted); max-width: 56ch; }
.lesson-types { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.lesson-types li {
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--body-c);
}

/* ---------- Access ---------- */
.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
}
.access-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.4rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.access-panel h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.access-panel > p { color: var(--muted); }
.access-panel .btn { margin-top: 1.6rem; }
.micro { font-size: 0.83rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 3rem 0 3.5rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-brand { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.footer-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.footer-meta { font-size: 0.85rem; color: var(--muted); display: grid; gap: 0.3rem; }
.footer-meta a {
  color: var(--body-c);
  transition: color 0.25s ease;
  /* underline via text-decoration so the expanded tap target keeps it on the text */
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  display: inline-block;
  padding: 0.6rem 0;
  margin: -0.6rem 0;
}
.footer-meta a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
/* breakpoint matches the JS matchMedia split at 768px */
@media (max-width: 767.98px) {
  .nav-links { display: none; } /* CTA + logo remain */
}

/* ---------- Reduced motion: kill all CSS animation/transition ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-cue { display: none; }
}
