/* ==========================================
   Augur — Shared Styles
   Aligned with Augur Dashboard (Futuristic theme)
   ========================================== */

:root {
    /* Backgrounds — matched to dashboard futuristic dark */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.85);
    --bg-glass: rgba(20, 20, 20, 0.85);
    --bg-hover: rgba(40, 40, 40, 0.8);
    --bg-section-alt: rgba(10, 10, 10, 0.6);
    --bg-input: rgba(15, 15, 15, 0.8);
    --bg-nav: rgba(10, 10, 10, 0.75);
    --bg-nav-mobile: rgba(5, 5, 5, 0.98);
    --bg-code: rgba(15, 15, 15, 0.8);
    --bg-table-head: rgba(10, 10, 10, 0.6);

    /* Text — dashboard futuristic */
    --text-primary: #d4d4d4;
    --text-secondary: #8f8f8f;
    --text-muted: #8a8a8a;

    /* Accents — dashboard cyan + purple */
    --accent-primary: #00f0ff;
    --accent-violet: #9040ff;
    --accent-violet-dim: #7c3aed;
    --accent-glow: rgba(0, 240, 255, 0.1);

    /* Button text on accent backgrounds */
    --accent-text: #050505;

    /* Status colors */
    --today-red: #ff0055;
    --augur-green: #00ff9d;
    --amber: #ffd000;

    /* Borders — dashboard */
    --border: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.22);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px -1px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 8px 32px rgba(0, 240, 255, 0.08);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Border radius — dashboard uses 16px */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Monospace — Fira Code */
code, pre, .mono,
.badge-value, .cta-price, .hero-tagline,
.principle-num, .session-meta, .module-num,
.arch-tag, .arch-layer-num {
    font-family: 'Fira Code', SFMono-Regular, Menlo, Monaco, monospace;
}

/* Layout */
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 800px; }

/* Background — matched to dashboard Futuristic theme */

