/**
 * PodControl Design System - Brand Tokens (Canonical)
 * Decision D2 approved: brand tokens as canonical site palette
 * Retires draft's navy/cream/rust palette
 */

:root {
  /* Brand tokens - canonical */
  --color-ink: #1F4C5F;
  --color-signal: #DA7B46;
  --color-wire: #3E9CC9;
  --color-paper: #F6FAFA;
  --color-rule: #E3ECEC;

  /* Short aliases (2026-10-16): the names the home page and its edit guide use */
  --ink: #1F4C5F;
  --signal: #DA7B46;
  --wire-deep: #2F7A9D;   /* authored deep wire, for quiet rules and diagram furniture */
  --paper: #F6FAFA;
  --rule: #E3ECEC;

  /* Reading measures for the letter columns */
  --measure-letter: 700px;
  --measure-wide: 940px;


  /* Deep-ink canvas family (hero + dark chapters) */
  --color-deep-ink: #0f2a36;
  --color-deep-ink-hover: #16414f;

  /* Semantic mappings */
  --color-primary: var(--color-signal);
  --color-primary-hover: #c46e3f;
  --color-primary-text: #ffffff;
  --color-secondary: var(--color-ink);
  --color-secondary-hover: #2a5e74;
  --color-background: var(--color-paper);
  --color-surface: #ffffff;
  --color-border: var(--color-rule);
  --color-text: var(--color-ink);
  --color-text-muted: #4c6b7a;
  --color-focus: var(--color-wire);

  /* Typography - Fraunces display + Source Sans 3 body (self-hosted, T72) */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  --text-7xl: 4.5rem;    /* 72px */
  --text-8xl: 6rem;      /* 96px */
  --text-9xl: 8rem;      /* 128px - hero only */

  /* Line heights */
  --leading-tight: 1.1;
  --leading-snug: 1.375;
  --leading-normal: 1.625;
  --leading-relaxed: 1.75;

  /* Spacing (4px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* Border radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

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

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

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-popover: 400;
  --z-tooltip: 500;

  /* Container widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* Chapter max widths (rhythm) */
  --chapter-hero: 100%;
  --chapter-content: 880px;
  --chapter-wide: 1200px;

  /* Demo video */
  --demo-max-width: 720px;
  --demo-aspect: 16/9;

  /* Clip wall */
  --clip-wall-gap: var(--space-6);
  --clip-thumb-aspect: 16/9;
  --clip-thumb-radius: var(--radius-md);

  /* Tap targets */
  --tap-target-min: 44px;
}

/* Dark chapter override */
.chapter-dark {
  --color-background: var(--color-deep-ink);
  --color-surface: var(--color-ink);
  --color-border: #16414f;
  --color-text: #ffffff;
  --color-text-muted: #a2bfc9;
  --color-primary: var(--color-signal);
  --color-secondary: var(--color-paper);
}

/* Reduced 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;
  }
}

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

/* Font loading lives in longform.css (self-hosted /assets/fonts paths). */