/* FT Academy — brand-aligned design system
   ---------------------------------------------------------------
   Cream + forest green editorial. Single-source-of-truth tokens,
   typography primitives, components, and motion.
*/

:root {
  /* ───── type ─────
     Architecture mirrors Section AI: a single sans for everything
     (Goga → Bricolage Grotesque, both humanist-grotesque hybrids), with
     italic serif reserved for decorative <em> emphasis only (Azurio →
     Instrument Serif Italic). One sans family carries hero, headlines,
     pillar titles, body, buttons — visual coherence without serif noise.

     Bricolage Grotesque is variable across opsz / wdth / wght, so the
     same font feels chunky-tight at 96px hero and balanced at 14px nav.
     Instrument Serif Italic is single-weight but carries strong
     character at large sizes; used only inline for italic accents.
  */
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --font-sans:    "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --font-italic:  "Instrument Serif", Georgia, serif;
  --font-hand:    "Caveat", "Patrick Hand", cursive;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* ───── canvas / ink ───── */
  --bg:   oklch(0.985 0.005 85);
  --bg-2: oklch(0.965 0.012 85);
  --bg-3: oklch(0.94  0.018 80);
  --ink:   oklch(0.18 0.01  80);
  --ink-2: oklch(0.42 0.012 80);
  --ink-3: oklch(0.6  0.01  80);
  --rule:  oklch(0.88 0.012 80);
  --page:  oklch(0.92 0.005 80);

  /* ───── brand ───── */
  --primary:     oklch(0.32 0.07 155);
  --primary-2:   oklch(0.42 0.09 155);
  --primary-ink: oklch(0.985 0.005 85);
  --lilac:       oklch(0.78 0.09 305);
  --lilac-ink:   oklch(0.28 0.08 305);
  --accent-warm: oklch(0.64 0.17 40);   /* terracotta — Learn/Practice/Apply eyebrows */
  --primary-deep: oklch(0.26 0.06 155); /* darker forest, for the live-feed inner panel */

  /* ───── hero gradient stops (sunset/ocean) ───── */
  --grad-1: oklch(0.78 0.08 240);  /* sky */
  --grad-2: oklch(0.85 0.06 80);   /* sand */
  --grad-3: oklch(0.78 0.10 25);   /* coral */
  --grad-4: oklch(0.65 0.10 150);  /* moss */
  --grad-5: oklch(0.78 0.08 70);   /* mustard */

  /* ───── tier colors (AI Fitness donut + bars) ───── */
  --tier-novice: oklch(0.66 0.18 35);
  --tier-exp:    oklch(0.78 0.14 85);
  --tier-prac:   oklch(0.55 0.15 265);
  --tier-expert: oklch(0.72 0.12 155);

  /* ───── motion ───── */
  --ease-out:  cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.4, 0,   0.2, 1);

  --gutter: 64px;
  --section-y: 120px;

  /* ───── elevation ───── */
  --shadow-card: 0 30px 80px -40px oklch(0.3 0.05 240 / 0.18);
  --shadow-page: 0 40px 120px -40px oklch(0.3 0.05 240 / 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Bricolage Grotesque variable axes:
   wght 300–800 (we lean 600/700 for display)
   wdth 75–100 (default 100, can pinch slightly for tight headlines)
   opsz 12–96  (auto via font-optical-sizing)
   The grotesque pairs naturally with Instrument Serif Italic for
   inline emphasis — the contrast between the geometric sans and
   the literary italic is the core editorial move. */
.display, .pillar-title, .hero-title {
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 96;
}
.hero-title { letter-spacing: -0.022em; }
.section-head .title,
.programs-head .title,
.pillar-title { letter-spacing: -0.018em; }

/* Italic emphasis inside any display-class heading or body copy
   switches to Instrument Serif Italic. This is the Section AI move:
   sans everywhere except where italic carries decorative weight. */
.serif em, .display em,
.hero-title em, .pillar-title em,
.cta-band h2 em, .footer-mark em,
h1 em, h2 em, h3 em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-feature-settings: "liga", "dlig";
  letter-spacing: 0;
  /* Italic serif is visually slightly smaller than sans of the same
     size; bump it 1.05× to compensate for x-height difference */
  font-size: 1.05em;
  line-height: 0.92;
}

