/* =============================================================
   Creative AI Group — Design System
   Editorial consultancy aesthetic (BCG/Bain inspired)
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — Primary Navy + Turquoise (brand) */
  --ink:        #1D3557;   /* Primary Navy — headings, dark surfaces, footer */
  --ink-soft:   #475569;   /* Slate — secondary text */
  --ink-mute:   #64748B;   /* muted / captions (slate-500) */
  --paper:      #F7FAFC;   /* whisper-cool near-white page background */
  --paper-2:    #EDF2F7;   /* cool section tint */
  --sand:       #D9E2EC;   /* Light Steel family — rules, borders */
  --white:      #FFFFFF;   /* cards / surfaces */
  --primary:      #1D3557; /* Primary Navy — solid buttons/CTAs */
  --primary-deep: #16283F; /* button hover (darker navy) */
  --brand:      #14B8A6;   /* Turquoise — primary accent */
  --brand-deep: #0E9488;   /* darker turquoise — accent hover */
  --brand-tint: #E6F8F5;   /* Light Turquoise — tags, icon chips */
  --steel:      #CBD5E1;   /* Light Steel — text on dark, dividers */
  --accent:     #14B8A6;   /* alias of the turquoise accent */

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --maxw: 1200px;
  --maxw-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-y: clamp(4rem, 9vw, 8rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 460;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 430; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.15rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; color: var(--ink); }
p  { margin: 0 0 1.2em; }
strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--brand);
  display: inline-block;
}
.lede {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-2); }
.section--ink  { background: var(--ink); color: var(--steel); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--sand); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); }
/* On midnight-navy sections a navy button would vanish — switch the primary
   action to the turquoise accent (with navy text) so it pops. */
