/* =========================================================
   FinOpsZilla — landing page styles
   ========================================================= */

:root {
  /* Brand colours */
  --ink: #0C1411;
  --ink-2: #141F1B;
  --ink-3: #1B2823;
  --line-dark: #23302B;
  --paper: #F3F5EF;
  --paper-2: #E9ECE5;
  --line-light: #D3D9D0;
  --white: #FFFFFF;
  --emerald: #0E8F5F;
  --emerald-deep: #0B6E4A;
  --volt: #C5F04A;
  --volt-hover: #D4F76E;
  --muted-on-dark: #A9B5AF;
  --muted-on-light: #3E4A45;

  /* Type */
  --font-display: "Unbounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* Logo mark defaults (light surfaces) */
  --mark-base: var(--ink);
  --mark-tips: var(--emerald);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; }

::selection { background: var(--volt); color: var(--ink); }

:focus-visible { outline: 3px solid var(--volt); outline-offset: 3px; border-radius: 6px; }
.section--paper :focus-visible,
.section--paper-2 :focus-visible { outline-color: var(--emerald-deep); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--volt); color: var(--ink); font-weight: 500; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* Hidden SVG sprite (not display:none — that breaks clip-path references) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Logo mark parts */
.mark__base { fill: var(--mark-base); }
.mark__tips { fill: var(--mark-tips); }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons & links ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  font-family: var(--font-mono); font-size: 15px; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn__arrow { display: inline-block; transition: transform .3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Shine sweep on hover */
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); transition: transform .7s var(--ease-out); }
.btn--ghost::after, .btn--ink::after { background: linear-gradient(110deg, transparent 30%, rgba(197, 240, 74, .25) 50%, transparent 70%); }

.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.btn--volt { background: var(--volt); color: var(--ink); }
.btn--volt:hover { background: var(--volt-hover); box-shadow: 0 8px 24px rgba(197, 240, 74, .25); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--white); box-shadow: 0 8px 24px rgba(243, 245, 239, .15); }
.btn--ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px #46544E; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--volt); color: var(--volt); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #1C2924; }

.text-link {
  position: relative;
  color: var(--emerald-deep); font-weight: 500; text-decoration: none;
  padding-bottom: 4px;
}
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: right; transition: transform .35s var(--ease-out);
}
.text-link:hover { color: var(--ink); }
.text-link:hover::after { transform: scaleX(0); transform-origin: left; }

.eyebrow {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--emerald-deep);
}
.eyebrow--volt { color: var(--volt); }

