/* ==========================================================================
   BASE — Design tokens, reset, typography, layout utilities
   Loaded first. All other CSS files depend on these custom properties.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    /* Color palette */
    --tx-black:        #080810;
    --tx-void:         #0A0A14;
    --tx-navy:         #131650;
    --tx-navy-light:   #1A2070;
    --tx-card:         #111436;
    --tx-border:       #1E2456;
    --tx-green:        #39FF14;
    --tx-green-dark:   #2ACC0F;
    --tx-green-glow:   rgba(57, 255, 20, 0.15);
    --tx-green-subtle: rgba(57, 255, 20, 0.07);
    --tx-red:          #FF3D3D;
    --tx-orange:       #FF9F00;
    --tx-white:        #F0F2FF;
    --tx-muted:        #8A8FB8;
    --tx-muted-light:  #B0B5D8;

    /* Typography */
    --font-display: 'Black Ops One', sans-serif;
    --font-body:    'Rajdhani', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    /* Type scale */
    --text-xs:   11px;
    --text-sm:   13px;
    --text-base: 15px;
    --text-md:   17px;
    --text-lg:   20px;
    --text-xl:   24px;
    --text-2xl:  32px;
    --text-3xl:  clamp(32px, 5vw, 54px);

    /* Spacing scale */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-8:  32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* Border radius */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md:    0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg:    0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-green: 0 8px 32px rgba(57, 255, 20, 0.12);
    --shadow-card:  0 4px 20px rgba(0, 0, 0, 0.35);

    /* Transitions */
    --ease:      0.2s ease;
    --ease-slow: 0.4s ease;

    /* Z-index layers */
    --z-base:    1;
    --z-raised:  10;
    --z-overlay: 50;
    --z-modal:   100;
    --z-nav:     200;
    --z-toast:   300;

    /* Layout */
    --container-max:    1240px;
    --container-narrow: 760px;
    --container-wide:   1440px;
    --sidebar-width:    280px;
    --header-height:    62px;
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background-color: var(--tx-void);
    color: var(--tx-white);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WordPress / WooCommerce wrapper resets */
#page, .site, .site-content, main,
#content, .site-main, .woocommerce {
    background-color: var(--tx-void);
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--tx-green); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--tx-green-dark); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
input, textarea { background: none; border: none; outline: none; }
button { cursor: pointer; background: none; border: none; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--tx-white);
    line-height: 1.1;
    font-weight: 400; /* Black Ops One is inherently display weight */
}

h1 { font-size: clamp(32px, 5vw, 54px); }
h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; }
h6 { font-size: var(--text-sm);   font-family: var(--font-body); font-weight: 700; }

p { margin-bottom: var(--space-4); color: var(--tx-muted); }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--tx-white); font-weight: 700; }
em, i     { font-style: italic; }
small     { font-size: var(--text-xs); }

code, pre {
    font-family: var(--font-mono);
    background: var(--tx-navy);
    border-radius: var(--radius-sm);
}
code { padding: 2px 6px; font-size: var(--text-sm); }
pre  { padding: var(--space-4); overflow-x: auto; }

hr {
    border: none;
    border-top: 1px solid var(--tx-border);
    margin: var(--space-8) 0;
}

/* --------------------------------------------------------------------------
   4. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-6);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide);   }

.flex           { display: flex; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-col       { display: flex; flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.gap-2          { gap: var(--space-2); }
.gap-4          { gap: var(--space-4); }
.gap-6          { gap: var(--space-6); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* Screen reader only */
.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;
}

/* Visibility helpers */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Text helpers */
.text-green  { color: var(--tx-green); }
.text-muted  { color: var(--tx-muted); }
.text-center { text-align: center; }
.text-upper  { text-transform: uppercase; letter-spacing: 1px; }
.text-sm     { font-size: var(--text-sm); }
.text-xs     { font-size: var(--text-xs); }

/* Section spacing */
.section     { padding: var(--space-10) 0; }
.section--lg { padding: var(--space-16) 0; }
.section--sm { padding: var(--space-6) 0; }
.section--bordered { border-top: 1px solid rgba(57, 255, 20, 0.06); }

/* Section header (title + view-all row) */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}
.section-title { font-size: var(--text-xl); }
.section-title span { color: var(--tx-green); }
.section-eyebrow {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--tx-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   5. ACCESSIBILITY
   -------------------------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--tx-green);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--tx-green);
    color: var(--tx-black);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-weight: 700;
    z-index: var(--z-toast);
    transition: top var(--ease);
}
.skip-link:focus { top: var(--space-2); }

/* --------------------------------------------------------------------------
   6. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(57, 255, 20, 0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease both; }

/* --------------------------------------------------------------------------
   7. RESPONSIVE BREAKPOINTS (reference — used across all CSS files)
   --------------------------------------------------------------------------
   --bp-sm:   480px   (mobile landscape)
   --bp-md:   768px   (tablet)
   --bp-lg:  1024px   (small desktop)
   --bp-xl:  1280px   (large desktop)
   -------------------------------------------------------------------------- */

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