/* ==========================================================================
   CBA NHS — Student Success
   --------------------------------------------------------------------------
   HOW TO REBRAND THIS SITE
   --------------------------------------------------------------------------
   Everything visual is driven by the custom properties in the :root block
   directly below. To apply real school branding, change ONLY the values in
   that block. Do not edit the component rules further down — they all read
   from these variables, so a brand change is a handful of lines, not a
   rewrite.

   The three things you will most likely want to change:
     --color-primary     the dominant brand color (headers, buttons, links)
     --color-accent      the secondary/highlight color
     --font-heading      the typeface for headings
     --font-body         the typeface for body text

   Fonts are currently system font stacks, which means zero network requests
   and instant rendering. If you swap in a webfont (Google Fonts, etc.),
   remember to also add the <link> tag in src/_includes/layouts/base.njk.
   ========================================================================== */

:root {
  /* ---- Brand colors ---------------------------------------------------
     The next two values are the school's OFFICIAL brand colors, confirmed by
     the chapter. They are spec — see BRAND.md. Do not "correct" them against
     logo.png; eyedropping that raster gives #912d2e / #c3ab69, which is drift,
     not a more accurate reading.

     Every other color on this site derives from these two. */
  --color-primary: #914544; /* CBA burgundy — SPEC */
  --color-accent: #ab9a71; /* CBA gold — SPEC */

  /* Derived tints and shades. These are implementation, not brand: adjust
     them if a real need appears, but do not let an adjustment drag the two
     spec values above along with it. */
  --color-primary-dark: #6d3332; /* darker burgundy — footers, hover states */
  --color-primary-light: #a85e5d;
  --color-primary-pale: #f7eeed; /* faint burgundy wash */

  --color-accent-dark: #8a7b57;
  --color-accent-pale: #f6f2e8;

  /* Gold is too light to read as text on white (2.8:1) OR on burgundy
     (2.4:1) — both fail WCAG AA. Use --color-accent for decorative fills,
     borders, and dots only. For gold TEXT on a dark burgundy background,
     use this lightened tint instead, which clears AA at 4.9:1. */
  --color-accent-on-dark: #e8dcc0;

  /* ---- Neutrals -------------------------------------------------------
     Warm, paper-like neutrals rather than cool grays — they sit far better
     next to burgundy and gold than blue-tinted grays do. */
  --color-ink: #241c1b; /* primary body text */
  --color-ink-soft: #5c4f4d; /* secondary text */
  --color-ink-faint: #8a7b78; /* captions, meta */
  --color-surface: #ffffff; /* card / panel background */
  --color-canvas: #fdfaf6; /* page background — warm off-white */
  --color-canvas-alt: #f6f0e8; /* alternating section background — cream */
  --color-border: #e8ded3;
  --color-border-strong: #d3c4b5;

  /* ---- Status colors ------------------------------------------------- */
  --color-success: #14713d;
  --color-success-pale: #e7f6ed;
  --color-error: #b3261e;
  --color-error-pale: #fdecea;
  --color-warning: #8a5a00;
  --color-warning-pale: #fff6e0;

  /* ---- Typography ---------------------------------------------------- */
  --font-heading: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale — grows smoothly between phone and desktop. */
  --text-xs: 0.78rem;
  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.08rem + 0.22vw, 1.25rem);
  --text-xl: clamp(1.3rem, 1.2rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.55rem, 1.35rem + 0.9vw, 2rem);
  --text-3xl: clamp(1.9rem, 1.55rem + 1.6vw, 2.75rem);
  --text-4xl: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);

  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.65;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-wide: 0.02em;
  --tracking-caps: 0.09em;

  /* ---- Spacing scale ------------------------------------------------- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Vertical rhythm between major page sections — fluid. */
  --section-gap: clamp(3rem, 2rem + 5vw, 6rem);

  /* ---- Layout -------------------------------------------------------- */
  --container-max: 1180px;
  --container-narrow: 760px;
  --container-pad: clamp(1.125rem, 0.7rem + 2vw, 2.5rem);

  /* ---- Shape and depth ----------------------------------------------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(22, 32, 46, 0.06),
    0 1px 3px rgba(22, 32, 46, 0.05);
  --shadow-md: 0 2px 4px rgba(22, 32, 46, 0.05),
    0 6px 16px rgba(22, 32, 46, 0.07);
  --shadow-lg: 0 4px 8px rgba(22, 32, 46, 0.05),
    0 16px 40px rgba(22, 32, 46, 0.1);

  /* ---- Motion -------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-fast: 130ms;
  --duration: 220ms;
  --duration-slow: 420ms;

  /* ---- Per-program accent -------------------------------------------
     Overridden inline on the <body> of a program page from that program's
     accent_color field in the CMS. Defaults to the brand primary. */
  --color-program-accent: var(--color-primary);
  --color-program-accent-rgb: 145, 69, 68;
}

