/* =========================================================
   I-Teach — "Blueprint" design system
   Light, technical, node-and-line. Built from the I-Teach
   wordmark: brand blue + raspberry, geometric sans, no serif.
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  /* brand, sampled from the I-Teach wordmark */
  --brand-blue: #2791d0;
  --brand-blue-deep: #1a6fa4;
  --brand-blue-ink: #12507a;
  --brand-rasp: #cb3a64;
  --brand-rasp-deep: #a92549;

  /* light surfaces */
  --paper: #ffffff;
  --page: #f4f7fb;
  --tint: #e7f1f9;
  --tint-2: #f0f6fb;

  /* navy anchor */
  --navy: #0c2334;
  --navy-2: #123147;
  --navy-line: #21455e;
  --navy-text: #cfdfea;
  --navy-dim: #8fabc0;

  /* text */
  --ink: #0f2433;
  --ink-2: #3d5666;
  --ink-3: #566d7c;
  --line: #d5e3ee;
  --line-soft: #e6eef5;

  /* semantic (light theme default) */
  --bg: var(--page);
  --surface: var(--paper);
  --surface-2: var(--tint-2);
  --band: var(--tint);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);
  --border: var(--line);
  --border-soft: var(--line-soft);
  --primary: var(--brand-blue-deep);
  --primary-bright: var(--brand-blue);
  --accent: var(--brand-rasp);
  --accent-text: var(--brand-rasp-deep);

  /* type */
  --font-display: 'Rubik', 'Assistant', system-ui, sans-serif;
  --font-body: 'Assistant', 'Rubik', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-hero: clamp(2.15rem, 3.9vw, 3.15rem);

  /* space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --radius: 6px;
  --radius-lg: 10px;
  --wrap: 1200px;
  --shadow-card: 0 1px 2px rgba(15, 36, 51, 0.04), 0 8px 24px -16px rgba(15, 36, 51, 0.18);
  --shadow-lift: 0 2px 4px rgba(15, 36, 51, 0.06), 0 18px 40px -22px rgba(18, 80, 122, 0.35);
}

/* dark theme */
html[data-theme='dark'] {
  --bg: #0b1c29;
  --surface: #102a3b;
  --surface-2: #0e2434;
  --band: #0e2635;
  --text: #e8f1f7;
  --text-2: #a9c3d4;
  --text-3: #7d9cb0;
  --border: #1e4159;
  --border-soft: #17334799;
  --primary: #56b0e6;
  --primary-bright: #6cbcea;
  --accent: #ef6f92;
  --accent-text: #f286a4;
  --navy: #071520;
  --navy-2: #0d2432;
  --navy-line: #1c3c52;
  --navy-text: #d3e3ee;
  --navy-dim: #8dabc0;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.35), 0 20px 44px -24px rgba(0, 0, 0, 0.8);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  color: var(--text);
}
p {
  margin: 0;
}
a {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 3px;
  border-radius: 3px;
}
table {
  border-collapse: collapse;
  width: 100%;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section {
  padding-block: var(--space-9);
}
section.band {
  background: var(--band);
}
section.paper {
  background: var(--surface);
}
section.navy {
  background: var(--navy);
  color: var(--navy-text);
}
section.navy h2,
section.navy h3 {
  color: #fff;
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.header[data-stuck='true'] {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 20px -18px rgba(15, 36, 51, 0.5);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand__logo {
  height: 30px;
  width: auto;
}
.brand__rule {
  width: 1px;
  height: 22px;
  background: var(--border);
}
.brand__tag {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  max-width: 13ch;
  line-height: 1.25;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.35vw, 1.5rem);
  margin-inline-start: auto;
}
.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  padding-block: 4px;
  white-space: nowrap;
}
.nav__link:hover {
  color: var(--primary);
  text-decoration: none;
}
.nav__link::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--primary-bright);
  transform: scaleX(0);
  transition: transform 0.22s ease;
}
.nav__link:hover::after {
  transform: scaleX(1);
}
.nav__link--cta {
  display: none;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding-inline: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.icon-btn:hover {
  border-color: var(--primary-bright);
  color: var(--primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.72em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px -16px rgba(18, 80, 122, 0.9);
}
.btn--primary:hover {
  background: var(--brand-blue-ink);
}
html[data-theme='dark'] .btn--primary {
  color: #06202f;
}
.btn--accent {
  background: var(--brand-rasp);
  color: #fff;
  box-shadow: 0 10px 24px -16px rgba(169, 37, 73, 0.9);
}
.btn--accent:hover {
  background: var(--brand-rasp-deep);
}
.btn--outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn--outline:hover {
  border-color: var(--primary-bright);
  color: var(--primary);
}
section.navy .btn--outline {
  border-color: var(--navy-line);
  background: transparent;
  color: #fff;
}
section.navy .btn--outline:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--surface);
  padding-block: var(--space-8) var(--space-9);
  overflow: hidden;
}
.hero::before {
  /* blueprint grid */
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 80% at 70% 0%, #000 0%, transparent 72%);
  opacity: 0.75;
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: var(--space-8);
  align-items: center;
}
.hero__lockup {
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.hero__lockup img {
  width: min(300px, 62vw);
  height: auto;
}
.hero__lockup-note {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 6px;
}
.hero h1 {
  font-size: var(--text-hero);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
  max-width: 22ch;
}
.hero h1 .rasp {
  color: var(--accent-text);
}
.hero h1 .blue {
  color: var(--primary);
}
.hero__sub {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--accent-text);
  margin-bottom: var(--space-5);
  max-width: 34ch;
}
.hero__copy > p:not(.hero__sub):not(.hero__meta) {
  font-size: var(--text-lg);
  color: var(--text-2);
  max-width: 48ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
/* ---------- track switch (K-12 <-> Work) ---------- */
.hero__switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: 0.62rem 1.05rem 0.62rem 1.15rem;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--text-sm);
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hero__switch:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary-bright) 55%, var(--border));
  box-shadow: 0 6px 18px rgba(15, 36, 51, 0.07);
}
.hero__switch strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
}
.hero__switch-chev {
  color: var(--primary);
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.hero__switch:hover .hero__switch-chev {
  color: var(--primary-bright);
}
[dir='rtl'] .hero__switch-chev {
  transform: scaleX(-1);
}
html[data-theme='dark'] .hero__switch:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
@media (max-width: 560px) {
  .hero__switch {
    align-items: flex-start;
    gap: var(--space-2);
    flex-wrap: wrap;
  }
}
.hero__art {
  position: relative;
}
.hero__art img {
  width: 100%;
  border-radius: var(--radius-lg);
}
html[data-theme='dark'] .hero__art img,
html[data-theme='dark'] .figure img {
  filter: invert(1) hue-rotate(180deg) saturate(1.15) brightness(1.05);
}

.hero__meta {
  position: relative;
  margin-top: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-3);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}
