/* =========================================================
   NeuronEQ — Chalk & Slate (single theme, light only)
   ========================================================= */
:root{
  --bg:         #F5F2EC;
  --bg-card:    rgba(255, 255, 255, 0.42);
  --bg-card-hi: rgba(255, 255, 255, 0.6);

  --ink:        #1E2432;
  --ink-muted:  #3a4250;
  --ink-faint:  #6a7585;
  --ink-soft:   #9ba4b2;

  --accent:     #3F6B4F;
  --accent-soft: rgba(63, 107, 79, 0.4);

  --line:       rgba(30, 36, 50, 0.1);
  --line-2:     rgba(30, 36, 50, 0.18);

  --serif:      "Fraunces", Georgia, serif;
  --sans:       "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:       "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container:  1240px;
  --radius:     14px;
  --radius-sm:  8px;
  --nav-h:      68px;
}

/* =========================================================
   reset
   ========================================================= */
*,*::before,*::after{ box-sizing: border-box; }
html,body{ margin: 0; padding: 0; }
html{ background: var(--bg); color: var(--ink); }
body{
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img{ display: block; max-width: 100%; }
::selection{ background: rgba(63, 107, 79, 0.2); color: var(--ink); }

/* =========================================================
   utilities
   ========================================================= */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.mono{ font-family: var(--mono); letter-spacing: 0.02em; }
.serif{ font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }

.eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before{
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(63, 107, 79, 0.45);
}

/* =========================================================
   paper grain (shared — applied to page-level surfaces)
   ========================================================= */
.grain::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.14  0 0 0 0 0.18  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* =========================================================
   buttons
   ========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn .arrow{ transition: transform .25s ease; }
.btn:hover .arrow{ transform: translateX(3px); }

.btn-primary{
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  box-shadow:
    0 0 0 1px rgba(30, 36, 50, 0.12) inset,
    0 14px 32px -14px rgba(30, 36, 50, 0.45);
}
.btn-primary:hover{
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(63, 107, 79, 0.25) inset,
    0 16px 32px -14px rgba(63, 107, 79, 0.5);
}

.btn-ghost{
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover{
  border-color: rgba(30, 36, 50, 0.32);
  background: rgba(30, 36, 50, 0.04);
}
.btn-sm{ padding: 9px 14px; font-size: 13px; }

/* Button ink-bloom on click — soft green pulse radiates from button center */
.btn{
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.btn::before{
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(63, 107, 79, 0.45) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.btn:active::before{
  animation: btn-bloom .6s cubic-bezier(.2, .7, .2, 1);
}
@keyframes btn-bloom{
  0%   { opacity: 0.6; transform: scale(0.55); }
  100% { opacity: 0;   transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce){
  .btn:active::before{ animation: none; }
}

/* =========================================================
   nav — solid cream strip, no blur, no gradient, no dark mode
   ========================================================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
  animation: nav-slide-in .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes nav-slide-in{
  from{ transform: translateY(-100%); }
  to{ transform: none; }
}
@media (prefers-reduced-motion: reduce){
  .nav{ animation: none; }
}
.nav.scrolled{
  border-bottom-color: var(--line);
}
.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-mark{
  width: 1.2em;
  height: 1.2em;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-mark::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--accent), transparent 60%, var(--accent) 100%);
  -webkit-mask: radial-gradient(circle, transparent 40%, black 42%);
          mask: radial-gradient(circle, transparent 40%, black 42%);
  animation: markSpin 10s linear infinite;
}
.logo-mark::after{
  content: "";
  width: 0.38em;
  height: 0.38em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(63, 107, 79, 0.5);
}
@keyframes markSpin{
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce){
  .logo-mark::before{ animation: none; }
}
.nav-links{
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-muted);
}
.nav-links a{
  color: var(--ink-muted);
  transition: color .2s ease;
}
.nav-links a:hover{ color: var(--ink); }

/* Nav link underline — active section + hover. Animated draw left-to-right. */
.nav-links a.nav-link{
  position: relative;
  padding: 4px 0;
}
.nav-links a.nav-link::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
  opacity: 0.85;
}
.nav-links a.nav-link:hover::after,
.nav-links a.nav-link.active::after{ transform: scaleX(1); }
.nav-links a.nav-link.active{ color: var(--ink); }

/* =========================================================
   Scroll progress bar — fixed thin line at top of viewport
   ========================================================= */
.scroll-progress{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 50;
  pointer-events: none;
  background: transparent;
}
.scroll-progress::after{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
@media (prefers-reduced-motion: reduce){
  .scroll-progress::after{ transition: none; }
}

/* =========================================================
   hero
   ========================================================= */
.hero{
  position: relative;
  padding: 140px 0 120px;
  min-height: 700px;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero .container{
  position: relative;
  z-index: 3;
}
.hero-copy{
  max-width: 640px;
}
.hero-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.8vw, 78px);
  letter-spacing: -0.028em;
  line-height: 1.02;
  color: var(--ink);
  margin: 24px 0 28px;
  text-wrap: balance;
}
.hero-title em{
  color: var(--accent);
  font-style: italic;
}
.hero-sub{
  color: var(--ink-muted);
  font-size: 19px;
  line-height: 1.5;
  max-width: 540px;
  margin: 0 0 40px;
  text-wrap: pretty;
}
.hero-cta{
  margin-bottom: 48px;
}
.hero-meta{
  display: flex;
  gap: 26px;
  align-items: center;
  color: var(--ink-faint);
  font-size: 13px;
  font-family: var(--mono);
}
.hero-meta .dot{
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-soft);
}

/* =========================================================
   Socratic Threads — SVG ink lines on cream
   ========================================================= */
.threads-wrap{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.threads-wrap svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.thread path{
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.5;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
}
.threads--live .thread path{
  animation: thread-draw 1.9s cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s) forwards;
}
.thread circle{
  fill: var(--accent);
  opacity: 0;
}
.threads--live .thread circle{
  animation: thread-node 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) calc(var(--d, 0s) + 1.4s) forwards;
}
.thread-origin{
  fill: var(--ink);
  opacity: 0;
}
.threads--live .thread-origin{
  animation: thread-node 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) forwards;
}
@keyframes thread-draw{
  from{ stroke-dashoffset: 1600; }
  to  { stroke-dashoffset: 0; }
}
@keyframes thread-node{
  from{ opacity: 0; }
  to  { opacity: 1; }
}

/* Thread spark — brief pulse on a random endpoint every 12–18s.
   Toggled by JS adding/removing .thread-spark on the circle node. */
.thread circle.thread-spark{
  transform-box: fill-box;
  transform-origin: center;
  animation: thread-spark .7s cubic-bezier(.2,.7,.2,1);
}
@keyframes thread-spark{
  0%   { transform: scale(1); filter: none; }
  40%  { transform: scale(1.85); filter: drop-shadow(0 0 6px rgba(63, 107, 79, 0.65)); }
  100% { transform: scale(1); filter: none; }
}
@media (prefers-reduced-motion: reduce){
  .thread circle.thread-spark{ animation: none; }
}
@media (prefers-reduced-motion: reduce){
  .thread path{
    stroke-dashoffset: 0;
    animation: none !important;
  }
  .thread circle, .thread-origin{
    opacity: 1;
    animation: none !important;
  }
}

/* =========================================================
   "By design" section
   ========================================================= */
.by-design{
  position: relative;
  padding: 140px 0 120px;
  isolation: isolate;
  overflow: hidden;
}
.by-design .container{
  position: relative;
  z-index: 1;
}

.by-design-head{
  max-width: 720px;
  margin: 0 auto 72px;
  text-align: center;
}
.by-design-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 60px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 26px;
}
.by-design-lead{
  color: var(--ink-muted);
  font-size: 19px;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 620px;
}