/* ==========================================================================
   Base / reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-sm);
  text-wrap: balance;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-sm);
  text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration-color: rgba(145, 69, 68, 0.35);
  text-underline-offset: 0.18em;
  transition: color var(--duration-fast) var(--ease),
    text-decoration-color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--color-primary-light);
  text-decoration-color: currentColor;
}

img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  margin: 0 0 var(--space-sm);
  padding-left: 1.35em;
}

li { margin-bottom: var(--space-3xs); }

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

strong { font-weight: 650; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-canvas-alt);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

/* Visible focus for keyboard users — accessibility requirement, do not remove. */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Screen-reader-only text. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 200;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

.container--narrow { max-width: var(--container-narrow); }

.site-main {
  flex: 1 0 auto;
  width: 100%;
}

.section {
  padding-block: var(--section-gap);
}

.section--tight { padding-block: calc(var(--section-gap) * 0.6); }

.section--alt { background: var(--color-canvas-alt); }

.section--surface {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.section__header {
  max-width: 62ch;
  margin-bottom: var(--space-xl);
}

.section__header--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-program-accent);
  margin-bottom: var(--space-2xs);
}

.lede {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-ink-soft);
}

/* Rich text coming out of the markdown filter. */
.prose { max-width: 68ch; }

/* Centered variant, for short intro copy that sits under a centered heading. */
.prose--center {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--space-xl); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--space-lg); }
.prose ul,
.prose ol { margin-bottom: var(--space-md); }
.prose blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--color-program-accent);
  background: var(--color-canvas-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-ink-soft);
  font-style: italic;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.2;
  padding: 0.8em 1.75em;
  /* Fully rounded, per the brand mockup. */
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    transform var(--duration-fast) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--color-program-accent);
  border-color: var(--color-program-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-primary-dark);
}

.btn--secondary:hover {
  border-color: var(--color-program-accent);
  color: var(--color-program-accent);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn--large {
  font-size: var(--text-lg);
  padding: 0.85em 1.9em;
}

.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* ==========================================================================
   Site header + navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  text-decoration: none;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: 650;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  flex-shrink: 0;
}

.brand:hover { color: var(--color-primary); }

/* Sized to work for both the placeholder SVG shield and a real logo file
   dropped in as an <img> with the same class. */
.brand__mark {
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand__text { display: flex; flex-direction: column; }

.brand__sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--color-ink-faint);
  text-transform: uppercase;
}

/* --- Mobile menu toggle --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-primary-dark);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--duration) var(--ease),
    opacity var(--duration-fast) var(--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);
}

/* --- Nav list --- */
.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3xs);
}

