/* ============================================================
   AkashBoard: Precision Spec Sheet Design System
   ============================================================ */

/* === TOKENS === */
:root {
    /* Brand: Precision Industrial Cinnabar & Technical Amber */
    --primary: oklch(0.64 0.21 38.0);
    --primary-hover: oklch(0.70 0.19 40.0);
    --primary-dark: oklch(0.55 0.22 35.0);
    --primary-ghost: color-mix(in oklch, oklch(0.64 0.21 38.0) 14%, transparent);
    --primary-rgb: 224, 98, 42;

    --accent: oklch(0.82 0.16 85.0);
    --accent-hover: oklch(0.88 0.14 85.0);
    --accent-ghost: color-mix(in oklch, oklch(0.82 0.16 85.0) 14%, transparent);
    --accent-rgb: 235, 178, 38;

    /* Canvas: Cockpit Instrument Slate (Anchor-chroma >= 0.006, zero void) */
    --canvas: oklch(0.14 0.02 260.0);
    --surface-1: oklch(0.17 0.02 260.0);
    --surface-card: oklch(0.20 0.02 260.0);
    --surface-elevated: oklch(0.23 0.02 260.0);
    --surface-code: oklch(0.11 0.02 260.0);

    /* Text */
    --on-dark: oklch(0.98 0.005 85.0);
    --body: oklch(0.80 0.015 260.0);
    --body-strong: oklch(0.95 0.005 85.0);
    --muted: oklch(0.58 0.02 260.0);
    --muted-strong: oklch(0.72 0.02 260.0);

    /* Hairlines */
    --hairline: oklch(0.24 0.02 260.0);
    --hairline-strong: oklch(0.34 0.02 260.0);

    /* Semantic */
    --success: oklch(0.75 0.18 145.0);
    --warning: oklch(0.82 0.16 85.0);
    --warning-rgb: 235, 178, 38;

    /* Fonts */
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'Sora', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;

    /* Spacing (4px / 8dp rhythmic ladder) */
    --sp-xxs: 4px;
    --sp-xs: 8px;
    --sp-sm: 12px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;
    --sp-xxl: 48px;
    --sp-section: 96px;

    /* Radius: Concentric & Crisp */
    --r-none: 0px;
    --r-xs: 2px;
    --r-sm: 4px;
    --r-full: 9999px;

    /* Transitions: Canonical Timing Canon */
    --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-snap: cubic-bezier(0.18, 0.89, 0.32, 1.28);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === LIGHT THEME (OEM Vintage Factory Manual Rag Paper) === */
[data-theme="light"] {
    --canvas: oklch(0.96 0.015 85.0);
    --surface-1: oklch(0.92 0.02 85.0);
    --surface-card: oklch(0.98 0.01 85.0);
    --surface-elevated: oklch(0.94 0.018 85.0);
    --surface-code: oklch(0.90 0.02 85.0);
    --on-dark: oklch(0.18 0.02 260.0);
    --body: oklch(0.28 0.02 260.0);
    --body-strong: oklch(0.14 0.02 260.0);
    --muted: oklch(0.50 0.02 260.0);
    --muted-strong: oklch(0.38 0.02 260.0);
    --hairline: oklch(0.85 0.02 85.0);
    --hairline-strong: oklch(0.75 0.02 85.0);
    --primary: oklch(0.58 0.22 35.0);
    --primary-hover: oklch(0.52 0.22 35.0);
    --accent: oklch(0.72 0.18 75.0);
}

@media (prefers-color-scheme: light) {
    html:not([data-theme="dark"]) {
        --canvas: oklch(0.96 0.015 85.0);
        --surface-1: oklch(0.92 0.02 85.0);
        --surface-card: oklch(0.98 0.01 85.0);
        --surface-elevated: oklch(0.94 0.018 85.0);
        --surface-code: oklch(0.90 0.02 85.0);
        --on-dark: oklch(0.18 0.02 260.0);
        --body: oklch(0.28 0.02 260.0);
        --body-strong: oklch(0.14 0.02 260.0);
        --muted: oklch(0.50 0.02 260.0);
        --muted-strong: oklch(0.38 0.02 260.0);
        --hairline: oklch(0.85 0.02 85.0);
        --hairline-strong: oklch(0.75 0.02 85.0);
        --primary: oklch(0.58 0.22 35.0);
        --primary-hover: oklch(0.52 0.22 35.0);
        --accent: oklch(0.72 0.18 75.0);
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

[id] {
    scroll-margin-top: 80px;
}

body {
    background: var(--canvas);
    color: var(--body);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

code {
    font-family: var(--font-mono);
    background: var(--surface-card);
    padding: 2px 6px;
    border-radius: var(--r-xs);
    font-size: 0.9em;
    color: var(--primary);
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-lg);
}

/* === SCROLL PROGRESS === */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 1001;
    transform-origin: left;
    transform: scaleX(0);
    width: 100%;
}

/* === TOP NAVIGATION === */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 64px;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.top-nav.scrolled {
    background: rgba(var(--primary-rgb), 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--hairline);
}

[data-theme="light"] .top-nav.scrolled {
    background: rgba(245, 245, 245, 0.85);
}

@media (prefers-color-scheme: light) {
    html:not([data-theme="dark"]) .top-nav.scrolled {
        background: rgba(245, 245, 245, 0.85);
    }
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: var(--sp-xs);
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0.05em;
    color: var(--on-dark);
}

.brand-version {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    padding: 1px 6px;
    border-radius: var(--r-xs);
}

.nav-links {
    display: flex;
    gap: var(--sp-xl);
}

.nav-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-strong);
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover {
    color: var(--on-dark);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    gap: 2px;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    padding: 2px;
    border-radius: var(--r-xs);
}

.theme-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 3px 6px;
    cursor: pointer;
    transition: color 0.15s var(--ease-enter), background-color 0.15s var(--ease-enter);
    border-radius: 1px;
}

