/* =========================================
   ASTRO-HEALTH: SPACE THEME (Consolidated)
   ========================================= */

/* --- 1. STRICT RESET & BASE --- */
:root {
    /* Colors */
    --bg-deep: #050510;
    --bg-space: #0b0d17;
    --bg-glass: rgba(11, 13, 23, 0.7);
    --bg-glass-heavy: rgba(11, 13, 23, 0.95);
    --bg-panel: rgba(20, 24, 40, 0.95);

    --primary: #00d4ff;
    --primary-dim: rgba(0, 212, 255, 0.15);
    --primary-glow: rgba(0, 212, 255, 0.6);

    --accent: #7b2cbf;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-primary: rgba(0, 212, 255, 0.3);

    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --radius: 12px;
    --radius-lg: 20px;

    /* Layout */
    --container-width: 1180px;
    --header-height: 80px;
}

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

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

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Critical Prevent Scroll */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Base Elements */
a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #fff;
}

/* Global Backgrounds */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 50% 30%, #1a1c29 0%, #050510 80%);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0, 212, 255, 0.02) 2px, rgba(0, 212, 255, 0.02) 3px);
    pointer-events: none;
    opacity: 0.4;
}

/* --- 2. LAYOUT UTILITIES --- */
.page {
    flex: 1;
    position: relative;
    width: 100%;
}

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

.section {
    padding: var(--space-lg) 0;
    position: relative;
}

.section-sm {
    padding: var(--space-md) 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 1rem;
}

.gap-4 {
    gap: 2rem;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), white);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- 3. COMPONENTS --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-dim);
}

.btn-primary:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Cards (Holo) */
.holo-card {
    background: rgba(25, 30, 45, 0.4);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.holo-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.holo-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Card Content Push Bottom */
.holo-card>.mt-auto {
    margin-top: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
}

.top-bar {
    background: rgba(0, 0, 0, 0.8);
    font-size: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.nav-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

/* Mobile Menu Trigger */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: #020205;
    border-top: 1px solid var(--border-glass);
    padding: 4rem 0 0;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.footer-link {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-glass);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 3rem;
}

/* Orbit Selector (Home) */
.orbit-wrap {
    width: 320px;
    height: 320px;
    margin: 3rem auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-center {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--primary) 60%);
    box-shadow: 0 0 50px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 800;
    z-index: 10;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.1;
    padding: 5px;
}

.orbit-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.2);
    animation: orbit-spin 40s linear infinite;
}

.orbit-wrap:hover .orbit-ring {
    animation-play-state: paused;
}

.orbit-node {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #050510;
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    cursor: pointer;
    transition: 0.3s;
    top: 50%;
    left: 50%;
    margin: -25px 0 0 -25px;
}

.orbit-node:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.2);
}

/* Manually positioned on ring radius = 160px */
.orbit-node:nth-child(1) {
    transform: rotate(0deg) translate(160px) rotate(0deg);
}

.orbit-node:nth-child(2) {
    transform: rotate(60deg) translate(160px) rotate(-60deg);
}

.orbit-node:nth-child(3) {
    transform: rotate(120deg) translate(160px) rotate(-120deg);
}

.orbit-node:nth-child(4) {
    transform: rotate(180deg) translate(160px) rotate(-180deg);
}

.orbit-node:nth-child(5) {
    transform: rotate(240deg) translate(160px) rotate(-240deg);
}

.orbit-node:nth-child(6) {
    transform: rotate(300deg) translate(160px) rotate(-300deg);
}

@keyframes orbit-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ACCESSIBILITY PANEL (Floating) */
.a11y-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9990;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-glass-heavy);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

.a11y-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--primary-dim);
}

.a11y-drawer {
    position: fixed;
    bottom: 85px;
    left: 20px;
    z-index: 9991;
    width: 300px;
    max-width: 90vw;
    background: var(--bg-panel);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.a11y-drawer.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 800px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100vw;
        height: calc(100vh - var(--header-height));
        background: var(--bg-deep);
        flex-direction: column;
        padding: 2rem;
        align-items: center;
        transform: translateX(100%);
        transition: 0.3s;
        border-top: 1px solid var(--border-glass);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: block;
    }

    .orbit-wrap {
        width: 280px;
        height: 280px;
    }

    .orbit-node:nth-child(1) {
        transform: rotate(0deg) translate(140px) rotate(0deg);
    }

    .orbit-node:nth-child(2) {
        transform: rotate(60deg) translate(140px) rotate(-60deg);
    }

    .orbit-node:nth-child(3) {
        transform: rotate(120deg) translate(140px) rotate(-120deg);
    }

    .orbit-node:nth-child(4) {
        transform: rotate(180deg) translate(140px) rotate(-180deg);
    }

    .orbit-node:nth-child(5) {
        transform: rotate(240deg) translate(140px) rotate(-240deg);
    }

    .orbit-node:nth-child(6) {
        transform: rotate(300deg) translate(140px) rotate(-300deg);
    }
}

/* Animations Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}