/* ============================================================
   Aperintelligence AI Academy — Design System
   Last edited 2026-05-13
   Family of the Aperintelligence main site (dark base, Inter, fixed nav)
   with Academy-specific gold accent and editorial typography.
   ============================================================ */

/* Michroma: wide geometric display face, used on the wordmark and eyebrow
   labels to echo the flyer headings. Loaded here so every page picks it up. */
@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

/* Theme model: the default :root is the warm light-gold theme. The current
   dark look lives under :root[data-theme="dark"], applied by the header toggle
   and remembered in localStorage (see js/theme.js / js/main.js). Only the colour
   tokens are theme-split; type, layout, and radii are shared below. */
:root {
  /* Surface — warm parchment, not pure white */
  --bg: #F7F1E1;
  --bg-2: #FBF6EA;
  --bg-3: #F2EAD6;
  --bg-4: #EBE1C9;

  /* Text — warm dark ink. --white is the high-contrast text token (named for its
     dark-theme role); on light it is near-black ink. */
  --white: #1A1A17;
  --bone: #2A2620;
  --grey-1: #57503F;
  --grey-2: #6B6353;
  --grey-3: #D6CBB0;
  --grey-4: #E4DAC2;

  /* Borders */
  --border: rgba(0, 0, 0, 0.10);
  --border-soft: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.18);

  /* Accents — brand gold stays for fills/borders/buttons in both themes;
     --gold-text is a deeper gold used wherever gold is TEXT, so it meets AA
     contrast on the light bg. --on-gold is the dark ink for text on gold. */
  --gold: #C9A84C;
  --gold-text: #856814; /* deep ochre-gold: meets AA (4.5:1) as text on the light bg */
  --gold-soft: #B8923A;
  --gold-dim: rgba(201, 168, 76, 0.14);
  --gold-border: rgba(201, 168, 76, 0.42);
  --gold-glow: rgba(201, 168, 76, 0.10);
  --on-gold: #0B0B0B;

  /* Chrome for the header and footer, the same warm charcoal on both themes. It
     is lifted off pure black so it reads as a distinct band on the dark theme,
     and it carries a gold/brown undertone that aligns with the gold palette. */
  --chrome: #181510;
  --on-dark: #ECE7DB;
  --on-dark-dim: rgba(236, 231, 219, 0.78);

  /* Header: transparent at the top, this frosted bar appears on scroll. Per theme
     so it always sits on the theme's own tone (light here, dark under [data-theme]). */
  --nav-solid-bg: rgba(247, 241, 225, 0.82);
  --nav-solid-border: rgba(0, 0, 0, 0.08);

  --indigo: #5B73F5;
  --indigo-dim: rgba(91, 115, 245, 0.10);
  --indigo-border: rgba(91, 115, 245, 0.28);

  /* Surfaces that feather photos into the page, plus the sticky nav and mobile
     menu fills. --scrim is an rgb triple so each theme fades to its own bg. */
  --scrim: 247, 241, 225;
  --hover-tint: rgba(0, 0, 0, 0.04);

  /* Gold honeycomb backdrop: same hex tile as aperintel.com, recoloured gold and
     drawn larger and fainter so it reads as quiet texture, not a dense field of
     holes (kinder to trypophobia). Tiled on the body behind all content. */
  --honeycomb: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'28'%20height%3D'49'%20viewBox%3D'0%200%2028%2049'%3E%3Cg%20fill%3D'%23C9A84C'%20fill-opacity%3D'0.15'%20fill-rule%3D'evenodd'%3E%3Cpath%20d%3D'M13.99%209.25l13%207.5v15l-13%207.5L1%2031.75v-15l12.99-7.5zM3%2017.9v12.7l10.99%206.34%2011-6.35V17.9l-11-6.34L3%2017.9zM0%2015l12.98-7.5V0h-2v6.35L0%2012.69v2.3zm0%2018.5L12.98%2041v8h-2v-6.85L0%2035.81v-2.3zM15%200v7.5L27.99%2015H28v-2.31h-.01L17%206.35V0h-2zm0%2049v-8l12.99-7.5H28v2.31h-.01L17%2042.15V49h-2z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");

  /* Curriculum track cards: defined dark-gold edge plus a soft 3D lift */
  --card-border-3d: rgba(133, 104, 20, 0.50);
  --card-shadow: 0 12px 26px -14px rgba(74, 58, 10, 0.40), 0 3px 8px -3px rgba(0, 0, 0, 0.10);
  --card-shadow-hover: 0 22px 44px -18px rgba(74, 58, 10, 0.52), 0 6px 14px -4px rgba(0, 0, 0, 0.14);

  /* Status */
  --success: #2E9E55;
  --warning: #B7791F;
  --danger: #D14343;

  /* Type — Aperintelligence brand system: Questrial headings, Work Sans body,
     Michroma wordmark/eyebrows. JetBrains Mono kept for code and terminal
     surfaces only. (Fraunces retired; --font-serif now maps to Work Sans.) */
  --font-display: 'Questrial', 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Work Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --font-michroma: 'Michroma', 'Work Sans', sans-serif;

  /* Layout */
  --nav-h: 88px; /* taller than the stacked logo lockup (~69px) so the header breathes */
  --max-w: 1180px;
  --max-w-narrow: 880px;
  --gap-xxs: 4px;
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 32px;
  --gap-lg: 64px;
  --gap-xl: 96px;
  --gap-2xl: 144px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 28px;
}

