/* ==========================================================================
   ShiftSpace Official Website — Design Tokens
   Mirrors MoveWithSymlinkWPF/Resources/FluentTheme.xaml
   ========================================================================== */

:root {
  /* Core Fluent Light Surfaces */
  --bg-canvas: #F4F6F9;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-track: #EEF2F6;
  --bg-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.86);

  /* Hairline Borders */
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-divider: rgba(203, 213, 225, 0.65);

  /* Typography Ink */
  --ink-primary: #0F172A;
  --ink-body: #334155;
  --ink-muted: #475569;
  --ink-inverse: #FFFFFF;

  /* Brand Primary (ShiftSpace Fluent Cerulean) */
  --brand-primary: #0078D4;
  --brand-ink: #005A9E;
  --brand-hover: #005A9E;
  --brand-press: #004578;
  --brand-soft: #EBF5FF;
  --brand-border: #BFDBFE;
  --brand-cyan: #0EA5E9;

  /* Semantic L0-L3 & Safety Accents */
  --sem-green: #0F7B4B;
  --sem-green-bright: #10B981;
  --sem-green-soft: #ECFDF5;
  --sem-green-border: #A7F3D0;

  --sem-amber: #B45309;
  --sem-amber-bright: #F59E0B;
  --sem-amber-soft: #FFFBEB;
  --sem-amber-border: #FDE68A;

  --sem-red: #C42B1C;
  --sem-red-bright: #EF4444;
  --sem-red-soft: #FEF2F2;
  --sem-red-border: #FECACA;

  /* Elevation Shadows (soft layered offset, zero harsh neon) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-cinema:
    0 24px 64px -16px rgba(15, 23, 42, 0.14),
    0 8px 20px -6px rgba(0, 120, 212, 0.08),
    0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-capsule:
    0 12px 32px -8px rgba(15, 23, 42, 0.14),
    0 2px 6px rgba(15, 23, 42, 0.05);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Typography */
  --font-sans: "Segoe UI Variable Display", "Segoe UI Variable", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "Consolas", ui-monospace, SFMono-Regular, monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 150ms;
  --dur-mid: 280ms;
  --dur-slow: 520ms;

  /* Layout */
  --container-max: 1180px;
  --cinema-max: 1060px;
  --header-h: 68px;
}

/* Base Reset & Browser Surface Theming */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--ink-body);
  overflow-x: clip;
  max-width: 100%;
}

::selection {
  background: rgba(0, 120, 212, 0.18);
  color: var(--ink-primary);
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle Brand-Matched Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-canvas);
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

.tabular {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
