/* ==========================================================================
   GoZen Host — Design Tokens
   Brand-aligned CSS custom properties for the speed test frontend.
   ========================================================================== */

/* --- Typography --------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Figtree:wght@300..900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  /* Font stacks */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Type scale — fixed rem for product UI */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.5rem;    /* 40px */
  --text-5xl: 3.5rem;    /* 56px */

  /* Line heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tight: -0.03em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;

  /* --- Spacing (4pt base) ----------------------------------------------- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 96px;

  /* --- Border radius ---------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;

  /* --- Shadows ---------------------------------------------------------- */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 250 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 250 / 0.08);
  --shadow-lg: 0 8px 24px oklch(0.2 0.01 250 / 0.10);

  /* --- Transitions ------------------------------------------------------ */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Brand colors (constant across themes) ---------------------------- */
  --brand-primary: #1E3A8A;
  --brand-blue: #3B82F6;
  --brand-deep: #172D70;
  --brand-success: #10B981;
  --brand-warning: #F59E0B;
  --brand-error: #EF4444;
}


/* ==========================================================================
   Light Theme (default)
   ========================================================================== */
:root,
[data-theme="light"] {
  --color-bg: #F8FAFC;
  --color-bg-elevated: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F1F5F9;
  --color-surface-active: #E8ECF3;

  --color-text: #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-text-inverse: #F8FAFC;

  --color-border: #E2E8F0;
  --color-border-subtle: #F1F5F9;

  --color-primary: var(--brand-primary);
  --color-primary-hover: #1E40AF;
  --color-primary-text: #FFFFFF;

  --color-accent: var(--brand-blue);

  /* Speed test result colors */
  --color-download: var(--brand-primary);
  --color-upload: #7C3AED;
  --color-ping: var(--brand-success);
  --color-jitter: var(--brand-warning);

  /* Progress bar track */
  --color-track: #E2E8F0;

  /* Logo filter */
  --logo-filter: none;

  /* Card specifics */
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;

  /* Navbar */
  --nav-bg: rgba(246, 248, 251, 0.85);
  --nav-border: #E2E8F0;

  color-scheme: light;
}


/* ==========================================================================
   Dark Theme
   ========================================================================== */
[data-theme="dark"] {
  --color-bg: #10172A;
  --color-bg-elevated: #1A2236;
  --color-surface: #1E293B;
  --color-surface-hover: #243044;
  --color-surface-active: #2D3B52;

  --color-text: #E8ECF3;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-text-inverse: #0F172A;

  --color-border: #1E293B;
  --color-border-subtle: #172033;

  --color-primary: #3B82F6;
  --color-primary-hover: #60A5FA;
  --color-primary-text: #FFFFFF;

  --color-accent: #60A5FA;

  /* Speed test result colors */
  --color-download: #60A5FA;
  --color-upload: #A78BFA;
  --color-ping: #34D399;
  --color-jitter: #FBBF24;

  /* Progress bar track */
  --color-track: #1E293B;

  /* Logo filter — invert for white */
  --logo-filter: brightness(0) invert(1);

  /* Card specifics */
  --card-bg: #131B2E;
  --card-border: #1E293B;

  /* Navbar */
  --nav-bg: rgba(11, 17, 32, 0.9);
  --nav-border: #1E293B;

  /* Shadows are more subtle in dark mode */
  --shadow-sm: 0 1px 2px oklch(0.05 0.01 250 / 0.3);
  --shadow-md: 0 4px 12px oklch(0.05 0.01 250 / 0.4);
  --shadow-lg: 0 8px 24px oklch(0.05 0.01 250 / 0.5);

  color-scheme: dark;
}