/* ---------- Brand lockup ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--paper);
  --mark-base: var(--paper);
  --mark-tips: var(--volt);
}
.brand__mark { width: 40px; height: 40px; flex-shrink: 0; transition: transform .4s var(--ease-spring); }
.brand:hover .brand__mark { transform: translateY(-2px) rotate(-4deg); }
.brand__word {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: -.035em; line-height: 1;
}
.brand__word span { color: var(--volt); font-weight: 800; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 20, 17, .9);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, transform .4s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line-dark); }
.site-header.is-hidden { transform: translateY(-100%); }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress__bar {
  display: block; height: 100%; width: 100%;
  background: var(--volt);
  transform: scaleX(0); transform-origin: left;
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h);
}

.site-nav ul { display: flex; align-items: center; gap: 32px; }
.site-nav a:not(.btn) {
  position: relative;
  color: #D6DED9; text-decoration: none; font-size: 14px; font-weight: 500;
  padding-block: 12px;
  transition: color .2s ease;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; border-radius: 2px;
  background: var(--volt); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.site-nav a:not(.btn):hover { color: var(--volt); }
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 10px;
  border: 0; border-radius: 12px;
  background: transparent; color: var(--paper); cursor: pointer;
}
.nav-toggle:hover { background: var(--ink-2); }
.nav-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle__close { display: none !important; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none !important; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block !important; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: var(--ink); color: var(--paper);
  padding-top: clamp(40px, 6vw, 80px);
  overflow: hidden;
  /* Fill the first screen, with the topic bar resting along its bottom edge */
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}
.hero__grid {
  margin-block: auto;
  padding-bottom: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(40px, 6vw, 80px); align-items: center;
}
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 5.8vw, 72px); line-height: 1.04; letter-spacing: -.04em;
}
.hero__title .w { display: inline-block; }
.hero__title .w--accent { color: var(--volt); }
.hero__lede { max-width: 54ch; color: var(--muted-on-dark); font-size: clamp(15px, 1.6vw, 17px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__promises { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--muted-on-dark); }
.hero__promises li { display: flex; align-items: center; gap: 8px; }
.hero__promises li::before {
  content: ""; width: 8px; height: 8px; flex-shrink: 0;
  background: var(--volt); clip-path: polygon(0 100%, 0 40%, 70% 0, 100% 30%, 100% 100%);
}

/* --- Hero entrance: copy --- */
.hero__eyebrow,
.hero__title .w,
.hero__lede,
.hero__actions,
.hero__promises { animation: rise-in .9s var(--ease-out) both; }
.hero__eyebrow { animation-delay: .05s; }
.hero__title .w:nth-child(1) { animation-delay: .12s; }
.hero__title .w:nth-child(2) { animation-delay: .18s; }
.hero__title .w:nth-child(3) { animation-delay: .24s; }
.hero__title .w:nth-child(4) { animation-delay: .30s; }
.hero__title .w:nth-child(5) { animation-delay: .42s; }
.hero__title .w:nth-child(6) { animation-delay: .48s; }
.hero__title .w:nth-child(7) { animation-delay: .54s; }
.hero__title .w:nth-child(8) { animation-delay: .60s; }
.hero__lede { animation-delay: .72s; }
.hero__actions { animation-delay: .84s; }
.hero__promises { animation-delay: .96s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* --- Hero visual --- */
.hero__visual { position: relative; padding-bottom: 48px; }
.hero__stage {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 480px; margin-left: auto;
  border-radius: var(--radius-lg); overflow: hidden;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  box-shadow: inset 0 0 0 1px var(--line-dark);
  display: grid; place-items: center;
  --mark-base: var(--paper);
  --mark-tips: var(--volt);
  animation: stage-in 1s var(--ease-out) .2s both, grid-drift 24s linear 1.2s infinite;
}
@keyframes stage-in {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes grid-drift {
  to { background-position: 39px -41px; }
}

/* Trend line drawing itself behind the mark */
.hero__trend { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__trend-line {
  fill: none; stroke: var(--volt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: .45;
  stroke-dasharray: 640; stroke-dashoffset: 640;
  animation: draw 1.8s var(--ease-out) 1.3s forwards;
}
.hero__trend-dot {
  fill: var(--volt); opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: dot-in .4s var(--ease-spring) 2.9s forwards, dot-pulse 2.4s ease-in-out 3.3s infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.6); opacity: .5; }
}

/* Fins grow up from the baseline; the tips "light up" as they cross the cut */
.hero__mark { position: relative; width: 58%; height: auto; }
.fin {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: fin-grow 1.1s var(--ease-spring) both;
}
.fin--1 { animation-delay: .45s; }
.fin--2 { animation-delay: .6s; }
.fin--3 { animation-delay: .75s; }
@keyframes fin-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
.hero__tips { animation: tips-glow 3.2s ease-in-out 2s infinite; }
@keyframes tips-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(197, 240, 74, 0)); }
  50%      { filter: drop-shadow(0 0 7px rgba(197, 240, 74, .8)); }
}

