:root {
    --space-deep: #040814;
    --space: #0a1228;
    --space-mid: #12203f;
    --star: #e8f0ff;
    --accent: #7eb6ff;
    --accent-soft: rgba(126, 182, 255, 0.35);
    --gold: #f0c75e;
    --gold-soft: rgba(240, 199, 94, 0.35);
    --text: #e8eefc;
    --text-muted: #9aa8c7;
    --white: #ffffff;
    --font-display: 'Orbitron', 'Segoe UI', sans-serif;
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
    --hub-x: 50%;
    --hub-y: 54%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--space-deep);
    position: relative;
    overflow-x: hidden;
}

a {
    color: var(--accent);
}

/* —— Starfield —— */
.sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(40, 70, 140, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 80%, rgba(30, 50, 100, 0.35), transparent 50%),
        radial-gradient(ellipse 50% 40% at 15% 70%, rgba(60, 40, 90, 0.25), transparent 45%),
        linear-gradient(180deg, #02060f 0%, var(--space) 40%, #060d1c 100%);
}

.sky--dim {
    opacity: 0.85;
}

.sky__nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: nebula-drift 28s ease-in-out infinite alternate;
}

.sky__nebula--a {
    width: min(55vw, 640px);
    height: min(55vw, 640px);
    left: -8%;
    top: 18%;
    background: radial-gradient(circle, rgba(70, 110, 200, 0.55), transparent 70%);
}

.sky__nebula--b {
    width: min(45vw, 520px);
    height: min(45vw, 520px);
    right: -6%;
    bottom: 8%;
    background: radial-gradient(circle, rgba(90, 70, 160, 0.4), transparent 70%);
    animation-duration: 36s;
    animation-direction: alternate-reverse;
}

.sky__stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.sky__stars .star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--star);
    opacity: 0.55;
    box-shadow: 0 0 4px rgba(232, 240, 255, 0.6);
    animation: twinkle var(--twinkle, 3s) ease-in-out infinite;
}

.sky__stars--far .star {
    width: 1px;
    height: 1px;
    opacity: 0.35;
    box-shadow: none;
}

.sky__stars--near .star.is-bright {
    width: 2.5px;
    height: 2.5px;
    opacity: 0.9;
    box-shadow: 0 0 8px rgba(232, 240, 255, 0.85);
}

.sky__comets {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.comet {
    position: absolute;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(232, 240, 255, 0.15), #fff);
    border-radius: 2px;
    opacity: 0;
    transform: rotate(-28deg);
    filter: drop-shadow(0 0 6px rgba(180, 210, 255, 0.8));
    animation: comet-fly var(--dur, 4.5s) linear var(--delay, 0s) infinite;
}

.comet::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    box-shadow: 0 0 10px 3px rgba(200, 220, 255, 0.9);
}

@keyframes nebula-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(4%, -3%) scale(1.08); }
}

@keyframes twinkle {
    0%, 100% { opacity: var(--o, 0.4); }
    50% { opacity: calc(var(--o, 0.4) * 0.25); }
}

@keyframes comet-fly {
    0% {
        opacity: 0;
        transform: translate(-10vw, -10vh) rotate(-28deg) scaleX(0.4);
    }
    8% { opacity: 1; }
    70% { opacity: 0.85; }
    100% {
        opacity: 0;
        transform: translate(110vw, 70vh) rotate(-28deg) scaleX(1);
    }
}

/* —— Hero —— */
.hero {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin: 0 auto;
    padding: clamp(2.5rem, 7vh, 4.5rem) 1.5rem 1.25rem;
    text-align: center;
}

.hero__brand {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 9vw, 5.2rem);
    font-weight: 800;
    letter-spacing: 0.18em;
    line-height: 1;
    color: var(--white);
    text-shadow:
        0 0 40px rgba(126, 182, 255, 0.45),
        0 0 80px rgba(240, 199, 94, 0.2);
}

.hero__slogan {
    margin: 1rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2.4vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.hero__lead {
    margin: 1.1rem auto 0;
    max-width: 38rem;
    font-size: clamp(0.95rem, 1.8vw, 1.08rem);
    line-height: 1.6;
    color: var(--text-muted);
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.35rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--gold), #d4a84a);
    color: #1a1408;
    box-shadow: 0 6px 24px rgba(240, 199, 94, 0.35);
}

.btn--primary:hover {
    box-shadow: 0 8px 28px rgba(240, 199, 94, 0.5);
}

.btn--ghost {
    background: rgba(126, 182, 255, 0.08);
    color: var(--text);
    border-color: rgba(126, 182, 255, 0.35);
}

