/* ============================================================
   BASE — tokens, reset, typography, layout utilities
   ============================================================ */

:root {
    /* Background layers */
    --bg-void:       #010810;
    --bg-base:       #030712;
    --bg-section:    #060f1e;
    --bg-surface:    #0a1628;
    --bg-card:       #0d1f35;
    --bg-card-h:     #112240;

    /* Brand accent */
    --cyan:          #00D4FF;
    --cyan-dim:      #0099BB;
    --cyan-pale:     rgba(0, 212, 255, 0.08);
    --green:         #00FF87;
    --green-dim:     #00BB63;
    --orange:        #FF6B35;
    --purple:        #7B61FF;

    /* Text */
    --text-bright:   #F0F8FF;
    --text-primary:  #C8E0F0;
    --text-secondary:#7A9DB8;
    --text-muted:    #3A5A72;

    /* Borders */
    --border:        rgba(0, 212, 255, 0.12);
    --border-h:      rgba(0, 212, 255, 0.40);

    /* Glows */
    --glow-cyan:     0 0 24px rgba(0,212,255,0.50), 0 0 60px rgba(0,212,255,0.15);
    --glow-green:    0 0 24px rgba(0,255,135,0.50), 0 0 60px rgba(0,255,135,0.15);
    --glow-cyan-sm:  0 0 12px rgba(0,212,255,0.40);
    --glow-green-sm: 0 0 12px rgba(0,255,135,0.40);

    /* Fonts */
    --font-display:  'Orbitron', 'Noto Sans SC', sans-serif;
    --font-ui:       'Rajdhani', 'Noto Sans SC', sans-serif;
    --font-cn:       'Noto Sans SC', sans-serif;
    --font-mono:     'JetBrains Mono', 'Courier New', monospace;

    /* Dimensions */
    --nav-h:         68px;
    --radius:        6px;
    --radius-lg:     12px;
    --container:     1200px;

    /* Transitions */
    --t-fast:        0.15s ease;
    --t-smooth:      0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --t-slow:        0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar         { width: 5px; }
::-webkit-scrollbar-track   { background: var(--bg-base); }
::-webkit-scrollbar-thumb   { background: var(--cyan-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

::selection {
    background: rgba(0, 212, 255, 0.22);
    color: var(--text-bright);
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem,   5vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p  { font-family: var(--font-cn); line-height: 1.85; }

a  {
    color: var(--cyan);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--green); }

ul, ol { list-style: none; }

img, svg, canvas { display: block; max-width: 100%; }

/* ── Layout ───────────────────────────────────────────────── */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.section      { padding: 6rem 0; }
.section-alt  { background: var(--bg-section); }

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--cyan);
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(0,212,255,0.3);
    border-radius: 2px;
    margin-bottom: 0.9rem;
}

.section-title {
    font-family: var(--font-display);
    margin-bottom: 0.9rem;
}

.section-subtitle {
    font-family: var(--font-cn);
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto;
}

/* ── Grid helpers ─────────────────────────────────────────── */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .container        { padding: 0 1rem; }
    .section          { padding: 4rem 0; }
}

/* ── Scroll reveal ─────────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.visible           { opacity: 1; transform: translateY(0); }
.reveal.d1                { transition-delay: 0.10s; }
.reveal.d2                { transition-delay: 0.20s; }
.reveal.d3                { transition-delay: 0.30s; }
.reveal.d4                { transition-delay: 0.40s; }
.reveal.d5                { transition-delay: 0.50s; }