.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.hero__meta span::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-bright);
  flex-shrink: 0;
}
.hero__meta span:nth-child(even)::before {
  background: var(--accent);
}

/* ---------- statbar ---------- */
.statbar {
  background: var(--band);
  border-block: 1px solid var(--border);
  padding-block: var(--space-6);
}
.statbar__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}
.statbar__item {
  padding-inline-start: var(--space-4);
  border-inline-start: 3px solid var(--primary-bright);
}
.statbar__item:nth-child(even) {
  border-inline-start-color: var(--accent);
}
.statbar__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}
.statbar__label {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: 2px;
}

/* ---------- section heads ---------- */
.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-7);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-bright) 12%, transparent);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-bright);
  flex-shrink: 0;
}
section.navy .eyebrow {
  color: #7ec4ee;
  background: rgba(126, 196, 238, 0.14);
}
section.navy .eyebrow::before {
  background: #7ec4ee;
}
.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}
.lede {
  font-size: var(--text-lg);
  color: var(--text-2);
}
section.navy .lede,
section.navy p {
  color: var(--navy-text);
}
.rule-node {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.rule-node::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--primary-bright);
  flex-shrink: 0;
}
.rule-node::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--primary-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
[dir='rtl'] .card::before {
  transform-origin: right;
}
.card:nth-child(2)::before {
  background: var(--accent);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--primary-bright) 45%, var(--border));
}
.card:hover::before {
  transform: scaleX(1);
}
.card__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: var(--space-3);
}
.card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}
.card p {
  color: var(--text-2);
  font-size: var(--text-base);
}

/* ---------- pull quote ---------- */
.pull {
  margin: var(--space-8) 0 0;
  padding: var(--space-6) var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius);
}
.pull p {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}
section.navy .pull {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--navy-line);
  border-inline-start-color: #7ec4ee;
}
section.navy .pull p {
  color: #fff;
}

