/* ═══════════════════════════════════════════════════════════════
   KRITEXA LABS — GLOBAL CSS
   Design System: C0demine-Inspired
   Phase 2 — Global Design System

   This file contains the global defaults, reset, custom scrollbars,
   legacy page styles, and accessibility foundations. It imports
   the design tokens to serve as a base for all other styles.
═══════════════════════════════════════════════════════════════ */

/* ═══ IMPORTS ═══ */
@import "./tokens.css";
/* Phase 16: Google Fonts @import removed — loaded via <link> in HTML <head>
   which is faster (parallel fetch, no CSS parser block).
   The <link> tags with preconnect remain in build system (scripts/build.js). */

/* ═══ RESET & BASE ═══ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* ═══ SCROLLBAR ═══ */
/* Firefox (standards-based) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-purple) var(--color-bg);
}

/* WebKit/Chromium/Edge */
::-webkit-scrollbar {
  width: 3px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-purple);
  border-radius: 2px;
}

/* ═══ ACCESSIBILITY FOUNDATIONS ═══ */
/* Visible keyboard focus indicator */
:focus-visible {
  outline: 2px solid var(--color-purple2);
  outline-offset: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  
  /* Disable specific complex ambient effects & custom cursor ring */
  .ambient, .amb-blob, #cur, #cur-r {
    display: none !important;
  }
  
  /* Reset scroll-reveal classes to visible */
  .rv, .rv-l, .rv-r {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══ PAGE SYSTEM (legacy SPA — REMOVED Phase 16) ═══ */
/* .page / .page.active were used by the legacy SPA go() routing.
   In multi-page architecture (Phase 1+), each URL has its own HTML file.
   No built page uses class="page" or class="page active" — safe to remove.
   Confirmed unused across all 9 pages before removal. */
