:root {
    --blue: #4db5ff;
    --blue-bright: #77caff;
    --purple: #a05cff;
    --green: #20e8b0;
    --orange: #ffad3d;
    --text: #f4f8ff;
    --muted: rgba(235,243,255,.74);
    --border: rgba(110,187,255,.34);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: #010510;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
}

.space-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("../images/space-background.png?v=3");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.035);
    animation: spaceFloat 32s ease-in-out infinite alternate;
}

.space-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 40%, transparent 25%, rgba(0,4,18,.18) 100%),
        linear-gradient(180deg, rgba(0,0,0,.22), transparent 22%, transparent 72%, rgba(0,0,0,.34));
}

@keyframes spaceFloat {
    from { transform: scale(1.035) translate3d(0,0,0); }
    to { transform: scale(1.07) translate3d(-.35%,.25%,0); }
}

.site-header {
    position: relative;
    z-index: 10;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(0,4,15,.38);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    letter-spacing: .07em;
}

.brand-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 10px rgba(77,181,255,.55));
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; }
.brand small {
    margin-top: 2px;
    font-size: .76rem;
    color: rgba(255,255,255,.78);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    position: relative;
    padding: 25px 0 22px;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .045em;
    text-transform: uppercase;
    transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--blue-bright); }

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    height: 2px;
    border-radius: 99px;
    background: var(--blue);
    box-shadow: 0 0 12px var(--blue);
}

.theme-button {
    border: 0;
    background: transparent 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

main {
    position: relative;
    z-index: 5;
    min-height: calc(100vh - 72px);
    padding-bottom: 70px;
}

.hero {
    min-height: 610px;
    display: grid;
    place-items: center;
    padding: 70px 24px 40px;
}

.hero-content {
    width: min(680px,100%);
    text-align: center;
    padding: 20px;
    text-shadow: 0 2px 14px rgba(0,0,0,.65);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.5rem,6vw,4.7rem);
    line-height: 1;
    letter-spacing: .08em;
}

.hero-subtitle {
    margin: 16px 0 25px;
    color: var(--blue-bright);
    font-size: clamp(.82rem,2vw,1.05rem);
    letter-spacing: .08em;
}

.divider {
    width: min(470px,82%);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--blue-bright);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,rgba(120,202,255,.8));
}

.divider::after {
    background: linear-gradient(90deg,rgba(120,202,255,.8));
}

.hero-text {
    margin: 0 auto 28px;
    max-width: 590px;
    color: var(--muted);
    line-height: 1.75;
    font-size: 1rem;
}

.primary-button,
.service-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-bright);
    text-decoration: none;
    border: 1px solid rgba(77,181,255,.8);
    border-radius: 6px;
    background: rgba(0,18,48,.38);
    transition: .25s ease;
}

.primary-button {
    padding: 12px 23px;
    font-weight: 600;
}

.primary-button:hover,
.service-card a:hover {
    color: #fff;
    background: rgba(48,137,205,.25);
    box-shadow: 0 0 25px rgba(77,181,255,.18);
    transform: translateY(-2px);
}

.cards-section {
    width: min(1100px,calc(100% - 40px));
    margin: -25px auto 0;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
}

.service-card {
    min-height: 170px;
    padding: 22px;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: linear-gradient(145deg,rgba(4,15,38,.78),rgba(1,8,23,.68));
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    transition: transform .25s ease;
}

.service-card:hover { transform: translateY(-5px); }
.service-card.services { border-color: rgba(160,92,255,.45); }
.service-card.monitoring { border-color: rgba(32,232,176,.45); }
.service-card.contact { border-color: rgba(255,173,61,.45); }

.card-icon {
    font-size: 29px;
    color: var(--blue-bright);
}

.services .card-icon { color: var(--purple); }
.monitoring .card-icon { color: var(--green); }
.contact .card-icon { color: var(--orange); }

.service-card h2 {
    margin: 0 0 10px;
    font-size: 1rem;
    letter-spacing: .07em;
}

.service-card p {
    min-height: 45px;
    margin: 0 0 15px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.55;
}

.service-card a {
    width: fit-content;
    padding: 8px 14px;
    font-size: .72rem;
    font-weight: 700;
}

.detail-section {
    position: relative;
    min-height: 360px;
    margin-top: 60px;
    padding: 80px 24px;
    background: rgba(1,5,17,.86);
    border-top: 1px solid rgba(255,255,255,.07);
}

.detail-inner {
    width: min(1000px,100%);
    margin: auto;
}

.section-kicker {
    color: var(--blue-bright);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
}

.detail-inner h2 {
    margin: 10px 0 15px;
    font-size: 2.2rem;
}

.detail-inner p {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.75;
}

.scroll-indicator {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 20;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255,255,255,.8);
    font-size: .66rem;
    letter-spacing: .1em;
    pointer-events: none;
    animation: pulse 1.8s ease-in-out infinite;
}

.scroll-indicator b {
    font-size: 27px;
    line-height: 22px;
}

@keyframes pulse {
    0%,100% { opacity: .45; }
    50% { opacity: 1; }
}

footer {
    position: relative;
    z-index: 5;
    padding: 25px;
    text-align: center;
    color: rgba(255,255,255,.45);
    background: #01040d;
    font-size: .75rem;
}

@media (max-width:900px) {
    .main-nav { gap:16px; }
    .main-nav a { font-size:.72rem; }
    .cards-section { grid-template-columns:repeat(2,1fr); }
}

@media (max-width:650px) {
    .site-header {
        padding:12px 16px;
        flex-wrap:wrap;
        gap:8px;
    }

    .main-nav {
        order:3;
        width:100%;
        overflow-x:auto;
        justify-content:flex-start;
    }

    .main-nav a {
        padding:8px 0 12px;
        white-space:nowrap;
    }

    .main-nav a.active::after { bottom:3px; }
    .theme-button { display:none; }

    .hero {
        min-height:540px;
        padding-top:35px;
    }

    .cards-section {
        grid-template-columns:1fr;
        width:min(100% - 28px,460px);
    }
}

@media (prefers-reduced-motion:reduce) {
    html { scroll-behavior:auto; }
    .space-background,.scroll-indicator { animation:none; }
}