/* ---------- challenge → answer rows ---------- */
.rows {
  margin-top: var(--space-7);
  border-top: 1px solid var(--border);
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) 30px minmax(0, 0.66fr);
  gap: var(--space-4);
  align-items: start;
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.row__problem {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.5;
  color: var(--accent-text);
}
.row__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--primary-bright) 45%, transparent);
  background: color-mix(in srgb, var(--primary-bright) 8%, transparent);
  color: var(--primary);
  font-size: 0.8rem;
  line-height: 1;
  padding-bottom: 1px;
}
.row__answer {
  color: var(--text-2);
  font-size: var(--text-base);
  line-height: 1.62;
}

/* ---------- parameter clusters ---------- */
.clusters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.cluster {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.cluster__head {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-soft);
}
.cluster__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.cluster__sub {
  font-size: var(--text-sm);
  color: var(--text-3);
}
.cluster ul {
  display: grid;
  gap: var(--space-3);
}
.cluster li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.cluster li span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--primary);
  padding-top: 2px;
}
.footnote {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-3);
  max-width: 78ch;
}

/* ---------- flow ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-7);
}
.flow__col h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
section.navy .flow__col h3 {
  border-bottom-color: var(--navy-line);
}
.steps {
  display: grid;
  gap: var(--space-4);
}
.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
  align-items: start;
  font-size: var(--text-base);
  color: var(--text-2);
}
section.navy .steps li {
  color: var(--navy-text);
}
.steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--primary-bright);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
}
section.navy .steps b {
  border-color: #7ec4ee;
  color: #7ec4ee;
}

/* ---------- figure ---------- */
.figure {
  margin-top: var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
section.navy .figure {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--navy-line);
}
.figure img {
  width: 100%;
  border-radius: var(--radius);
}
.figure figcaption {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-3);
}
section.navy .figure figcaption {
  color: var(--navy-dim);
}

/* ---------- tables ---------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-7);
  align-items: start;
}
.grade-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: fixed;
}
.grade-table caption {
  text-align: start;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: var(--space-3);
}
.grade-table th,
.grade-table td {
  padding: 0.78rem var(--space-4);
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}
.grade-table th + th,
.grade-table td + td,
.grade-table th + td {
  border-inline-start: 1px solid var(--border);
}
.grade-table thead th {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.grade-table thead th:first-child {
  color: #0f4c74;
  background: color-mix(in srgb, var(--primary-bright) 10%, transparent);
}
.grade-table thead th:last-child {
  color: #a92549;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
html[data-theme='dark'] .grade-table thead th:first-child {
  color: #9ad4f7;
}
html[data-theme='dark'] .grade-table thead th:last-child {
  color: #f4a7bd;
}
.grade-table tbody th {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
}
.grade-table tbody td {
  color: var(--text-3);
}
.grade-table tbody tr:last-child th,
.grade-table tbody tr:last-child td {
  border-bottom: 0;
}
.grade-table tbody tr:nth-child(even) {
  background: var(--surface-2);
}
.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}
.muted {
  color: var(--text-3);
  font-weight: 400;
}
.bar {
  height: 7px;
  background: var(--border-soft);
  border-radius: 999px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--primary-bright);
  border-radius: 999px;
}
.bar i.alt {
  background: var(--accent);
  opacity: 0.75;
}
.legend {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-3);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.legend i {
  width: 12px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary-bright);
}
.legend i.alt {
  background: var(--accent);
  opacity: 0.75;
}

/* ---------- metrics ---------- */
.metrics {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.metric__num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--primary);
  line-height: 1;
}
.metric:nth-child(even) .metric__num {
  color: var(--accent-text);
}
.metric__num .small {
  font-size: var(--text-lg);
}
.metric__label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-top: var(--space-3);
}
.metric__note {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: var(--space-2);
}

