/* =====================================================================
   Apalex Design System — shared/design-system.css
   Shared across all pages. Include via:
   <link rel="stylesheet" href="shared/design-system.css">
   (adjust path prefix for pages in subdirectories)
   ===================================================================== */

/* =====================
   Design Token System
===================== */
:root {
    --color-accent: #0057FF;
    --color-accent-hover: #0044CC;
    --color-accent-subtle: rgba(0, 87, 255, 0.08);
    --color-accent-border: rgba(0, 87, 255, 0.25);
    --color-success: #00C97D;
    --color-surface-light: #fafafa;
    --color-surface-dark: #050505;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Manrope', sans-serif;
}

body {
    background-color: var(--color-surface-light);
    color: #18181b;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.dark body {
    background-color: var(--color-surface-dark);
    color: #ffffff;
}

/* Display font for headings */
h1, h2, h3 {
    font-family: var(--font-display);
}

/* =====================
   Unified CTA Buttons
===================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 2rem;
    border-radius: 10px;
    background-color: var(--color-accent);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 87, 255, 0.35);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 87, 255, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 2rem;
    border-radius: 10px;
    background-color: transparent;
    color: inherit;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border: 1.5px solid rgba(0,0,0,0.12);
    cursor: pointer;
    text-decoration: none;
}
.dark .btn-secondary { border-color: rgba(255,255,255,0.12); }
.btn-secondary:hover { background-color: rgba(0,0,0,0.05); }
.dark .btn-secondary:hover { background-color: rgba(255,255,255,0.05); }

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-width: 48px;
    padding: 0 1.1rem;
    border-radius: 8px;
    background-color: var(--color-accent);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 87, 255, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-nav:hover { background-color: var(--color-accent-hover); }

/* =====================
   Noise Texture Overlay
===================== */
.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    filter: invert(0);
    transition: filter 0.5s ease;
}
.dark .bg-noise {
    filter: invert(1);
    opacity: 0.04;
}

/* =====================
   Scroll Reveal Animations
===================== */
.reveal {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.stagger-1 { animation-delay: 100ms; }
.stagger-2 { animation-delay: 200ms; }
.stagger-3 { animation-delay: 300ms; }

/* =====================
   Utilities
===================== */
.glass {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.dark .glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mask-gradient {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.nav-logo {
    height: 32px;
    width: 32px;
    display: block;
}

/* =====================
   Modal Base
===================== */
.modal-base {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex !important;
}
.modal-base.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.modal-base:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =====================
   Aurora Canvas
===================== */
#aurora-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
    mix-blend-mode: screen;
}
#aurora-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}
.dark #aurora-canvas { opacity: 1; }

/* Industry content min-height */
#industry-content { min-height: 400px; }