/* Floating chips */
.chip {
  position: absolute;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  box-shadow: inset 0 0 0 1px #33423C;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip--a { top: 9%; left: 8%;   animation: pop-in .6s var(--ease-spring) 1.5s both, float 6s ease-in-out 2.1s infinite; }
.chip--b { top: 20%; right: 6%; color: var(--volt); animation: pop-in .6s var(--ease-spring) 1.7s both, float 7s ease-in-out 2.3s infinite reverse; }
.chip--c { bottom: 24%; right: 8%; animation: pop-in .6s var(--ease-spring) 1.9s both, float 6.5s ease-in-out 2.5s infinite; }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(12px) scale(.8); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.preview-card {
  position: absolute; left: 0; bottom: 0;
  width: min(320px, 78%);
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; gap: 8px;
  animation: card-in .9s var(--ease-out) 1.2s both, float 8s ease-in-out 2.4s infinite;
}
@keyframes card-in {
  from { opacity: 0; transform: translate(-24px, 32px) rotate(-3deg); }
  to   { opacity: 1; transform: none; }
}
.preview-card__tag { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-deep); }
.preview-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
.preview-card__link { font-size: 14px; font-weight: 500; color: var(--muted-on-light); }

/* =========================================================
   TOPIC BAR (under the hero)
   ========================================================= */
.topic-rail {
  background: var(--ink); color: var(--paper);
  border-top: 1px solid var(--line-dark);
}
.topic-rail__inner {
  display: flex; align-items: center; gap: 14px 28px;
  padding-block: 22px;
}
.topic-rail__label {
  flex-shrink: 0;
  font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted-on-dark);
}
.topic-rail__list { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-rail__link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  background: var(--ink-2); color: #D6DED9;
  box-shadow: inset 0 0 0 1px var(--line-dark);
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease-out), background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.topic-rail__link::before {
  content: ""; width: 9px; height: 10px; flex-shrink: 0;
  background: var(--volt); clip-path: polygon(0 100%, 0 40%, 70% 0, 100% 30%, 100% 100%);
  transition: transform .4s var(--ease-spring), background-color .25s ease;
}
.topic-rail__link:hover { transform: translateY(-2px); background: var(--volt); color: var(--ink); box-shadow: inset 0 0 0 1px var(--volt); }
.topic-rail__link:hover::before { background: var(--ink); transform: scale(1.2) rotate(-8deg); }

/* entrance, right after the hero */
.topic-rail__label,
.topic-rail__list li { animation: rise-in .7s var(--ease-out) both; }
.topic-rail__label { animation-delay: 1.05s; }
.topic-rail__list li:nth-child(1) { animation-delay: 1.10s; }
.topic-rail__list li:nth-child(2) { animation-delay: 1.16s; }
.topic-rail__list li:nth-child(3) { animation-delay: 1.22s; }
.topic-rail__list li:nth-child(4) { animation-delay: 1.28s; }
.topic-rail__list li:nth-child(5) { animation-delay: 1.34s; }
.topic-rail__list li:nth-child(6) { animation-delay: 1.40s; }

/* =========================================================
   LOADING SCREEN
   Shown once per browser session (assets/js/intro.js adds .intro to <html>).
   Without JavaScript, or with "reduce motion" on, it never appears.
   ========================================================= */
.loader { display: none; }
.intro .loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  --mark-base: var(--paper);
  --mark-tips: var(--volt);
}
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader__mark { width: 104px; height: 104px; overflow: visible; }
.loader__fin {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: fin-grow .9s var(--ease-spring) both;
}
.loader__fin--1 { animation-delay: .1s; }
.loader__fin--2 { animation-delay: .25s; }
.loader__fin--3 { animation-delay: .4s; }
.loader__tips { animation: tips-glow 1.6s ease-in-out .9s infinite; }
.loader__word {
  font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.035em; line-height: 1;
  animation: rise-in .7s var(--ease-out) .45s both;
}
.loader__word span { color: var(--volt); font-weight: 800; }
.loader__bar {
  position: relative; overflow: hidden;
  width: 148px; height: 2px; border-radius: 2px; background: var(--line-dark);
  animation: rise-in .7s var(--ease-out) .55s both;
}
.loader__bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  border-radius: 2px; background: var(--volt);
  animation: loader-slide 1.1s ease-in-out infinite;
}
@keyframes loader-slide {
  from { transform: translateX(-100%); }
  to   { transform: translateX(250%); }
}

