/*
 * CutX design tokens: the "Live Subtitle" theme.
 *
 * Every color in the UI comes from here. Light ("paper") is the default for
 * landing and form pages, dark follows the device, and [data-theme="stage"]
 * is always dark -- the editing-room backdrop video pages sit on.
 *
 * Yellow is either a background with dark text on it, or light on a dark
 * background. Yellow text on paper or white is never used (about 1.4:1).
 */

:root {
  color-scheme: light dark;

  --color-bg: #FAF7F0;
  --color-surface-1: #FFFFFF;
  --color-surface-2: #EFE9DC;
  --color-ink: #14120F;
  --color-ink-2: #5E584D;
  --color-border: rgb(20 18 15 / 0.12);
  --color-highlight: #FFD60A;
  --color-highlight-pressed: #E8C000;
  --color-on-highlight: #0E0D0B;
  --color-link: #8A6100;
  /* Focus rings and the active field underline: yellow where it is visible
     (on dark), the deep text-yellow where plain yellow would vanish (on paper). */
  --color-focus: #8A6100;
  --color-success: #0F7A4A;
  --color-error: #C8261C;
  --color-warning: #A35500;
  --color-info: #0A6BC2;
  --color-cinema: #E63B2E;
  --color-scrim: rgb(14 13 11 / 0.6);

  --font-body: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Lalezar", "Vazirmatn", system-ui, sans-serif;

  /* Type scale. Nothing a person reads is below 16px. */
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-display: clamp(2.25rem, 9vw, 3.75rem);
  --leading-tight: 1.35;
  --leading-body: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --gutter: 1rem;
  --content-max: 34rem;

  --radius-card: 24px;
  --radius-button: 14px;
  --radius-field: 10px;
  --radius-chip: 999px;
  --tap: 44px;
  --button-height: 52px;

  --shadow-card: 0 1px 2px rgb(20 18 15 / 0.06), 0 8px 24px rgb(20 18 15 / 0.06);

  --duration-fast: 120ms;
  --duration-cut: 220ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0E0D0B;
    --color-surface-1: #1A1814;
    --color-surface-2: #24211C;
    --color-ink: #F5F1E8;
    --color-ink-2: #A39E93;
    --color-border: rgb(245 241 232 / 0.12);
    --color-link: #FFD60A;
    --color-focus: #FFD60A;
    --color-success: #3DDC97;
    --color-error: #FF5A4E;
    --color-warning: #FF9F0A;
    --color-info: #5AC8FA;
    --shadow-card: 0 1px 0 rgb(245 241 232 / 0.04) inset;
  }
}

[data-theme="stage"] {
  color-scheme: dark;

  --color-bg: #0E0D0B;
  --color-surface-1: #1A1814;
  --color-surface-2: #24211C;
  --color-ink: #F5F1E8;
  --color-ink-2: #A39E93;
  --color-border: rgb(245 241 232 / 0.12);
  --color-link: #FFD60A;
  --color-focus: #FFD60A;
  --color-success: #3DDC97;
  --color-error: #FF5A4E;
  --color-warning: #FF9F0A;
  --color-info: #5AC8FA;
  --shadow-card: 0 1px 0 rgb(245 241 232 / 0.04) inset;
}