/* Dark theme: the original look, opt-in via the header toggle. */
:root[data-theme="dark"] {
  --bg: #0B0B0B;
  --bg-2: #111111;
  --bg-3: #171717;
  --bg-4: #1C1C1C;

  --white: #FFFFFF;
  --bone: #F5F1E6;
  --grey-1: #A1A1A1;
  --grey-2: #8A8A8A; /* lightened from #6E6E6E for WCAG AA contrast on the dark footer */
  --grey-3: #3D3D3D;
  --grey-4: #272727;

  --border: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.15);

  --gold-text: #C9A84C; /* gold reads fine as text on the dark bg */
  --gold-soft: #D4B86A;
  --gold-dim: rgba(201, 168, 76, 0.10);
  --gold-border: rgba(201, 168, 76, 0.28);
  --gold-glow: rgba(201, 168, 76, 0.05);

  --scrim: 11, 11, 11;
  --hover-tint: rgba(255, 255, 255, 0.04);
  --nav-solid-bg: rgba(20, 18, 16, 0.82);
  --nav-solid-border: rgba(255, 255, 255, 0.07);

  /* Very faint on dark so it does not compete with the starfield */
  --honeycomb: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'28'%20height%3D'49'%20viewBox%3D'0%200%2028%2049'%3E%3Cg%20fill%3D'%23C9A84C'%20fill-opacity%3D'0.05'%20fill-rule%3D'evenodd'%3E%3Cpath%20d%3D'M13.99%209.25l13%207.5v15l-13%207.5L1%2031.75v-15l12.99-7.5zM3%2017.9v12.7l10.99%206.34%2011-6.35V17.9l-11-6.34L3%2017.9zM0%2015l12.98-7.5V0h-2v6.35L0%2012.69v2.3zm0%2018.5L12.98%2041v8h-2v-6.85L0%2035.81v-2.3zM15%200v7.5L27.99%2015H28v-2.31h-.01L17%206.35V0h-2zm0%2049v-8l12.99-7.5H28v2.31h-.01L17%2042.15V49h-2z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");

  --card-border-3d: rgba(201, 168, 76, 0.42);
  --card-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.75), 0 3px 8px -3px rgba(0, 0, 0, 0.6);
  --card-shadow-hover: 0 24px 50px -18px rgba(0, 0, 0, 0.85), 0 6px 16px -4px rgba(0, 0, 0, 0.7);

  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #F87171;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image: var(--honeycomb);
  background-size: 12px 21px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

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

/* Visible keyboard focus on every interactive element (WCAG 2.4.7). --gold-text
   adapts per theme (deep gold on the light body, bright gold on dark chrome), so
   the ring keeps enough contrast on all surfaces. Mouse clicks do not trigger it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold-text);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============================================================
   Layout primitives
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: var(--gap-xl) 0;
  position: relative;
}

.section-lg {
  padding: var(--gap-2xl) 0;
}

.section-sm {
  padding: var(--gap-lg) 0;
}

/* ============================================================
   Navigation
   ============================================================ */