/* ─────────────────────────────────────────────────────────
   Site frame — desktop-first 1440px canvas. On narrower
   viewports, scale rather than clip. `zoom` is well-supported
   in modern Chromium/Firefox/Safari and avoids the layout
   reflow that `transform: scale` would cause.
   ───────────────────────────────────────────────────────── */
.site {
  width: 1440px;
  margin: 0 auto;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow-page);
}
.site-main { flex: 1; min-width: 0; }

@media (max-width: 1480px) {
  .site { zoom: calc((100vw - 24px) / 1440); }
}

/* ─────────────────────────────────────────────────────────
   Type primitives
   ───────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* Both .serif and .display now point at the same sans family
   (Bricolage Grotesque). The class names are kept for compatibility
   with existing JSX, but they're effectively just weight/spacing
   variants of the same display sans. */
.serif {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.02;
  color: var(--ink);
}
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 0.98;
  color: var(--ink);
}
.hand {
  font-family: var(--font-hand);
  font-weight: 500;
  color: var(--primary);
}

/* ─────────────────────────────────────────────────────────
   Pill buttons
   ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms var(--ease-out),
              background  180ms var(--ease-soft),
              box-shadow  240ms var(--ease-soft),
              border-color 180ms var(--ease-soft),
              color       180ms var(--ease-soft);
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-ink     { background: var(--ink);     color: var(--bg); }
.btn-ghost   { background: transparent;    color: var(--ink); border-color: var(--ink); }
.btn-cream   { background: var(--bg);      color: var(--ink); border-color: var(--rule); }

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -18px var(--primary); }
.btn-ink:hover     { transform: translateY(-1px); box-shadow: 0 14px 30px -18px var(--ink); }
.btn-cream:hover   { background: var(--bg-2); border-color: var(--ink-3); }
.btn-ghost:hover   { background: var(--ink); color: var(--bg); }

/* ─────────────────────────────────────────────────────────
   Hand-drawn motifs
   ───────────────────────────────────────────────────────── */
.underlined { position: relative; display: inline-block; }
.underlined::after {
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: -10px;
  height: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M2 8 Q 50 2, 100 6 T 198 5' fill='none' stroke='%23234c2a' stroke-width='3' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}

.scribble-arrow {
  display: inline-block;
  width: 120px; height: 80px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'><path d='M10 10 Q 20 60, 80 60' fill='none' stroke='%23234c2a' stroke-width='2.4' stroke-linecap='round'/><path d='M70 50 L82 62 L70 72' fill='none' stroke='%23234c2a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}

.scribble-callout {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  opacity: 0;
  animation: rise-in 0.9s var(--ease-out) 0.5s forwards;
}
.scribble-callout .hand {
  font-size: 19px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────────────────
   Hero gradient panel — sunset/ocean with noise grain
   ───────────────────────────────────────────────────────── */
.grad-panel {
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%,  var(--grad-1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 10%, var(--grad-1) 0%, transparent 55%),
    radial-gradient(ellipse at 30% 70%, var(--grad-3) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 70%, var(--grad-2) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 95%, var(--grad-3) 0%, transparent 50%),
    radial-gradient(ellipse at 15% 95%, var(--grad-4) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%,var(--grad-5) 0%, transparent 60%),
    linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-4) 100%);
}
.grad-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ─────────────────────────────────────────────────────────
   Recommended badge (lilac)
   ───────────────────────────────────────────────────────── */
.badge-rec {
  display: inline-block;
  background: var(--lilac);
  color: var(--lilac-ink);
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────
   Side rail
   ───────────────────────────────────────────────────────── */
.rail {
  width: 88px;
  border-right: 1px solid var(--rule);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0;
  gap: 28px;
  flex-shrink: 0;
}
.rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink-2);
  font-size: 11px;
  cursor: pointer;
}
.rail-item .ico {
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  display: grid; place-items: center;
  transition: border-color 160ms var(--ease-soft), color 160ms var(--ease-soft);
}
.rail-item:hover .ico { border-color: var(--ink); color: var(--ink); }
.rail-item.active .ico,
.rail-item[aria-current="page"] .ico { border-color: var(--primary); color: var(--primary); }

/* ─────────────────────────────────────────────────────────
   Marquee
   ───────────────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee { overflow: hidden; }
.marquee-track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ─────────────────────────────────────────────────────────
   Top bar
   ───────────────────────────────────────────────────────── */
