/*
Theme Name: Cortex
Theme URI: https://example.com/cortex
Author: Cortex Studio
Author URI: https://example.com
Description: A premium, futuristic WordPress theme built for AI courses & training platforms. Deep-space UI, glassmorphism, a signature "neural thread" progress system, full LearnDash/Tutor LMS/LifterLMS/Sensei support, dark & light modes, WCAG 2.2 AA accessible, RTL-ready.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cortex
Tags: education, e-learning, custom-colors, custom-menu, dark-light-mode, translation-ready, rtl-language-support, accessibility-ready, block-styles, wide-blocks
*/

/* CSS requires @import to come before any other rules (only @charset may
   precede it) — these MUST stay here at the top, not at the bottom of the
   file, or browsers will silently ignore them and every component style
   (cards, buttons, grid, header, hero, neural thread) disappears. */
@import url("assets/css/neural-thread.css");
@import url("assets/css/components.css");
@import url("assets/css/layout.css");

/* =========================================================
   CORTEX DESIGN TOKENS
   Do not hardcode colors/type elsewhere — reference these.
   ========================================================= */
:root{
  /* -- Dark mode (default) -- */
  --c-bg:            #0B0F1A;
  --c-bg-elevated:   #0F1424;
  --c-surface:       #131829;
  --c-surface-2:     #1B2238;
  --c-border:        rgba(232,236,251,0.08);
  --c-border-strong: rgba(232,236,251,0.16);

  --c-ink:           #E8ECFB;
  --c-ink-muted:     #9AA3C7;
  --c-ink-faint:     #6A7398;

  --c-signal:        #7C5CFC;   /* electric purple */
  --c-signal-2:      #A78BFA;
  --c-cyan:          #22D3EE;
  --c-cyan-2:        #67E8F9;
  --c-success:       #34D399;
  --c-warning:       #FBBF24;
  --c-danger:        #FB7185;

  --c-gradient-signal: linear-gradient(120deg, var(--c-signal) 0%, var(--c-cyan) 100%);
  --c-gradient-radial-glow: radial-gradient(circle at 30% 20%, rgba(124,92,252,0.25), transparent 60%);

  /* -- Typography -- */
  --f-display: 'Space Grotesk', 'Inter', sans-serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.75rem;
  --fs-4xl:  3.75rem;

  --lh-tight: 1.15;
  --lh-normal: 1.55;

  /* -- Layout -- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-glass: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-glow-signal: 0 0 40px rgba(124,92,252,0.35);
  --shadow-glow-cyan: 0 0 40px rgba(34,211,238,0.30);

  --container-max: 1280px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 320ms;
  --dur-slow: 600ms;
}

/* -- Light mode -- */
:root[data-theme="light"]{
  --c-bg:            #F7F8FC;
  --c-bg-elevated:   #FFFFFF;
  --c-surface:       #FFFFFF;
  --c-surface-2:     #EEF0FA;
  --c-border:        rgba(11,15,26,0.08);
  --c-border-strong: rgba(11,15,26,0.14);

  --c-ink:           #10131F;
  --c-ink-muted:     #4B5273;
  --c-ink-faint:     #7C84A3;

  --c-gradient-radial-glow: radial-gradient(circle at 30% 20%, rgba(124,92,252,0.10), transparent 60%);
  --shadow-glass: 0 8px 32px rgba(20,24,50,0.08);
}

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

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
h1,h2,h3,h4,h5,h6{ font-family: var(--f-display); line-height: var(--lh-tight); letter-spacing: -0.01em; margin: 0 0 var(--space-4); }
h1{ font-size: var(--fs-4xl); } h2{ font-size: var(--fs-3xl); } h3{ font-size: var(--fs-2xl); }
p{ margin: 0 0 var(--space-4); color: var(--c-ink-muted); }
a{ color: inherit; text-decoration: none; }
code, pre, .cx-mono{ font-family: var(--f-mono); }
img{ max-width: 100%; height: auto; display: block; }

/* Visible keyboard focus — accessibility floor */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.cx-container{ max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-5); }
.screen-reader-text{ position:absolute !important; width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px); }

/* RTL flip helpers */
[dir="rtl"] .cx-flip{ transform: scaleX(-1); }

/* -- Glass surface, the base building block for cards/panels -- */
.cx-glass{
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg-elevated) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(20px);
}

/* Component, layout, and neural-thread styles are imported at the top of
   this file (required by the CSS spec — see note above). */