.theme-btn:hover {
    color: var(--on-dark);
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--r-none);
    cursor: pointer;
    transition: background-color 0.15s var(--ease-enter), border-color 0.15s var(--ease-enter), transform 0.1s var(--ease-snap);
    text-decoration: none;
    line-height: 1;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--body);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 24px;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--r-none);
    cursor: pointer;
    transition: color 0.15s var(--ease-enter), border-color 0.15s var(--ease-enter), transform 0.1s var(--ease-snap);
    text-decoration: none;
    line-height: 1;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost:active {
    transform: scale(0.95);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 14px;
}

.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--canvas);
    color: var(--on-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 16px 32px;
    border: 2px solid var(--canvas);
    border-radius: var(--r-none);
    cursor: pointer;
    transition: background-color 0.15s var(--ease-enter), border-color 0.15s var(--ease-enter), transform 0.1s var(--ease-snap);
    text-decoration: none;
    line-height: 1;
}

.btn-dark:hover {
    background: var(--surface-card);
    border-color: var(--surface-card);
}

.btn-dark:active {
    transform: scale(0.95);
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--on-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 16px 32px;
    border: 1px solid var(--on-dark);
    border-radius: var(--r-none);
    cursor: pointer;
    transition: background-color 0.15s var(--ease-enter), color 0.15s var(--ease-enter), transform 0.1s var(--ease-snap);
    text-decoration: none;
    line-height: 1;
}

.btn-outline-dark:hover {
    background: var(--on-dark);
    color: var(--canvas);
}

.btn-outline-dark:active {
    transform: scale(0.95);
}

.nav-cta {
    padding: 8px 16px;
    font-size: 12px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--on-dark);
    transition: transform 0.25s var(--ease-enter), opacity 0.2s var(--ease-enter);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--canvas);
    z-index: 99;
    padding: var(--sp-xxl) var(--sp-lg);
    flex-direction: column;
    gap: var(--sp-lg);
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.05em;
    color: var(--on-dark);
    text-transform: uppercase;
}

.mobile-cta {
    margin-top: var(--sp-lg);
    text-align: center;
}

/* === HERO === */
.hero-band {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--canvas);
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--hairline) 1px, transparent 1px),
        linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.04;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 120px 0 var(--sp-section);
    width: 100%;
}

.hero-content {
    max-width: 720px;
}

.label-uppercase {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: var(--sp-md);
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 56px;
    line-height: 1.0;
    letter-spacing: -1.5px;
    color: var(--on-dark);
    margin-bottom: var(--sp-lg);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
    max-width: 540px;
    margin-bottom: var(--sp-xl);
}

.hero-actions {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

/* Stat Callouts */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-xl);
    margin-top: var(--sp-xxl);
    padding-top: var(--sp-xxl);
    border-top: 1px solid var(--hairline);
}

.stat-callout {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.stat-number {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.0;
    letter-spacing: -1.5px;
    color: var(--primary);
}

.stat-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

/* === SECTION BANDS === */
.section-band {
    padding: var(--sp-section) 0;
    background: var(--canvas);
}

.section-band.alt {
    background: var(--surface-1);
}

.section-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--on-dark);
    margin-bottom: var(--sp-xl);
}

.section-lead {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.6;
    color: var(--body);
    max-width: 540px;
    margin-bottom: var(--sp-xxl);
}

/* === ARCHITECTURE === */
.architecture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xxl);
    align-items: start;
}

.arch-diagram {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--r-none);
    padding: var(--sp-lg);
}

.diagram-svg {
    width: 100%;
    height: auto;
}

.part-box {
    fill: var(--canvas);
    stroke: var(--primary);
    stroke-width: 1.5;
    transition: fill 0.2s var(--ease-enter), stroke 0.2s var(--ease-enter), stroke-width 0.2s var(--ease-enter);
}

