/*
  Clipsana design tokens for the website.
  Values copy the app's Redesign F roles (orbit-video-ios: Docs/DESIGN_SYSTEM.md,
  Clipsana/Resources/Colors.xcassets, AppRadius.swift, AppTypography.swift).
  Each colour names its colorset. Light is the default, dark follows the system,
  and prefers-contrast: more uses the Increased Contrast variants.
*/

:root {
  color-scheme: light dark;

  /* Layers */
  --ground: #F2F2EF; /* Ground */
  --surface: #E7E7E3; /* Surface */
  --surface-raised: #FFFFFF; /* SurfaceRaised */
  --hairline: rgba(0, 0, 0, 0.1); /* Hairline */

  /* Text */
  --ink: #111112; /* Ink */
  --ink-secondary: #55554F; /* InkSecondary */
  --ink-tertiary: #8F8F89; /* InkTertiary: decorative marks only, never text */

  /* The one accent */
  --action-tint: #62E1A3; /* ActionTint */
  --on-action: #111111; /* OnAction */
  --action-text: #075C3A; /* ActionText */

  /* Family ticks: 6-pixel marks only, never fills or text */
  --family-combine: #4A58A6; /* FamilyCombine */
  --family-time: #7A5A1C; /* FamilyTime */
  --family-compare: #A24A6A; /* FamilyCompare */

  /* Media: independent of appearance */
  --media: #000000; /* Media */
  --on-media: #FFFFFF; /* AppColor.onMedia */
  --media-scrim: rgba(0, 0, 0, 0.64); /* AppColor.mediaScrim */

  /* Shape (AppRadius) */
  --radius-media: 4px;
  --radius-control: 8px;
  --radius-sheet: 14px;
  --hairline-width: 0.5px;

  /* Type: system font (SF on Apple devices, never rounded) and the MetaLabel mono */
  --font-text: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --meta-tracking: 0.08em;

  /* Layout (AppLayout, AdaptiveLayoutContext) */
  --readable-width: 720px;
  --page-width: 1120px;
  --gutter: 16px;
}

@media (min-width: 48rem) {
  :root { --gutter: 24px; }
}

@media (min-width: 75rem) {
  :root { --gutter: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0B0C; /* Ground */
    --surface: #141416; /* Surface */
    --surface-raised: #242427; /* SurfaceRaised */
    --hairline: rgba(255, 255, 255, 0.09); /* Hairline */
    --ink: #F2F2EF; /* Ink */
    --ink-secondary: #A3A39E; /* InkSecondary */
    --ink-tertiary: #6E6E6A; /* InkTertiary */
    --action-tint: #62E1A3; /* ActionTint */
    --on-action: #111111; /* OnAction */
    --action-text: #62E1A3; /* ActionText */
    --family-combine: #8E9BD6; /* FamilyCombine */
    --family-time: #D2A866; /* FamilyTime */
    --family-compare: #D68FA8; /* FamilyCompare */
  }
}

/* Increased Contrast, light */
@media (prefers-contrast: more) {
  :root {
    --hairline: rgba(0, 0, 0, 0.2); /* Hairline, high contrast */
    --ink: #000000; /* Ink, high contrast */
    --ink-secondary: #3D3D39; /* InkSecondary, high contrast */
    --ink-tertiary: #6F6F69; /* InkTertiary, high contrast */
    --on-action: #000000; /* OnAction, high contrast */
    --action-text: #04452B; /* ActionText, high contrast */
    --family-combine: #3A4685; /* FamilyCombine, high contrast */
    --family-time: #614716; /* FamilyTime, high contrast */
    --family-compare: #823B55; /* FamilyCompare, high contrast */
  }
}

/* Increased Contrast, dark */
@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --hairline: rgba(255, 255, 255, 0.18); /* Hairline, high contrast */
    --ink: #FFFFFF; /* Ink, high contrast */
    --ink-secondary: #C2C2BD; /* InkSecondary, high contrast */
    --ink-tertiary: #8A8A85; /* InkTertiary, high contrast */
    --on-action: #000000; /* OnAction, high contrast */
    --action-text: #8FEFBF; /* ActionText, high contrast */
    --family-combine: #A5B0DE; /* FamilyCombine, high contrast */
    --family-time: #DBB985; /* FamilyTime, high contrast */
    --family-compare: #DFA5B9; /* FamilyCompare, high contrast */
  }
}
