/**
 * Pólya SDLC Coder Design System Tokens
 * Source: DESIGN.md & Apple Web Design Philosophy
 * Zero-Build, Pure CSS Custom Properties
 */

:root {
  /* ==========================================================================
     Colors & Canvases
     ========================================================================== */
  /* Brand & Interactive */
  --color-primary: #0066cc;
  --color-primary-blue: var(--color-primary);
  --color-primary-blue-muted: #7dd3fc;
  --color-primary-hover: #005bb5;
  --color-primary-focus: #0071e3;
  --color-primary-on-dark: #2997ff;
  --color-status-pause: #ef4444;

  /* Surfaces & Canvases */
  --color-canvas: #ffffff;
  --color-canvas-parchment: #f5f5f7;
  --color-surface-pearl: #fafafc;
  --color-surface-tile-1: #272729;
  --color-surface-tile-2: #2a2a2c;
  --color-surface-tile-3: #252527;
  --color-surface-black: #000000;
  --color-surface-chip-translucent: rgba(210, 210, 215, 0.64);
  --color-surface-frosted: rgba(245, 245, 247, 0.82);
  --color-surface-frosted-dark: rgba(39, 39, 41, 0.85);

  /* Typography Colors */
  --color-ink: #1d1d1f;
  --color-body: #1d1d1f;
  --color-body-on-dark: #ffffff;
  --color-body-muted: #cccccc;
  --color-ink-muted-80: #333333;
  --color-ink-muted-48: #6e6e73;

  /* Hairlines & Dividers */
  --color-divider-soft: rgba(0, 0, 0, 0.04);
  --color-hairline: rgba(0, 0, 0, 0.08);
  --color-hairline-solid: #e0e0e0;
  --color-hairline-dark: rgba(255, 255, 255, 0.12);

  /* ==========================================================================
     Typography
     ========================================================================== */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Display & Heading Scales */
  --type-hero-display-size: 56px;
  --type-hero-display-lh: 1.07;
  --type-hero-display-tracking: -0.028em;
  --type-hero-display-weight: 700;

  --type-display-lg-size: 40px;
  --type-display-lg-lh: 1.10;
  --type-display-lg-tracking: -0.02em;
  --type-display-lg-weight: 600;

  --type-display-md-size: 34px;
  --type-display-md-lh: 1.20;
  --type-display-md-tracking: -0.022em;
  --type-display-md-weight: 600;

  --type-lead-size: 24px;
  --type-lead-lh: 1.35;
  --type-lead-tracking: -0.01em;
  --type-lead-weight: 400;

  --type-tagline-size: 21px;
  --type-tagline-lh: 1.25;
  --type-tagline-tracking: -0.015em;
  --type-tagline-weight: 600;

  /* Body Scales */
  --type-body-strong-size: 17px;
  --type-body-strong-lh: 1.47;
  --type-body-strong-tracking: -0.022em;
  --type-body-strong-weight: 600;

  --type-body-size: 17px;
  --type-body-lh: 1.47;
  --type-body-tracking: -0.022em;
  --type-body-weight: 400;

  --type-caption-size: 14px;
  --type-caption-lh: 1.43;
  --type-caption-tracking: -0.015em;
  --type-caption-weight: 400;

  --type-caption-strong-size: 14px;
  --type-caption-lh: 1.43;
  --type-caption-tracking: -0.015em;
  --type-caption-weight: 600;

  --type-fine-print-size: 12px;
  --type-fine-print-lh: 1.40;
  --type-fine-print-tracking: -0.01em;
  --type-fine-print-weight: 400;

  /* Monospace Scales */
  --type-code-default-size: 14px;
  --type-code-default-lh: 1.55;
  --type-code-pill-size: 12px;
  --type-code-pill-lh: 1.40;
  --type-code-pill-weight: 500;

  /* Dense Link Scale (Footer) */
  --type-dense-link-size: 13px;
  --type-dense-link-lh: 1.40;
  --type-dense-link-tracking: -0.01em;

  /* ==========================================================================
     Layout, Spacing & Geometry
     ========================================================================== */
  --spacing-xxs: 4px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 17px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  --spacing-section: 80px;

  --container-showcase-max: 1440px;
  --container-docs-max: 980px;

  /* Border Radii */
  --radius-none: 0px;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --radius-full: 50%;

  /* ==========================================================================
     Elevation & Micro-Interactions
     ========================================================================== */
  /* The Single Drop-Shadow Law (DESIGN.md) */
  --elevation-product-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0;
  --elevation-whisper-card: rgba(0, 0, 0, 0.05) 0 4px 20px 0;

  /* Transitions */
  --transition-press: transform 120ms ease;
  --transition-normal: all 200ms ease;
  --transition-fade: opacity 150ms ease;

  /* Navigation Heights */
  --height-global-nav: 44px;
  --height-sub-nav: 52px;
}

/* ==========================================================================
   CSS Reset & Base Surfaces
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: var(--type-body-lh);
  color: var(--color-ink);
  background-color: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  caret-color: var(--color-primary);
}

::selection {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Accessible Keyboard Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-primary-focus);
  outline-offset: 2px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fade);
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}