.topbar {
  padding: 20px 56px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-brand img { height: 36px; width: auto; display: block; }
.topbar-brand .wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.topbar-nav { display: flex; gap: 28px; font-size: 14px; color: var(--ink-2); }
.topbar-nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 160ms var(--ease-soft);
}
.topbar-nav a:hover { color: var(--ink); }
.topbar-actions { display: flex; gap: 12px; }

/* ─────────────────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────────────────── */
.hero {
  height: 700px;
  border-radius: 0;
  padding: 100px 64px 0;
  text-align: center;
  position: relative;
}
.hero-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stack > * {
  opacity: 0;
  animation: rise-in 0.85s var(--ease-out) forwards;
}
.hero-stack > *:nth-child(1) { animation-delay: 0.05s; }
.hero-stack > *:nth-child(2) { animation-delay: 0.20s; }
.hero-stack > *:nth-child(3) { animation-delay: 0.35s; }

.hero-title {
  font-size: 96px;
  margin: 0;
  line-height: 1.05;
  font-weight: 500;
  color: var(--ink);
}
.hero-sub {
  font-size: 20px;
  color: var(--ink);
  margin: 24px 0 0;
  opacity: 0.85;
  max-width: 760px;
}
.hero-cta { margin-top: 32px; padding: 14px 28px; }

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

/* ─────────────────────────────────────────────────────────
   Trusted-by row
   ───────────────────────────────────────────────────────── */
.trusted-row {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  overflow: hidden;
}
.trusted-label {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  padding-left: 64px;
}
.trusted-marquee {
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.trusted-logo {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--ink-2);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* ─────────────────────────────────────────────────────────
   Section heads (centered eyebrow + title + sub)
   ───────────────────────────────────────────────────────── */
.section-head {
  padding: 100px 56px 32px;
  text-align: center;
  position: relative;
}
.section-head .label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.section-head .title {
  font-size: 56px;
  margin: 16px auto 0;
  max-width: 820px;
  line-height: 1.05;
}
.section-head .title.lg {
  font-size: 64px;
  max-width: 1000px;
  margin-top: 20px;
}
.section-head .sub {
  font-size: 18px;
  color: var(--ink-2);
  margin: 20px auto 0;
  max-width: 640px;
}

/* ─────────────────────────────────────────────────────────
   Command center
   ───────────────────────────────────────────────────────── */
.cmd-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cmd-tabs .btn { padding: 12px 22px; font-size: 15px; }

.cmd-frame {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-width: 1240px;
  margin: 0 auto;
}
.cmd-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--rule);
}
.cmd-app-header .brand { display: flex; align-items: center; gap: 10px; }
.cmd-app-header .brand img { height: 22px; width: auto; }
.cmd-app-header .brand span {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.cmd-app-header .user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.cmd-app-header .avatar {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, oklch(0.78 0.06 240), oklch(0.7 0.1 25));
}

.cmd-grid {
  display: grid;
  grid-template-columns: 104px 1fr;
  min-height: 620px;
}
.cmd-sidebar {
  border-right: 1px solid var(--rule);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmd-sidebar .item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 10px 0;
  color: var(--ink-3);
  position: relative;
  transition: color 160ms var(--ease-soft);
}
.cmd-sidebar .item:hover { color: var(--ink-2); }
.cmd-sidebar .item[aria-current="page"] { color: var(--ink); }
.cmd-sidebar .item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--ink);
  border-radius: 0 4px 4px 0;
}
.cmd-sidebar .item span { font-size: 11px; }

.cmd-body { padding: 28px 36px; background: var(--bg); position: relative; }
.cmd-body > * { animation: fade-in 280ms var(--ease-out) both; }

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

/* ─────────────────────────────────────────────────────────
   Image placeholder
   ───────────────────────────────────────────────────────── */
.placeholder {
  position: relative;
  background: repeating-linear-gradient(135deg, var(--bg-2) 0 12px, var(--bg) 12px 24px);
  border: 1px solid var(--rule);
  display: flex;
  align-items: flex-end;
  border-radius: 16px;
  overflow: hidden;
}
.placeholder .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 12px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

/* ─────────────────────────────────────────────────────────
   Generic card
   ───────────────────────────────────────────────────────── */
