/* =====================================================================
   style.css  -  BASE STYLES
   Responsibility: fonts, design tokens (CSS variables), reset,
   typography and tiny utility classes.
   Nothing in this file is specific to one component or one page.
   Load order on every page: style.css -> pages.css -> responsive.css
   ===================================================================== */


/* ---------- 1. Local fonts (no CDN, works offline) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/vendor/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/vendor/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/vendor/fonts/inter-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/vendor/fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/vendor/fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
}


/* ---------- 2. Design tokens ---------- */
:root {
  /* Brand colors */
  --color-navy: #14213D;
  --color-navy-soft: #1E3A6E;
  --color-blue: #2563EB;
  --color-blue-dark: #1D4ED8;
  --color-blue-soft: #EFF6FF;
  --color-sky: #38BDF8;
  --color-sky-soft: #E0F2FE;

  /* Neutrals */
  --color-bg: #F8FAFC;
  --color-white: #FFFFFF;
  --color-text: #172033;
  --color-muted: #64748B;
  --color-border: #E2E8F0;

  /* Status colors (dark text on a soft background keeps contrast high) */
  --color-success: #15803D;
  --color-success-soft: #DCFCE7;
  --color-warning: #B45309;
  --color-warning-soft: #FEF3C7;
  --color-danger: #B91C1C;
  --color-danger-soft: #FEE2E2;

  /* Typography */
  --font-heading: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing scale (multiples of 0.5rem) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 5rem;

  /* Shape and depth */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.06), 0 1px 3px rgba(20, 33, 61, 0.05);
  --shadow-md: 0 6px 18px rgba(20, 33, 61, 0.09);
  --shadow-lg: 0 18px 40px rgba(20, 33, 61, 0.16);

  /* Layout */
  --container-width: 1200px;
  --header-height: 68px;
  --transition: 180ms ease;
}


/* ---------- 3. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;          /* smooth scrolling for anchor links */
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;   /* turns on kerning, which tightens letter pairs */
}

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

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

ul,
ol {
  padding: 0;
}

a {
  color: var(--color-blue);
}

a:hover {
  color: var(--color-blue-dark);
}


/* ---------- 4. Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.125rem);
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 700;
}

p {
  max-width: 70ch;          /* keeps lines readable */
}


/* ---------- 5. Accessibility helpers ---------- */
:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 500;
  padding: 0.7rem 1rem;
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}


/* ---------- 6. Layout utilities ---------- */
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

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

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

.no-scroll {
  overflow: hidden;         /* added to <body> while a modal is open */
}

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

/* Respect people who ask their system for less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