.nav__link {
  display: block;
  padding: 0.55em 0.85em;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--color-ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.nav__link:hover {
  background: var(--color-primary-pale);
  color: var(--color-primary-dark);
}

.nav__link[aria-current="page"] {
  color: var(--color-primary-dark);
  font-weight: 650;
  background: var(--color-primary-pale);
}

.nav__link--cta {
  margin-left: var(--space-2xs);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.nav__link--cta:hover,
.nav__link--cta[aria-current="page"] {
  background: var(--color-primary-dark);
  color: #fff;
}

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

/* --------------------------------------------------------------------------
   Hero — warm cream, centered, per the brand mockup.

   Deliberately light rather than a dark colour block: burgundy and gold are
   both saturated, and a full-bleed dark band of either fights the logo. The
   dark anchors on this site are the stats band and the footer instead.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(
    170deg,
    var(--color-canvas-alt) 0%,
    #faf3ea 45%,
    var(--color-canvas) 100%
  );
  border-bottom: 1px solid var(--color-border);
  color: var(--color-ink);
  padding-block: clamp(3.5rem, 2rem + 8vw, 6.5rem);
  text-align: center;
}

/* Very soft brand-tinted wash — decorative only. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
      ellipse at 78% 10%,
      rgba(var(--color-program-accent-rgb), 0.07) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 15% 95%,
      rgba(171, 154, 113, 0.16) 0%,
      transparent 55%
    );
}

.hero__inner {
  position: relative;
  max-width: 46rem;
  margin-inline: auto;
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.hero__title {
  color: var(--color-ink);
  margin-bottom: var(--space-md);
}

.hero__text {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-ink-soft);
  margin-bottom: var(--space-lg);
  max-width: 36rem;
  margin-inline: auto;
}

.hero .btn-group { justify-content: center; }

/* On the light hero, the secondary button is gold-outlined rather than the
   default gray, matching the mockup. */
.hero .btn--ghost {
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-ink);
}

.hero .btn--ghost:hover {
  background: var(--color-accent-pale);
  border-color: var(--color-accent-dark);
  color: var(--color-primary-dark);
}

/* Compact hero variant for interior pages. */
.page-hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-block: clamp(2.25rem, 1.5rem + 4vw, 4rem);
}

.page-hero__inner { max-width: 52rem; }

.page-hero__title { margin-bottom: var(--space-xs); }

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin-top: var(--space-md);
}

/* ==========================================================================
   Pills / tags
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0.75em;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  background: var(--color-canvas-alt);
  color: var(--color-ink-soft);
  border: 1px solid var(--color-border);
}

.pill--accent {
  background: rgba(var(--color-program-accent-rgb), 0.09);
  color: var(--color-program-accent);
  border-color: rgba(var(--color-program-accent-rgb), 0.22);
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}

.pill-list li { margin: 0; }

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2xs);
}

.card__text {
  color: var(--color-ink-soft);
  margin-bottom: 0;
}

/* A card that is itself a link. */
.card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.card--link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--color-program-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.card--link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
}

.card--link:hover::after { transform: scaleX(1); }

.card__cue {
  margin-top: var(--space-md);
  font-weight: 650;
  font-size: var(--text-sm);
  color: var(--color-program-accent);
}

.card--link:hover .card__cue { color: var(--color-primary-dark); }

/* Generic responsive grid used for cards, pillars, officers. */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
}

.grid--tight { gap: var(--space-sm); }

/* ==========================================================================
   Pillars (About page)
   ========================================================================== */

.pillar {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + 0.5rem);
}

.pillar__number {
  position: absolute;
  top: calc(var(--space-lg) - 0.35rem);
  right: var(--space-lg);
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  line-height: 1;
  font-weight: 700;
  color: var(--color-canvas-alt);
  user-select: none;
}

.pillar__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2xs);
  position: relative;
}

.pillar__text {
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  margin-bottom: 0;
  position: relative;
}

/* ==========================================================================
   Officer / contact list
   ========================================================================== */

.officer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-program-accent);
}

.officer__role {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-program-accent);
}

.officer__name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.contact-panel {
  background: var(--color-primary-pale);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.contact-panel__email {
  font-family: var(--font-heading);
  /* Sized down from the old --text-xl: a long address wrapped mid-word in the
     two-column tablet layout. Breaks only when it genuinely has to. */
  font-size: var(--text-lg);
  font-weight: 650;
  line-height: var(--leading-snug);
  overflow-wrap: anywhere;
  hyphens: none;
}

/* ==========================================================================
   Procedures (split by audience)
   ========================================================================== */

.procedures {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  align-items: start;
}

.procedure-track {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.procedure-track__header {
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.procedure-track__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3xs);
}

.procedure-track__sub {
  font-size: var(--text-sm);
  color: var(--color-ink-faint);
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps__item {
  position: relative;
  counter-increment: step;
  padding-left: 3rem;
  padding-bottom: var(--space-md);
  margin-bottom: 0;
}

.steps__item:last-child { padding-bottom: 0; }

/* Numbered circle marker. */
.steps__item::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--color-program-accent-rgb), 0.1);
  color: var(--color-program-accent);
  border: 1.5px solid rgba(var(--color-program-accent-rgb), 0.28);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
}