/* Exit: the content fades, then the panel lifts away like a curtain */
.intro-done .loader {
  transform: translateY(-100%);
  transition: transform .85s cubic-bezier(.76, 0, .24, 1) .2s;
}
.intro-done .loader__inner {
  opacity: 0; transform: translateY(-14px);
  transition: opacity .3s ease, transform .4s ease;
}

/* While the loader is up, hold the hero's entrance so it plays as the curtain lifts */
.intro:not(.intro-play) .hero,
.intro:not(.intro-play) .hero *,
.intro:not(.intro-play) .topic-rail * { animation-play-state: paused !important; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--paper { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper); }

.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--row {
  max-width: none; flex-direction: row; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between; gap: 16px 32px;
}
.section__head--row > div { display: flex; flex-direction: column; gap: 14px; }
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.035em;
}
.section__lede { color: var(--muted-on-light); max-width: 56ch; }
.section__lede--dark { color: var(--muted-on-dark); }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-delay="1"] { transition-delay: .08s; }
.js [data-reveal-delay="2"] { transition-delay: .18s; }
.js [data-reveal-delay="3"] { transition-delay: .28s; }

/* ---------- How it works ---------- */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
/* connecting line draws across when the steps come into view */
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 2px;
  background: var(--line-light);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s var(--ease-out) .2s;
}
.steps.is-visible::before, html:not(.js) .steps::before { transform: scaleX(1); }
.js .steps[data-reveal] { opacity: 1; transform: none; }
.step { position: relative; display: flex; flex-direction: column; gap: 12px; }
.step__num {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--volt);
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  box-shadow: 0 0 0 8px var(--paper);
  transition: transform .4s var(--ease-spring), background-color .3s ease, color .3s ease;
}
.step:hover .step__num { transform: scale(1.08) rotate(-6deg); background: var(--volt); color: var(--ink); }
.step__title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; }
.step__text { color: var(--muted-on-light); max-width: 34ch; }

/* ---------- Topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.topic-grid > li { display: flex; }
.topic {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 10px; width: 100%;
  padding: 28px; border-radius: var(--radius);
  background: var(--white); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-light);
  transition: transform .35s var(--ease-out), box-shadow .35s ease;
}
/* cursor spotlight (position set by JS) */
.topic::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(197, 240, 74, .28), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.topic:hover::before { opacity: 1; }
.topic:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--emerald), 0 18px 36px rgba(12, 20, 17, .1); }
.topic__icon {
  width: 48px; height: 48px; padding: 11px; margin-bottom: 8px;
  border-radius: 14px; background: var(--ink);
  fill: none; stroke: var(--volt); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .45s var(--ease-spring), background-color .3s ease, stroke .3s ease;
}
.topic:hover .topic__icon { transform: rotate(-8deg) scale(1.08); background: var(--volt); stroke: var(--ink); }
.topic__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.topic__text { color: var(--muted-on-light); font-size: 14px; flex-grow: 1; }
.topic__more {
  margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--emerald-deep);
  opacity: 0; transform: translateX(-8px);
  transition: opacity .3s ease, transform .35s var(--ease-out);
}
.topic:hover .topic__more, .topic:focus-visible .topic__more { opacity: 1; transform: none; }

/* Highlight the card a topic-bar link jumps to */
.topic-grid > li:target .topic { animation: target-glow 1.8s var(--ease-out) .35s; }
@keyframes target-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--line-light), 0 0 0 0 rgba(14, 143, 95, 0); }
  30%      { box-shadow: inset 0 0 0 2px var(--emerald), 0 0 0 8px rgba(14, 143, 95, .18); }
}

/* ---------- Article cards ---------- */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
}
.card { display: flex; }
.card--featured { grid-row: span 2; }
.card__link {
  display: flex; flex-direction: column; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  background: var(--white); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line-light);
  transition: transform .35s var(--ease-out), box-shadow .35s ease;
}
.card__link:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(12, 20, 17, .12); }
.card__link:hover .card__title { color: var(--emerald-deep); }