nav.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 40px;
  /* Transparent at the top so the hero shows through (premium feel); a frosted
     theme-toned bar fades in on scroll (.solid, added by js/main.js). */
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

/* Brand sits left; the auto margin pushes every other nav item (links, CTA,
   theme toggle, mobile hamburger) into one group on the right. */
.nav-brand {
  margin-right: auto;
}

nav.top-nav.solid {
  background: var(--nav-solid-bg);
  border-bottom-color: var(--nav-solid-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.5);
}

.nav-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--white);
  text-decoration: none;
}

.nav-brand-mark {
  height: 66px;
  width: auto;
  max-width: 210px;
  display: block;
  /* The header is light on the light theme (transparent over the light hero, or a
     light frosted bar), so the metallic logo is darkened to read; dark theme and
     the dark footer keep the original brightness (overrides below). */
  filter: brightness(0.4) contrast(1.25) saturate(0.7);
}

:root[data-theme="dark"] .nav-brand-mark { filter: brightness(1.15) contrast(1.05); }
footer .nav-brand-mark { filter: brightness(1.15) contrast(1.05); height: 34px; max-width: 44px; }

.nav-brand-text { display: block; }
.nav-brand-name {
  display: block;
  font-family: var(--font-michroma);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-text);
  text-transform: uppercase;
  line-height: 1;
}

/* The footer is dark chrome on both themes, so its brand text stays light/gold. */
footer .nav-brand { color: var(--on-dark); }
footer .nav-brand-name { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--grey-1);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

/* Premium nav link with inline icon (FAQs). Gold accent so it reads as
   a discoverable resource rather than just another link. */
.nav-link-faq {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: var(--gold-text) !important;
  padding: 5px 11px;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  background: var(--gold-dim);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.nav-link-faq svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.nav-link-faq:hover {
  color: var(--white) !important;
  border-color: var(--gold-text);
  background: rgba(201, 168, 76, 0.18);
  transform: translateY(-1px);
}
.nav-link-faq.active {
  color: var(--on-gold) !important;
  background: var(--gold);
  border-color: var(--gold-text);
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--on-gold);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 9px 18px;
  border-radius: var(--r-sm);
  letter-spacing: 0.005em;
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--gold-soft);
  color: var(--on-gold);
}

/* Hamburger toggle button (injected by js/main.js, hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-toggle:hover { border-color: var(--gold-text); background: var(--gold-dim); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--white);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Theme toggle (injected by js/main.js). Shows the icon of the theme you would
   switch TO: a moon on the light theme, a sun on the dark theme. */
/* Theme toggle: a honeycomb cell (hexagon, tying to the site motif) that holds a
   sun when the cell is "lit" (light theme) and a crescent when it is dark. The
   cell fills with a faint gold glow on the light theme and turns on hover. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.theme-toggle svg {
  width: 30px;
  height: 30px;
  overflow: visible;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.theme-toggle:hover svg { transform: rotate(30deg); }

.tt-hex {
  fill: rgba(201, 168, 76, 0.18);
  stroke: var(--gold-text);
  stroke-width: 1.3;
  transition: fill 0.35s ease;
}
.theme-toggle:hover .tt-hex { fill: rgba(201, 168, 76, 0.30); }

.tt-glyph {
  stroke: var(--gold-text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.tt-glyph .tt-core { fill: var(--gold-text); stroke: none; }

.tt-moon { display: none; }
:root[data-theme="dark"] .tt-sun { display: none; }
:root[data-theme="dark"] .tt-moon { display: block; }
/* On the dark theme the cell is unlit: hollow hexagon, crescent inside. */
:root[data-theme="dark"] .tt-hex { fill: transparent; }
:root[data-theme="dark"] .theme-toggle:hover .tt-hex { fill: rgba(201, 168, 76, 0.16); }