/* ---------- proofs ---------- */
.proofs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.proof {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.proof:hover {
  transform: translateY(-3px);
  border-color: #7ec4ee;
}
.proof__tag {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ec4ee;
  margin-bottom: var(--space-3);
}
.proof:nth-child(even) .proof__tag {
  color: #f4899f;
}
.proof h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.proof p {
  font-size: var(--text-sm);
  color: var(--navy-text);
}
.proof a {
  color: #7ec4ee;
}
.stamp {
  margin-top: var(--space-7);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: #7ec4ee;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.stamp::before {
  content: '';
  width: 26px;
  height: 2px;
  background: #f4899f;
  flex-shrink: 0;
}

/* ---------- plain list ---------- */
.list-plain {
  display: grid;
  gap: var(--space-5);
}
.list-plain li {
  padding-inline-start: var(--space-5);
  border-inline-start: 2px solid var(--border);
}
.list-plain li:nth-child(odd) {
  border-inline-start-color: color-mix(in srgb, var(--primary-bright) 55%, transparent);
}
.list-plain li:nth-child(even) {
  border-inline-start-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.list-plain strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.list-plain p {
  font-size: var(--text-base);
  color: var(--text-2);
}
.notice {
  margin-top: var(--space-7);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-2);
}
.notice strong {
  color: var(--accent-text);
}

/* ---------- audiences ---------- */
.audiences {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
.audience {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.audience__icon {
  color: var(--primary);
  margin-bottom: var(--space-4);
}
.audience:nth-child(2) .audience__icon {
  color: var(--accent-text);
}
.audience h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.audience p {
  font-size: var(--text-base);
  color: var(--text-2);
}

/* ---------- team ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}
.person {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.person__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}
.person__role {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-block: 2px var(--space-3);
}
.person:nth-child(even) .person__role {
  color: var(--accent-text);
}
.person p:last-child {
  font-size: var(--text-sm);
  color: var(--text-2);
}

/* ---------- contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-8);
  align-items: start;
}
.contact h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-4);
}
.contact-list {
  display: grid;
  gap: var(--space-5);
}
.contact-list li {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--navy-line);
  font-size: var(--text-sm);
  color: var(--navy-text);
}
.contact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.contact-list span {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7ec4ee;
  margin-bottom: var(--space-2);
}
.contact-list a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}


/* inline links inside body copy: not colour-only (WCAG 1.4.1) */
.card p a,
.proof p a,
.audience p a,
.row__answer a,
.list-plain a,
.footnote a,
.notice a,
.lede a,
.steps a,
.vid__note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- footer ---------- */
.footer {
  background: var(--navy-2);
  color: var(--navy-dim);
  border-top: 1px solid var(--navy-line);
  padding-block: var(--space-6);
  font-size: var(--text-sm);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  align-items: center;
  justify-content: space-between;
}
.footer img {
  height: 22px;
  width: auto;
}
.footer a {
  color: var(--navy-text);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .card:hover,
  .proof:hover,
  .hero__switch:hover {
    transform: none;
  }
}

/* ---------- Hebrew / RTL ---------- */
[lang='he'] {
  --font-display: 'Rubik', 'Assistant', system-ui, sans-serif;
  --font-body: 'Assistant', 'Rubik', system-ui, sans-serif;
}
[lang='he'] h1,
[lang='he'] h2,
[lang='he'] h3 {
  letter-spacing: 0;
  line-height: 1.2;
}
[lang='he'] .hero h1 {
  letter-spacing: -0.01em;
}
[lang='he'] .eyebrow,
[lang='he'] .proof__tag,
[lang='he'] .person__role,
[lang='he'] .contact-list span,
[lang='he'] .hero__lockup-note {
  letter-spacing: 0.04em;
}
[dir='rtl'] .row__arrow {
  transform: scaleX(-1);
}
html[data-theme='dark'] .row__arrow {
  color: #8fd0f5;
}
[dir='rtl'] .hero::before {
  mask-image: radial-gradient(120% 80% at 30% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 80% at 30% 0%, #000 0%, transparent 72%);
}

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .hero__copy {
    order: 1;
  }
  .hero__art {
    order: 2;
  }
  .statbar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5) var(--space-6);
  }
  .cards,
  .clusters,
  .proofs,
  .audiences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split,
  .contact,
  .flow {
    grid-template-columns: 1fr;
  }
  .brand__rule,
  .brand__tag {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px -28px rgba(15, 36, 51, 0.6);
    padding: var(--space-2) var(--space-6) var(--space-5);
    display: none;
  }
  .nav[data-open='true'] {
    display: flex;
  }
  .nav__link {
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--border-soft);
    font-size: var(--text-base);
  }
  .nav__link--cta {
    display: block;
    color: var(--primary);
    font-weight: 600;
  }
  .nav__link:last-child {
    border-bottom: 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .header__tools .btn--primary {
    display: none;
  }
  .header__inner {
    justify-content: space-between;
  }
  .header__tools {
    margin-inline-start: auto;
  }
  section {
    padding-block: var(--space-8);
  }
  .section-title,
  .contact h2 {
    font-size: var(--text-2xl);
  }
  .row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .row__arrow {
    display: none;
  }
  .row__answer {
    font-size: var(--text-sm);
  }
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .wrap {
    padding-inline: var(--space-5);
  }
  .cards,
  .clusters,
  .proofs,
  .audiences,
  .metrics,
  .team,
  .statbar__grid {
    grid-template-columns: 1fr;
  }
  .hero__lockup img {
    width: min(250px, 72vw);
  }
  .pull {
    padding: var(--space-5);
  }
  .pull p {
    font-size: var(--text-xl);
  }
  .grade-table {
    font-size: var(--text-xs);
  }
  .grade-table th,
  .grade-table td {
    padding: 0.55rem var(--space-3);
  }
}

/* ---------- small-screen refinements ---------- */
@media (max-width: 900px) {
  .brand__logo {
    height: 24px;
  }
  .hero::before {
    background-size: 34px 34px;
    opacity: 0.45;
    mask-image: radial-gradient(110% 55% at 50% 0%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(110% 55% at 50% 0%, #000 0%, transparent 78%);
  }
  .hero__sub {
    font-size: var(--text-lg);
  }
}

/* ---------- logo light/dark variants ---------- */
.logo-dark {
  display: none;
}
html[data-theme='dark'] .logo-light {
  display: none;
}
html[data-theme='dark'] .logo-dark {
  display: block;
}
html[data-theme='dark'] .hero__lockup img.logo-dark {
  filter: none;
}

/* footer sits on navy in both themes: always use the light-tagline mark */
.footer .logo-light {
  display: none;
}
.footer .logo-dark {
  display: block;
}
html[data-theme='dark'] .brand__logo.logo-dark {
  display: block;
}


/* ---------- accessibility ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: var(--space-5);
  top: -60px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.65em 1.2em;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 0;
  text-decoration: none;
}
.a11y-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.a11y-link svg {
  flex-shrink: 0;
}

/* legal / statement pages */
.doc {
  background: var(--surface);
  padding-block: var(--space-8) var(--space-9);
}
.doc__wrap {
  max-width: 78ch;
}
.doc h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}
.doc h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}
.doc p,
.doc li {
  color: var(--text-2);
  margin-bottom: var(--space-3);
}
.doc ul {
  list-style: disc;
  padding-inline-start: 1.4em;
  margin-bottom: var(--space-4);
}
.doc__meta {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* underline inline links inside prose so they don't rely on colour alone */
.doc p a,
.doc li a,
.notice a,
.footnote a,
.grade-table caption a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc .eyebrow,
.eyebrow {
  font-weight: 600;
  color: var(--brand-blue-ink);
}
html[data-theme='dark'] .eyebrow {
  color: #8ccdf2;
}

/* ---------- video section ---------- */
.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 900px) {
  .videos {
    grid-template-columns: 1fr;
  }
}
.vid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.vid__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c2334;
}
.vid__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.vid__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
  display: block;
}
.vid__play img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
}
.vid__play::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 35, 52, 0.42),
    rgba(12, 35, 52, 0.12) 45%,
    rgba(12, 35, 52, 0.28)
  );
  transition: opacity 0.3s var(--ease);
}
.vid__badge {
  position: absolute;
  z-index: 2;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(50%, -50%);
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(12, 35, 52, 0.4);
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease);
}
[dir='ltr'] .vid__badge {
  transform: translate(-50%, -50%);
}
.vid__badge svg {
  width: 17px;
  height: 19px;
  flex-shrink: 0;
  fill: var(--primary);
  margin-inline-start: 3px;
}
.vid__play:hover img,
.vid__play:focus-visible img {
  transform: scale(1.03);
}
.vid__play:hover .vid__badge {
  background: var(--primary);
  transform: translate(50%, -50%) scale(1.08);
}
[dir='ltr'] .vid__play:hover .vid__badge {
  transform: translate(-50%, -50%) scale(1.08);
}
.vid__play:hover .vid__badge svg {
  fill: #fff;
}
.vid__play:focus-visible {
  outline: 3px solid var(--primary-bright);
  outline-offset: -4px;
}
@media (prefers-reduced-motion: reduce) {
  .vid__play:hover .vid__badge {
    transform: translate(50%, -50%);
  }
  [dir='ltr'] .vid__play:hover .vid__badge {
    transform: translate(-50%, -50%);
  }
}
.vid__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}
.vid__note {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.55;
}
.vid__meta {
  font-size: var(--text-xs);
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
@media (prefers-reduced-motion: reduce) {
  .vid__play img {
    transition: none;
  }
}