.card {
  background: var(--bg);
  border-radius: 16px;
  border: 1px solid var(--rule);
  padding: 28px;
}

/* ─────────────────────────────────────────────────────────
   Case studies
   ───────────────────────────────────────────────────────── */
.case-section { padding: 100px 56px; text-align: center; position: relative; }
.case-section .pills {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}
.case-screen-wrap {
  margin: 48px auto 0;
  max-width: 1100px;
  text-align: left;
}

/* ─────────────────────────────────────────────────────────
   Programs
   ───────────────────────────────────────────────────────── */
.programs-section { padding: var(--section-y) 56px; background: var(--bg-2); }
.programs-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 48px;
}
.programs-head .title { font-size: 64px; margin: 20px 0 0; }
.programs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ─────────────────────────────────────────────────────────
   CTA band
   ───────────────────────────────────────────────────────── */
.cta-band {
  padding: 120px 56px;
  background: var(--primary);
  color: var(--primary-ink);
  text-align: center;
}
.cta-band h2 { font-size: 88px; margin: 0; color: var(--primary-ink); }
.cta-band p  { font-size: 18px; margin-top: 24px; opacity: 0.85; }
.cta-band .btn { margin-top: 28px; }

/* ─────────────────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────────────────── */
.site-footer {
  padding: 80px 64px 40px;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-mark { font-size: 56px; line-height: 0.98; max-width: 480px; }
.footer-mark em { font-style: italic; color: var(--primary); }
.footer-addr { margin-top: 32px; color: var(--ink-3); font-size: 13px; }
.footer-col-title { margin-bottom: 18px; }
.footer-col-list {
  display: flex; flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.footer-col-list a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: color 160ms var(--ease-soft);
}
.footer-col-list a:hover { color: var(--ink); }
.footer-meta {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────────────────────
   Method — Learn / Practice / Apply pillars
   Three-column composition: two cream cards bracketing a
   dark forest-green "live feed" card. Each card carries a
   small interactive affordance that previews its pillar.
   ───────────────────────────────────────────────────────── */
.method-section {
  padding: var(--section-y) 56px;
  background: var(--bg);
}
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.pillar {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 28px;
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  transition: transform 380ms var(--ease-out),
              box-shadow 380ms var(--ease-out),
              border-color 380ms var(--ease-out);
  will-change: transform;
}
.pillar:hover {
  transform: translateY(-6px);
  box-shadow: 0 36px 70px -34px oklch(0.3 0.05 240 / 0.32);
  border-color: var(--ink-3);
}
.pillar.dark {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}
.pillar.dark:hover {
  border-color: var(--primary-2);
  box-shadow: 0 36px 70px -34px var(--primary);
}
/* A subtle ambient glow that breathes inside the dark Practice card —
   reinforces the "live feed" character with motion that's almost
   subliminal. Disabled in reduced-motion. */
.pillar.dark::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(closest-side, var(--accent-warm), transparent 70%);
  opacity: 0.18;
  filter: blur(32px);
  animation: glow-drift 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow-drift {
  from { transform: translate(0, 0)   scale(1); opacity: 0.14; }
  to   { transform: translate(-12%, 8%) scale(1.15); opacity: 0.22; }
}

.pillar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-warm);
  font-weight: 500;
  position: relative;
  z-index: 2;
}
.pillar-title {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 0.96;
  margin: 22px 0 18px;
  color: inherit;
  position: relative;
  z-index: 2;
}
.pillar-body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  flex: 1;
  max-width: 360px;
  position: relative;
  z-index: 2;
}
.pillar.dark .pillar-body { color: oklch(0.88 0.03 145 / 0.78); }
.pillar-affordance { margin-top: 36px; position: relative; z-index: 2; }

/* ── Affordance: Learn — stacked curriculum pill ──
   The top pill's label rotates through curriculum tracks every few
   seconds. A fade-blur swap (driven by JS toggling `is-swapping`)
   keeps the motion feeling soft, not harsh. */
.stack-pill {
  position: relative;
  display: inline-block;
  isolation: isolate;
}
.stack-pill .top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  z-index: 3;
  box-shadow: 0 12px 24px -14px var(--ink);
  min-width: 230px;
  justify-content: center;
}
/* Slot-machine label scroller. The window clips to one line; the track
   is a plain block-level column whose top edge sits at the window's top.
   transform: translateY(-i * 1.18em) shifts to the i-th item.
   Note: must NOT use inline-flex with align-items:center on the window
   — flex centering of an oversized track causes the track to overflow
   both top and bottom edges, breaking the clip. Inline-block solves it. */