/* Mobile menu overlay (injected by js/main.js, hidden on desktop) */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--nav-solid-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-solid-border);
  padding: 24px 28px 32px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  padding: 14px 4px;
  border-bottom: 1px solid var(--nav-solid-border);
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: color 0.2s ease;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--gold-text); }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.005em;
  padding: 14px 24px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease, color 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--on-gold);
  border-color: var(--gold-text);
}

.btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--white);
  background: var(--hover-tint);
}

.btn-ghost {
  background: transparent;
  color: var(--grey-1);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--white);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 15px;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   Typography
   ============================================================ */

.eyebrow {
  font-family: var(--font-michroma);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-text);
  margin-bottom: 18px;
  display: inline-block;
}

.eyebrow-grey {
  color: var(--grey-1);
}

.display-1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 300;
  color: var(--white);
}

.display-2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 300;
  color: var(--white);
}

.display-3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 400;
  color: var(--white);
}

.display-italic {
  font-weight: 400;
  color: var(--bone);
}

.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--grey-1);
  font-weight: 400;
  max-width: 640px;
}

.body-muted {
  color: var(--grey-1);
}

.body-small {
  font-size: 14.5px;
  line-height: 1.55;
}

.body-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--grey-1);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.018em;
}

h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 300;
}

h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  font-weight: 400;
}

h4 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
}

p {
  color: var(--grey-1);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: calc(var(--nav-h) + 80px) 0 var(--gap-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.55;
  color: var(--grey-1);
  max-width: 640px;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* The dark-theme photo scrim only reaches 55-62% opacity where the subtitle
   sits (see .hero-photo::before), so the default grey subtitle colour does
   not reliably contrast against whatever the photo shows underneath it. */
:root[data-theme="dark"] .hero:has(.hero-photo) .hero-subtitle {
  color: var(--on-dark);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Very small phones: stack hero CTAs full-width so long labels never spill
   past the viewport edge. */
@media (max-width: 400px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-meta {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-2);
}

.hero-meta-value {
  font-size: 18px;
  color: var(--white);
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ============================================================
   Studio section layout: metrics beside the build-session terminal
   ============================================================ */

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.studio-layout .metric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.studio-layout .hero-terminal {
  margin-top: 0;
}

/* ============================================================
   Hero terminal (animated build session)
   ============================================================ */

.hero-terminal {
  position: relative;
  min-width: 0;
  margin-top: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(28, 28, 28, 0.92) 0%, rgba(15, 15, 15, 0.96) 100%);
  border: 1px solid rgba(201, 168, 76, 0.22);
  box-shadow:
    0 1px 0 rgba(245, 241, 230, 0.05) inset,
    0 30px 70px -25px rgba(0, 0, 0, 0.85),
    0 8px 24px -12px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  isolation: isolate;
  animation: term-float 9s ease-in-out infinite;
}

/* Ambient gold glow sitting behind the card */
.hero-terminal::before {
  content: '';
  position: absolute;
  inset: -40% -30% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.16) 0%, transparent 62%);
  z-index: -1;
  pointer-events: none;
}

/* Hairline sheen along the top edge */
.hero-terminal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 184, 106, 0.55), transparent);
  pointer-events: none;
}

@keyframes term-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  background: rgba(11, 11, 11, 0.6);
  border-bottom: 1px solid rgba(245, 241, 230, 0.07);
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 8px -1px currentColor;
}