.card__thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 7; display: grid; place-items: center; }
.card--featured .card__thumb { aspect-ratio: auto; flex-grow: 1; min-height: 240px; }
.card__thumb svg { width: auto; height: 56%; max-height: 160px; transition: transform .6s var(--ease-spring); }
.card__link:hover .card__thumb svg { transform: translateY(-6px) scale(1.08); }
/* light sweep across the thumbnail on hover */
.card__thumb::after {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
  transform: translateX(-100%);
}
.card__link:hover .card__thumb::after { transform: translateX(100%); transition: transform .9s var(--ease-out); }
.card__thumb--ink { background: var(--ink); --mark-base: var(--paper); --mark-tips: var(--volt); }
.card__thumb--emerald { background: var(--emerald-deep); --mark-base: var(--paper); --mark-tips: var(--volt); }
.card__thumb--volt { background: var(--volt); --mark-base: var(--ink); --mark-tips: var(--emerald-deep); }

.card__body { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.card--featured .card__body { padding: 28px; }
.card__tag { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--emerald-deep); }
.card__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; transition: color .2s ease; }
.card--featured .card__title { font-size: clamp(22px, 2.4vw, 28px); }
.card__excerpt { color: var(--muted-on-light); font-size: 14px; }
.card__more { font-size: 14px; font-weight: 500; color: var(--emerald-deep); }
.card__more span { display: inline-block; transition: transform .3s var(--ease-out); }
.card__link:hover .card__more span { transform: translateX(4px); }

