/* =============================================================
   VEL — Voices for Equitable Learning
   Core color + type tokens. Import this once at the top of any
   page. All component styles should reference these variables
   rather than hard-coding values.
   ============================================================= */

/* ---------- Web fonts ---------- */
/* Source Sans 3 (body) loads from Google Fonts; @import must come first
   per CSS spec. Montserrat (display) is self-hosted from /fonts/ below. */
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");

/* Montserrat is self-hosted from /fonts/ (user-provided TTFs). Source Sans 3
   (the actively maintained successor to Source Sans Pro) is still served
   from Google Fonts — drop those TTF/WOFF2 into /fonts and add @font-face
   blocks below if you need fully offline.

   url() paths in this file resolve relative to colors_and_type.css itself,
   so `fonts/...` works from any HTML location that imports this stylesheet. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100; font-display: swap; src: url("fonts/Montserrat-Thin.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 100; font-display: swap; src: url("fonts/Montserrat-ThinItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 200; font-display: swap; src: url("fonts/Montserrat-ExtraLight.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 200; font-display: swap; src: url("fonts/Montserrat-ExtraLightItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/Montserrat-Light.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 300; font-display: swap; src: url("fonts/Montserrat-LightItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Montserrat-Regular.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/Montserrat-Italic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Montserrat-Medium.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 500; font-display: swap; src: url("fonts/Montserrat-MediumItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Montserrat-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 600; font-display: swap; src: url("fonts/Montserrat-SemiBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/Montserrat-Bold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 700; font-display: swap; src: url("fonts/Montserrat-BoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/Montserrat-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 800; font-display: swap; src: url("fonts/Montserrat-ExtraBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 900; font-display: swap; src: url("fonts/Montserrat-Black.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 900; font-display: swap; src: url("fonts/Montserrat-BlackItalic.ttf") format("truetype"); }

/* Source Sans 3 — still from Google Fonts pending font upload (see @import at top) */

:root {
  /* ============================================================
     CORE BRAND COLORS — from the VEL brand brief
     ============================================================ */
  --vel-blue:        #0B3D91; /* Royal Blue — primary, body of logo "V" */
  --vel-teal:        #00A7B5; /* Teal — secondary, inner book pages */
  --vel-orange:      #F26522; /* Orange — accent / CTAs / "L" of logo */
  --vel-green:       #4CAF50; /* Green — trust / success / "E" of logo */
  --vel-gray:        #6D6E71; /* Body text gray (mid) */

  /* ============================================================
     PALETTE EXPANSION — tints + shades derived in oklch space
     for accessible contrast pairs. Use the -50/-100 tints for
     surfaces, -600/-700 shades for hover & deep ink.
     ============================================================ */
  --vel-blue-50:     #EAF1FB;
  --vel-blue-100:    #C9DAF2;
  --vel-blue-200:    #8EB1E2;
  --vel-blue-300:    #4F84CC;
  --vel-blue-500:    #0B3D91;  /* alias */
  --vel-blue-600:    #093273;
  --vel-blue-700:    #06245A;
  --vel-blue-900:    #03142F;

  --vel-teal-50:     #E2F7F8;
  --vel-teal-100:    #B6ECEF;
  --vel-teal-300:    #5DCFD6;
  --vel-teal-500:    #00A7B5;
  --vel-teal-600:    #008892;
  --vel-teal-700:    #006A72;

  --vel-orange-50:   #FEEFE6;
  --vel-orange-100:  #FCD4BD;
  --vel-orange-300:  #F89669;
  --vel-orange-500:  #F26522;
  --vel-orange-600:  #D24F11;
  --vel-orange-700:  #A93D08;

  --vel-green-50:    #E8F5E9;
  --vel-green-100:   #C8E6C9;
  --vel-green-300:   #81C784;
  --vel-green-500:   #4CAF50;
  --vel-green-600:   #3D8C41;
  --vel-green-700:   #2D6A31;

  /* ============================================================
     NEUTRALS — warm gray scale that pairs with the brand gray
     ============================================================ */
  --vel-ink:         #1A2238;   /* near-black, used for deep ink only */
  --vel-gray-900:    #2E2F33;
  --vel-gray-700:    #4B4C50;
  --vel-gray-500:    #6D6E71;   /* alias of brand gray */
  --vel-gray-400:    #9A9B9E;
  --vel-gray-300:    #C8C9CB;
  --vel-gray-200:    #E3E4E6;
  --vel-gray-100:    #F1F2F4;
  --vel-gray-50:     #F8F9FB;
  --vel-paper:       #FFFFFF;
  --vel-cream:       #FBF8F3;   /* warm off-white for grant/print pages */

  /* ============================================================
     SEMANTIC COLOR TOKENS — use these in components
     ============================================================ */
  --fg-1:            var(--vel-ink);        /* primary heading ink */
  --fg-2:            var(--vel-gray-700);   /* body text */
  --fg-3:            var(--vel-gray-500);   /* secondary text, captions */
  --fg-muted:        var(--vel-gray-400);   /* placeholder, disabled */
  --fg-inverse:      var(--vel-paper);

  --bg-1:            var(--vel-paper);      /* primary surface */
  --bg-2:            var(--vel-gray-50);    /* subtle surface */
  --bg-3:            var(--vel-gray-100);   /* card-on-bg */
  --bg-cream:        var(--vel-cream);

  --border-subtle:   var(--vel-gray-200);
  --border-default:  var(--vel-gray-300);
  --border-strong:   var(--vel-gray-400);

  --accent-primary:  var(--vel-blue-500);   /* main brand action ink */
  --accent-cta:      var(--vel-orange-500); /* call-to-action buttons */
  --accent-trust:    var(--vel-green-500);  /* success, verified, trust */
  --accent-info:     var(--vel-teal-500);   /* informational, secondary */

  --state-success:   var(--vel-green-500);
  --state-warning:   #E0A21A;
  --state-error:     #C8362B;
  --state-info:      var(--vel-teal-500);

  /* ============================================================
     TYPOGRAPHY
     ============================================================ */
  --font-display:    "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:       "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:       "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Size scale — modest 1.20 ratio; very readable for K-12 audiences */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --fs-72: 4.5rem;

  /* Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;

  /* Line heights */
  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  /* ============================================================
     SPACING — 4pt base scale
     ============================================================ */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ============================================================
     RADII — soft, friendly rounding
     ============================================================ */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* ============================================================
     SHADOWS — soft + warm, layered for trust-forward feel
     ============================================================ */
  --shadow-xs: 0 1px 2px rgba(11, 61, 145, 0.06);
  --shadow-sm: 0 2px 6px rgba(11, 61, 145, 0.08), 0 1px 2px rgba(11, 61, 145, 0.04);
  --shadow-md: 0 6px 18px rgba(11, 61, 145, 0.10), 0 2px 6px rgba(11, 61, 145, 0.05);
  --shadow-lg: 0 14px 40px rgba(11, 61, 145, 0.14), 0 4px 10px rgba(11, 61, 145, 0.06);
  --shadow-glow-orange: 0 8px 24px rgba(242, 101, 34, 0.30);
  --shadow-glow-blue:   0 8px 24px rgba(11, 61, 145, 0.25);
  --shadow-focus-ring:  0 0 0 4px rgba(11, 61, 145, 0.18);

  /* ============================================================
     MOTION
     ============================================================ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* ============================================================
     LAYOUT
     ============================================================ */
  --container-narrow: 720px;
  --container-base:   1120px;
  --container-wide:   1280px;
  --container-max:    1440px;
}