.term-dot-red   { background: #FF5F57; color: #FF5F57; }
.term-dot-amber { background: #FEBC2E; color: #FEBC2E; }
.term-dot-green { background: #28C840; color: #28C840; }

.term-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--grey-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-body {
  padding: 22px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
}

.term-line {
  display: block;
  color: var(--grey-1);
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
}

.term-line.is-active,
.term-line.is-done {
  opacity: 1;
}

/* Default command lines get a gold chevron */
.term-line::before {
  content: '$ ';
  color: var(--gold-text);
  font-weight: 600;
}

/* Lines from a named actor (architect / ai) get a tagged prompt */
.term-line[data-prompt]::before {
  content: attr(data-prompt) ' \203A  ';
  color: var(--gold-text);
  font-weight: 600;
}

.term-line[data-prompt="ai"]::before {
  color: var(--grey-1);
}

.term-line.term-line-ok {
  color: var(--gold-soft);
}

.term-line.term-line-ok::before {
  content: '\2713  ';
  color: var(--gold-soft);
}

.term-line.term-line-ship {
  color: #28C840;
}

.term-line.term-line-ship::before {
  content: '\2192  ';
  color: #28C840;
}

/* Blinking caret on the line currently typing */
.term-line.is-active::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--gold-soft);
  box-shadow: 0 0 8px rgba(212, 184, 106, 0.6);
  animation: term-caret 1s steps(1) infinite;
}

@keyframes term-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.term-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 22px;
  border-top: 1px solid rgba(245, 241, 230, 0.07);
  background: rgba(11, 11, 11, 0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.term-foot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.term-foot-meta {
  color: var(--grey-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Premise: discipline stepper card
   ============================================================ */

.premise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: stretch;
  gap: 64px;
}

.premise-copy {
  max-width: 620px;
  align-self: center;
}

.premise-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
  padding: 22px 26px 8px;
  overflow: hidden;
}

.premise-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-text);
  margin-bottom: 6px;
}

.discipline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.discipline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  transition: flex-grow 0.4s ease;
}

.discipline:first-child {
  border-top: none;
}

.discipline.is-active {
  flex: 1 1 auto;
}

.discipline-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--grey-1);
  transition: color 0.25s ease;
}

.discipline-head:hover { color: var(--white); }

.discipline-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--grey-2);
  transition: color 0.25s ease;
  flex: none;
}

.discipline-title {
  flex: 1 1 auto;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.discipline-chev {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
}

.discipline-chev::before,
.discipline-chev::after {
  content: '';
  position: absolute;
  background: var(--grey-2);
  transition: transform 0.3s ease, background 0.25s ease;
}

.discipline-chev::before {
  top: 6px;
  left: 0;
  width: 13px;
  height: 1.5px;
}

.discipline-chev::after {
  top: 0;
  left: 6px;
  width: 1.5px;
  height: 13px;
}

.discipline.is-active .discipline-num { color: var(--gold-text); }
.discipline.is-active .discipline-title { color: var(--white); }
.discipline.is-active .discipline-chev::after { transform: scaleY(0); }
.discipline.is-active .discipline-chev::before { background: var(--gold); }

/* Progress bar: present only on the active step, fills then advances */
.discipline-bar {
  display: block;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.discipline.is-active .discipline-bar { opacity: 1; }

.discipline-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
}

.discipline.is-active .discipline-bar i {
  animation: disc-fill 6.5s linear forwards;
}

.discipline.is-active:hover .discipline-bar i {
  animation-play-state: paused;
}

@keyframes disc-fill {
  from { width: 0; }
  to { width: 100%; }
}

.discipline-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.4s ease, padding 0.45s ease;
}

.discipline.is-active .discipline-body {
  max-height: 260px;
  opacity: 1;
  padding: 10px 0 18px;
}

.discipline-body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-1);
}

/* ============================================================
   Reveal on scroll (curriculum cards and similar)
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Gentle left-to-right cascade within a grid row */
.course-grid [data-reveal]:nth-child(3n+2) { transition-delay: 0.08s; }
.course-grid [data-reveal]:nth-child(3n) { transition-delay: 0.16s; }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-3);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-text);
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.012em;
}

.card-body {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--grey-1);
  margin-bottom: 24px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--grey-1);
}

.card-arrow {
  display: none;
}

.card-link:hover .card-arrow {
  display: none;
}

/* Featured card */

.card.featured {
  background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border-color: var(--gold-border);
}

.card.featured .card-eyebrow {
  color: var(--gold-text);
}

.card.featured::before {
  content: 'Most popular';
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-text);
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ============================================================
   Course grid
   ============================================================ */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--card-border-3d);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.course-card:hover {
  border-color: var(--gold);
  background: var(--bg-3);
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

/* Duration / cohort label as a quiet eyebrow at the top of the card (no pill). */
.course-card-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-text);
  margin-bottom: 12px;
}

.course-card-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.014em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.course-card-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--gold-text);
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.course-card-price-period {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--grey-1);
  margin-left: 5px;
  letter-spacing: 0;
}