/* Connecting line between steps. */
.steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.25rem;
  bottom: 0.35rem;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(var(--color-program-accent-rgb), 0.25),
    rgba(var(--color-program-accent-rgb), 0.05)
  );
}

.steps__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 650;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-3xs);
  padding-top: 0.2rem;
}

.steps__detail {
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  margin: 0;
}

/* ==========================================================================
   "Confirm with advisor" placeholder marker
   --------------------------------------------------------------------------
   Deliberately loud. Every one of these is a spot where real, advisor-approved
   wording has to replace invented detail before launch. Search the repo for
   "CONFIRM WITH ADVISOR" to find them all.
   ========================================================================== */

.confirm-flag {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4em;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-sm);
  background: var(--color-warning-pale);
  border: 1px dashed var(--color-warning);
  color: var(--color-warning);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.4;
}

.confirm-note {
  display: block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-warning-pale);
  border: 1px dashed var(--color-warning);
  color: var(--color-warning);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

/* ==========================================================================
   Roster
   ========================================================================== */

.roster {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.tutor-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.tutor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tutor-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

/* Initials avatar — no photos of minors are published on this site. */
.tutor-card__initials {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(var(--color-program-accent-rgb), 0.12);
  color: var(--color-program-accent);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
}

.tutor-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.tutor-card__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.tutor-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-ink-faint);
}

.tutor-card__value {
  font-size: var(--text-sm);
  color: var(--color-ink-soft);
}

/* ==========================================================================
   Stats ("braggable" section)
   ========================================================================== */

.stats {
  background: linear-gradient(
    145deg,
    var(--color-primary-dark),
    var(--color-primary)
  );
  color: #fff;
}

.stats__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  /* The lightened gold, not the brand gold — brand gold on burgundy is
     only 2.4:1 and would fail contrast. */
  color: var(--color-accent-on-dark);
  /* Stops the layout shifting as digits count up. */
  font-variant-numeric: tabular-nums;
}

.stat__label {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: rgba(255, 255, 255, 0.86);
}

.stats .section__header { margin-inline: auto; text-align: center; }
.stats h2 { color: #fff; }
.stats .lede { color: rgba(255, 255, 255, 0.85); }

/* ==========================================================================
   Callout / CTA band
   ========================================================================== */

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-program-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.callout__body { flex: 1 1 22rem; }

.callout__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3xs);
}

.callout__text {
  color: var(--color-ink-soft);
  margin: 0;
}

/* ==========================================================================
   Form
   ========================================================================== */

.form-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.field { display: flex; flex-direction: column; gap: var(--space-3xs); }

.field--full { grid-column: 1 / -1; }

.field__label {
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-primary-dark);
}

.field__required {
  color: var(--color-error);
  margin-left: 0.15em;
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--color-ink-faint);
  line-height: var(--leading-snug);
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  font-family: var(--font-body);
  /* 16px minimum stops iOS Safari zooming in when a field is focused. */
  font-size: 16px;
  color: var(--color-ink);
  background: var(--color-surface);
  padding: 0.7em 0.85em;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field__textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: var(--leading-normal);
}

.field__select {
  /* Custom chevron so the control matches across browsers. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8em center;
  background-size: 1em;
  padding-right: 2.4em;
}

.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--color-program-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-program-accent-rgb), 0.15);
}

/* Invalid state — only applied after a submit attempt, via .is-invalid. */
.field.is-invalid .field__input,
.field.is-invalid .field__select,
.field.is-invalid .field__textarea {
  border-color: var(--color-error);
}

.field.is-invalid .field__input:focus,
.field.is-invalid .field__select:focus,
.field.is-invalid .field__textarea:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}

.field__error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-error);
  min-height: 1em;
}

.field__error:empty { display: none; }

