/* ============================================
   MATH-UP — Design tokens
   Palette extracted directly from the logo file.
   ============================================ */

:root {
  --cream: #FDFEF8;
  --cream-dim: #F2F0E5;
  --ink: #0A0A0A;
  --ink-soft: #3A3A3A;
  --red: #D3300D;
  --red-soft: #B5290B;
  --line: rgba(10, 10, 10, 0.12);

  --display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --max-w: 1140px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

::selection { background: var(--red); color: var(--cream); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================
   Triangle motif — the signature element.
   Reused everywhere a "delta / forward" marker
   is needed, instead of generic bullets/numbers.
   ============================================ */

.tri {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 0.45em solid transparent;
  border-right: 0.45em solid transparent;
  border-top: 0.62em solid var(--red);
  flex-shrink: 0;
}

.tri--up {
  transform: rotate(180deg);
}

.tri--small {
  border-left-width: 0.3em;
  border-right-width: 0.3em;
  border-top-width: 0.42em;
}

/* ============================================
   Layout shell
   ============================================ */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ============================================
   Header / nav
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img {
  height: 38px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a {
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.15s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.2s ease;
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: 100%;
}

.nav a[aria-current="page"] {
  color: var(--red);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: relative;
  z-index: 120;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
}

@media (max-width: 720px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem var(--pad);
    gap: 1.75rem;
    font-size: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--line);
    z-index: 110;
  }
  .nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 90;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--cream);
}

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

.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--on-dark {
  border-color: var(--cream);
  color: var(--cream);
}

.btn--on-dark:hover {
  background: var(--cream);
  color: var(--ink);
}

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

.hero {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  display: block;
  text-align: center;
}

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

.hero .eyebrow {
  justify-content: center;
}

.hero .lede {
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  justify-content: center;
}

.hero .stat-row {
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.hero .stat-row > div {
  text-align: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-soft);
  margin-bottom: 1.25rem;
}

.h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.h1 em {
  font-style: normal;
  color: var(--red);
}

.hero p.lede {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* ============================================
   Section scaffolding
   ============================================ */

section {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.section-divider {
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head .tri {
  transform: translateY(-0.15em);
}

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

.section-kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  display: block;
}

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

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--cream-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
}

.card .tri {
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ============================================
   Dark band (CTA strips, footer)
   ============================================ */

.band-dark {
  background: var(--ink);
  color: var(--cream);
}

.band-dark .ink-soft-on-dark {
  color: rgba(253, 254, 248, 0.65);
}

/* ============================================
   List with triangle markers
   ============================================ */

.tri-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tri-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.tri-list .tri {
  margin-top: 0.45em;
}

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

.footer {
  padding-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.footer-brand img { height: 32px; }

.footer h4 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: rgba(253, 254, 248, 0.55);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-bottom {
  border-top: 1px solid rgba(253, 254, 248, 0.15);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(253, 254, 248, 0.5);
}

/* ============================================
   Page header (non-home pages)
   ============================================ */

.page-header {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 3rem);
}

.page-header .h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

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

.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--red);
  outline: none;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

/* ============================================
   Tutoring flier image
   ============================================ */

.tutoring-flier {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 420px;
  margin: 0 auto;
}

.tutoring-flier img {
  width: 100%;
  display: block;
}

@media (max-width: 860px) {
  .tutoring-flier {
    max-width: 320px;
    margin-bottom: 1rem;
  }
}

/* ============================================
   Video embed
   ============================================ */

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream-dim);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-thumb {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--ink);
  border: none;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.video-thumb__mark {
  display: flex;
  opacity: 0.9;
}

.video-thumb__play {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--red);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-thumb:hover .video-thumb__play {
  transform: scale(1.08);
  background: var(--red-soft);
}

.video-thumb__label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--cream);
}

/* ============================================
   Misc utility
   ============================================ */

.mono { font-family: var(--mono); }
.text-soft { color: var(--ink-soft); }
.text-red { color: var(--red); }
.center { text-align: center; }
.mt-lg { margin-top: clamp(2rem, 4vw, 3rem); }

.stat-row {
  display: flex;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  flex-wrap: wrap;
}

.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--red);
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}
