/*
 * theme.css — MagnetBrains Learning Foundation.
 * Direction: a horseshoe magnet's two poles — a confident magnet red as the
 * action colour and a deep classroom-ink navy as the ground for statements.
 * Warm, trustworthy, school-notebook clear; like Khan Academy's openness with
 * a bolder Indian-print warmth. Opens light.
 */

:root {
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eceff7;
  --border: #dde1ec;
  --border-strong: #b4bbd0;
  --ink: #141a33;
  --muted: #555d78;
  --accent: #c8322a;
  --accent-hover: #a82820;
  --accent-ink: #ffffff;
  --accent-text: #b02a23;
  --accent-strong: #8f201a;
  --accent-soft: #fbe8e6;
  --accent-border: #f0b9b4;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dff0e5;
  --success-strong: #136e35;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f7ead9;
  --warning-strong: #9a4508;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f8e1e1;
  --danger-strong: #9f1818;
  --chart-1: #c8322a;
  --chart-2: #2347c5;
  --chart-3: #b45309;
  --chart-4: #15803d;
  --chart-5: #6b3fa0;
  --chart-6: #0b6e86;

  --x-blue: #2347c5;
  --x-blue-soft: #e4eafc;
  --x-band-bg: #141a33;
  --x-band-ink: #f2f4fb;
  --x-band-muted: #aab3d1;
  --x-band-line: #2c3458;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display-weight: 800;
  --display-tracking: -0.035em;
  --eyebrow-tracking: 0.08em;

  --radius-btn: 999px;
  --radius-card: 1.25rem;
  --radius-input: 0.75rem;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
  --shadow-raised: 0 18px 40px -16px rgba(0, 0, 0, 0.28);
  --card-pad: 1.75rem;
  --btn-weight: 700;
  --measure: 64ch;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0e1324;
  --surface: #161c33;
  --surface-2: #1d2440;
  --border: #2a3256;
  --border-strong: #46507a;
  --ink: #eef1fa;
  --muted: #a3abc7;
  --accent: #ff6b5e;
  --accent-hover: #ff8579;
  --accent-ink: #1b0a08;
  --accent-text: #ff8a7f;
  --accent-strong: #ffb8b0;
  --accent-soft: #3a1d22;
  --accent-border: #6e3238;
  --success: #22a057;
  --success-ink: #06140b;
  --success-soft: #12301f;
  --success-strong: #6fd39a;
  --warning: #d9822b;
  --warning-ink: #1a0d02;
  --warning-soft: #33240f;
  --warning-strong: #f0b46e;
  --danger: #e05252;
  --danger-ink: #1a0505;
  --danger-soft: #3a1719;
  --danger-strong: #f29a9a;
  --chart-1: #ff6b5e;
  --chart-2: #7d9bff;
  --chart-3: #f0b46e;
  --chart-4: #6fd39a;
  --chart-5: #b896e6;
  --chart-6: #5cc6dd;

  --x-blue: #8aa5ff;
  --x-blue-soft: #1c2650;
  --x-band-bg: #070a16;
  --x-band-ink: #eef1fa;
  --x-band-muted: #9aa3c2;
  --x-band-line: #222a4a;
}

/*
 * app.css — MagnetBrains Learning Foundation's own rules: type, bands,
 * the magnet poles, and the few site pieces no primitive covers.
 */

body { font-family: var(--font-body); }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.02;
}
.hero-title { line-height: 0.95; letter-spacing: -0.045em; }

.caps {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
}

/* The two poles of the magnet. */
.pole-red { color: var(--accent-text); }
.pole-blue { color: var(--x-blue); }
.pole-tip { color: var(--muted); }
svg .pole-red { color: var(--accent); }
.band-dark .pole-red, .pole-red-band { color: var(--x-band-ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.12em; text-underline-offset: 0.12em; }
.band-dark svg .pole-red { color: var(--accent); text-decoration: none; }
.band-dark .pole-tip { color: var(--x-band-muted); }

/* Bar */
.nav-link {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.is-active { color: var(--accent-strong); background: var(--accent-soft); }

/* Bands */
.band-tint { background: var(--surface-2); }
.band-dark { background: var(--x-band-bg); color: var(--x-band-ink); }
.band-muted { color: var(--x-band-muted); }
.foot-head { font-weight: 700; color: var(--x-band-ink); }
.foot-link { color: var(--x-band-muted); text-decoration: none; }
.foot-link:hover { color: var(--x-band-ink); text-decoration: underline; }
.foot-rule { border-top: 1px solid var(--x-band-line); }
.btn-band { background: transparent; border-color: var(--x-band-line); color: var(--x-band-ink); }
.btn-band:hover { background: var(--x-band-line); border-color: var(--x-band-muted); }

/* Rows with an icon */
.promise-row { display: flex; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--border); }
.promise-row:first-child { border-top: 0; padding-top: 0; }
.promise-icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 3rem; height: 3rem; border-radius: 1rem;
  background: var(--accent-soft); color: var(--accent-strong);
}
.promise-icon .icon { width: 1.4rem; height: 1.4rem; }

.value-row { display: flex; gap: 1.25rem; }
.value-mark { flex-shrink: 0; padding-top: 0.15rem; }
.value-mark .icon { width: 1.75rem; height: 1.75rem; }

.work-icon {
  display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem; border-radius: 1rem;
  background: var(--x-blue-soft); color: var(--x-blue);
}
.work-icon .icon { width: 1.5rem; height: 1.5rem; }

/* Subjects and stages */
.subject-chip {
  padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: 0.95rem;
}
.stage-tile {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.25rem; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--border);
}
.stage-num { font-family: var(--font-display); font-weight: 800; font-size: 2.25rem; letter-spacing: -0.03em; color: var(--x-blue); line-height: 1; }

/* Careers: roles as an expandable list */
.jobs { border-top: 1px solid var(--border); }
.job { border-bottom: 1px solid var(--border); }
.job-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0; cursor: pointer; list-style: none;
}
.job-head::-webkit-details-marker { display: none; }
.job-head:hover h3 { color: var(--accent-text); }
.job-toggle {
  display: grid; place-items: center; flex-shrink: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--border-strong); transition: transform 200ms, background-color 200ms;
}
.job[open] .job-toggle { transform: rotate(45deg); background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); }
.job-body { padding: 0 0 2rem; max-width: 60ch; }

.apply-form > #apply-result:empty, .contact-form > #contact-result:empty { display: none; }

/* The one moment that moves: the hero photograph settles into place. */
@keyframes settle {
  from { transform: translateY(28px) scale(0.985); }
  to { transform: none; }
}
.hero-photo { animation: settle 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.reduced-motion .hero-photo { animation: none; }