/* Honeypot — hidden from humans, visible to naive bots that fill everything.
   Uses position/opacity rather than display:none, because some bots skip
   display:none fields specifically. Also removed from the tab order and the
   accessibility tree. */
.honeypot {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-consent {
  font-size: var(--text-xs);
  color: var(--color-ink-faint);
  line-height: var(--leading-snug);
  margin-top: var(--space-sm);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* --- Form status messages --- */
.form-status {
  display: none;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.form-status.is-visible { display: block; }

.form-status--success {
  background: var(--color-success-pale);
  border: 1px solid var(--color-success);
  color: var(--color-success);
}

.form-status--error {
  background: var(--color-error-pale);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

.form-status__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 650;
  color: inherit;
  margin-bottom: var(--space-3xs);
}

/* Spinner shown on the submit button while the request is in flight. */
.btn__spinner {
  display: none;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading .btn__label { opacity: 0.85; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Whole form is hidden once a submission succeeds. */
.form-panel.is-submitted .request-form { display: none; }

/* ==========================================================================
   Notice / info box
   ========================================================================== */

.notice {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--color-accent-pale);
  border: 1px solid rgba(201, 153, 43, 0.35);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-ink-soft);
}

.notice__icon {
  flex-shrink: 0;
  color: var(--color-accent-dark);
  font-weight: 700;
}

.notice strong { color: var(--color-primary-dark); }

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

/* The footer is the largest solid block of brand color on the site, so it uses
   --color-primary directly — the official #914544 from BRAND.md, not a derived
   shade. It previously used --color-primary-dark, which is the same hue but
   ~11 points darker, and read as a different red next to the buttons.

   Every text alpha below is set for AA against #914544 specifically. Because
   this background is lighter than the old one, the alphas had to come UP; the
   minimum that clears 4.5:1 here is 0.76. Do not lower them, and re-check them
   if this background ever changes. */
.site-footer {
  flex-shrink: 0;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.86); /* 5.4:1 */
  padding-block: var(--space-xl) var(--space-lg);
  font-size: var(--text-sm);
  margin-top: var(--space-2xl);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer__title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82); /* 5.1:1 — was 0.55, which failed AA at 4.1:1 */
  margin-bottom: var(--space-2xs);
}

.site-footer__brand {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 650;
  color: #fff;
  margin-bottom: var(--space-2xs);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.site-footer a:hover { color: #fff; }

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list li { margin-bottom: var(--space-3xs); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xs);
  padding-top: var(--space-md);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.82); /* 5.1:1 — was 0.5, which failed AA at 3.7:1 */
}

/* ==========================================================================
   Responsive
   --------------------------------------------------------------------------
   The layout is mobile-first and mostly fluid (auto-fit grids + clamp()), so
   there is only one structural breakpoint: the navigation collapsing into a
   drawer below 860px. Verified at 375px, 430px, 768px, 1024px, and 1280px+.
   ========================================================================== */

@media (max-width: 859px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm) var(--container-pad) var(--space-md);
    /* Hidden by default; toggled by the button in nav.njk. */
    display: none;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
  }

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

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3xs);
  }

  .nav__link {
    padding: 0.8em 0.9em;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }

  .nav__link--cta {
    margin-left: 0;
    margin-top: var(--space-2xs);
    text-align: center;
  }

  .site-header__inner { position: relative; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  /* Ensure the drawer state never leaks into the desktop layout. */
  .nav { display: block !important; }
}

/* Below ~400px the brand's secondary line crowds the toggle button. */
@media (max-width: 400px) {
  .brand { font-size: var(--text-base); }
  .brand__sub { display: none; }
  .btn-group .btn { width: 100%; }
}

/* ==========================================================================
   Motion preferences
   --------------------------------------------------------------------------
   Users who ask their OS to reduce motion get no transitions, no scroll
   animation, and no count-up (the JS checks this too and jumps to the final
   number immediately).
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card--link:hover,
  .tutor-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .nav-toggle,
  .form-panel,
  .skip-link {
    display: none !important;
  }

  body { background: #fff; color: #000; }

  .hero {
    background: none !important;
    color: #000;
    padding-block: var(--space-md);
  }

  .hero__title,
  .hero__text { color: #000; }
}