/* ---------- Learning paths ---------- */
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.path-grid > li { display: flex; }
.path {
  display: flex; flex-direction: column; gap: 12px; width: 100%;
  padding: 28px; border-radius: var(--radius);
  background: var(--ink-2); text-decoration: none; color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-dark);
  transition: transform .35s var(--ease-out), box-shadow .35s ease, background-color .35s ease;
}
.path:hover { transform: translateY(-4px); background: var(--ink-3); box-shadow: inset 0 0 0 1px var(--volt); }
.path__level {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--volt);
}
.path__bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.path__bars i { display: block; width: 5px; border-radius: 1px; background: #3A4842; transition: transform .4s var(--ease-spring); transform-origin: bottom; }
.path__bars i:nth-child(1) { height: 6px; }
.path__bars i:nth-child(2) { height: 11px; }
.path__bars i:nth-child(3) { height: 16px; }
.path__bars--1 i:nth-child(-n+1),
.path__bars--2 i:nth-child(-n+2),
.path__bars--3 i:nth-child(-n+3) { background: var(--volt); }
.path:hover .path__bars i { transform: scaleY(1.25); }
.path:hover .path__bars i:nth-child(2) { transition-delay: .05s; }
.path:hover .path__bars i:nth-child(3) { transition-delay: .1s; }
.path__title { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.path__text { color: var(--muted-on-dark); font-size: 14px; flex-grow: 1; }
.path__more { font-size: 14px; font-weight: 500; color: var(--paper); }
.path__more span { display: inline-block; transition: transform .3s var(--ease-out); }
.path:hover .path__more { color: var(--volt); }
.path:hover .path__more span { transform: translateX(4px); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__intro { display: flex; flex-direction: column; gap: 14px; }
.faq__item { border-top: 1px solid var(--line-light); }
.faq__item:last-child { border-bottom: 1px solid var(--line-light); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: clamp(16px, 1.8vw, 19px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3;
  transition: color .2s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--emerald-deep); }
.faq__icon {
  position: relative; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink);
  transition: transform .4s var(--ease-spring), background-color .3s ease;
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px;
  background: var(--volt); transform: translate(-50%, -50%);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__icon { transform: rotate(135deg); background: var(--emerald-deep); }
.faq__answer { padding: 0 56px 24px 0; color: var(--muted-on-light); }
.faq__item[open] .faq__answer { animation: faq-open .45s var(--ease-out); }
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Newsletter ---------- */
.newsletter {
  position: relative; overflow: hidden;
  background: var(--emerald-deep); color: var(--paper);
  padding-block: clamp(64px, 9vw, 112px);
}
/* animated equaliser-style bars in the background */
.nl-bars {
  position: absolute; right: -2%; bottom: 0; height: 100%; width: min(560px, 60%);
  display: flex; align-items: flex-end; gap: 10px;
  opacity: .16; pointer-events: none;
}
.nl-bars span {
  flex: 1; border-radius: 4px 4px 0 0; background: var(--volt);
  transform-origin: bottom;
  animation: bar-sway 3.2s ease-in-out infinite alternate;
}
.nl-bars span:nth-child(1)  { height: 18%; animation-delay: -.2s; }
.nl-bars span:nth-child(2)  { height: 26%; animation-delay: -1.1s; }
.nl-bars span:nth-child(3)  { height: 22%; animation-delay: -.6s; }
.nl-bars span:nth-child(4)  { height: 34%; animation-delay: -1.8s; }
.nl-bars span:nth-child(5)  { height: 30%; animation-delay: -.9s; }
.nl-bars span:nth-child(6)  { height: 42%; animation-delay: -2.2s; }
.nl-bars span:nth-child(7)  { height: 38%; animation-delay: -.4s; }
.nl-bars span:nth-child(8)  { height: 50%; animation-delay: -1.5s; }
.nl-bars span:nth-child(9)  { height: 46%; animation-delay: -2.6s; }
.nl-bars span:nth-child(10) { height: 58%; animation-delay: -.7s; }
.nl-bars span:nth-child(11) { height: 64%; animation-delay: -1.9s; }
.nl-bars span:nth-child(12) { height: 72%; animation-delay: -1.2s; }
.nl-bars span:nth-child(13) { height: 80%; animation-delay: -2.4s; }
.nl-bars span:nth-child(14) { height: 92%; animation-delay: -.3s; }
@keyframes bar-sway {
  from { transform: scaleY(.7); }
  to   { transform: scaleY(1); }
}

.newsletter__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px; align-items: center;
}
.newsletter__copy { display: flex; flex-direction: column; gap: 12px; }
.newsletter__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.035em;
}
.newsletter__text { color: #E2EBE5; max-width: 46ch; }

.signup {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  padding: 8px; border-radius: 999px; background: var(--paper);
  box-shadow: 0 16px 40px rgba(6, 40, 27, .35);
  transition: box-shadow .3s ease;
}
.signup:focus-within { box-shadow: 0 0 0 4px rgba(197, 240, 74, .55), 0 16px 40px rgba(6, 40, 27, .35); }
.signup__input {
  min-height: 48px; width: 100%; padding: 0 18px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink);
}
.signup__input::placeholder { color: #5E6B65; }
.signup__input:focus-visible { outline: none; }
.signup__status { grid-column: 1 / -1; padding: 0 18px 6px; font-size: 14px; color: var(--ink); animation: rise-in .4s var(--ease-out); }
.signup__status:empty { display: none; }
.signup__status.is-error { color: #A3271A; }
.signup.is-shaking { animation: shake .45s ease; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-on-dark); padding-top: 64px; }
.site-footer__grid {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
  padding-bottom: 40px; border-bottom: 1px solid var(--line-dark);
}
.site-footer__brand { display: flex; flex-direction: column; gap: 14px; }
.site-footer__tagline { font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.site-footer__nav ul { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 40px; }
.site-footer__nav a { display: inline-block; padding-block: 10px; color: #D6DED9; text-decoration: none; font-size: 14px; transition: color .2s ease, transform .25s var(--ease-out); }
.site-footer__nav a:hover { color: var(--volt); transform: translateX(3px); }
.site-footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px;
  padding-block: 20px 28px; font-size: 13px;
}
.site-footer__end { display: flex; align-items: center; gap: 24px; }
.to-top {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: #D6DED9; text-decoration: none; font-weight: 500;
}
.to-top span { display: inline-block; transition: transform .3s var(--ease-spring); }
.to-top:hover { color: var(--volt); }
.to-top:hover span { transform: translateY(-4px); }

/* ---------- 404 page ---------- */
.not-found {
  min-height: calc(100vh - var(--header-h));
  display: grid; place-items: center; text-align: center;
  background: var(--ink); color: var(--paper); padding: 64px var(--gutter);
  --mark-base: var(--paper); --mark-tips: var(--volt);
}
.not-found__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.not-found__inner > * { animation: rise-in .8s var(--ease-out) both; }
.not-found__inner > :nth-child(2) { animation-delay: .9s; }
.not-found__inner > :nth-child(3) { animation-delay: 1s; }
.not-found__inner > :nth-child(4) { animation-delay: 1.1s; }
.not-found__inner > :nth-child(5) { animation-delay: 1.2s; }
.not-found__mark { width: 120px; height: 120px; animation: none !important; }
.not-found__title { font-family: var(--font-display); font-size: clamp(32px, 5vw, 56px); letter-spacing: -.04em; line-height: 1.05; }
.not-found p { color: var(--muted-on-dark); max-width: 44ch; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__nav ul { grid-template-columns: repeat(2, auto); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { max-width: 520px; width: 100%; margin-inline: auto; }
  .hero__stage { margin-inline: auto; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--featured { grid-column: 1 / -1; grid-row: auto; }
  .card--featured .card__thumb { min-height: 220px; }
  .path-grid { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .newsletter__inner { grid-template-columns: minmax(0, 1fr); }
  .nl-bars { width: 90%; opacity: .1; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    padding: 8px var(--gutter) 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s linear .3s;
  }
  .site-header.is-open .site-nav {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s ease, transform .3s var(--ease-out), visibility 0s;
  }
  .site-header.is-open { border-bottom-color: var(--line-dark); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a:not(.btn) { display: block; padding-block: 14px; font-size: 16px; border-bottom: 1px solid var(--line-dark); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav li:last-child { padding-top: 20px; }
  .site-nav .btn { width: 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps::before { left: 27px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform: scaleY(0); transform-origin: top; }
  .steps.is-visible::before, html:not(.js) .steps::before { transform: scaleY(1); }
  .step { padding-left: 80px; }
  .step__num { position: absolute; left: 0; top: 0; }
  .step__title { margin-top: 10px; }
}

/* Shorter laptop screens: tighten the hero so the topic bar still fits on the first screen */
@media (min-width: 901px) and (max-height: 860px) {
  .hero { padding-top: 32px; }
  .hero__grid { padding-bottom: 32px; }
  .hero__copy { gap: 20px; }
  .hero__title { font-size: clamp(36px, 5vw, 64px); }
  .hero__stage { max-width: 400px; }
}

@media (max-width: 900px) {
  .topic-rail__inner { flex-direction: column; align-items: flex-start; padding-block: 20px 24px; }
}

@media (max-width: 640px) {
  .topic-rail__list { gap: 8px; }
  .topic-rail__link { padding: 10px 14px; font-size: 13px; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .topic { padding: 24px; }
  .topic__more { opacity: 1; transform: none; }
  .hero__actions .btn { flex: 1 1 auto; }
  .chip { font-size: 12px; padding: 6px 12px; }
  .preview-card { width: 86%; padding: 16px 18px; }
  .preview-card__title { font-size: 15px; }
  .signup { grid-template-columns: minmax(0, 1fr); border-radius: var(--radius); }
  .signup .btn { width: 100%; }
  .faq__answer { padding-right: 0; }
  .site-footer__end { width: 100%; justify-content: space-between; }
}

/* Touch devices: no hover-only reveals */
@media (hover: none) {
  .topic__more { opacity: 1; transform: none; }
}

/* =========================================================
   Reduced motion: everything shows in its final state
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .hero__trend-line { stroke-dashoffset: 0; }
  .hero__trend-dot { opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .steps::before { transform: none !important; }
  .loader { display: none !important; }
}