.course-card-tag {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--grey-1);
  margin-bottom: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.course-card-features {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.course-card-features li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--bone);
  padding-left: 24px;
  position: relative;
}

/* Premium feature marker: a small gold check (drawn with borders), not a dash. */
.course-card-features li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid var(--gold-text);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.course-card-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.course-card-cta-label {
  font-size: 13.5px;
  color: var(--white);
  font-weight: 600;
}

.course-card-cta-arrow {
  display: none;
}

/* ============================================================
   Two-column feature block
   ============================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: var(--gap-md);
}

.feature {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}

.feature-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-1);
}

/* ============================================================
   Section heads
   ============================================================ */

.section-head {
  margin-bottom: var(--gap-md);
  max-width: 720px;
}

.section-head-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--gap-lg);
}

.section-title {
  margin-bottom: 16px;
}

.section-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--grey-1);
}

/* ============================================================
   Editorial block (quote / pull-quote)
   ============================================================ */

.editorial {
  border-left: 2px solid var(--gold);
  padding-left: 32px;
  margin: var(--gap-md) 0;
  max-width: 680px;
}

.editorial-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--bone);
  font-weight: 400;
  margin-bottom: 16px;
}

.editorial-attr {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey-1);
}

/* ============================================================
   Stats / metric panel
   ============================================================ */

.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: -0.022em;
  line-height: 1;
}

.metric-value .unit {
  font-size: 20px;
  color: var(--gold-text);
  margin-left: 4px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-1);
}

.metric-context {
  font-size: 13.5px;
  color: var(--grey-1);
  line-height: 1.5;
}

/* ============================================================
   Pricing table (per-course detail page)
   ============================================================ */

.pricing-detail {
  background: var(--bg-2);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-lg);
  padding: 40px;
  margin: var(--gap-md) 0;
}

.pricing-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.pricing-detail-row:last-child {
  border-bottom: none;
}

.pricing-detail-label {
  font-size: 15px;
  color: var(--grey-1);
}

.pricing-detail-value {
  font-size: 15px;
  color: var(--white);
  font-weight: 500;
}

/* ============================================================
   FAQ accordion
   ============================================================ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  cursor: pointer;
  letter-spacing: -0.005em;
  gap: 16px;
}

.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 300;
  color: var(--gold-text);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--grey-1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding-top 0.25s ease;
  padding-top: 0;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 16px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--white);
}

.form-hint {
  font-size: 12.5px;
  color: var(--grey-1);
  margin-top: -4px;
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold-text);
  background: var(--bg-3);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  background: var(--chrome);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--gap-md) 0 var(--gap-sm);
  margin-top: var(--gap-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: var(--gap-md);
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand-strap {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--on-dark-dim);
  max-width: 360px;
  margin-top: 8px;
}

.footer-faq-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-faq-link:hover {
  color: var(--on-dark);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--on-dark-dim);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li a {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-dim);
  transition: color 0.2s ease;
}

.footer-col li a:hover {
  color: var(--on-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--gap-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--on-dark-dim);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: var(--on-dark-dim);
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: var(--on-dark);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-inner {
    max-width: 640px;
    margin: 0 auto;
  }

  .hero-terminal {
    margin-top: 0;
    animation: none;
  }

  .studio-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-meta {
    gap: 32px;
  }

  .premise-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .premise-copy {
    max-width: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .term-body {
    font-size: 12.5px;
    padding: 20px 18px 24px;
    min-height: 320px;
  }

  .term-title {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-terminal {
    animation: none;
  }

  .term-line {
    opacity: 1;
  }

  .term-line.is-active::after {
    animation: none;
  }

  .discipline.is-active .discipline-bar i {
    animation: none;
    width: 100%;
  }

  .discipline-body,
  .discipline {
    transition: none;
  }

  /* No movement on the theme toggle or the course-card hover lift. */
  .theme-toggle svg { transition: none; }
  .theme-toggle:hover svg { transform: none; }
  .course-card { transition: border-color 0.25s ease, background 0.25s ease; }
  .course-card:hover { transform: none; }
}

