/* ==========================================================================
   Slate & Syntax — colors and type taken from the logo
   ========================================================================== */

:root {
  /* Logo palette */
  --bg: #0d1218;
  --bg-deep: #0a0d11;
  --bg-raised: #161e27;
  --bg-raised-2: #1c2631;
  --cream: #f7f1e1;
  --cream-muted: #cfc8b6;
  --cream-faint: rgba(247, 241, 225, 0.12);
  --slate: #4f7fae;
  --slate-light: #8db4dc;
  --olive: #6f8c3c;
  --olive-light: #a9c46e;
  --amber-glow: rgba(196, 130, 60, 0.18);
  --outline: #05080b;

  /* Type */
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --container: 1120px;
  --gutter: 16px;
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 68px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream-muted);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img { height: auto; }

h1, h2, h3 {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.1;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--slate-light);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 760px; }

.amp { color: var(--slate); }

.nowrap { white-space: nowrap; }

@media (max-width: 520px) {
  .nowrap { white-space: normal; }
}

.code {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cream);
  color: var(--bg);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 18, 24, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-faint);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark-mark {
  width: 38px;
  height: 30px;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--cream-muted);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: color 160ms ease, background-color 160ms ease;
}

.site-nav a[aria-current="true"] {
  color: var(--cream);
  background: var(--cream-faint);
}

@media (hover: hover) {
  .site-nav a:hover {
    color: var(--cream);
    background: var(--cream-faint);
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--cream-faint);
  border-radius: 12px;
  color: var(--cream);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms var(--ease-out), opacity 150ms ease;
}

.nav-toggle-bars { position: relative; }

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--cream-faint);
    display: none;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul { flex-direction: column; }

  .site-nav a {
    padding: 12px 14px;
    font-size: 1.1rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 40px 0 72px;
  text-align: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 -20%;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 40% at 50% 28%, var(--amber-glow), transparent 70%),
    radial-gradient(ellipse 60% 25% at 50% 72%, rgba(79, 127, 174, 0.1), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(22, 30, 39, 0.8);
  border: 1px solid var(--cream-faint);
  border-radius: 999px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive-light);
  box-shadow: 0 0 0 3px rgba(169, 196, 110, 0.2);
}

.hero-logo {
  width: min(100%, 760px);
  margin-top: 8px;
}

.hero-logo img {
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}

.hero-title {
  margin-top: 4px;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.br-wide { display: none; }

@media (min-width: 720px) {
  .br-wide { display: inline; }
}

.hero-lede {
  max-width: 620px;
  margin-top: 20px;
  font-size: 1.15rem;
}

.hero-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 620px);
  margin-top: 36px;
}

@media (max-width: 520px) {
  .hero-paths { grid-template-columns: 1fr; }
}

.path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 18px 20px;
  text-align: left;
  text-decoration: none;
  background: var(--bg-raised);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--cream-faint), 0 6px 0 var(--outline);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.path:active {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 1px var(--cream-faint), 0 3px 0 var(--outline);
}

@media (hover: hover) {
  .path:hover { transform: translateY(-2px); }
}

.path-kicker {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
}

.path-olive .path-kicker { color: var(--olive-light); }
.path-slate .path-kicker { color: var(--slate-light); }

.path-olive { border-top: 6px solid var(--olive); }
.path-slate { border-top: 6px solid var(--slate); }

.path-title {
  color: var(--cream);
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cream-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow .code {
  color: var(--slate-light);
  font-size: 0.95rem;
}

.eyebrow-olive { color: var(--olive-light); }
.eyebrow-slate { color: var(--slate-light); }

.section-title {
  font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-title-center { text-align: center; }

.lede {
  margin-top: 18px;
  font-size: 1.15rem;
}

.divider {
  width: 100%;
  max-width: var(--container);
  height: 1px;
  margin: 0 auto;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--cream-faint) 20%, var(--cream-faint) 80%, transparent);
}

/* ---------- About ---------- */

.about { text-align: center; }

.about .section-title {
  max-width: 820px;
  margin-inline: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  text-align: left;
}

.about-card {
  height: 100%;
  padding: 28px;
  background: var(--bg-raised);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--cream-faint);
}

.about-card h3 {
  margin-bottom: 10px;
  font-size: 2rem;
  font-weight: 900;
}

.about-slate { border-left: 6px solid var(--olive); }
.about-slate h3 { color: var(--olive-light); }

.about-syntax { border-left: 6px solid var(--slate); }
.about-syntax h3 { color: var(--slate-light); }

