.neural-hero {
    --neural-title: #09788a;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--bg);
}

html[data-theme=dark] .neural-hero { --neural-title: #80dce6; }
@media (prefers-color-scheme: dark) {
    html[data-theme=device] .neural-hero { --neural-title: #80dce6; }
}

.neural-hero::before,
.neural-hero__aurora,
.neural-hero__field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.neural-hero::before {
    content: "";
    z-index: -3;
    background:
        radial-gradient(ellipse 53% 88% at 76% 46%, #4089da19, transparent 74%),
        linear-gradient(180deg, transparent 78%, var(--bg) 100%);
}

.neural-hero__aurora {
    z-index: -2;
    inset: -8% -12%;
    background:
        radial-gradient(ellipse 32% 52% at 77% 33%, #00aabd27, transparent 72%),
        radial-gradient(ellipse 35% 42% at 66% 70%, #6276dd22, transparent 77%),
        radial-gradient(ellipse 20% 33% at 93% 61%, #ff926118, transparent 72%);
}

.neural-hero__field {
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    opacity: .74;
    mask-image: linear-gradient(90deg, #0004 0%, #0003 32%, #0009 59%, #0006 83%, #0008 100%);
}
.neural-hero__field > canvas { display: block; width: 100%; height: 100%; }

.neural-hero .portal-hero {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    min-height: clamp(460px, 44vw, 650px);
    padding-block: clamp(3.25rem, 5.5vw, 5.75rem) clamp(2.5rem, 4.3vw, 4rem);
}

.neural-hero .portal-hero-copy { min-width: 0; }
.neural-hero .portal-hero h1 {
    max-width: 15ch;
    font-size: clamp(3rem, 6.2vw, 6.5rem);
    text-wrap: balance;
}
.neural-hero h1 em { color: var(--neural-title); font-style: normal; }
.neural-hero .portal-hero .lead { max-width: 41ch; }

.neural-hero__figure {
    display: grid;
    align-content: center;
    position: relative;
    min-width: 0;
    margin: 0;
}

.neural-hero__scene { aspect-ratio: 3 / 2; }
.neural-original { position:relative;isolation:isolate; }
.neural-original > :is(img,canvas) { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none; }
.neural-original > img { mask-image:radial-gradient(ellipse 81% 80% at 52% 49%,#000 51%,transparent 100%); }
.neural-original > canvas { visibility:hidden; }
.neural-original[data-rendered] > canvas { visibility:visible; }

.neural-hero__wordmark {
    position: relative;
    isolation: isolate;
    width: min(75%, 405px);
    margin: clamp(-2.5rem, -3vw, -1.05rem) auto 0;
}
.neural-hero__wordmark img {
    width: 100%;
    height: auto;
    filter: var(--trial-logo-glow, none);
}
.neural-hero__wordmark::before {
    content: "";
    position: absolute;
    inset: -2% 4% -10%;
    z-index: -1;
    background: radial-gradient(ellipse 56% 42% at 50% 60%, #35b4da32, transparent 85%);
    opacity: .4;
}
.neural-hero__wordmark::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    mask: url("/assets/identity/02_Logotipos/NN_H_cor_v3.svg") center / contain no-repeat;
    background: linear-gradient(108deg,transparent 43%,#fff9 50%,transparent 57%) 116% 50% / 280% 100% no-repeat;
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .neural-hero__aurora { animation: neural-aurora 34s ease-in-out infinite alternate paused; }
    .neural-hero__wordmark { animation: neural-float 22s ease-in-out infinite paused; }
    .neural-hero__wordmark::before { animation: neural-light 22s ease-in-out infinite paused; }
    .neural-hero__wordmark::after { animation: brand-reflection 28s linear infinite paused; }
    .neural-hero[data-motion] :is(.neural-hero__aurora,.neural-hero__wordmark),
    .neural-hero[data-motion] .neural-hero__wordmark::before,
    .neural-hero[data-motion] .neural-hero__wordmark::after { animation-play-state: running; }
}

@keyframes neural-aurora {
    from { transform: translate3d(-1.5%, -.8%, 0); opacity: .75; }
    to { transform: none; opacity: 1; }
}
@keyframes neural-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes neural-light {
    0%, 100% { opacity: .35; transform: scale(.97); }
    50% { opacity: .68; transform: scale(1.06); }
}
html[dir="rtl"] .neural-hero__field { mask-image: linear-gradient(270deg, #0004 0%, #0003 32%, #0009 59%, #0006 83%, #0008 100%); }

@media (max-width: 700px) {
    .neural-hero .portal-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: .8rem;
        min-height: 0;
        padding-block: 2.25rem 1rem;
    }
    .neural-hero .portal-hero h1 { font-size: clamp(2.55rem, 10.25vw, 4.4rem); }
    .neural-hero .portal-hero .eyebrow { margin-block-end: 1.1rem; }
    .neural-hero .portal-hero .lead { margin-block: 1.1rem 1.35rem; font-size: 1rem; line-height: 1.65; }
    .neural-hero .button-row { gap: .55rem; }
    .neural-hero .portal-hero .button { min-height: 46px; padding-inline: .75rem; font-size: .81rem; }
    .neural-hero__figure { width: min(100%, 35rem); justify-self: center; }
    .neural-hero__wordmark { width: min(74%, 355px); }
    :is(html,html[dir="rtl"]) .neural-hero__field { mask-image: linear-gradient(180deg, #0003 10%, #0004 47%, #0008 78%); }
}