.label-scroll {
  display: inline-block;
  height: 1.18em;
  line-height: 1.18em;
  overflow: hidden;
  vertical-align: middle;
  min-width: 200px;
}
.label-scroll-track {
  display: block;
  transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.label-scroll-track.no-anim { transition: none; }
.label-scroll-track > span {
  display: block;
  height: 1.18em;
  line-height: 1.18em;
  white-space: nowrap;
}
.stack-pill::before,
.stack-pill::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 14px;
  border-radius: 999px;
  background: var(--primary);
  z-index: 1;
}
.stack-pill::before { bottom: -7px;  opacity: 0.55; z-index: 2; }
.stack-pill::after  { bottom: -14px; opacity: 0.28; left: 16px; right: 16px; }

/* ── Affordance: Practice — live feed input ── */
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-warm);
  position: relative;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent-warm);
  animation: pulse-dot 1.6s var(--ease-out) infinite;
}
@keyframes pulse-dot {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}
.live-input {
  background: var(--primary-deep);
  border-radius: 14px;
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  letter-spacing: 0.01em;
  min-height: 56px;     /* lock height so the typing loop doesn't bounce */
  overflow: hidden;
}
.live-input .typed {
  white-space: pre;
  font-variant-ligatures: none;
}
.live-input .caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  background: var(--primary-ink);
  margin-left: 2px;
  vertical-align: middle;
  animation: caret-blink 1.05s steps(2) infinite;
}
@keyframes caret-blink { to { opacity: 0; } }

/* ── Affordance: Apply — day chiclets + save pill ── */
.day-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.day-tile {
  height: 48px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms var(--ease-out),
              background  160ms var(--ease-soft),
              color       160ms var(--ease-soft),
              border-color 160ms var(--ease-soft);
}
.day-tile:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.day-tile[aria-checked="true"] {
  background: var(--accent-warm);
  color: var(--primary-ink);
  border-color: var(--accent-warm);
}
.day-tile:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 3px; }

/* Save button — three visual states:
   default → pressing (brief scale-down to suggest a click) → saved (green
   fill with check). State transitions are driven by JS in the Apply card's
   auto-demo loop and any user click on the pill. */
.save-pill {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 16px 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 240ms var(--ease-soft),
              border-color 240ms var(--ease-soft),
              color 240ms var(--ease-soft),
              transform 140ms var(--ease-out);
  position: relative;
}
.save-pill:hover { background: var(--bg-3); border-color: var(--ink-3); }
.save-pill:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.save-pill.pressing { transform: scale(0.97); }
.save-pill.saved {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
  transform: scale(1);
}
.save-pill.saved::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 0 var(--primary);
  animation: save-ripple 700ms var(--ease-out) forwards;
  pointer-events: none;
}
@keyframes save-ripple {
  0%   { box-shadow: 0 0 0 0 oklch(0.55 0.13 145 / 0.45); }
  100% { box-shadow: 0 0 0 14px oklch(0.55 0.13 145 / 0); }
}
.save-pill .save-text {
  display: inline-block;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
.save-pill.swapping-text .save-text {
  opacity: 0;
  transform: translateY(-6px);
}
.save-pill .check {
  display: inline-flex;
  width: 0;
  overflow: hidden;
  transition: width 240ms var(--ease-out) 80ms;
}
.save-pill.saved .check { width: 18px; }

/* Day-tile auto-pulse — runs the moment a tile becomes selected by the
   demo, makes the selection feel like a click happened. */
@keyframes day-pulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.day-tile[aria-checked="true"].auto-tap {
  animation: day-pulse 480ms var(--ease-out);
}

/* ─────────────────────────────────────────────────────────
   Reduced motion — disable entrances and the marquee for
   users who request less motion. The marquee is decorative;
   pausing it is the right call.
   ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-stack > *, .scribble-callout { opacity: 1; }
  .marquee-track { animation: none; }
  .live-dot::after { display: none; }
  .live-input .caret { animation: none; opacity: 1; }
}