.about-amp {
  color: var(--slate);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4.5rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .about-amp {
    text-align: center;
    font-size: 3rem;
  }
}

/* ---------- People ---------- */

.person { position: relative; }

.person-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 56px;
}

.person-grid-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.person-grid-flip .portrait { order: 2; }

.portrait {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  aspect-ratio: 4 / 5;
  padding: 32px 24px 0;
  overflow: hidden;
  border: 2px solid var(--outline);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px var(--cream-faint), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.portrait picture,
.portrait img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
}

/* A lighter halo so the dark cartoon outlines (and Zardon's black shirt) read clearly */
.person-olive .portrait {
  background:
    radial-gradient(circle at 50% 38%, rgba(247, 241, 225, 0.22), transparent 62%),
    radial-gradient(circle at 50% 100%, rgba(111, 140, 60, 0.55), transparent 70%),
    #24301a;
}

.person-slate .portrait {
  background:
    radial-gradient(circle at 50% 36%, rgba(247, 241, 225, 0.24), transparent 62%),
    radial-gradient(circle at 50% 100%, rgba(79, 127, 174, 0.6), transparent 70%),
    #1d2c3c;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--cream);
  font-weight: 600;
}

.location svg {
  width: 18px;
  height: 18px;
}

.person-olive .location svg { color: var(--olive-light); }
.person-slate .location svg { color: var(--slate-light); }

.cards {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 20px 22px;
  background: var(--bg-raised);
  border: 2px solid var(--outline);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--cream-faint);
}

.person-olive .card { border-left: 5px solid var(--olive); }
.person-slate .card { border-left: 5px solid var(--slate); }

.card h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.subjects { margin-top: 32px; }

.subjects-title {
  margin-bottom: 14px;
  font-size: 1.25rem;
  font-weight: 800;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 7px 14px;
  color: var(--cream);
  font-weight: 600;
  background: rgba(111, 140, 60, 0.16);
  border: 1px solid rgba(169, 196, 110, 0.4);
  border-radius: 999px;
}

.chip-note {
  color: var(--olive-light);
  font-weight: 400;
}

.pullquote {
  margin: 32px 0 0;
  padding: 4px 0 4px 22px;
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.45;
  border-left: 4px solid var(--olive);
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.flow-step {
  padding: 8px 14px;
  color: var(--cream);
  background: var(--bg-raised-2);
  border: 1px solid var(--cream-faint);
  border-radius: 8px;
}

.flow-step-accent {
  background: var(--slate);
  border-color: var(--slate);
  color: #fff;
}

.flow-arrow {
  color: var(--slate-light);
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 860px) {
  .person-grid,
  .person-grid-flip {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .person-grid-flip .portrait { order: 0; }

  .portrait {
    position: relative;
    top: 0;
    width: min(100%, 360px);
    margin-inline: auto;
  }
}

/* ---------- Referrals ---------- */

.referrals { text-align: center; }

.referrals .section-title {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem);
  font-weight: 900;
}

.note {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  padding: 22px 24px;
  text-align: left;
  background: var(--bg-raised);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--cream-faint), 0 0 0 6px rgba(196, 130, 60, 0.08);
}

.note strong {
  display: block;
  color: var(--cream);
  font-size: 1.1rem;
}

.note-mark {
  flex: none;
  width: 64px;
  height: 50px;
}

@media (max-width: 480px) {
  .note {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Areas ---------- */

.areas { padding-top: 24px; }

.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 36px auto 0;
}

@media (max-width: 600px) {
  .areas-grid { grid-template-columns: 1fr; }
}

.area {
  padding: 28px 24px;
  text-align: center;
  background: var(--bg-raised);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--cream-faint);
}

.area svg {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
}

.area-olive { border-bottom: 6px solid var(--olive); }
.area-olive svg,
.area-olive .area-kicker { color: var(--olive-light); }

.area-slate { border-bottom: 6px solid var(--slate); }
.area-slate svg,
.area-slate .area-kicker { color: var(--slate-light); }

.area-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.area-place {
  margin-top: 4px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.area-note {
  margin-top: 6px;
  font-size: 0.98rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0 40px;
  background: var(--bg-deep);
  border-top: 1px solid var(--cream-faint);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-mark {
  width: 56px;
  height: 44px;
}

.footer-name {
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
}

.footer-meta { font-size: 0.92rem; }

/* ---------- Reveal on scroll (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .path,
  .site-nav a,
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { transition: none; }
}