.by-design-threads{
  position: relative;
  max-width: 1000px;
  margin: 0 auto 72px;
  aspect-ratio: 1000 / 300;
}

.by-design-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}
.design-card{
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.design-card:hover{
  border-color: var(--line-2);
  background: var(--bg-card-hi);
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px -22px rgba(30, 36, 50, 0.25),
    inset 0 0 80px rgba(63, 107, 79, 0.06);
}
.design-card-num{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  margin-bottom: 24px;
}
.design-card-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.15;
}
.design-card-body{
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
}

.by-design-strip{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 auto 56px;
  max-width: 780px;
}

.by-design-close{
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--ink);
  text-align: center;
  letter-spacing: -0.015em;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.3;
}

/* =========================================================
   Students section — "A tutor that remembers yesterday."
   ========================================================= */
.students{
  position: relative;
  padding: 140px 0 120px;
  isolation: isolate;
  overflow: hidden;
}
.students-grid{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}
.students-copy{
  max-width: 560px;
}
.students-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 54px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 24px 0 24px;
  text-wrap: balance;
}
.students-lead{
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.students-highlights{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.students-highlights li{
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.students-highlights li strong{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
}
.students-highlights li span{
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}
.students-visual{
  display: flex;
  justify-content: center;
  align-items: center;
}
.hologram{
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
}

/* Rising particles around the hologram — slow vertical drift + fade.
   Each particle has its own delay (--p-d) and period (--p-r). */
.h-particle{
  transform-box: fill-box;
  transform-origin: center;
  animation: h-particle var(--p-r, 8s) ease-in-out infinite;
  animation-delay: var(--p-d, 0s);
}
@keyframes h-particle{
  0%   { transform: translateY(0);    opacity: 0.4; }
  40%  { opacity: 0.9; }
  60%  { opacity: 0.9; }
  100% { transform: translateY(-22px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .h-particle{ animation: none; opacity: 0.7; }
}

@media (max-width: 1020px){
  .students{ padding: 100px 0 80px; }
  .students-grid{
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .students-copy{ max-width: none; }
  .students-visual{ order: -1; }
  .hologram{ max-width: 360px; }
}
@media (max-width: 600px){
  .students{ padding: 72px 0 60px; }
  .students-lead{ font-size: 16px; }
  .hologram{ max-width: 280px; }
}

/* =========================================================
   Teachers section — "Concept-level, not grade-level."
   ========================================================= */
.teachers{
  position: relative;
  padding: 140px 0 120px;
  isolation: isolate;
  overflow: hidden;
}
.teachers-head{
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: center;
}
.teachers-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 60px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 24px 0 24px;
  text-wrap: balance;
}
.teachers-lead{
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 640px;
  text-wrap: pretty;
}

.teachers-dashboard{
  max-width: 1100px;
  margin: 0 auto;
}

/* dashboard card */
.dashboard{
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 36px 80px -40px rgba(30, 36, 50, 0.28),
              0 2px 6px rgba(30, 36, 50, 0.04);
}

.dash-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
  flex-wrap: wrap;
}
.dash-top-meta{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-top-eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.dash-top-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.dash-tabs{
  display: flex;
  gap: 4px;
  background: rgba(30, 36, 50, 0.04);
  padding: 4px;
  border-radius: 999px;
}
.dash-tab{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-faint);
  transition: color .2s ease, background .2s ease;
}
.dash-tab:hover{ color: var(--ink-muted); }
.dash-tab.active{
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(30, 36, 50, 0.1);
}

.dash-body{
  padding: 28px;
  min-height: 420px;
}

/* Class view — two panels */
.dash-body-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.dash-panel{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px 18px;
}
.dash-panel-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.dash-panel-meta{
  color: var(--ink-faint);
  font-weight: 400;
}

/* student rows */
.student-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.student-row{
  display: grid;
  grid-template-columns: 1.3fr 1fr 48px;
  gap: 14px;
  align-items: center;
  padding: 14px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease;
}
.student-row + .student-row{ border-top: 1px solid var(--line); }
.student-row:hover{ background: rgba(30, 36, 50, 0.03); border-top-color: transparent; }
.student-row:hover + .student-row{ border-top-color: transparent; }
.student-main{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.student-name{
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.student-flag{
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(63, 107, 79, 0.14);
  color: var(--accent);
  align-items: center;
  justify-content: center;
}
.student-concept{
  font-size: 12.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-pct{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: right;
}

.mbar{
  height: 6px;
  background: rgba(30, 36, 50, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.mbar-fill{
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #5c8e6e);
  border-radius: 3px;
  transition: width 1s cubic-bezier(.2, .7, .2, 1);
}
.mbar--flag .mbar-fill{
  background: linear-gradient(90deg, #C87C5A, #d89a7c);
}
/* When the dashboard wrapper enters view, bars fill from 0 with row stagger */
.reveal.in .mbar-fill{
  width: var(--target-w, 0);
  transition-delay: calc(var(--row-i, 0) * 90ms + 200ms);
}

/* Shimmer sweep across mastery bar on student-row hover */
.student-row .mbar{ position: relative; }
.student-row .mbar::after{
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0;
  pointer-events: none;
}
.student-row:hover .mbar::after{
  animation: row-shimmer .9s cubic-bezier(.2, .7, .2, 1);
}
@keyframes row-shimmer{
  0%   { left: -60%; opacity: 0.7; }
  100% { left: 110%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .student-row:hover .mbar::after{ animation: none; }
}

/* Sparkline endpoint pulse */
.spark-endpoint{
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-pulse 2.4s ease-in-out infinite;
}
@keyframes spark-pulse{
  0%, 100% { transform: scale(1);   opacity: 0.9; }
  50%      { transform: scale(1.35); opacity: 1; }
}
@media (prefers-reduced-motion: reduce){
  .spark-endpoint{ animation: none; }
}

/* flag list */
.flag-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flag-row{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.4);
  transition: border-color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.flag-row:hover{
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
  box-shadow: inset 0 0 60px rgba(63, 107, 79, 0.05);
}
.flag-ico{
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(63, 107, 79, 0.14);
  color: var(--accent);
}
.flag-title{
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
}
.flag-source{
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-top: 3px;
}

/* Student view */
.dash-body-student{
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.dash-back{
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.dash-back:hover{
  background: rgba(30, 36, 50, 0.05);
  color: var(--ink);
}
.student-detail-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}
.student-detail-name{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.student-detail-concept{
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.student-detail-metric{
  text-align: right;
}
.student-detail-metric .v{
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.student-detail-metric .l{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 6px;
}
.student-detail-spark{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
.student-detail-spark .spark{
  width: 100%;
  height: 80px;
}
.student-detail-concepts{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.concepts-col{
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.concepts-head{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.concepts-col--weak .concepts-head{ color: #C87C5A; }
.concepts-col ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-muted);
}
.concepts-col li{ line-height: 1.45; }

/* Curriculum view */
.dash-body-curriculum{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-panel-head--curriculum{
  margin-bottom: 4px;
  padding: 0 2px;
}
.strand-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.strand-table thead th{
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.strand-table thead th:nth-child(2),
.strand-table thead th:nth-child(3){ width: 28%; }
.strand-table tbody td{
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.strand-table tbody tr:last-child td{ border-bottom: 0; }
.strand-name{
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
}
.strand-warn{
  display: inline-block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C87C5A;
  background: rgba(200, 124, 90, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}
.strand-row--warn .strand-name{ color: var(--ink); }
.strand-bar{
  height: 5px;
  background: rgba(30, 36, 50, 0.08);
  border-radius: 3px;
  overflow: hidden;
  display: block;
  margin-bottom: 6px;
}
.strand-bar > span{
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1s cubic-bezier(.2, .7, .2, 1);
}
.reveal.in .strand-bar > span{
  width: var(--target-w, 0);
  transition-delay: calc(var(--row-i, 0) * 80ms + 100ms);
}
.strand-pct{
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* responsive */
@media (max-width: 1020px){
  .teachers{ padding: 100px 0 80px; }
  .teachers-head{ margin-bottom: 44px; }
  .dash-top{ padding: 18px 20px; }
  .dash-body{ padding: 20px; min-height: auto; }
  .dash-body-grid{ grid-template-columns: 1fr; gap: 20px; }
  .student-detail-concepts{ grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 600px){
  .teachers{ padding: 72px 0 60px; }
  .teachers-lead{ font-size: 16px; }
  .dash-top{ flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px 18px; }
  .dash-top-title{ font-size: 19px; }
  .dash-tabs{ width: 100%; justify-content: space-between; }
  .dash-tab{ padding: 8px 10px; font-size: 10.5px; flex: 1; text-align: center; }
  .dash-body{ padding: 16px; }
  .dash-panel{ padding: 16px 16px 14px; }
  .student-row{ grid-template-columns: 1fr 80px 40px; gap: 10px; }
  .student-concept{ font-size: 12px; }
  .student-detail-name{ font-size: 24px; }
  .student-detail-metric .v{ font-size: 28px; }
  .strand-table{ font-size: 13px; }
  .strand-table thead th,
  .strand-table tbody td{ padding: 10px 8px; }
}

/* =========================================================
   Pilot — compact pre-launch call-out
   ========================================================= */
.pilot{
  position: relative;
  padding: 100px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pilot-inner{
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.pilot-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.pilot-lead{
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 540px;
  margin: 0;
}
.pilot-cta{
  margin-top: 12px;
}

@media (max-width: 600px){
  .pilot{ padding: 72px 0; }
  .pilot-lead{ font-size: 16px; }
}

/* =========================================================
   Team — 3 founders, photo placeholders
   ========================================================= */
.team{
  position: relative;
  padding: 140px 0 120px;
  isolation: isolate;
}
.team-head{
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.team-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin: 24px 0 0;
  text-wrap: balance;
}

.team-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.team-card{
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: transform .3s ease;
}
.team-card:hover .team-photo{
  border-color: var(--line-2);
  box-shadow: inset 0 0 80px rgba(63, 107, 79, 0.08);
}
.team-photo{
  transition: border-color .3s ease, box-shadow .3s ease;
}

.team-photo{
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(63, 107, 79, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(30, 36, 50, 0.07), rgba(30, 36, 50, 0.14));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-photo-initials{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 5vw, 64px);
  letter-spacing: -0.02em;
  color: rgba(30, 36, 50, 0.32);
  user-select: none;
}

.team-card-body{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-name{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}
.team-role{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.team-bio{
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 6px 0 0;
  text-wrap: pretty;
}

@media (min-width: 1021px){
  .team-grid > .team-card:nth-child(4):last-child{
    grid-column: 2 / 3;
  }
}

@media (max-width: 1020px){
  .team{ padding: 100px 0 80px; }
  .team-head{ margin-bottom: 48px; }
  .team-grid{ grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 600px){
  .team{ padding: 72px 0 60px; }
  .team-grid{ grid-template-columns: 1fr; gap: 32px; max-width: 380px; }
  .team-bio{ font-size: 14px; }
}

/* =========================================================
   footer stub
   ========================================================= */
.footer{
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer .logo{
  font-size: 16px;
}
.footer a{
  color: var(--ink-muted);
  transition: color .2s ease;
}
.footer a:hover{ color: var(--ink); }

/* =========================================================
   scroll-reveal — IntersectionObserver-driven fade-up
   Supports custom per-element delay via --reveal-delay
   ========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .8s cubic-bezier(.2,.7,.2,1),
    transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in{ opacity: 1; transform: none; }
.reveal.d1{ --reveal-delay: 80ms; }
.reveal.d2{ --reveal-delay: 160ms; }
.reveal.d3{ --reveal-delay: 240ms; }
.reveal.d4{ --reveal-delay: 320ms; }
.reveal.d5{ --reveal-delay: 400ms; }
.reveal.d6{ --reveal-delay: 480ms; }

/* =========================================================
   Word-cascade — splits a heading into staggered words
   <h2 class="cascade reveal"><CascadeText words={[...]} /></h2>
   Each word has --i set; transitions in 60–80ms apart once
   the parent gets `.in`.
   ========================================================= */
.cascade .cascade-word{
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity .55s cubic-bezier(.2,.7,.2,1),
    transform .55s cubic-bezier(.2,.7,.2,1);
}
.cascade.in .cascade-word{
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i) * 70ms + var(--cascade-base, 0ms));
}

/* =========================================================
   Em underline draw — for the italic "homework" in the Hero
   ========================================================= */
.hero-title em{
  position: relative;
}
.hero-title em::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--em-underline-delay, 1.6s);
  opacity: 0.65;
}
.hero-title.in em::after{ transform: scaleX(1); }

/* =========================================================
   Reduced-motion: disable all animation across the site.
   Place this near the bottom so it overrides any rules above.
   (Existing rules already use !important where needed; this is
   an extra safety net for transitions and CSS animations.)
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .reveal,
  .cascade .cascade-word,
  .hero-title em::after{
    transition: none !important;
    animation: none !important;
  }
  .reveal{
    opacity: 1 !important;
    transform: none !important;
  }
  .cascade .cascade-word{
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-title em::after{
    transform: scaleX(1) !important;
  }
}

/* =========================================================
   Mobile nav — hamburger + slide-down panel
   Hidden on desktop; appears at \u22641020px.
   ========================================================= */
.nav-hamburger{
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s ease;
}
.nav-hamburger:hover{ background: rgba(30, 36, 50, 0.05); }

.hamburger-icon .hamburger-line{
  transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .25s ease;
  transform-origin: center;
}
.hamburger-icon.is-open .hamburger-line.top{    transform: translateY(5px) rotate(45deg); }
.hamburger-icon.is-open .hamburger-line.middle{ opacity: 0; }
.hamburger-icon.is-open .hamburger-line.bottom{ transform: translateY(-5px) rotate(-45deg); }

.nav-mobile-panel{
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height .35s cubic-bezier(.2,.7,.2,1), visibility 0s linear .35s;
}
.nav-mobile-panel.is-open{
  max-height: calc(100vh - var(--nav-h));
  visibility: visible;
  transition: max-height .4s cubic-bezier(.2,.7,.2,1), visibility 0s linear 0s;
}
.nav-mobile-inner{
  display: flex;
  flex-direction: column;
  padding: 18px 0 28px;
  gap: 4px;
}
.nav-mobile-link{
  display: block;
  padding: 14px 4px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.018em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: color .2s ease;
}
.nav-mobile-link:hover{ color: var(--accent); }
.nav-mobile-link.active{ color: var(--accent); }
.nav-mobile-link.active::before{
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-mobile-cta{
  margin-top: 18px;
  width: 100%;
  justify-content: center;
}

/* =========================================================
   Modal — backdrop + cream paper card + form styles
   ========================================================= */
.modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 34, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  animation: backdrop-fade .25s cubic-bezier(.2,.7,.2,1);
}
@keyframes backdrop-fade{
  from{ opacity: 0; }
  to  { opacity: 1; }
}

.modal-card{
  position: relative;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 36px 32px;
  box-shadow: 0 40px 80px -20px rgba(20, 24, 34, 0.45);
  animation: card-in .35s cubic-bezier(.2,.7,.2,1);
  max-height: 92vh;
  overflow-y: auto;
}
@keyframes card-in{
  from{ opacity: 0; transform: translateY(12px) scale(0.98); }
  to  { opacity: 1; transform: none; }
}

.modal-close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.modal-close:hover{ color: var(--ink); background: rgba(30, 36, 50, 0.06); }

.modal-head{ margin-bottom: 24px; }
.modal-head .eyebrow{ margin-bottom: 14px; }
.modal-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 12px;
  text-wrap: balance;
}
.modal-lead{
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

@media (prefers-reduced-motion: reduce){
  .modal-backdrop, .modal-card{ animation: none; }
}

/* =========================================================
   Form fields
   ========================================================= */
.form{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.field-label{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.field-required{ color: var(--accent); }

.field input,
.field select,
.field textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea{ resize: vertical; min-height: 80px; font-family: var(--sans); }
.field input:focus,
.field select:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(63, 107, 79, 0.18);
}
.field input::placeholder,
.field textarea::placeholder{
  color: var(--ink-faint);
}
.field select{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231E2432' stroke-width='1.6' stroke-linecap='round'><path d='M2 2l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-error{
  color: #b54a3b;
  font-size: 13px;
  margin: 0;
  padding: 10px 14px;
  background: rgba(200, 124, 90, 0.08);
  border: 1px solid rgba(200, 124, 90, 0.2);
  border-radius: 8px;
}
.form-submit{
  margin-top: 6px;
  align-self: flex-start;
  min-width: 140px;
  justify-content: center;
}
.form-submit:disabled{
  opacity: 0.65;
  cursor: progress;
}

.form-success{
  text-align: left;
  padding: 12px 0;
}
.form-success h3{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 10px;
}
.form-success p{
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

/* =========================================================
   Footer link button (inherits color, not styled like button)
   ========================================================= */
.footer-link{
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color .2s ease;
  text-decoration: underline;
  text-decoration-color: rgba(30, 36, 50, 0.2);
  text-underline-offset: 3px;
}
.footer-link:hover{ color: var(--ink); text-decoration-color: var(--accent); }
.footer-meta{ display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 1020px){
  .hero{ padding: 108px 0 80px; min-height: 600px; }
  .by-design{ padding: 100px 0 80px; }
  .by-design-head{ margin-bottom: 60px; }
  .by-design-threads{ margin-bottom: 56px; }
  .by-design-grid{ grid-template-columns: repeat(2, 1fr); }

  /* Mobile nav: swap desktop links for hamburger */
  .nav-links--desktop{ display: none; }
  .nav-hamburger{ display: inline-flex; }
  .container{ padding: 0 22px; }
}
@media (max-width: 600px){
  .hero{ padding: 80px 0 56px; min-height: 520px; }
  .hero-title{ font-size: clamp(34px, 9.5vw, 50px); }
  .hero-sub{ font-size: 17px; }
  .hero-meta{ flex-wrap: wrap; justify-content: center; gap: 10px 18px; font-size: 12.5px; }
  .hero-cta{ width: 100%; }
  .hero-cta .btn-primary{ width: 100%; justify-content: center; }

  .by-design{ padding: 72px 0 60px; }
  .by-design-head{ margin-bottom: 48px; }
  .by-design-lead{ font-size: 17px; }
  .by-design-grid{ grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; }
  .design-card{ padding: 22px 20px 20px; min-height: 0; }
  .by-design-strip{ font-size: 10px; letter-spacing: 0.16em; padding: 16px 0; margin-bottom: 40px; }
  .by-design-close{ font-size: 20px; }

  .container{ padding: 0 18px; }

  /* Modal — full-width on phones */
  .modal-backdrop{ padding: 12px; align-items: flex-start; padding-top: 60px; }
  .modal-card{ padding: 28px 22px 24px; border-radius: 14px; }
  .modal-title{ font-size: 22px; }
  .form-row{ grid-template-columns: 1fr; gap: 14px; }
  .form-submit{ width: 100%; align-self: stretch; }

  /* Hamburger trigger size already 44px (touch-friendly) */
  .nav-mobile-link{ font-size: 20px; padding: 12px 4px; }

  /* Touch-target bumps on mobile */
  .modal-close{ width: 44px; height: 44px; top: 10px; right: 10px; }
  .field input,
  .field select,
  .field textarea{ font-size: 16px; /* prevents iOS zoom on focus */ padding: 13px 14px; }

  /* Pilot section CTA full-width on mobile */
  .pilot-cta .btn-primary{ width: 100%; justify-content: center; }
}

/* Tablet polish — 601 to 1020px tweaks */
@media (min-width: 601px) and (max-width: 1020px){
  .by-design-grid{ grid-template-columns: repeat(2, 1fr); }
  .team-grid{ grid-template-columns: repeat(2, 1fr); }
  .team-card:last-child{ grid-column: 1 / -1; max-width: 460px; justify-self: center; }
}
