/*
  Minimal site-wide CSS framework (v0.1)
  - Design tokens (colors, spacing, radius, typography)
  - Reset + base
  - Utilities (container, stack, grid)
  - Components (buttons, cards, tags, header, hero, footer)
*/

/* =========================
   Design tokens
   ========================= */
   :root {
    /* Colors (light) */
    --bg: #ffffff;
    --text: #111827;      /* slate-900 */
    --muted: #6b7280;     /* slate-500 */
    --surface-1: #ffffff; /* cards */
    --surface-2: #f3f4f6; /* sections */
    --border: #e5e7eb;
    --accent: #2563eb;    /* blue-600 */
    --accent-contrast: #ffffff;
  
    /* Typography */
    --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    --leading: 1.6;
    --h1: clamp(2rem, 4vw + 1rem, 3rem);
    --h2: clamp(1.5rem, 2vw + 1rem, 2rem);
    --h3: 1.25rem;
  
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
  
    /* Radius & shadow */
    --radius: 14px;
    --radius-pill: 999px;
    --shadow: 0 8px 30px rgba(0,0,0,.06);
  }
  
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0b0f15;
      --text: #e5e7eb;
      --muted: #9ca3af;
      --surface-1: #111827;
      --surface-2: #0f172a;
      --border: #1f2937;
      --accent: #60a5fa;   /* blue-400 */
      --accent-contrast: #0b0f15;
      --shadow: 0 8px 30px rgba(0,0,0,.35);
    }
  }
  
  /* =========================
     Reset & base
     ========================= */
  * { box-sizing: border-box; }
  html { color-scheme: light dark; }
  body {
    margin: 0;
    font-family: var(--font-sans);
    line-height: var(--leading);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  img, svg, video { max-width: 100%; height: auto; }
  :focus-visible { outline: 3px dashed var(--accent); outline-offset: 3px; border-radius: 6px; }
  ::selection { background: var(--accent); color: var(--accent-contrast); }
  
  h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--space-4); }
  h1 { font-size: var(--h1); }
  h2 { font-size: var(--h2); }
  h3 { font-size: var(--h3); }
  p { margin: 0 0 var(--space-4); color: var(--text); }
  .small { font-size: .875rem; }
  .muted { color: var(--muted); }
  .center { text-align: center; }
  .lead { font-size: clamp(1.125rem, 1.2vw + .75rem, 1.375rem); color: var(--muted); }
  
  /* =========================
     Utilities
     ========================= */
  .container { width: min(100%, 72rem); margin-inline: auto; padding-inline: var(--space-4); }
  .section { padding-block: var(--space-16); }
  .section--alt { background: var(--surface-2); }
  
  .stack > * + * { margin-top: var(--space-4); }
  .stack-sm > * + * { margin-top: var(--space-2); }
  .stack-lg > * + * { margin-top: var(--space-8); }
  
  .grid { display: grid; gap: var(--space-6); }
  @media (min-width: 42rem) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 60rem) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  
  .pill { display: inline-block; padding: .35rem .65rem; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); }
  
  .card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-6); }
  
  /* Skip link */
  .skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
  .skip-link:focus { position: static; width: auto; height: auto; margin: var(--space-2); padding: .5rem .75rem; background: var(--accent); color: var(--accent-contrast); border-radius: var(--radius); }
  
  /* =========================
     Components
     ========================= */
  /* Buttons */
  .btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-radius: var(--radius); text-decoration: none; background: var(--accent); color: var(--accent-contrast); border: 1px solid color-mix(in oklab, var(--accent), black 12%); transition: transform .04s ease, filter .15s ease; }
  .btn:hover { filter: brightness(1.05); }
  .btn:active { transform: translateY(1px); }
  .btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
  .btn--sm { padding: .45rem .75rem; border-radius: 10px; }
  
  /* Header */
  .site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in oklab, var(--bg), var(--surface-2) 30%); backdrop-filter: saturate(1.2) blur(6px); border-bottom: 1px solid var(--border); }
  .nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 64px; }
  .brand { font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: .2px; }
  .nav-list { list-style: none; display: flex; gap: var(--space-4); margin: 0; padding: 0; }
  .nav-list a { text-decoration: none; color: var(--text); }
  .nav-list a:hover { color: var(--accent); }
  
  /* Hero */
  .hero { display: grid; place-items: center; min-height: 70vh; text-align: center; }
  .hero .actions { display: inline-flex; gap: var(--space-3); }
  
  /* Footer */
  .site-footer { border-top: 1px solid var(--border); background: var(--surface-2); }
  
  /* Lists of tags */
  .tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
  .tags .tag { composes: pill; }
  /* Fallback since `composes` is non-standard: duplicate */
  .tags .tag { display: inline-block; padding: .35rem .65rem; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--border); }