/* ==========================================================================
   tokens.css — CSS Custom Properties (Design Tokens)
   Kogtek Agency Website
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand Palette (raw values — not used directly in components)
   -------------------------------------------------------------------------- */
:root {
  --color-brand-navy:      #0B1629;
  --color-brand-slate:     #1E2D45;
  --color-brand-teal:      #00C5A8;
  --color-brand-teal-dim:  #009F88;
  --color-brand-blue:      #1A78C2;
  --color-brand-white:     #F4F7FA;
}

/* --------------------------------------------------------------------------
   Light Mode (default)
   -------------------------------------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-base:        #F4F7FA;
  --bg-surface:     #FFFFFF;
  --bg-surface-alt: #EDF1F7;
  --bg-nav:         #FFFFFF;
  --bg-hero:        #0B1629;
  --bg-footer:      #0B1629;

  /* Text */
  --text-primary:   #0B1629;
  --text-secondary: #3D5170;
  --text-muted:     #6B82A0;
  --text-on-dark:   #F4F7FA;
  --text-on-accent: #0B1629;

  /* Accent */
  --accent-primary:           #00C5A8;
  --accent-primary-hover:     #009F88;
  --accent-secondary:         #1A78C2;
  --accent-secondary-hover:   #135E9B;

  /* Borders */
  --border-default: #D0DAE8;
  --border-muted:   #E4EAF2;
  --border-strong:  #9DB0C8;

  /* Semantic */
  --color-success: #16A34A;
  --color-error:   #DC2626;
  --color-warning: #D97706;
  --color-info:    #1A78C2;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(11, 22, 41, 0.08);
  --shadow-md:   0 4px 16px rgba(11, 22, 41, 0.12);
  --shadow-lg:   0 8px 32px rgba(11, 22, 41, 0.16);
  --shadow-xl:   0 16px 48px rgba(11, 22, 41, 0.20);
  --shadow-glow: 0 0 24px rgba(0, 197, 168, 0.30);

  /* Typography — Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Typography — Weights */
  --font-light:     300;
  --font-regular:   400;
  --font-medium:    500;
  --font-semibold:  600;
  --font-bold:      700;
  --font-extrabold: 800;

  /* Typography — Size Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  3.75rem;

  /* Spacing Scale (4px base unit) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-7:  1.75rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   14px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Container Widths */
  --container-max:    1280px;
  --container-wide:   1440px;
  --container-narrow: 800px;

  /* Z-index Scale */
  --z-base:    0;
  --z-raised:  10;
  --z-dropdown:100;
  --z-sticky:  200;
  --z-overlay: 300;
  --z-modal:   400;
  --z-toast:   500;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.2s ease;
  --transition-slow:   0.3s ease;
  --transition-spring: 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Dark Mode
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  /* Backgrounds */
  --bg-base:        #0B1629;
  --bg-surface:     #1E2D45;
  --bg-surface-alt: #162035;
  --bg-nav:         #0D1A30;
  --bg-hero:        #060E1C;
  --bg-footer:      #060E1C;

  /* Text */
  --text-primary:   #E8EDF5;
  --text-secondary: #A8BAD4;
  --text-muted:     #7090B4;
  --text-on-dark:   #E8EDF5;
  --text-on-accent: #0B1629;

  /* Accent (unchanged — vivid against dark) */
  --accent-primary:         #00C5A8;
  --accent-primary-hover:   #00E5C5;
  --accent-secondary:       #3A9AE8;
  --accent-secondary-hover: #5AAFE8;

  /* Borders */
  --border-default: #2C3F5C;
  --border-muted:   #1E2D45;
  --border-strong:  #4A6080;

  /* Semantic */
  --color-success: #22C55E;
  --color-error:   #F87171;
  --color-warning: #FBBF24;
  --color-info:    #60A5FA;

  /* Shadows (stronger in dark — subtle glow) */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.50);
  --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.60);
  --shadow-glow: 0 0 32px rgba(0, 197, 168, 0.20);
}

/* --------------------------------------------------------------------------
   System Preference: Dark (applies when no explicit user toggle)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base:        #0B1629;
    --bg-surface:     #1E2D45;
    --bg-surface-alt: #162035;
    --bg-nav:         #0D1A30;
    --bg-hero:        #060E1C;
    --bg-footer:      #060E1C;

    --text-primary:   #E8EDF5;
    --text-secondary: #A8BAD4;
    --text-muted:     #7090B4;
    --text-on-dark:   #E8EDF5;
    --text-on-accent: #0B1629;

    --accent-primary:         #00C5A8;
    --accent-primary-hover:   #00E5C5;
    --accent-secondary:       #3A9AE8;
    --accent-secondary-hover: #5AAFE8;

    --border-default: #2C3F5C;
    --border-muted:   #1E2D45;
    --border-strong:  #4A6080;

    --color-success: #22C55E;
    --color-error:   #F87171;
    --color-warning: #FBBF24;
    --color-info:    #60A5FA;

    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.30);
    --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.40);
    --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.50);
    --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.60);
    --shadow-glow: 0 0 32px rgba(0, 197, 168, 0.20);
  }
}

/* --------------------------------------------------------------------------
   Theme Icon Visibility
   -------------------------------------------------------------------------- */
:root .icon-moon { display: none; }
:root .icon-sun  { display: block; }

[data-theme="dark"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: none; }
