/* Animated network hero — /free-trial landing page */

.hero-network {
    position: relative;
    background-color: rgba(11, 31, 58, 0.97);
    color: #fff;
    min-height: clamp(520px, 88vh, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-network__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-network__svg {
    position: absolute;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    top: 50%;
    left: 55%;
    transform: translate(-45%, -50%);
    opacity: 0.95;
}

.hero-network__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(11, 31, 58, 0.98) 0%,
        rgba(11, 31, 58, 0.92) 28%,
        rgba(11, 31, 58, 0.65) 48%,
        rgba(11, 31, 58, 0.35) 68%,
        rgba(11, 31, 58, 0.2) 100%
    );
}

.hero-network__content {
    position: relative;
    z-index: 2;
    padding: 4rem 0 5rem;
    width: 100%;
}

.hero-network__content h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 14ch;
}

.hero-network__content .lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 36rem;
    margin-top: 1.25rem;
}

.hero-network__eyebrow {
    color: #5eead4;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.hero-network__note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 1.5rem;
}

/* SVG nodes */
.hn-node__ring {
    fill: rgba(20, 184, 166, 0.12);
    stroke: rgba(34, 211, 238, 0.45);
    stroke-width: 1.5;
    animation: hn-node-breathe 4s ease-in-out infinite;
}

.hn-node__core {
    fill: #22d3ee;
    filter: url(#hn-glow-cyan);
}

.hn-node__label {
    fill: rgba(148, 163, 184, 0.85);
    font-size: 9px;
    font-family: system-ui, sans-serif;
    text-anchor: middle;
    letter-spacing: 0.04em;
}

.hn-node__label--compact {
    font-size: 7.5px;
    letter-spacing: 0.02em;
}

.hn-node--api .hn-node__core { fill: #3b82f6; }
.hn-node--dns .hn-node__core { fill: #14b8a6; }
.hn-node--mail .hn-node__core { fill: #22c55e; }
.hn-node--lb .hn-node__core { fill: #a78bfa; }
.hn-node--db .hn-node__core { fill: #818cf8; }
.hn-node--cloud .hn-node__core { fill: #38bdf8; }
.hn-node--ssl .hn-node__core { fill: #fbbf24; }

/* UpMonix hub — larger icon + label */
.hn-node--hub .hn-node__hub-ring {
    fill: rgba(20, 184, 166, 0.2);
    stroke: rgba(103, 232, 249, 0.7);
    stroke-width: 1.75;
    animation: hn-node-breathe 3s ease-in-out infinite;
}

.hn-node__hub-bg {
    fill: rgba(11, 31, 58, 0.9);
    stroke: rgba(45, 212, 191, 0.45);
    stroke-width: 1.25;
}

.hn-node__hub-icon {
    filter: url(#hn-glow-hub);
}

.hn-node__label--hub {
    fill: #ffffff;
    font-size: 12px;
    font-weight: 700;
    font-family: system-ui, sans-serif;
    text-anchor: middle;
    letter-spacing: 0.05em;
}

.hn-node--alert .hn-node__ring {
    stroke: rgba(251, 146, 60, 0.7);
    fill: rgba(239, 68, 68, 0.15);
    animation: hn-node-alert 2.5s ease-in-out infinite;
}

.hn-node--alert .hn-node__core {
    fill: #f97316;
    filter: url(#hn-glow-alert);
}

.hn-node--web { animation-delay: 0s; }
.hn-node--api { animation-delay: 0.4s; }
.hn-node--server { animation-delay: 0.8s; }
.hn-node--dns { animation-delay: 1.2s; }
.hn-node--mail { animation-delay: 0.6s; }
.hn-node--db { animation-delay: 1s; }
.hn-node--cloud { animation-delay: 1.4s; }

/* Pulse along lines */
@keyframes hn-pulse-travel {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }
    6% {
        opacity: 1;
    }
    94% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

/* JS-fired one-shot pulses */
.hn-pulse--shot {
    animation: hn-pulse-travel linear forwards;
}

@keyframes hn-node-breathe {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes hn-node-alert {
    0%, 85%, 100% {
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
}

/* Reduced motion */
.hero-network--static .hero-network__pulses-dynamic {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .hn-pulse,
    .hn-node__ring,
    .hn-node--hub .hn-node__hub-ring,
    .hn-node--alert .hn-node__ring {
        animation: none;
    }

    .hero-network__svg {
        opacity: 0.6;
    }
}

@media (max-width: 991px) {
    .hero-network {
        min-height: clamp(480px, 82vh, 680px);
    }

    .hero-network__svg {
        left: 60%;
        opacity: 0.75;
    }

    .hero-network__overlay {
        background: linear-gradient(
            180deg,
            rgba(11, 31, 58, 0.97) 0%,
            rgba(11, 31, 58, 0.88) 45%,
            rgba(11, 31, 58, 0.5) 100%
        );
    }

    .hero-network__content h1 {
        max-width: none;
    }
}

@media (max-width: 575px) {
    .hero-network__content {
        padding: 3rem 0 3.5rem;
    }

    .hero-network__svg {
        opacity: 0.55;
    }
}

/* Register / auth — form over animated network */
:root {
    --auth-register-width: 540px;
}

.hero-network--auth {
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
}

.hero-network--auth .hero-network__svg {
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.85;
}

.hero-network__overlay--auth {
    background: radial-gradient(
        ellipse 70% 80% at 50% 45%,
        rgba(11, 31, 58, 0.55) 0%,
        rgba(11, 31, 58, 0.82) 45%,
        rgba(11, 31, 58, 0.94) 100%
    );
}

.hero-network--auth .hero-network__content {
    padding: 2.5rem 0 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: inherit;
    width: 100%;
}

.hero-network--auth .auth-register-col {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

@media (min-width: 576px) {
    .hero-network--auth .auth-register-col {
        width: var(--auth-register-width);
        max-width: var(--auth-register-width);
        flex: 0 0 var(--auth-register-width);
        padding-left: 0;
        padding-right: 0;
    }
}

.auth-register-panel {
    width: 100%;
    background: rgba(11, 31, 58, 0.88);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 14px;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

.auth-register-panel h2 {
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    font-weight: 700;
}

.auth-register-panel .form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.auth-register-panel .form-control {
    background: #fff;
    border-color: rgba(148, 163, 184, 0.45);
}

.auth-register-panel .form-control:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2);
}

.auth-register-footer a {
    color: #5eead4;
    font-weight: 600;
    text-decoration: none;
}

.auth-register-footer a:hover {
    color: #99f6e4;
    text-decoration: underline;
}

.public-body.marketing-body main:has(.hero-network--auth) {
    padding: 0;
    position: relative;
}

main:has(.hero-network--auth) .hero-network-flash {
    position: absolute;
    top: 0.75rem;
    left: 0;
    right: 0;
    z-index: 5;
    margin-top: 0 !important;
    pointer-events: none;
}

main:has(.hero-network--auth) .hero-network-flash .alert {
    pointer-events: auto;
    max-width: var(--auth-register-width);
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (max-width: 991px) {
    .hero-network--auth .hero-network__svg {
        opacity: 0.7;
    }

    .hero-network__overlay--auth {
        background: radial-gradient(
            ellipse 90% 70% at 50% 40%,
            rgba(11, 31, 58, 0.6) 0%,
            rgba(11, 31, 58, 0.92) 100%
        );
    }
}

@media (max-width: 575px) {
    .hero-network--auth {
        min-height: auto;
    }

    .hero-network--auth .hero-network__content {
        padding: 2rem 0 2.5rem;
    }
}
