/*
 * Studio Pilates / Stockwell brand tokens.
 *
 * Shared visual contract across all Stockwell modules and Front Desk Hub.
 * Update in two places (here and in FDH's brand.css) when brand changes.
 *
 * Status colors map to the brand palette, not generic web red/green/orange,
 * so urgent UI feels coherent with the rest of the experience.
 */

:root {
  /* ── Palette ────────────────────────────────────────────────────── */
  --color-coffee:     #28200E;  /* Primary text, dark accents */
  --color-oat:        #EEE2D9;  /* Card / panel backgrounds */
  --color-canvas:     #F4EDE7;  /* Page background */
  --color-seaglass:   #006976;  /* Healthy / OK status; primary brand action */
  --color-terracotta: #9F543F;  /* Warm accent, secondary brand */
  --color-sunshine:   #F2A408;  /* Warning / watch status */
  --color-cherry:     #E8581B;  /* Critical / urgent status */

  /* Subtle tints for backgrounds (semi-transparent over canvas) */
  --color-seaglass-subtle:   rgba(0, 105, 118, 0.08);
  --color-sunshine-subtle:   rgba(242, 164, 8, 0.10);
  --color-cherry-subtle:     rgba(232, 88, 27, 0.08);
  --color-terracotta-subtle: rgba(159, 84, 63, 0.07);

  /* Neutrals derived from coffee for muted text */
  --color-fg:        var(--color-coffee);
  --color-fg-muted: rgba(40, 32, 14, 0.65);
  --color-fg-faint: rgba(40, 32, 14, 0.45);
  --color-border:   rgba(40, 32, 14, 0.12);
  --color-border-muted: rgba(40, 32, 14, 0.06);

  /* Semantic status colors — use these in components, not raw palette */
  --status-ok-fg:        var(--color-seaglass);
  --status-ok-bg:        var(--color-seaglass-subtle);
  --status-watch-fg:     var(--color-sunshine);
  --status-watch-bg:     var(--color-sunshine-subtle);
  --status-short-fg:     var(--color-terracotta);
  --status-short-bg:     var(--color-terracotta-subtle);
  --status-critical-fg:  var(--color-cherry);
  --status-critical-bg:  var(--color-cherry-subtle);

  /* ── Typography ─────────────────────────────────────────────────── */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;     /* 12px */
  --fs-sm: 0.875rem;    /* 14px */
  --fs-md: 1rem;        /* 16px — body default */
  --fs-lg: 1.125rem;    /* 18px */
  --fs-xl: 1.5rem;      /* 24px */
  --fs-2xl: 2rem;       /* 32px */
  --fs-3xl: 2.5rem;     /* 40px — KPI numbers */

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ── Spacing ────────────────────────────────────────────────────── */
  --space-1: 0.25rem;   /* 4px  */
  --space-2: 0.5rem;    /* 8px  */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */

  /* ── Radii ──────────────────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;    /* Buyout Board card standard */
  --radius-pill: 9999px;

  /* ── Elevation ──────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(40, 32, 14, 0.06);
  --shadow-md: 0 4px 12px rgba(40, 32, 14, 0.08);
  --shadow-lg: 0 12px 32px rgba(40, 32, 14, 0.12);

  /* ── Layout ─────────────────────────────────────────────────────── */
  --max-content-width: 1200px;
  --tap-target-min: 44px;  /* Apple HIG floor — every interactive element */
  --bottom-nav-height: 64px;  /* Mobile bottom nav reserved space */

  /* ── Motion ─────────────────────────────────────────────────────── */
  --duration-quick: 150ms;
  --duration-normal: 220ms;
  --duration-slow: 320ms;
  --easing-standard: cubic-bezier(0.2, 0, 0.2, 1);
  --easing-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --easing-accelerate: cubic-bezier(0.4, 0, 1, 1);
}

/* Reduced motion: collapse all transitions to near-instant */
@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-quick: 0ms;
    --duration-normal: 0ms;
    --duration-slow: 0ms;
  }
}

/* ── Reset / base ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--color-fg);
  background: var(--color-canvas);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;  /* dynamic viewport on mobile (accounts for browser chrome) */
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: transparent;
}

a {
  color: var(--color-seaglass);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

/* Focus rings — visible, branded, non-jarring */
:focus-visible {
  outline: 2px solid var(--color-seaglass);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }
