/* ==========================================================================
   base.css — Foundation layer for Get in Gear
   ========================================================================== */

@layer reset, base, layout, components, utilities, brand;

/* ---------- RESET ---------- */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    scroll-behavior: smooth;
  }

  body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

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

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

  a {
    text-decoration-skip-ink: auto;
    color: currentColor;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
  }

  h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  p {
    overflow-wrap: break-word;
    text-wrap: pretty;
  }

  table {
    border-collapse: collapse;
  }
}

/* ---------- BASE ---------- */
@layer base {
  :root {
    /* Colors */
    --color-bg: #ffffff;
    --color-surface: #f8f9fa;
    --color-surface-raised: #ffffff;
    --color-text: #1a1a2e;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Accent */
    --color-accent: #1b93df;
    --color-accent-dark: #1574b3;
    --color-accent-light: #e8f4fd;

    /* Category colors */
    --color-learners: #e63946;
    --color-edt: #2a9d8f;
    --color-blog: #457b9d;
    --color-car-news: #e9c46a;
    --color-road-safety: #264653;
    --color-road-trips: #6a994e;
    --color-electric-green: #06d6a0;

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

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

    /* Radii */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --nav-height: 64px;
    --container-max: 1200px;
    --sidebar-width: 340px;
  }

  body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    background-color: var(--color-bg);
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
  }

  h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
  h2 { font-size: clamp(1.375rem, 3vw, 2rem); }
  h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
  h4 { font-size: 1.125rem; }

  a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
  }

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

  ::selection {
    background-color: var(--color-accent);
    color: #fff;
  }

  :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }
}