/* =============================================================
   ELEMENT-LEVEL DEFAULTS
   These map semantic HTML to the VEL brand without forcing class
   names. Components are free to override.
   ============================================================= */

html {
  font-family: var(--font-body);
  color: var(--fg-2);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
  color: var(--fg-2);
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg-1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-48); font-weight: var(--fw-extrabold); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-32); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-24); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-20); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-18); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-16); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); }

p { margin: 0 0 var(--space-4) 0; line-height: var(--lh-relaxed); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  border-bottom: 1.5px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--vel-blue-700); border-bottom-color: currentColor; }
a:focus-visible { outline: none; box-shadow: var(--shadow-focus-ring); border-radius: 2px; }

strong, b { font-weight: var(--fw-bold); color: var(--fg-1); }

small { font-size: var(--fs-14); color: var(--fg-3); }

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

code {
  background: var(--vel-blue-50);
  color: var(--vel-blue-700);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

hr {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-8) 0;
}

::selection { background: var(--vel-teal-100); color: var(--vel-blue-900); }

/* =============================================================
   UTILITY CLASSES — minimal helpers; favor component CSS.
   ============================================================= */
.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-info);
}

.display-1 { font-family: var(--font-display); font-size: var(--fs-72); font-weight: var(--fw-extrabold); line-height: 1.02; letter-spacing: -0.03em; color: var(--fg-1); }
.display-2 { font-family: var(--font-display); font-size: var(--fs-60); font-weight: var(--fw-extrabold); line-height: 1.05; letter-spacing: -0.025em; color: var(--fg-1); }

.lead { font-size: var(--fs-20); line-height: var(--lh-relaxed); color: var(--fg-2); }
.muted { color: var(--fg-3); }
.caption { font-size: var(--fs-14); color: var(--fg-3); }

.text-blue   { color: var(--vel-blue-500); }
.text-teal   { color: var(--vel-teal-500); }
.text-orange { color: var(--vel-orange-500); }
.text-green  { color: var(--vel-green-500); }

/* ---------- Rotating phrase (footer tagline) ---------- */
@keyframes rp-slide-in {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
@keyframes rp-slide-out {
  from { transform: translateY(0); }
  to   { transform: translateY(-105%); }
}