@media (max-width: 640px) {
  .container,
  .container-narrow {
    padding: 0 24px;
  }

  nav.top-nav {
    padding: 0 24px;
  }

  .section {
    padding: var(--gap-lg) 0;
  }

  .section-lg {
    padding: var(--gap-xl) 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 48px);
  }
}

/* ============================================================
   Utilities
   ============================================================ */

.text-center { text-align: center; }
.text-gold { color: var(--gold-text); }
.text-bone { color: var(--bone); }

/* Accessibility (WCAG 1.4.1): links inside running text must be distinguishable
   without relying on colour alone, so underline in-paragraph and gold text links. */
p a:not(.btn),
main li a:not(.btn),
a.text-gold {
  text-decoration: underline;
}

.text-grey { color: var(--grey-1); }
.text-white { color: var(--white); }

.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mb-md { margin-bottom: var(--gap-md); }
.mb-lg { margin-bottom: var(--gap-lg); }

.italic {
  font-family: var(--font-serif);
  font-style: italic;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--gap-md) 0;
}

.divider-thick {
  border-top-width: 2px;
}

/* Highlight word in display headlines */
.hl {
  color: var(--gold-text);
}

.hl-italic {
  font-weight: 400;
  color: var(--gold-text);
}

/* ============================================================
   Mobile-first defensive rules
   Stop horizontal scroll, prevent iOS auto-zoom on form inputs,
   wrap long words on small screens.
   ============================================================ */

html, body { overflow-x: hidden; }

@media (max-width: 720px) {
  .form-input,
  .form-select,
  .form-textarea,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  h1, h2, h3, h4, p, li, a, .display-1, .display-2, .hero-title, .hero-subtitle, .section-title, .section-lede {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* ============================================================
   Imagery: photographic heroes, figure cards, and CTA band
   (added 2026-06-12; black scrim + gold wash + feathered masks
   so photographs dissolve into the dark instead of sitting in
   hard rectangles)
   ============================================================ */

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  filter: saturate(0.85);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 55%, transparent 99%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 55%, transparent 99%);
}

.hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(var(--scrim), 0.62) 0%, rgba(var(--scrim), 0.55) 45%, rgba(var(--scrim), 0.88) 100%),
    linear-gradient(rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.06));
}

/* Light theme: the hero text is dark, so the photo needs a much stronger parchment
   veil than the dark theme (where light text sits on a dark scrim) to stay readable. */
:root:not([data-theme="dark"]) .hero-photo::before {
  background:
    linear-gradient(to bottom, rgba(var(--scrim), 0.86) 0%, rgba(var(--scrim), 0.82) 45%, rgba(var(--scrim), 0.95) 100%),
    linear-gradient(rgba(201, 168, 76, 0.05), rgba(201, 168, 76, 0.05));
}

.figure-card {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.22);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.85);
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88);
}

.figure-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(var(--scrim), 0.62), rgba(var(--scrim), 0) 45%),
    linear-gradient(rgba(201, 168, 76, 0.05), rgba(201, 168, 76, 0.05));
}

.figure-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
}

.figure-mt {
  margin-top: 32px;
}

.photo-banner {
  margin: 0 0 56px;
}

.photo-banner img {
  aspect-ratio: 16 / 6;
  object-fit: cover;
  object-position: center 35%;
}

.figure-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 56px;
}

.figure-duo img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.cta-photo {
  position: relative;
  overflow: hidden;
}

.cta-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  filter: saturate(0.8);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 1) 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 1) 80%, transparent 100%);
}

.cta-photo-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(var(--scrim), 0.82), rgba(var(--scrim), 0.86)),
    linear-gradient(rgba(201, 168, 76, 0.06), rgba(201, 168, 76, 0.06));
}

.cta-photo > .container {
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .figure-duo {
    grid-template-columns: 1fr;
  }

  .photo-banner img {
    aspect-ratio: 16 / 9;
  }
}

/* ============================================================
   Left-aligned photographic hero (homepage concept, 2026-06-12)
   Photo anchored right, copy on the left over a side scrim.
   ============================================================ */

.hero-photo-side {
  background-position: right center;
}

