/* ==========================================================================
   JSDI Landing — Hero Visual 2.0
   Jet-Service Digital Infrastructure
   ========================================================================== */

/* Hero layout */
.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - var(--jsdi-header-height));
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    top: -22%;
    right: -12%;
    width: min(820px, 64vw);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.06) 42%, transparent 72%);
    filter: blur(8px);
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--jsdi-bg-primary) 0%, transparent 35%, transparent 72%, rgba(5, 10, 16, 0.2)),
        linear-gradient(180deg, transparent 72%, var(--jsdi-bg-primary));
}

.hero__inner {
    min-height: calc(100vh - var(--jsdi-header-height));
    padding-block: clamp(4rem, 8vw, 7.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(500px, 0.92fr);
    align-items: center;
    gap: clamp(3rem, 5vw, 5rem);
}

.hero__content {
    position: relative;
    z-index: 3;
    min-width: 0;
    max-width: 690px;
}

.hero__visual {
    position: relative;
    z-index: 2;
    min-width: 0;
    min-height: 610px;
    display: grid;
    place-items: center;
    perspective: 1400px;
}

/* Hero typography */
.hero__eyebrow {
    width: fit-content;
    margin: 0 0 1.6rem;
    padding: 0.5rem 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: var(--jsdi-space-2);
    border: 1px solid var(--jsdi-border-default);
    border-radius: var(--jsdi-radius-pill);
    color: var(--jsdi-accent-primary);
    background: rgba(15, 34, 51, 0.46);
    font-family: var(--jsdi-font-mono);
    font-size: var(--jsdi-text-xs);
    font-weight: var(--jsdi-weight-semibold);
    letter-spacing: var(--jsdi-tracking-wider);
    text-transform: uppercase;
}

.hero__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--jsdi-accent-secondary);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.75);
}

.hero__title {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.hero__title span {
    display: block;
    color: var(--jsdi-text-secondary);
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    font-weight: var(--jsdi-weight-semibold);
    letter-spacing: 0.2em;
}

.hero__title strong {
    display: block;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
    color: var(--jsdi-text-primary);
    background: linear-gradient(108deg, #ffffff 0%, #e5f5ff 55%, var(--jsdi-accent-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(3.05rem, 4vw, 4.25rem);
    font-weight: var(--jsdi-weight-black);
}

.hero__description {
    max-width: 590px;
    margin: 2rem 0 0;
    color: var(--jsdi-text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: var(--jsdi-leading-relaxed);
}

.hero__actions {
    margin-top: 2.6rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--jsdi-space-4);
}

/* Hero core */
.hero-core {
    position: relative;
    width: min(100%, 620px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    transform: rotateX(2deg) rotateY(-3deg);
    transform-style: preserve-3d;
}

.hero-core::before {
    content: "";
    position: absolute;
    z-index: -3;
    inset: 19%;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(14, 165, 233, 0.2);
    filter: blur(82px);
    animation: hero-ambient 7s ease-in-out infinite;
}

.hero-core::after {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 6%;
    border: 1px solid rgba(56, 189, 248, 0.11);
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        inset 0 0 80px rgba(56, 189, 248, 0.035),
        0 0 70px rgba(56, 189, 248, 0.04);
}

.hero-core__grid {
    position: absolute;
    z-index: -1;
    inset: 2%;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 3rem;
    background:
        linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(14, 165, 233, 0.15), transparent 53%);
    background-size: 34px 34px, 34px 34px, auto;
    box-shadow:
        inset 0 0 90px rgba(56, 189, 248, 0.06),
        0 0 90px rgba(14, 165, 233, 0.07);
}

.hero-core__grid::before,
.hero-core__grid::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.hero-core__grid::before {
    inset: 13%;
    border: 1px solid rgba(56, 189, 248, 0.12);
    box-shadow: inset 0 0 44px rgba(56, 189, 248, 0.04);
}

.hero-core__grid::after {
    inset: 25%;
    border: 1px dashed rgba(45, 212, 191, 0.14);
    animation: hero-orbit 36s linear infinite;
}

/* Server stack */
.hero-core__server {
    position: relative;
    z-index: 3;
    width: 270px;
    min-height: 350px;
    padding: 4.7rem 1.65rem 1.7rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 2rem;
    background:
        linear-gradient(145deg, rgba(15, 46, 68, 0.96), rgba(4, 15, 25, 0.96)),
        var(--jsdi-bg-elevated-strong);
    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.055),
        0 30px 80px rgba(0, 0, 0, 0.52),
        0 0 76px rgba(14, 165, 233, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 70px rgba(56, 189, 248, 0.055);
    transform: translateZ(76px) rotateX(3deg) rotateY(-5deg);
    transform-style: preserve-3d;
    animation: hero-float 6s ease-in-out infinite;
}

.hero-core__server::before {
    content: "JSDI CORE";
    position: absolute;
    top: -1.35rem;
    right: 1.4rem;
    left: 1.4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(56, 189, 248, 0.52);
    border-radius: 1.3rem;
    color: var(--jsdi-accent-primary);
    background: linear-gradient(145deg, rgba(22, 69, 98, 0.98), rgba(6, 27, 43, 0.98));
    box-shadow:
        0 0 34px rgba(56, 189, 248, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: var(--jsdi-font-mono);
    font-size: 0.78rem;
    font-weight: var(--jsdi-weight-bold);
    letter-spacing: 0.14em;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.72);
    transform: translateZ(28px);
}

.hero-core__server::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 1rem;
    border-radius: 1.5rem;
    background: rgba(56, 189, 248, 0.14);
    filter: blur(38px);
}

.hero-core__logo {
    position: absolute;
    top: 2.25rem;
    right: 0;
    left: 0;
    color: rgba(103, 215, 255, 0.88);
    font-family: var(--jsdi-font-mono);
    font-size: 1.8rem;
    font-weight: var(--jsdi-weight-black);
    letter-spacing: 0.11em;
    text-align: center;
    text-shadow:
        0 0 12px rgba(56, 189, 248, 0.85),
        0 0 28px rgba(56, 189, 248, 0.38);
}

.hero-core__layer {
    position: relative;
    height: 48px;
    margin-top: 0.72rem;
    display: block;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(18, 53, 76, 0.94), rgba(5, 20, 32, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 7px 18px rgba(0, 0, 0, 0.32);
}

.hero-core__layer::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jsdi-status-online);
    box-shadow:
        0 0 8px rgba(34, 197, 94, 0.9),
        0 0 18px rgba(34, 197, 94, 0.4);
    transform: translateY(-50%);
    animation: hero-led 2.4s ease-in-out infinite;
}