/* Layer 1: Mouse-responsive gradient orbs */
.bg-grid {
    --mouse-x: 50;
    --mouse-y: 50;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at calc(var(--mouse-x) * 0.6% + 8%) calc(var(--mouse-y) * 0.6% + 12%), rgba(0, 240, 255, 0.14) 0%, transparent 50%),
        radial-gradient(circle at calc(100% - var(--mouse-x) * 0.4%) calc(var(--mouse-y) * 0.4%), rgba(112, 0, 255, 0.16) 0%, transparent 50%),
        radial-gradient(circle at calc(var(--mouse-x) * 0.5% + 15%) calc(100% - var(--mouse-y) * 0.5%), rgba(0, 255, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at calc(100% - var(--mouse-x) * 0.3% + 5%) calc(100% - var(--mouse-y) * 0.3%), rgba(255, 0, 85, 0.08) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
    transition: background 0.3s ease;
}

/* Layer 2: Grid lines — disabled */
.bg-grid::before {
    display: none;
}

/* Layer 3: Scanlines — disabled */
.bg-grid::after {
    display: none;
}


main { position: relative; z-index: 1; }

/* Navigation */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

nav.nav-relative {
    position: relative;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 20px 0;
}

nav .container {
    display: flex; justify-content: space-between; align-items: center; height: 60px;
}

nav.nav-relative .container { height: auto; }

.logo {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem; font-weight: 600; color: var(--text-primary);
    text-decoration: none; display: flex; align-items: center; gap: 8px;
}

.logo-icon svg { width: 26px; height: 26px; color: var(--accent-primary); }

.nav-back {
    color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-back:hover { color: var(--text-primary); }

/* Footer */
footer {
    padding: 32px 0; border-top: 1px solid var(--border); text-align: center;
}

.footer-links {
    display: flex; justify-content: center; gap: 24px;
    margin-bottom: 16px; flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy { color: var(--text-muted); font-size: 0.8rem; }
.footer-copy a { color: var(--accent-primary); text-decoration: none; }

/* Glass panel — matched to dashboard .glass-panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Shine line on top of glass panels — matched to dashboard BlockShell */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-shine), transparent);
    z-index: 1;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Light mode — matched to dashboard futuristic-light */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f9f8f6;
        --bg-secondary: #f0efe9;
        --bg-card: rgba(255, 255, 255, 0.8);
        --bg-glass: rgba(255, 255, 255, 0.8);
        --bg-hover: rgba(0, 0, 0, 0.03);
        --bg-section-alt: rgba(0, 0, 0, 0.02);
        --bg-input: rgba(0, 0, 0, 0.08);
        --bg-nav: rgba(249, 248, 246, 0.85);
        --bg-nav-mobile: rgba(249, 248, 246, 0.98);
        --bg-code: rgba(0, 0, 0, 0.05);
        --bg-table-head: rgba(0, 0, 0, 0.03);

        --text-primary: #111111;
        --text-secondary: #555555;
        --text-muted: #6b6862;

        --accent-primary: #6b5b95;
        --accent-violet: #6b5b95;
        --accent-violet-dim: #5d4f8a;
        --accent-glow: rgba(107, 91, 149, 0.1);
        --accent-text: #ffffff;

        --today-red: #b34434;
        --augur-green: #4a6759;
        --amber: #a85540;

        --border: rgba(170, 160, 150, 0.5);
        --border-hover: rgba(170, 160, 150, 0.7);
        --glass-border: rgba(170, 160, 150, 0.35);
        --glass-shine: rgba(255, 255, 255, 0.6);

        --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
        --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
        --shadow-glow: 0 4px 16px rgba(107, 91, 149, 0.06);
        --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .bg-grid {
        background:
            radial-gradient(circle at calc(var(--mouse-x) * 0.6% + 8%) calc(var(--mouse-y) * 0.6% + 12%), rgba(233, 220, 202, 0.2) 0%, transparent 40%),
            radial-gradient(circle at calc(100% - var(--mouse-x) * 0.4%) calc(var(--mouse-y) * 0.4%), rgba(167, 199, 183, 0.15) 0%, transparent 40%),
            radial-gradient(circle at calc(var(--mouse-x) * 0.5% + 15%) calc(100% - var(--mouse-y) * 0.5%), rgba(201, 196, 218, 0.15) 0%, transparent 40%);
    }

    .bg-grid::before {
        opacity: 0; /* no grid in light mode */
    }

    .bg-grid::after {
        display: none; /* no scanlines in light mode */
    }

    /* Stronger accent borders in light mode */
    .arch-layer, .mode-card, .augur-is-card, .works-card,
    .option-card.highlight, .cta-card, .faq-item,
    .metric-badge, .problem-bullet {
        border-color: rgba(107, 91, 149, 0.2) !important;
    }

    .orbit-icon-wrap {
        background: transparent;
        box-shadow: none;
    }
    .laptop-screen {
        background: linear-gradient(160deg, #f0f0f0, #e0e0e0);
        border-color: #c0c0c0;
        box-shadow:
            0 0 40px rgba(107, 91, 149, 0.08),
            0 8px 24px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.8),
            inset 0 0 30px rgba(107, 91, 149, 0.03);
    }
    .laptop-screen svg { color: var(--accent-violet); filter: drop-shadow(0 0 16px rgba(107, 91, 149, 0.3)) drop-shadow(0 0 32px rgba(107, 91, 149, 0.15)); }
    .laptop-base {
        background: linear-gradient(180deg, #d5d5d5, #bbb, #aaa);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    .laptop-base::before { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); }
    .laptop-base::after { background: linear-gradient(180deg, #ccc, #b5b5b5); }
    .orbit-path { border-color: rgba(107, 91, 149, 0.12); }

    .option-card.highlight {
        border-color: rgba(107, 91, 149, 0.4) !important;
    }

    .bg-glow {
        background:
            radial-gradient(ellipse at 30% 20%, rgba(233, 220, 202, 0.12) 0%, transparent 50%),
            radial-gradient(ellipse at 70% 30%, rgba(167, 199, 183, 0.08) 0%, transparent 50%),
            radial-gradient(ellipse at center top, rgba(201, 196, 218, 0.08) 0%, transparent 70%) !important;
    }

    .glass-panel:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(170, 160, 150, 0.3);
    }
}

/* Section labels — consistent across all pages */
.section-label {
    color: var(--accent-violet);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bg-grid { transition: none; }
}

/* Focus states (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

@media (prefers-color-scheme: light) {
    ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); }
    ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.25); }
}

/* Shared responsive */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
}
