/*
 * Tide — Hold's design tokens. The single source for the website and (next) the app.
 * Dark ("Deep") is the primary theme. Light ("Shallows") follows the OS unless a page
 * pins a theme with <html data-theme="dark|light">. The website pins dark.
 *
 * Color roles
 *   ground / raised / glass   surfaces, back to front
 *   ink / ink-muted / ink-subtle   text, strongest to quietest
 *   sea     action and "live" (calls in progress, primary buttons)
 *   mist    the machine at work (dialing, menu, AI)
 *   ember   a human — reserved for the moment a person answers or is needed
 */
:root {
  color-scheme: dark;

  /* Surfaces */
  --ground: #0A1517;
  --raised: #12272B;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.42);

  /* Text */
  --ink: #EAF3F0;
  --ink-muted: #B7C8C3;
  --ink-subtle: #8FA69F;

  /* Sea — action, live */
  --sea: #86E3C8;
  --sea-text: #86E3C8;
  --sea-soft: rgba(134, 227, 200, 0.16);
  --on-sea: #06201B;

  /* Mist — the machine at work */
  --mist: #A9B4FF;
  --mist-text: #C9D0FF;
  --mist-soft: rgba(169, 180, 255, 0.16);

  /* Ember — a human */
  --ember: #FFB89A;
  --ember-text: #FFD3C0;
  --ember-soft: rgba(255, 184, 154, 0.18);
  --on-ember: #2A1206;

  /* Status (always paired with a word or icon) */
  --success: #86E3C8;
  --warning: #F5C46B;
  --danger: #FF9C94;
  --warning-soft: rgba(245, 196, 107, 0.16);
  --danger-soft: rgba(255, 156, 148, 0.16);

  /* Atmosphere */
  --tide-a: #1F7A6A;
  --tide-b: #3E4CB0;
  --orb-core: #CFF7EA;
  --focus: #A9F0DA;

  /* Type */
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Space (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Depth */
  --blur-glass: 20px;
  --blur-tide: 80px;
  --shadow-float: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --shadow-glow-sea: 0 0 0 6px rgba(134, 227, 200, 0.14), 0 18px 40px -12px rgba(134, 227, 200, 0.55);
  --shadow-glow-ember: 0 0 0 8px rgba(255, 184, 154, 0.14), 0 20px 60px -10px rgba(255, 184, 154, 0.5);

  /* Motion */
  --ease-settle: cubic-bezier(.22, 1, .36, 1);
  --ease-glide: cubic-bezier(.65, 0, .35, 1);
  --dur-quick: 180ms;
  --dur-settle: 420ms;
  --dur-arrive: 2400ms;
  --dur-breathe: 6000ms;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --ground: #F3F8F6; --raised: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.72); --glass-strong: #FFFFFF;
    --line: rgba(10, 21, 23, 0.10); --line-strong: rgba(10, 21, 23, 0.52);
    --ink: #0A1517; --ink-muted: #3C5550; --ink-subtle: #56706A;
    --sea: #127A65; --sea-text: #0E6E5C; --sea-soft: rgba(18, 122, 101, 0.10); --on-sea: #FFFFFF;
    --mist: #4A55C8; --mist-text: #3B45B0; --mist-soft: rgba(74, 85, 200, 0.10);
    --ember: #B44D27; --ember-text: #A9431E; --ember-soft: rgba(194, 86, 45, 0.10); --on-ember: #FFFFFF;
    --success: #127A65; --warning: #8A5A00; --danger: #B42318;
    --warning-soft: rgba(138, 90, 0, 0.10); --danger-soft: rgba(180, 35, 24, 0.10);
    --tide-a: #9FE3D0; --tide-b: #C9CCFF; --orb-core: #FFFFFF; --focus: #0E6E5C;
    --shadow-float: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 70px -34px rgba(10, 40, 40, 0.35);
    --shadow-glow-sea: 0 0 0 6px rgba(18, 122, 101, 0.12), 0 18px 40px -16px rgba(18, 122, 101, 0.5);
    --shadow-glow-ember: 0 0 0 8px rgba(194, 86, 45, 0.12), 0 20px 50px -14px rgba(194, 86, 45, 0.45);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F3F8F6; --raised: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.72); --glass-strong: #FFFFFF;
  --line: rgba(10, 21, 23, 0.10); --line-strong: rgba(10, 21, 23, 0.52);
  --ink: #0A1517; --ink-muted: #3C5550; --ink-subtle: #56706A;
  --sea: #127A65; --sea-text: #0E6E5C; --sea-soft: rgba(18, 122, 101, 0.10); --on-sea: #FFFFFF;
  --mist: #4A55C8; --mist-text: #3B45B0; --mist-soft: rgba(74, 85, 200, 0.10);
  --ember: #B44D27; --ember-text: #A9431E; --ember-soft: rgba(194, 86, 45, 0.10); --on-ember: #FFFFFF;
  --success: #127A65; --warning: #8A5A00; --danger: #B42318;
  --warning-soft: rgba(138, 90, 0, 0.10); --danger-soft: rgba(180, 35, 24, 0.10);
  --tide-a: #9FE3D0; --tide-b: #C9CCFF; --orb-core: #FFFFFF; --focus: #0E6E5C;
  --shadow-float: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 30px 70px -34px rgba(10, 40, 40, 0.35);
  --shadow-glow-sea: 0 0 0 6px rgba(18, 122, 101, 0.12), 0 18px 40px -16px rgba(18, 122, 101, 0.5);
  --shadow-glow-ember: 0 0 0 8px rgba(194, 86, 45, 0.12), 0 20px 50px -14px rgba(194, 86, 45, 0.45);
}