.newsletter .btn--primary,
.news-bar .btn--primary,
.section--ink .btn--primary { background: var(--brand); color: var(--ink); }
.newsletter .btn--primary:hover,
.news-bar .btn--primary:hover,
.section--ink .btn--primary:hover { background: var(--brand-deep); color: var(--ink); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Text link with animated underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--brand);
  position: relative;
}
.link::after {
  content: "";
  position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.link:hover::after { transform: scaleX(1); }
.link .arrow { transition: transform .3s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(247, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--sand); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; }
/* Keep the wordmark left; group the links + hamburger on the right */
.nav .brand { margin-right: auto; }
.brand-logo { height: 56px; width: auto; display: block; }
.site-footer .brand-logo { height: 62px; }
/* Header: horizontal mark + single-line wordmark (larger, more legible) */
.brand-mark { height: 40px; width: auto; display: block; flex: none; }
.brand-name {
  margin-left: 0.6rem; white-space: nowrap;
  font-family: var(--font-sans); font-size: 1.4rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}
.brand-name .ai { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding-block: 0.4rem;
  transition: color .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--brand);
}
.nav-cta { margin-left: 0.5rem; }
/* Ensure the button keeps its own colours inside the nav (beats .nav-links a) */
.nav-links a.btn--primary { color: #fff; }
.nav-links a.btn--primary:hover { color: #fff; }

/* Nav dropdown — "Who We Help" */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-toggle { cursor: pointer; }
.nav-dd-toggle .dd-caret { font-size: 0.7em; display: inline-block; transition: transform .25s var(--ease); }
.nav-dd:hover .dd-caret, .nav-dd:focus-within .dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 4px); left: 50%;
  min-width: 250px; background: var(--white); border: 1px solid var(--sand);
  border-radius: 8px; box-shadow: 0 24px 48px -28px rgba(29,53,87,0.45);
  padding: 0.5rem; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s var(--ease);
  z-index: 60;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-dd-menu a { padding: 0.6rem 0.85rem; border-radius: 5px; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.nav-dd-menu a:hover { color: var(--ink); background: var(--brand-tint); }
.nav-dd-menu a.active { color: var(--brand); background: var(--brand-tint); }
.nav-dd-menu a.active::after { content: none; }
/* Hamburger — always visible, at all breakpoints */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center;
  background: none; border: 0; cursor: pointer; padding: 0.5rem;
  margin-left: 1.75rem; position: relative; z-index: 90;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: transform .35s var(--ease), opacity .25s var(--ease); }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Slide-in menu drawer (opened by the hamburger) ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 18, 15, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.menu-overlay.show { opacity: 1; visibility: visible; }
.menu-drawer {
  position: fixed; top: 0; right: 0; z-index: 70;
  height: 100%; width: min(380px, 86vw);
  background: var(--paper); border-left: 1px solid var(--sand);
  box-shadow: -30px 0 60px -30px rgba(20, 18, 15, 0.45);
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
  padding: calc(74px + 1.75rem) var(--gutter) 2rem;
  overflow-y: auto;
}
.menu-drawer.open { transform: none; }
.menu-drawer .eyebrow { margin-bottom: 1rem; }
.menu-drawer-links { display: flex; flex-direction: column; }
.menu-drawer-links a {
  font-family: var(--font-display); font-size: 1.55rem; color: var(--ink);
  padding: 0.8rem 0; border-bottom: 1px solid var(--sand);
  transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.menu-drawer-links a:hover { color: var(--brand); padding-left: 0.4rem; }
.menu-drawer-links a.active { color: var(--brand); }
/* "Who We Help" becomes a small group header; its 4 paths become an indented sub-list */
.menu-drawer-links a.dd-head {
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute);
  padding: 1.15rem 0 0.5rem; border-bottom: 0;
}
.menu-drawer-links a.dd-head:hover { color: var(--ink-mute); padding-left: 0; }
.menu-drawer-links a.dd-head .dd-caret { display: none; }
.menu-drawer-links a.dd-sub {
  font-size: 1.2rem; padding: 0.6rem 0 0.6rem 1.1rem; margin-left: 0.15rem;
  border-left: 2px solid var(--sand);
}
.menu-drawer-links a.dd-sub:hover { padding-left: 1.4rem; border-left-color: var(--brand); }
.menu-drawer-links a.dd-sub.active { color: var(--brand); border-left-color: var(--brand); }
.menu-drawer-links a.btn {
  display: flex; align-self: stretch; justify-content: center;
  font-family: var(--font-sans); font-size: 0.95rem; color: #fff;
  border-bottom: 0; margin-top: 1.75rem;
}
.menu-drawer-links a.btn:hover { color: #fff; padding-left: 0; }
.menu-drawer-foot { margin-top: auto; padding-top: 2rem; font-size: 0.9rem; color: var(--ink-mute); }
.menu-drawer-foot a { color: var(--brand); }
.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 52ch; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
/* Hero with a right-column image (path pages). --img is a photo file; if it's missing the
   navy→turquoise gradient shows silently as a placeholder. */
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-media {
  aspect-ratio: 4 / 3; border-radius: 10px;
  background-image: var(--img, none), linear-gradient(140deg, var(--ink), var(--brand));
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 30px 60px -38px rgba(29,53,87,0.55);
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 9; }
}
.hero-meta {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2rem; border-top: 1px solid var(--sand);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.hero-meta .stat .num { font-family: var(--font-display); font-size: clamp(2rem,3vw,2.6rem); color: var(--ink); line-height: 1; }
.hero-meta .stat .lbl { font-size: 0.85rem; color: var(--ink-mute); margin-top: 0.5rem; }

/* ---------- Section heading block ---------- */
.section-head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

/* ---------- Offerings / cards grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px;
  padding: 2.25rem;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(20,18,15,0.35); border-color: var(--brand); }
.card .card-num { font-family: var(--font-display); font-size: 0.95rem; color: var(--brand); margin-bottom: 1.5rem; }
.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }
.card .link { margin-top: auto; padding-top: 1.5rem; }

/* ---------- Offering tiles (path-page CTA grid) ---------- */
.offer-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.offer-tile {
  position: relative;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex; flex-direction: column;
  min-height: 240px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
a.offer-tile { text-decoration: none; }
a.offer-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(20,18,15,0.35); border-color: var(--brand); }
.offer-tile .offer-kicker { font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 1rem; }
.offer-tile h3 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); margin-bottom: 0.6rem; }
.offer-tile p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1.25rem; }
.offer-tile .offer-go { margin-top: auto; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 0.5rem; }
a.offer-tile:hover .offer-go { color: var(--brand-deep); }
.offer-tile .offer-go .arrow { transition: transform .3s var(--ease); }
a.offer-tile:hover .offer-go .arrow { transform: translateX(4px); }
/* the two flagship "school programs" tiles get a turquoise top edge */
.offer-tile--flag { border-top: 3px solid var(--brand); }
/* newsletter tile: navy, with a role pivot */
.offer-tile--news { background: var(--ink); border-color: var(--ink); color: var(--steel); }
.offer-tile--news .offer-kicker { color: var(--brand); }
.offer-tile--news h3 { color: #fff; }
.offer-tile--news p { color: var(--steel); }
.role-pivot { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.role-pivot label { cursor: pointer; position: relative; }
.role-pivot input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.role-pivot span { display: inline-block; padding: 0.4rem 0.85rem; border: 1px solid #334155; border-radius: 999px; font-size: 0.82rem; color: var(--steel); transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.role-pivot input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--ink); font-weight: 600; }
.role-pivot input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.offer-tile--news form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0; }
.offer-tile--news input[type=email] { flex: 1; min-width: 150px; padding: 0.7rem 0.9rem; border-radius: 2px; border: 1px solid #334155; background: #1E293B; color: #fff; font-family: var(--font-sans); font-size: 0.92rem; }
.offer-tile--news input[type=email]::placeholder { color: #64748B; }
.offer-tile--news input[type=email]:focus { outline: none; border-color: var(--brand); }
.offer-tile--news .btn { background: var(--brand); color: var(--ink); }
.offer-tile--news .btn:hover { background: var(--brand-deep); }
@media (max-width: 720px) { .offer-tiles { grid-template-columns: 1fr; } }

/* Insight cards */
.insight-card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.insight-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(20,18,15,0.35); }
.insight-card .thumb {
  aspect-ratio: 16/10;
  position: relative; overflow: hidden;
  /* Layers: legibility scrim (top) · optional cover photo (--cover) · brand gradient fallback.
     A missing/absent --cover file fails silently, so the gradient shows as the placeholder. */
  background-image:
    linear-gradient(to top, rgba(11,18,32,0.90) 0%, rgba(11,18,32,0.50) 36%, rgba(11,18,32,0) 66%),
    var(--cover, none),
    linear-gradient(135deg, var(--ink) 0%, var(--brand) 100%);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.insight-card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.14), transparent 45%);
}
.insight-card .thumb .thumb-label {
  position: absolute; bottom: 1.25rem; left: 1.5rem; right: 1.5rem;
  font-family: var(--font-display); color: #fff; font-size: 1.5rem; line-height: 1.15;
  text-shadow: 0 1px 16px rgba(11,18,32,0.75), 0 1px 3px rgba(11,18,32,0.6);
}
.insight-card .body { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-tint);
  padding: 0.35rem 0.7rem; border-radius: 2px; margin-bottom: 1rem;
}
.insight-card h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.insight-card .body p { font-size: 0.95rem; color: var(--ink-soft); }
.insight-card .meta { margin-top: auto; padding-top: 1.25rem; font-size: 0.85rem; color: var(--ink-mute); border-top: 1px solid var(--paper-2); }

/* ---------- Newsletter band ---------- */
.newsletter { background: var(--ink); color: var(--steel); }
.newsletter .inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.newsletter h2 { color: #fff; }
.newsletter form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.newsletter input[type=email] {
  flex: 1; min-width: 220px;
  padding: 0.9rem 1.1rem; border-radius: 2px;
  border: 1px solid #334155; background: #1E293B; color: #fff;
  font-family: var(--font-sans); font-size: 0.98rem;
}
.newsletter input[type=email]::placeholder { color: #64748B; }
.newsletter input[type=email]:focus { outline: none; border-color: var(--brand); }
.newsletter .fineprint { font-size: 0.8rem; color: #64748B; margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #94A3B8; padding-block: clamp(3.5rem,7vw,5.5rem) 2.5rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid #1E293B; }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.footer-col h5 { font-family: var(--font-sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #64748B; margin: 0 0 1.2rem; font-weight: 600; }
.footer-col a { display: block; color: var(--steel); font-size: 0.95rem; padding: 0.35rem 0; transition: color .25s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-about { max-width: 34ch; font-size: 0.95rem; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 2rem; font-size: 0.85rem; color: #64748B; }
.footer-bottom a { color: inherit; transition: color .25s var(--ease); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Social icons ---------- */
.social { display: flex; gap: 0.55rem; margin-top: 1.1rem; }
.social a {
  width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--sand); border-radius: 7px; color: var(--ink-soft);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.social a:hover { color: #fff; background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; display: block; }
/* Dark footer variant */
.site-footer .social a { color: var(--steel); border-color: #33475F; }
.site-footer .social a:hover { color: #fff; background: var(--brand); border-color: var(--brand); }

/* ---------- Article / chapter reading ---------- */
.article { padding-block: clamp(3rem, 6vw, 5rem); }
.article-body { max-width: 68ch; margin-inline: auto; font-size: 1.15rem; line-height: 1.75; color: var(--ink-soft); }
.article-body h2 { margin-top: 2.5em; font-size: clamp(1.6rem,2.6vw,2.1rem); }
.article-body h3 { margin-top: 2em; }
.article-body p { margin-bottom: 1.4em; }
.article-body blockquote {
  margin: 2em 0; padding: 0.5em 0 0.5em 1.75rem;
  border-left: 3px solid var(--brand);
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); font-style: italic;
}
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.4em; }
.article-body li { margin-bottom: 0.6em; }
.article-body code { background: var(--paper-2); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; }
.article-body img { border-radius: 4px; margin: 2em 0; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* Chapter nav */
.chapter-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--sand); }
.chapter-nav a { flex: 1; padding: 1.25rem 1.5rem; border: 1px solid var(--sand); border-radius: 4px; transition: border-color .3s var(--ease); }
.chapter-nav a:hover { border-color: var(--brand); }
.chapter-nav .dir { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.chapter-nav .ttl { color: var(--ink); font-weight: 600; margin-top: 0.3rem; }
.chapter-nav .next { text-align: right; }

/* Table of contents list */
.toc { list-style: none; padding: 0; margin: 0; counter-reset: ch; }
.toc li { border-top: 1px solid var(--sand); }
.toc li:last-child { border-bottom: 1px solid var(--sand); }
.toc a { display: flex; align-items: baseline; gap: 1.5rem; padding: 1.5rem 0.5rem; transition: background .3s var(--ease), padding .3s var(--ease); }
.toc a:hover { background: var(--white); padding-inline: 1.25rem; }
.toc .ch-num { font-family: var(--font-display); color: var(--brand); font-size: 1.1rem; min-width: 2.5rem; }
.toc .ch-title { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.toc .ch-desc { display: block; color: var(--ink-mute); font-size: 0.92rem; margin-top: 0.25rem; }

/* Breadcrumb */
.crumbs { font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 1.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }

/* ---------- Content gate (free preview → newsletter) ---------- */
.gate {
  max-width: 620px; margin: 2.5rem auto 0; padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--white); border: 1px solid var(--sand); border-radius: 12px;
  box-shadow: 0 24px 48px -32px rgba(29, 53, 87, 0.35); text-align: center;
}
.gate-lock { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--brand); margin: 0 0 0.6rem; }
.gate h2 { margin: 0 0 0.6rem; }
.gate > p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 1.5rem; }
.gate form { display: flex; gap: 0.6rem; max-width: 440px; margin: 0 auto; flex-wrap: wrap; }
.gate input[type=email] {
  flex: 1; min-width: 200px; padding: 0.85rem 1rem; font: inherit;
  border: 1px solid var(--sand); border-radius: 8px; background: var(--paper);
}
.gate input[type=email]:focus { outline: none; border-color: var(--brand); }
.gate .fineprint { font-size: 0.8rem; color: var(--ink-mute); margin: 1rem 0 0; }

/* Teased (locked) contents rows */
.toc-locked li.locked { border-top: 1px solid var(--sand); }
.toc-locked li.locked:last-child { border-bottom: 1px solid var(--sand); }
.toc-locked li.locked { display: flex; align-items: baseline; gap: 1.5rem; padding: 1.15rem 0.5rem; color: var(--ink-mute); }
.toc-locked li.locked .ch-num { font-size: 1rem; min-width: 2.5rem; opacity: 0.6; }
.toc-locked li.locked .ch-title { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-soft); }

/* ---------- Utility ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Pathways ("What is your AI journey?") ---------- */
.pathway { padding-block: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--sand); }
.pathway .section-head { text-align: center; margin-inline: auto; margin-bottom: clamp(2rem, 4vw, 3rem); }
.pathway .section-head .eyebrow { justify-content: center; }
.path-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.path-tile {
  display: flex; flex-direction: column; text-align: left;
  background: var(--white); border: 1px solid var(--sand); border-radius: 5px;
  padding: 1.85rem 1.6rem 1.6rem; position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.path-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.path-tile:hover { transform: translateY(-6px); box-shadow: 0 26px 55px -32px rgba(29,53,87,0.4); border-color: var(--brand); }
.path-tile:hover::before { transform: scaleX(1); }
.path-icon {
  width: 46px; height: 46px; border-radius: 9px; margin-bottom: 1.35rem;
  background: var(--brand-tint); color: var(--brand);
  display: grid; place-items: center; flex: none;
}
.path-icon svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.path-tile h3 { font-size: 1.28rem; line-height: 1.14; margin-bottom: 0.55rem; }
.path-tile p { font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft); margin-bottom: 1.4rem; }
.path-go { margin-top: auto; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; color: var(--brand); display: inline-flex; align-items: center; gap: 0.45rem; }
.path-go .arrow { transition: transform .3s var(--ease); }
.path-tile:hover .path-go .arrow { transform: translateX(4px); }
.path-tile--explore { background: var(--paper-2); border-style: dashed; }
.path-tile--explore:hover .path-go .arrow { transform: translateY(4px); }

/* Course sequence steps (professional learning tracks) */
.seq { list-style: none; margin: 1.25rem 0 0; padding: 0 0 0 0.8rem; counter-reset: seq; }
.seq li { position: relative; padding: 0 0 1.1rem 1.5rem; font-size: 0.92rem; line-height: 1.4; color: var(--ink-soft); border-left: 2px solid var(--sand); }
.seq li:last-child { border-left-color: transparent; padding-bottom: 0; }
.seq li::before {
  counter-increment: seq; content: counter(seq);
  position: absolute; left: -0.82rem; top: -0.2rem; width: 1.5rem; height: 1.5rem;
  background: var(--brand-tint); color: var(--brand); border-radius: 50%;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; font-family: var(--font-sans);
}

/* ---------- Glossary quiz ---------- */
.quiz { max-width: 640px; margin: 0 auto; }
.quiz-card {
  background: var(--white); border: 1px solid var(--sand); border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 0 26px 55px -36px rgba(29,53,87,0.35);
}
.quiz-progress {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 0.75rem;
}
.quiz-bar { height: 4px; background: var(--paper-2); border-radius: 2px; overflow: hidden; margin-bottom: 1.75rem; }
.quiz-bar span { display: block; height: 100%; background: var(--brand); transition: width .4s var(--ease); }
.quiz-q { font-family: var(--font-display); font-size: clamp(1.4rem, 3.2vw, 2rem); line-height: 1.15; color: var(--ink); margin: 0 0 0.35rem; }
.quiz-q-sub { color: var(--ink-mute); font-size: 0.9rem; margin: 0 0 1.5rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.6rem; }
.quiz-opt {
  text-align: left; padding: 0.9rem 1.1rem; border: 1px solid var(--sand); border-radius: 7px;
  background: var(--white); font-family: var(--font-sans); font-size: 0.98rem; line-height: 1.4;
  color: var(--ink-soft); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--brand); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { border-color: var(--brand-deep); background: var(--brand-tint); color: var(--ink); font-weight: 500; }
.quiz-opt.wrong { border-color: #C0392B; background: #FBEAE8; color: var(--ink); }
.quiz-foot { margin-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.quiz-feedback { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.quiz-result { text-align: center; padding: 0.5rem 0; }
.quiz-score { font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 3.6rem); color: var(--brand); line-height: 1; }

/* ---------- Resource library ---------- */
.lib-search-wrap { position: relative; margin-bottom: 1.75rem; }
.lib-search {
  width: 100%; padding: 1.05rem 1.25rem 1.05rem 3rem; font-family: var(--font-sans);
  font-size: 1.05rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--sand); border-radius: 10px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.lib-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.lib-search::placeholder { color: var(--ink-mute); }
.lib-search-wrap::before {
  content: ""; position: absolute; left: 1.1rem; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: var(--ink-mute);
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
}

.aud-label { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin: 0 0 0.75rem; }
.aud-label span { color: var(--ink-mute); font-weight: 400; }
.lib-audience { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.75rem; }
.aud-chip {
  padding: 0.7rem 1.3rem; border-radius: 999px; border: 1px solid var(--sand);
  background: var(--white); font-family: var(--font-sans); font-size: 0.98rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; transition: all .2s var(--ease);
}
.aud-chip:hover { border-color: var(--ink); color: var(--ink); }
.aud-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.lib-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.lib-types { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-chip {
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--sand);
  background: var(--white); font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500;
  color: var(--ink-soft); cursor: pointer; transition: all .2s var(--ease);
}
.filter-chip:hover { border-color: var(--brand); color: var(--ink); }
.filter-chip.on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }
.lib-sort-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--ink-mute); white-space: nowrap; }
.lib-sort { font-family: var(--font-sans); font-size: 0.9rem; padding: 0.45rem 0.6rem; border: 1px solid var(--sand); border-radius: 6px; background: var(--white); color: var(--ink); }

.lib-controls-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--sand); }
.lib-count { font-size: 0.85rem; font-weight: 600; color: var(--ink-mute); letter-spacing: 0.04em; text-transform: uppercase; }
.lib-active { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.active-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 0; background: var(--brand); color: var(--ink); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.lib-clear { margin-left: auto; background: none; border: 0; color: var(--brand); font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.lib-clear:hover { text-decoration: underline; }

.lib-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.lib-loading { color: var(--ink-mute); }
.lib-empty { grid-column: 1 / -1; text-align: center; padding: 3.5rem 1rem; color: var(--ink-mute); }
.lib-empty h3 { color: var(--ink); }

.lib-card {
  background: var(--white); border: 1px solid var(--sand); border-radius: 8px;
  padding: 1.5rem; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.lib-card:hover { transform: translateY(-3px); box-shadow: 0 22px 46px -30px rgba(29,53,87,0.4); border-color: var(--brand); }
.lib-card.is-featured { border-top: 3px solid var(--brand); }
.lib-card-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.lib-badge { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); background: var(--paper-2); padding: 0.25rem 0.55rem; border-radius: 3px; }
.lib-star { margin-left: auto; color: var(--brand); font-size: 0.9rem; }
.lib-card h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.35rem; }
.lib-card h3 a { color: var(--ink); }
.lib-card:hover h3 a { color: var(--brand); }
.lib-card-meta { font-size: 0.82rem; color: var(--ink-mute); margin: 0 0 0.7rem; }
.lib-ext { color: var(--brand); }
.lib-card-desc { font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 1.1rem; }
.lib-card-tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip-aud { font-size: 0.7rem; font-weight: 600; color: var(--brand-deep); background: var(--brand-tint); padding: 0.22rem 0.5rem; border-radius: 3px; }
.chip-topic { font-family: var(--font-sans); font-size: 0.7rem; color: var(--ink-mute); background: var(--paper-2); border: 0; padding: 0.22rem 0.5rem; border-radius: 3px; cursor: pointer; transition: color .2s var(--ease), background .2s var(--ease); }
.chip-topic:hover { color: var(--brand-deep); background: var(--brand-tint); }
.chip-topic::before { content: "#"; opacity: 0.5; }

/* ---------- Slim ~1-inch masthead banner (condensed hero) ---------- */
.brand-banner { background: var(--ink); color: #fff; min-height: 96px; display: flex; align-items: center; }
.brand-banner .wrap { display: flex; align-items: center; gap: 1.5rem; }
.brand-banner .bb-kicker {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.72); white-space: nowrap;
  padding-right: 1.5rem; border-right: 1px solid rgba(255,255,255,0.28);
}
.brand-banner h1 { color: #fff; margin: 0; font-weight: 430; letter-spacing: -0.01em; font-size: clamp(1.05rem, 1.8vw, 1.5rem); line-height: 1.15; }

/* ---------- Short, sharp newsletter sign-up bar ---------- */
.news-bar { background: var(--ink); color: var(--steel); }
.news-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.4rem; flex-wrap: wrap; }
.news-bar-copy strong { color: #fff; font-family: var(--font-display); font-weight: 460; font-size: 1.3rem; margin-right: 0.7rem; }
.news-bar-copy span { color: #94A3B8; font-size: 0.94rem; }
.news-bar-form { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.news-bar-form input {
  padding: 0.7rem 1rem; border-radius: 2px; min-width: 240px;
  border: 1px solid #334155; background: #16283F; color: #fff;
  font-family: var(--font-sans); font-size: 0.95rem;
}
.news-bar-form input::placeholder { color: #64748B; }
.news-bar-form input:focus { outline: none; border-color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .path-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .newsletter .inner { grid-template-columns: 1fr; }
}
/* Below this width the inline links get cramped — hide them and rely on the
   hamburger drawer, which is available at every width. */
@media (max-width: 1040px) {
  .nav-links { display: none; }
}

@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .chapter-nav { flex-direction: column; }
}
