/* ==========================================================================
   OpenPress — Design Tokens
   Apple-inspired monochrome system. Light + Dark.
   ========================================================================== */

:root {
  /* ---- Color: Light (default) ---- */
  --color-bg: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-surface: #f5f5f7;          /* Apple's signature warm-gray surface */
  --color-surface-hover: #eaeaec;
  --color-text-primary: #1d1d1f;     /* Apple near-black */
  --color-text-secondary: #6e6e73;
  --color-text-tertiary: #86868b;
  --color-divider: rgba(0, 0, 0, 0.08);
  --color-divider-strong: rgba(0, 0, 0, 0.14);
  --color-accent: #1d1d1f;           /* monochrome "accent" = ink */
  --color-accent-text: #ffffff;
  --color-inverse: #000000;
  --color-nav-bg: rgba(255, 255, 255, 0.72);
  --color-card-bg: #ffffff;
  --color-tag-bg: rgba(0, 0, 0, 0.06);
  --color-skeleton: #e8e8ea;
  --color-focus: #0071e3;            /* kept ONLY for accessible focus rings */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-elevated: 0 20px 60px rgba(0,0,0,0.12);
  --overlay-scrim: rgba(0, 0, 0, 0.5);

  /* ---- Type ---- */
  --font-display: -apple-system, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Menlo", monospace;

  /* Type scale (Apple-esque: large, tight, confident) */
  --fs-hero: clamp(2.6rem, 6vw, 5.2rem);
  --fs-h1: clamp(2.2rem, 4.4vw, 3.4rem);
  --fs-h2: clamp(1.7rem, 3vw, 2.4rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-lead: clamp(1.1rem, 1.6vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-caption: 0.8125rem;
  --fs-eyebrow: 0.8125rem;

  --lh-tight: 1.07;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.6;

  --ls-tight: -0.022em;
  --ls-snug: -0.015em;
  --ls-wide: 0.04em;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --container-pad: clamp(20px, 5vw, 64px);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --nav-height: 52px;

  /* ---- Motion ---- */
  --ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --dur-fast: 0.22s;
  --dur-base: 0.4s;
  --dur-slow: 0.7s;
}

/* ---- Color: Dark ---- */
html[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-elevated: #0a0a0c;
  --color-surface: #1d1d1f;
  --color-surface-hover: #2a2a2c;
  --color-text-primary: #f5f5f7;
  --color-text-secondary: #a1a1a6;
  --color-text-tertiary: #86868b;
  --color-divider: rgba(255, 255, 255, 0.1);
  --color-divider-strong: rgba(255, 255, 255, 0.16);
  --color-accent: #f5f5f7;
  --color-accent-text: #1d1d1f;
  --color-inverse: #ffffff;
  --color-nav-bg: rgba(0, 0, 0, 0.6);
  --color-card-bg: #1c1c1e;
  --color-tag-bg: rgba(255, 255, 255, 0.08);
  --color-skeleton: #2a2a2c;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 8px 30px rgba(0,0,0,0.45);
  --shadow-elevated: 0 20px 70px rgba(0,0,0,0.55);
  --overlay-scrim: rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
