/* olympiclift.ing design tokens: bridge onto the jameslcowan system (/platform.css) */
/* Every legacy semantic var re-points at a --theme-* slot from /platform.css, so the
   site follows system light/dark plus the html[data-theme] override automatically:
   this file defines NO theme blocks of its own. Brand identity is the platform blue
   accent ramp below. Fonts are the jameslcowan SF system stacks. */

:root {
  /* Brand accent ramp (#2563eb at the 500 slot) overriding the platform scale */
  --accent-50: #eff6ff;
  --accent-100: #dbeafe;
  --accent-200: #bfdbfe;
  --accent-300: #93c5fd;
  --accent-400: #60a5fa;
  --accent-500: #2563eb;
  --accent-600: #1d4ed8;
  --accent-700: #1e40af;
  --accent-800: #1e3a8a;
  --accent-900: #172554;
  --accent-950: #0d1733;

  /* Brand-derived theme slots the platform hard-codes to the jameslcowan blue */
  --theme-focus-ring: color-mix(in srgb, var(--accent-500) 42%, transparent);
  --light-border-accent: var(--accent-500);
  --dark-border-accent: var(--accent-400);

  /* Legacy brand names -> accent slots */
  --pl-plate: var(--accent-500);
  --pl-plate-dim: var(--accent-600);

  /* Legacy surface names -> jameslcowan palette */
  --pl-chalk: var(--light-bg);
  --pl-iron: var(--dark-bg);
  --pl-steel: var(--dark-bg-subtle);
  --pl-rack: var(--dark-bg-elevated);
  --pl-rack-up: var(--dark-bg-raised);

  /* Semantic bridge -> --theme-* (theme switching handled by /platform.css) */
  --bg: var(--theme-bg);
  --bg-elevated: var(--theme-bg-elevated);
  --panel: var(--theme-bg-elevated);
  --panel2: var(--theme-bg-subtle);
  --text: var(--theme-color);
  --text-strong: var(--theme-color);
  --muted: var(--theme-color-dim);
  --border: var(--theme-border);
  --border2: var(--theme-border-strong);
  --ghost-border: var(--theme-border-strong);

  --accent: var(--accent-500);
  --accent-muted: color-mix(in srgb, var(--accent-500) 16%, transparent);
  --danger: #dc2626;
  --success: #16a34a;
  --focus-ring: var(--theme-focus-ring);

  --shadow: 0 4px 24px var(--theme-shadow-md);
  --shadow-lg: 0 14px 40px var(--theme-shadow-lg);

  --sb-track: var(--theme-bg);
  --sb-thumb: var(--theme-bg-soft);
  --sb-thumb-hover: var(--theme-bg-strong);

  /* jameslcowan fonts (SF system stacks from /platform.css); zero webfonts.
     --font-display comes straight from the platform; the old fallback slots
     resolve to the same stacks so the fonts-loaded gate is moot. */
  --font-display: "Finlandica", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif; /* brand display face (headings), body stays SF */
  --sans: var(--font-body);
  --mono: var(--font-mono);
  --font-wordmark: "Finlandica", var(--font-display); /* wordmark identity face (logo only) */
  --font-display-fallback: var(--font-display);
  --font-sans-fallback: var(--font-body);

  --topbar-h: 52px;
  --weekbar-h: auto;
}

/* Dark mode brand bump: the platform's own dark emphasis pattern (accent-400
   replaces accent-500) so the primary CTA stays legible on pure black instead
   of sinking into it. Mirrors how /platform.css flips --theme-accent-emphasis. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pl-plate: var(--accent-400);
    --pl-plate-dim: var(--accent-500);
    --theme-focus-ring: color-mix(in srgb, var(--accent-400) 42%, transparent);
  }
}
:root[data-theme="dark"] {
  --pl-plate: var(--accent-400);
  --pl-plate-dim: var(--accent-500);
  --theme-focus-ring: color-mix(in srgb, var(--accent-400) 42%, transparent);
}

/* Forced theme keeps native UI (form controls, scrollbars) in step */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* Mobile touch hygiene. Keep pinch zoom, drop the browser double-tap-to-zoom
   gesture and its 300ms click delay, and remove the grey/blue tap-highlight flash.
   A 16px input floor on mobile stops iOS Safari zooming the page on field focus. */
html {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a, button, input, textarea, select, label, summary,
[role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 800px) {
  input, textarea, select { font-size: max(16px, 1em); }
}