.btn--ghost:hover {
    background: rgba(126, 182, 255, 0.16);
    border-color: rgba(126, 182, 255, 0.55);
}

/* —— Orbit map —— */
.home {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2rem;
}

.orbit-panel {
    margin: 0 auto;
}

.orbit-stage {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 1536 / 1024;
    overflow: visible;
}

.orbit-rings {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbit-rings__path {
    opacity: 0.55;
    animation: ring-breathe 8s ease-in-out infinite;
}

.orbit-rings__path--2 { animation-delay: -2.5s; }
.orbit-rings__path--3 { animation-delay: -5s; }

@keyframes ring-breathe {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

.planet-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: block;
    text-decoration: none;
    z-index: 2;
    outline: none;
    transition: filter 0.18s;
    width: clamp(28px, calc(var(--node-scale, 1) * 3.6vw), calc(var(--node-scale, 1) * 52px));
    height: clamp(28px, calc(var(--node-scale, 1) * 3.6vw), calc(var(--node-scale, 1) * 52px));
}

.planet-node:hover,
.planet-node:focus-visible,
.planet-node--active {
    z-index: 12;
    filter: drop-shadow(0 0 16px var(--accent));
}

.planet-node:hover .planet,
.planet-node:focus-visible .planet,
.planet-node--active .planet {
    transform: scale(1.08);
}

.planet-node__label {
    position: absolute;
    top: calc(100% + 0.28rem);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: clamp(0.48rem, 1vw, 0.68rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

.planet-node__sub {
    position: absolute;
    top: calc(100% + 1.15rem);
    left: 50%;
    transform: translateX(-50%);
    max-width: 8.5rem;
    font-size: clamp(0.42rem, 0.85vw, 0.58rem);
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    color: var(--text-muted);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* —— Planets —— */
.planet {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.18s;
}

.planet__body,
.planet__glow,
.planet__shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.planet__glow {
    inset: -18%;
    background: radial-gradient(circle, var(--accent, var(--accent)) 0%, transparent 68%);
    opacity: 0.55;
    animation: planet-pulse 3.6s ease-in-out infinite;
}

.planet__body {
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55), transparent 28%),
        radial-gradient(circle at 70% 75%, rgba(0, 0, 0, 0.35), transparent 45%),
        var(--accent, #7eb6ff);
    box-shadow:
        inset -6px -8px 16px rgba(0, 0, 0, 0.35),
        inset 4px 5px 10px rgba(255, 255, 255, 0.25),
        0 0 18px color-mix(in srgb, var(--accent, #7eb6ff) 45%, transparent);
    animation: planet-spin 18s linear infinite;
}

.planet__shine {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 42%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

@keyframes planet-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.08); }
}

@keyframes planet-spin {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(12deg); }
}

.planet--sun .planet__body {
    background:
        radial-gradient(circle at 35% 30%, #fff6c8, transparent 35%),
        radial-gradient(circle at 50% 50%, #ffe08a, #e8a020 70%, #b45309);
    box-shadow:
        0 0 30px rgba(240, 199, 94, 0.55),
        0 0 60px rgba(240, 199, 94, 0.25),
        inset -4px -6px 14px rgba(120, 60, 0, 0.3);
    animation: sun-glow 3s ease-in-out infinite;
}

.planet--hub {
    width: clamp(72px, 11vw, 120px);
    height: clamp(72px, 11vw, 120px);
}

@keyframes sun-glow {
    0%, 100% { box-shadow: 0 0 28px rgba(240, 199, 94, 0.5), 0 0 55px rgba(240, 199, 94, 0.2); }
    50% { box-shadow: 0 0 40px rgba(240, 199, 94, 0.75), 0 0 80px rgba(240, 199, 94, 0.35); }
}

.planet--mars .planet__body { background: radial-gradient(circle at 30% 28%, #ffb4a2, #c2410c 55%, #7f1d1d); }
.planet--ember .planet__body { background: radial-gradient(circle at 30% 28%, #fdba74, #ea580c 55%, #9a3412); }
.planet--amber .planet__body { background: radial-gradient(circle at 30% 28%, #fde68a, #d97706 55%, #92400e); }
.planet--gold .planet__body { background: radial-gradient(circle at 30% 28%, #fef3c7, #eab308 50%, #a16207); }
.planet--earth .planet__body { background: radial-gradient(circle at 30% 28%, #93c5fd, #2563eb 45%, #14532d 78%); }
.planet--ice .planet__body { background: radial-gradient(circle at 30% 28%, #e0f2fe, #38bdf8 50%, #0c4a6e); }
.planet--forest .planet__body { background: radial-gradient(circle at 30% 28%, #bbf7d0, #16a34a 50%, #14532d); }
.planet--cyan .planet__body { background: radial-gradient(circle at 30% 28%, #a5f3fc, #06b6d4 50%, #155e75); }
.planet--moon .planet__body { background: radial-gradient(circle at 30% 28%, #f1f5f9, #94a3b8 50%, #475569); }
.planet--steel .planet__body { background: radial-gradient(circle at 30% 28%, #cbd5e1, #64748b 55%, #1e293b); }
.planet--sand .planet__body { background: radial-gradient(circle at 30% 28%, #fde68a, #ca8a04 55%, #713f12); }
.planet--slate .planet__body { background: radial-gradient(circle at 30% 28%, #cfd8dc, #78909c 55%, #37474f); }
.planet--copper .planet__body { background: radial-gradient(circle at 30% 28%, #fdba74, #ea580c 50%, #7c2d12); }
.planet--brown .planet__body { background: radial-gradient(circle at 30% 28%, #d6b28a, #92400e 55%, #451a03); }
.planet--violet .planet__body { background: radial-gradient(circle at 30% 28%, #ddd6fe, #7c3aed 50%, #4c1d95); }

.orbit-hub {
    position: absolute;
    left: var(--hub-x);
    top: var(--hub-y);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 8;
    outline: none;
}

.orbit-hub__pulse {
    position: absolute;
    width: clamp(110px, 16vw, 170px);
    height: clamp(110px, 16vw, 170px);
    border-radius: 50%;
    border: 1px solid rgba(240, 199, 94, 0.35);
    animation: hub-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hub-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.18); opacity: 0.12; }
}

.orbit-hub__label {
    margin-top: 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(0.7rem, 1.3vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.orbit-hub__sub {
    margin-top: 0.2rem;
    font-size: clamp(0.55rem, 1vw, 0.72rem);
    color: var(--text-muted);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.orbit-hub:hover .planet--hub .planet__body,
.orbit-hub:focus-visible .planet--hub .planet__body,
.orbit-hub--active .planet--hub .planet__body {
    transform: scale(1.05);
}

/* —— Detail —— */
.detail-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 0.5rem;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-top__brand {
    font-family: var(--font-display);
    letter-spacing: 0.16em;
    font-size: 0.85rem;
    color: var(--gold);
}

.detail {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2.5rem;
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 800px) {
    .detail {
        grid-template-columns: 1fr 230px;
    }
}

.detail-card {
    background: rgba(10, 18, 40, 0.72);
    border: 1px solid rgba(126, 182, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.detail-card__header {
    padding: 1.75rem 1.75rem 1.25rem;
    background:
        linear-gradient(135deg, rgba(240, 199, 94, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(126, 182, 255, 0.1), transparent);
    border-bottom: 1px solid rgba(126, 182, 255, 0.12);
}

.detail-card__category {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.detail-card__brand {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.planet--badge {
    width: 64px;
    height: 64px;
    --accent: #7eb6ff;
}

.detail-card__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    letter-spacing: 0.06em;
    color: var(--white);
}

.detail-card__subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.detail-card__body {
    padding: 1.5rem 1.75rem;
}

.detail-card__description {
    margin: 0 0 1.35rem;
    line-height: 1.65;
    font-size: 1.02rem;
    color: var(--text);
}

.detail-card__section-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.detail-card__features {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.detail-card__features li + li {
    margin-top: 0.35rem;
}

.detail-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.15rem 1.75rem 1.6rem;
    border-top: 1px solid rgba(126, 182, 255, 0.12);
}

.detail-related {
    background: rgba(10, 18, 40, 0.65);
    border: 1px solid rgba(126, 182, 255, 0.15);
    border-radius: 16px;
    padding: 1.15rem;
    height: fit-content;
    backdrop-filter: blur(10px);
}

.detail-related__title {
    margin: 0 0 0.85rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}

.detail-related__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detail-related__list li + li {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(126, 182, 255, 0.1);
}

.detail-related__list a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.detail-related__name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.92rem;
}

.detail-related__sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.detail-related__list a:hover .detail-related__name {
    color: var(--gold);
}

.site-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .planet-node__sub {
        display: none;
    }

    .planet-node__label {
        font-size: 0.42rem;
        top: calc(100% + 0.2rem);
    }

    .hero__brand {
        letter-spacing: 0.12em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .planet__body,
    .planet__glow,
    .orbit-hub__pulse,
    .orbit-rings__path,
    .sky__nebula,
    .comet,
    .sky__stars .star {
        animation: none !important;
    }
}