.part-box.bridge {
    stroke: var(--muted-strong);
}

.part-box.engine {
    stroke: var(--primary);
}

.part-box.storage {
    stroke: var(--muted);
}

.part-label {
    font-family: var(--font-body);
    font-size: 13px;
    fill: var(--body);
}

.leader-line {
    stroke: var(--muted);
    stroke-width: 0.5;
}

.connection-line {
    stroke: var(--primary);
    stroke-width: 1;
    opacity: 0.5;
}

.part-number {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    fill: var(--primary);
}

.part-group:hover .part-box {
    stroke-width: 2.5;
    fill: var(--primary-ghost);
}

/* Spec Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
}

.spec-table th {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    padding: var(--sp-sm) var(--sp-md);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.spec-table td {
    padding: var(--sp-sm) var(--sp-md);
    border-bottom: 1px solid var(--hairline);
    color: var(--body);
}

.spec-table tbody tr:hover {
    background: var(--primary-ghost);
}

.part-callout {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    background: var(--primary-ghost);
    padding: 2px 8px;
    border-radius: var(--r-xs);
}

/* === FEATURES === */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}

.feature-card {
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--r-none);
    padding: var(--sp-xl);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary),
                0 0 24px rgba(var(--primary-rgb), 0.08);
}

.feature-icon {
    color: var(--primary);
    margin-bottom: var(--sp-md);
}

.feature-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: var(--on-dark);
    margin-bottom: var(--sp-sm);
}

.feature-body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--body);
}

/* === SPECS === */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
}

.spec-cell {
    background: var(--surface-card);
    padding: var(--sp-xl);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.spec-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.0;
    letter-spacing: -0.5px;
    color: var(--on-dark);
}

.spec-key {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

/* === CODE WINDOW === */
.code-window {
    background: var(--surface-code);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary);
    border-radius: var(--r-none);
    max-width: 720px;
    overflow-x: auto;
}

.code-titlebar {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
    border-bottom: 1px solid var(--hairline);
}

.code-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--r-full);
}

.code-dot.red { background: #FF5F57; }
.code-dot.yellow { background: #FEBC2E; }
.code-dot.green { background: #28C840; }

.code-filename {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-left: auto;
}

.code-block {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--body);
    padding: var(--sp-lg);
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.code-keyword { color: var(--primary); }
.code-comment { color: var(--muted); }

/* === WARNINGS === */
.warning-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-lg);
}

.warning-panel {
    background: rgba(var(--warning-rgb), 0.06);
    border: 1px solid var(--hairline);
    border-radius: var(--r-none);
    overflow: hidden;
}

.warning-stripe {
    height: 4px;
    width: 100%;
}

.warning-stripe.warning {
    background: var(--warning);
}

.warning-stripe.caution {
    background: var(--primary);
}

.warning-body {
    padding: var(--sp-lg);
}

.warning-body strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--on-dark);
    margin-bottom: var(--sp-sm);
}

.warning-body p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--body);
}

/* === CTA BAND === */
.cta-band {
    background: var(--primary);
    padding: var(--sp-section) 0;
}

.cta-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -1px;
    color: #fff;
    margin-bottom: var(--sp-sm);
}

.cta-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--sp-xl);
}

.cta-actions {
    display: flex;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

/* === FOOTER === */
.site-footer {
    background: var(--canvas);
    padding: 64px 0;
    border-top: 1px solid var(--hairline);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xxl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0.05em;
    color: var(--on-dark);
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-xl);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.footer-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: var(--sp-xs);
}

.footer-link {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--body);
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--hairline);
}

.footer-legal {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out),
                transform 0.7s var(--ease-out);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal.in-view > *:nth-child(1) { transition-delay: 0s; }
.reveal.in-view > *:nth-child(2) { transition-delay: 0.1s; }
.reveal.in-view > *:nth-child(3) { transition-delay: 0.2s; }
.reveal.in-view > *:nth-child(4) { transition-delay: 0.3s; }
.reveal.in-view > *:nth-child(5) { transition-delay: 0.4s; }
.reveal.in-view > *:nth-child(6) { transition-delay: 0.5s; }

/* Code slide-in */
.code-window {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.code-window.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* === FOCUS STATES === */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* === REDUCED MOTION === */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .code-window {
        opacity: 1;
        transform: none;
    }
}

/* === SVG HIGHLIGHT STATES === */
.highlight-part {
    stroke: var(--primary) !important;
    stroke-width: 2.5 !important;
    fill: var(--primary-ghost) !important;
}

.highlight-row {
    background: var(--primary-ghost) !important;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .warning-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-headline {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-lg);
    }

    .stat-number {
        font-size: 36px;
    }

    .section-headline {
        font-size: 32px;
        letter-spacing: -0.5px;
    }

    .architecture-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .cta-headline {
        font-size: 28px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn-dark,
    .cta-actions .btn-outline-dark {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 28px;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        width: 100%;
    }
}