.hero-core__layer::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 52px;
    height: 3px;
    border-radius: var(--jsdi-radius-pill);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), var(--jsdi-accent-primary));
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transform: translateY(-50%);
}

.hero-core__layer:nth-of-type(3)::before {
    background: var(--jsdi-status-development);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
}

/* Connected nodes */
.hero-core__node {
    position: absolute;
    z-index: 4;
    min-width: 94px;
    min-height: 52px;
    padding: 0.7rem 1rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 1rem;
    color: var(--jsdi-text-primary);
    background: linear-gradient(145deg, rgba(13, 39, 58, 0.94), rgba(4, 17, 28, 0.97));
    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.34),
        0 0 26px rgba(56, 189, 248, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
    font-family: var(--jsdi-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.045em;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: hero-node 6.5s ease-in-out infinite;
}

.hero-core__node::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--jsdi-accent-secondary);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.72);
}

.hero-core__node::after {
    content: "";
    position: absolute;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.82), transparent);
    background-size: 200% 100%;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    animation: hero-flow 2.8s linear infinite;
}

.hero-core__node--cloud {
    top: 9%;
    left: 1%;
}

.hero-core__node--cloud::before,
.hero-core__node--services::before {
    right: -4px;
}

.hero-core__node--cloud::after {
    left: 100%;
    width: 116px;
    transform: rotate(20deg);
    transform-origin: left;
}

.hero-core__node--database {
    top: 13%;
    right: -1%;
}

.hero-core__node--database::before,
.hero-core__node--security::before {
    left: -4px;
}

.hero-core__node--database::after {
    right: 100%;
    width: 112px;
    transform: rotate(-19deg);
    transform-origin: right;
}

.hero-core__node--security {
    right: -2%;
    bottom: 16%;
    animation-delay: -1.8s;
}

.hero-core__node--security::after {
    right: 100%;
    width: 110px;
    transform: rotate(16deg);
    transform-origin: right;
}

.hero-core__node--services {
    bottom: 10%;
    left: 1%;
    animation-delay: -3.2s;
}

.hero-core__node--services::after {
    left: 100%;
    width: 112px;
    transform: rotate(-18deg);
    transform-origin: left;
}

/* Motion */
@keyframes hero-float {
    0%,
    100% {
        transform: translateZ(76px) translateY(0) rotateX(3deg) rotateY(-5deg);
    }
    50% {
        transform: translateZ(76px) translateY(-10px) rotateX(2deg) rotateY(-3deg);
    }
}

@keyframes hero-node {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes hero-orbit {
    to {
        transform: rotate(360deg);
    }
}

@keyframes hero-ambient {
    0%,
    100% {
        opacity: 0.75;
        transform: scale(0.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes hero-led {
    0%,
    100% {
        opacity: 0.65;
    }
    50% {
        opacity: 1;
    }
}

@keyframes hero-flow {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width: 1240px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr);
        gap: var(--jsdi-space-12);
    }

    .hero__title strong {
        font-size: clamp(2.9rem, 4.6vw, 4rem);
    }

    .hero-core {
        width: min(100%, 540px);
    }
}

@media (max-width: 980px) {
    .hero {
        min-height: auto;
    }

    .hero__inner {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: var(--jsdi-space-12);
    }

    .hero__content {
        max-width: 760px;
    }

    .hero__visual {
        min-height: 520px;
    }

    .hero-core {
        width: min(100%, 520px);
        transform: none;
    }
}

@media (max-width: 620px) {
    .hero__inner {
        padding-block: var(--jsdi-space-16);
    }

    .hero__title strong {
        font-size: clamp(2.2rem, 10.8vw, 2.65rem);
        letter-spacing: -0.055em;
    }

    .hero__description {
        margin-top: var(--jsdi-space-6);
    }

    .hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero__visual {
        min-height: 390px;
    }

    .hero-core {
        width: min(100%, 360px);
    }

    .hero-core__server {
        width: 196px;
        min-height: 270px;
        padding: 3.8rem 1.1rem 1.1rem;
    }

    .hero-core__server::before {
        height: 3.2rem;
    }

    .hero-core__logo {
        top: 1.9rem;
        font-size: 1.25rem;
    }

    .hero-core__layer {
        height: 37px;
        margin-top: 0.55rem;
    }

    .hero-core__node {
        min-width: 72px;
        min-height: 42px;
        padding: 0.5rem 0.7rem;
        font-size: 0.6rem;
    }

    .hero-core__node::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-core::before,
    .hero-core__grid::after,
    .hero-core__server,
    .hero-core__layer::before,
    .hero-core__node,
    .hero-core__node::after {
        animation: none;
    }
}
