/* =====================================================================
   Varsity Valuations — design system
   Tokens, reset, typography, layout primitives.
   Component styling lives in components.css; breakpoints in responsive.css.
   ===================================================================== */

:root {
  /* Surfaces ------------------------------------------------------- */
  --bg-primary: #f6f7f9;
  --bg-secondary: #eef0f4;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --surface-ink: #0e1620;

  /* Text ----------------------------------------------------------- */
  --text-primary: #0e1620;
  --text-secondary: #47535f;
  --text-muted: #78848f;
  --text-inverse: #f6f7f9;
  --text-inverse-muted: #94a3af;

  /* Accents.
     Green is reserved for verified intelligence and is never used
     decoratively. Ochre marks alerts. Nothing else carries colour. */
  --accent-primary: #0b5d3b;
  --accent-primary-hover: #084a2f;
  --accent-tint: #eaf3ee;
  --accent-tint-strong: #d6e8de;
  --accent-secondary: #8a5a00;
  --accent-secondary-tint: #fbf4e6;

  /* Lines ---------------------------------------------------------- */
  --border-subtle: #dde2e8;
  --border-strong: #c3ccd6;
  --border-ink: #263243;

  /* Status --------------------------------------------------------- */
  --success: #0b5d3b;
  --warning: #8a5a00;
  --error: #9b2226;

  /* Radii. Institutional software has small radii; pill shapes read
     as consumer SaaS. */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 5px;

  /* Shadows, used sparingly — depth comes from rules, not drop shadows. */
  --shadow-sm: 0 1px 2px rgba(14, 22, 32, 0.05);
  --shadow-md: 0 2px 12px rgba(14, 22, 32, 0.07);

  /* Type scale ----------------------------------------------------- */
  --font-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;

  --size-display: 3.75rem;
  --size-h1: 2.5rem;
  --size-h2: 1.875rem;
  --size-h3: 1.25rem;
  --size-body-lg: 1.0625rem;
  --size-body: 0.9375rem;
  --size-small: 0.8125rem;
  --size-meta: 0.75rem;
  --size-label: 0.6875rem;

  /* Spacing -------------------------------------------------------- */
  --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;

  /* Layout --------------------------------------------------------- */
  --container-width: 1200px;
  --container-narrow: 760px;
  --gutter: 2rem;
  --nav-height: 68px;
}

/* ---------------------------------------------------------------------
   Reset
   --------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

p {
  margin: 0;
}

.display {
  font-size: var(--size-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.h1 {
  font-size: var(--size-h1);
  letter-spacing: -0.03em;
}

.h2 {
  font-size: var(--size-h2);
  letter-spacing: -0.025em;
}

.h3 {
  font-size: var(--size-h3);
  letter-spacing: -0.015em;
}

.lede {
  font-size: var(--size-body-lg);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 62ch;
}

.body-text {
  color: var(--text-secondary);
  max-width: 68ch;
}

.small {
  font-size: var(--size-small);
}

.meta {
  font-size: var(--size-meta);
  color: var(--text-muted);
}

/* Figures across the site align in columns. */
.numeric {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

a {
  color: var(--text-primary);
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

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

/* ---------------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------------- */

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

.section {
  padding: var(--space-9) 0;
}

.section--tight {
  padding: var(--space-8) 0;
}

.section--ink {
  background: var(--surface-ink);
  color: var(--text-inverse);
}

.section--ink h1,
.section--ink h2,
.section--ink h3 {
  color: var(--text-inverse);
}

.section--ink .lede,
.section--ink .body-text {
  color: var(--text-inverse-muted);
}

.section--bordered {
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  max-width: var(--container-narrow);
  margin-bottom: var(--space-7);
}

.section-head > * + * {
  margin-top: var(--space-4);
}

.stack > * + * {
  margin-top: var(--space-4);
}

.stack-lg > * + * {
  margin-top: var(--space-6);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

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

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

/* ---------------------------------------------------------------------
   Accessibility
   --------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.section--ink :focus-visible {
  outline-color: #7cc4a3;
}

.visually-hidden {
  position: absolute;
  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-4);
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-ink);
  color: var(--text-inverse);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: var(--space-3);
}

@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;
  }
}
