/* ThinkLM public front page. Layers over design.css (tokens + the REAL bubble styles come from
   there — the demo chat is product-faithful by construction). Every selector is scoped under
   body.fp so nothing here can leak into app screens (the teacher.css layering precedent).
   Motion is an enhancement: the pre-reveal hidden state exists ONLY under html.js-anim (set by
   front.js) AND prefers-reduced-motion: no-preference — no JS or reduced motion = everything
   visible, in order, immediately. */

.fp {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}
.fp main { display: block; }

/* ── shared vocabulary ─────────────────────────────────────────────────────── */
.fp h1, .fp h2, .fp .fp-close-echo {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.fp h2 { font-size: clamp(1.7rem, 2.2vw + 0.9rem, 2.6rem); line-height: 1.15; margin: 6px 0 14px; }
.fp h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 6px; }
.fp p { line-height: 1.6; }

.fp .fp-eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 4px;
}
.fp .fp-eyebrow--light { color: #9cc0ee; }

.fp .fp-section { padding: clamp(56px, 8vw, 104px) 24px; }
.fp .fp-section--tint { background: #eaf0f6; }
.fp .fp-section-inner { max-width: 1060px; margin: 0 auto; }
.fp .fp-lede { font-size: clamp(16px, 1.2vw + 10px, 18.5px); color: var(--ink2); max-width: 46em; }
.fp .fp-fineprint { font-size: 13px; color: var(--ink3); max-width: 46em; margin-top: 18px; }

.fp .fp-btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fp .fp-btn--primary { background: var(--accent); color: #fff; }
.fp .fp-btn--primary:hover { background: var(--accent-press); transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(53, 104, 176, 0.35); }
.fp .fp-btn--ghost { border: 1px solid rgba(156, 192, 238, 0.55); color: inherit; }
.fp .fp-btn--ghost:hover { transform: translateY(-1px); border-color: #9cc0ee; }
.fp .fp-section .fp-btn--ghost { border-color: var(--line2); }
.fp .fp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.fp .fp-student-line { margin-top: 16px; font-size: 14px; }
.fp .fp-student-line a { color: inherit; opacity: 0.85; text-decoration: underline; text-underline-offset: 3px; }
.fp .fp-student-line a:hover { opacity: 1; }

/* keyboard focus must be visible on the dark bands too */
.fp a:focus-visible, .fp .fp-btn:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.fp .fp-hero a:focus-visible, .fp .fp-close a:focus-visible, .fp .fp-topbar a:focus-visible {
  outline-color: #9cc0ee;
}

/* ── topbar (over the hero) ────────────────────────────────────────────────── */
.fp .fp-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: 18px 24px;
  background: linear-gradient(rgba(25, 34, 48, 0.55), rgba(25, 34, 48, 0));
}
.fp .fp-topbar-inner { max-width: 1060px; margin: 0 auto; display: flex;
  align-items: center; justify-content: space-between; }
.fp .fp-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.fp .fp-topbar .glyph { background: #fff; }
.fp .fp-topbar .glyph::after { border-color: var(--ink); }
.fp .fp-brand-name { font-weight: 700; font-size: 19px; }
.fp .fp-topnav { display: flex; gap: 20px; }
.fp .fp-topnav a { color: rgba(255, 255, 255, 0.92); font-size: 14px; font-weight: 600;
  text-decoration: none; }
.fp .fp-topnav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* ── 1 · hero ──────────────────────────────────────────────────────────────── */
.fp .fp-hero { position: relative; min-height: min(92vh, 780px); display: flex;
  align-items: center; color: #fff; }
.fp .fp-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 65% 40%; }
.fp .fp-hero-veil { position: absolute; inset: 0;
  background: linear-gradient(97deg, rgba(21, 29, 42, 0.94) 0%, rgba(21, 29, 42, 0.82) 38%,
    rgba(21, 29, 42, 0.28) 78%, rgba(21, 29, 42, 0.18) 100%); }
.fp .fp-hero-copy { position: relative; z-index: 2; max-width: 1060px; width: 100%;
  margin: 0 auto; padding: 110px 24px 72px; }
.fp .fp-hero h1 { font-size: clamp(2.05rem, 3.4vw + 1rem, 3.5rem); line-height: 1.12;
  margin: 10px 0 18px; max-width: 15em; }
.fp .fp-hero h1 em { font-style: italic; color: #9cc0ee; }
.fp .fp-hero-sub { max-width: 34em; font-size: clamp(15.5px, 1vw + 10px, 18px);
  color: rgba(255, 255, 255, 0.88); }

/* ── 2 · the two screens ───────────────────────────────────────────────────── */
.fp .fp-twoscreens { display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(20px, 3vw, 40px); margin-top: 26px; align-items: start; }

.fp .fp-device { background: var(--surface); border: 1px solid var(--line2);
  border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(20, 40, 80, 0.12); }
.fp .fp-device-head { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); }
.fp .fp-chip { background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.fp .fp-problem { padding: 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.fp .fp-problem-text { font-family: "Source Serif 4", Georgia, serif; font-size: 16.5px;
  margin: 0 0 10px; }
.fp .fp-seal-chip { display: inline-flex; align-items: center; gap: 7px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--warm-text);
  background: var(--warm-soft); border: 1px solid #e8d5c8; border-radius: 99px;
  padding: 4px 11px; }
.fp .fp-seal-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warm); }

/* the demo chat rides design.css's REAL .bubble styles; it just needs the flex column */
.fp .fp-demo-chat { display: flex; flex-direction: column; padding: 18px 16px 10px; }
.fp .fp-demo-chat .bubble em { font-style: italic; }

.fp .fp-teacher-col { display: flex; flex-direction: column; gap: 14px; }
.fp .fp-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(20, 40, 80, 0.05); }
.fp .fp-card-title { font-size: 14.5px; margin-bottom: 10px; }
.fp .fp-card p { margin: 0; font-size: 14px; color: var(--ink2); }

.fp .fp-stall-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fp .fp-stall-list li { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: 3px 10px; align-items: center; font-size: 13.5px; }
.fp .fp-stall-label { color: var(--ink); }
.fp .fp-stall-n { color: var(--ink3); font-size: 12.5px; grid-column: 2; grid-row: 1; }
.fp .fp-stall-bar { grid-column: 1 / -1; height: 7px; background: var(--fill);
  border-radius: 99px; overflow: hidden; }
.fp .fp-stall-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* the 4-band distribution — the product's own ordinal ramp (leader page, item 47);
   identity is carried by the aria-label + the labelled list, never colour alone */
.fp .fp-bandbar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.fp .fp-bandbar i { display: block; }
.fp .fp-band--masters { background: #3e8c7b; }
.fp .fp-band--meets { background: #3568b0; }
.fp .fp-band--approaches { background: #c98a2a; }
.fp .fp-band--dnm { background: #c1663a; }
.fp .fp-bandlist { list-style: none; margin: 10px 0 0; padding: 0; display: flex;
  flex-wrap: wrap; gap: 8px 14px; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; color: var(--ink2); }
.fp .fp-bandlist li { display: inline-flex; align-items: center; gap: 6px; }
.fp .fp-bandlist i { width: 9px; height: 9px; border-radius: 2px; }

.fp .fp-caption { margin-top: 30px; font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(17px, 1.4vw + 10px, 21px); color: var(--ink); text-align: center;
  text-wrap: balance; }

/* ── 3 · steps (a real sequence: author → seal → join) ─────────────────────── */
.fp .fp-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 30px); }
.fp .fp-steps li { background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px; }
.fp .fp-step-n { display: inline-block; font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.fp .fp-steps p { margin: 0; font-size: 14px; color: var(--ink2); }

/* ── 4 · the contrast rows ─────────────────────────────────────────────────── */
.fp .fp-contrast { margin-top: 26px; display: grid; gap: 18px; }
.fp .fp-contrast-row { display: grid; grid-template-columns: 160px 1fr;
  gap: 12px 26px; padding: 18px 0; border-top: 1px solid var(--line2); }
.fp .fp-contrast-label { font-family: "IBM Plex Mono", monospace; font-size: 12px;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink3); margin: 3px 0 0; }
.fp .fp-contrast-them { margin: 0 0 10px; color: var(--ink2); }
.fp .fp-contrast-us { margin: 0; padding-left: 14px; border-left: 3px solid var(--accent);
  color: var(--ink); font-weight: 500; }

/* ── 5 · demo recordings ───────────────────────────────────────────────────── */
.fp .fp-demos { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px); }
.fp .fp-demo-fig { margin: 0; }
.fp .fp-demo-fig img { width: 100%; height: auto; border: 1px solid var(--line2);
  border-radius: 12px; background: var(--surface); }
.fp .fp-demo-fig figcaption { margin-top: 9px; font-size: 13px; line-height: 1.55;
  color: var(--ink2); }
.fp .fp-demo-fig b { color: var(--ink); }

/* ── 6 · leader cards ──────────────────────────────────────────────────────── */
.fp .fp-leadergrid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; }

/* ── 7 · the close (ink band) ──────────────────────────────────────────────── */
.fp .fp-close { background: var(--ink); color: rgba(255, 255, 255, 0.92);
  padding: clamp(64px, 9vw, 120px) 24px; text-align: center; }
.fp .fp-close-echo { font-size: clamp(1.5rem, 2.4vw + 0.8rem, 2.5rem); line-height: 1.25;
  max-width: 24em; margin: 0 auto 18px; }
.fp .fp-close-echo em { font-style: italic; color: #9cc0ee; }
.fp .fp-close-line { color: rgba(255, 255, 255, 0.75); margin: 0 auto;
  max-width: 36em; }
.fp .fp-close .fp-cta-row { justify-content: center; margin-top: 30px; }
.fp .fp-close .fp-btn--ghost { border-color: rgba(156, 192, 238, 0.45); color: #fff; }
.fp .fp-footer { margin-top: 54px; font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.55); }

/* ── reveal-on-scroll (enhancement only) ───────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .fp { scroll-behavior: smooth; }
  html.js-anim .fp [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  html.js-anim .fp [data-reveal].is-visible { opacity: 1; transform: none; }
  /* the chat plays bubble-by-bubble once the device scrolls into view */
  html.js-anim .fp [data-reveal-stagger] .bubble {
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble { opacity: 1; transform: none; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(1) { transition-delay: 0.3s; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(2) { transition-delay: 1.3s; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(3) { transition-delay: 2.4s; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(4) { transition-delay: 3.4s; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(5) { transition-delay: 4.4s; }
  html.js-anim .fp [data-reveal-stagger].is-visible .bubble:nth-child(6) { transition-delay: 5.4s; }
}
@media (prefers-reduced-motion: reduce) {
  .fp * { animation: none !important; transition: none !important; }
}

/* ── responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .fp .fp-twoscreens { grid-template-columns: 1fr; }
  .fp .fp-steps, .fp .fp-demos { grid-template-columns: 1fr 1fr; }
  .fp .fp-leadergrid { grid-template-columns: 1fr 1fr; }
  .fp .fp-contrast-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 600px) {
  .fp .fp-steps, .fp .fp-demos, .fp .fp-leadergrid { grid-template-columns: 1fr; }
  .fp .fp-hero { min-height: 88vh; }
  .fp .fp-topnav { gap: 12px; }
  .fp .fp-topnav a { font-size: 13px; }
}