.hero-photo-side::before {
  background:
    linear-gradient(to right, rgba(var(--scrim), 0.94) 0%, rgba(var(--scrim), 0.74) 34%, rgba(var(--scrim), 0.26) 60%, rgba(var(--scrim), 0.38) 100%),
    linear-gradient(to bottom, rgba(var(--scrim), 0) 55%, rgba(var(--scrim), 0.92) 100%),
    linear-gradient(rgba(201, 168, 76, 0.05), rgba(201, 168, 76, 0.05));
}

.hero-left {
  max-width: none;
  margin: 0;
  text-align: left;
}

.hero-left .hero-copy {
  max-width: 660px;
}

.hero-left .hero-title {
  margin-left: 0;
}

.hero-left .hero-subtitle {
  margin: 0 0 40px;
}

.hero-left .hero-actions {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  /* On narrow screens the photo sits behind the copy; dim it further */
  .hero-photo-side {
    opacity: 0.5;
  }

  .hero-left {
    text-align: left;
  }
}

/* ============================================================
   Faint photographic hero (apprenticeship, 2026-06-12)
   Centred copy as standard; the photo reads as a whisper of
   texture behind it, never competing with the text.
   ============================================================ */

.hero-photo-faint {
  opacity: 0.4;
}

/* ============================================================
   Faint full-bleed section background (curriculum ladder,
   2026-06-12): the photo sits behind the whole section as a
   barely-there texture, feathered top and bottom.
   ============================================================ */

.section-photo {
  position: relative;
  overflow: hidden;
}

.section-photo > .container {
  position: relative;
  z-index: 1;
}

.section-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  filter: saturate(0.8);
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 1) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 18%, rgba(0, 0, 0, 1) 82%, transparent 100%);
}

/* ============================================================
   Living photographic hero (upgrade 2026-07-04)
   The hero photograph follows the theme: the study desk in soft
   morning light on the light theme, the same desk at night on
   dark. Shown confidently (no faint whisper): the copy sits on a
   side veil that releases toward the photo. Ambient life comes
   from an ultra-slow Ken Burns drift on the image plus a warm
   veil that drifts across it; a static grain layer keeps the
   photograph tactile. Everything stops under reduced motion and
   on small screens.
   ============================================================ */

.hero-photo-study {
  background-image: url('/images/hero-study-morning.jpg');
  transform-origin: 70% 40%;
  animation: hero-study-drift 48s ease-in-out infinite alternate;
}

:root[data-theme="dark"] .hero-photo-study {
  background-image: url('/images/hero-study-night.jpg');
}

/* Side veil: strong under the copy, releasing right so the photo
   reads as photography. Grain rides this static layer so it does
   not move with the drifting veil below. Must out-rank the generic
   light-theme .hero-photo::before override, hence both rules. */
.hero-photo-study::before,
:root:not([data-theme="dark"]) .hero-photo-study::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    linear-gradient(to right, rgba(var(--scrim), 0.96) 0%, rgba(var(--scrim), 0.86) 36%, rgba(var(--scrim), 0.32) 62%, rgba(var(--scrim), 0.08) 100%),
    linear-gradient(to bottom, rgba(var(--scrim), 0) 58%, rgba(var(--scrim), 0.9) 100%);
}

/* A warm gold veil, oversized and drifting slowly across the
   photo: the "breathing" layer. Kept faint enough to read as
   light movement, not an effect. */
.hero-photo-study::after {
  content: '';
  position: absolute;
  inset: -22%;
  pointer-events: none;
  background: radial-gradient(42% 36% at 68% 38%, rgba(201, 168, 76, 0.14), transparent 70%);
  animation: hero-veil-drift 36s ease-in-out infinite alternate;
}

@keyframes hero-study-drift {
  from { transform: scale(1); }
  to   { transform: scale(1.055); }
}

@keyframes hero-veil-drift {
  from { transform: translate3d(-3%, -2%, 0); }
  to   { transform: translate3d(3%, 2.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-study,
  .hero-photo-study::after {
    animation: none;
  }
}

@media (max-width: 720px) {
  /* Small screens get the still: saves battery, and the 900px
     side-photo dimming already keeps the copy readable. */
  .hero-photo-study,
  .hero-photo-study::after {
    animation: none;
  }
}
