/* bootybuild.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 pink accent
   ramp below plus deliberately softer rounding. Body face is self-hosted
   Montserrat (owner direction 2026-07-28); Syne stays the display face. */

/* Self-hosted variable Montserrat, subset with OpenType features KEPT: the
   Google Fonts CDN build strips smcp/c2sc, so real small caps (the reason
   for this face) require serving our own file. One 55KB woff2 covers
   weights 100-900. */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-var.woff2?v=92a9fba2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand accent ramp (#ff2a8f at the 500 slot) overriding the platform scale */
  --accent-50: #fff0f7;
  --accent-100: #ffe0ee;
  --accent-200: #ffc2de;
  --accent-300: #ff94c5;
  --accent-400: #ff5fa9;
  --accent-500: #ff2a8f;
  --accent-600: #e8007a;
  --accent-700: #be0064;
  --accent-800: #93004e;
  --accent-900: #690038;
  --accent-950: #400022;

  /* Brand-derived theme slots the platform hard-codes to the jameslcowan blue */
  --theme-focus-ring: color-mix(in srgb, var(--accent-500) 45%, 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) 18%, transparent);
  --danger: #dc2626;
  --success: #16a34a;
  --focus-ring: var(--theme-focus-ring);

  --shadow: 0 4px 28px var(--theme-shadow-md);
  --shadow-lg: 0 16px 48px var(--theme-shadow-lg);

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

  /* Deliberate brand rounding: softer than the platform default (12px / 8px). */
  --radius: 14px;
  --radius2: 10px;

  /* 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: "Syne", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif; /* brand display face (headings) */
  /* Owner direction 2026-07-28: Montserrat replaces the SF stack as the body
     and UI face (geometric, consistent across every OS, pairs with Syne).
     Literal fallbacks, never self-referencing (circular var = serif). */
  --font-body: "Montserrat", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --sans: var(--font-body);
  --mono: var(--font-mono);
  --font-wordmark: "Syne", 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;
}

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