/* =========================================================
   Orbit Wave LLC — capa futurista: espacio, androides y HUD
   ========================================================= */
:root { --font-hud: "Orbitron", var(--font); }

.starfield-canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.page-hero {
    background:
        radial-gradient(900px 520px at 85% 10%, rgba(47, 118, 219, 0.30), transparent 60%),
        radial-gradient(600px 400px at 10% 90%, rgba(120, 80, 255, 0.14), transparent 60%),
        radial-gradient(700px 480px at 0% 100%, rgba(127, 199, 255, 0.10), transparent 60%),
        linear-gradient(180deg, #02060e 0%, var(--ink) 40%, var(--navy) 100%);
}
.page-hero::before { opacity: .55; }

.kicker { font-family: var(--font-hud); font-weight: 500; letter-spacing: .24em; font-size: .7rem; }
.kicker::before { content: "// "; opacity: .55; }
.hero-trust strong, .hud-stat strong { font-family: var(--font-hud); font-weight: 700; letter-spacing: 0; }
.process-num { font-family: var(--font-hud); font-style: normal; font-weight: 700; font-size: 2.2rem; }
.services-grid .service-card .tag::before { font-family: var(--font-hud); font-style: normal; font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--navy); padding: .2rem .45rem; border-radius: 6px; }

/* Esquinas tipo HUD */
.hud-corners {
    position: absolute;
    inset: -12px;
    z-index: 4;
    pointer-events: none;
    --c: rgba(127, 199, 255, 0.85);
    background:
        linear-gradient(var(--c), var(--c)) top left / 26px 2px no-repeat,
        linear-gradient(var(--c), var(--c)) top left / 2px 26px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 26px 2px no-repeat,
        linear-gradient(var(--c), var(--c)) top right / 2px 26px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 26px 2px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom left / 2px 26px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 26px 2px no-repeat,
        linear-gradient(var(--c), var(--c)) bottom right / 2px 26px no-repeat;
    filter: drop-shadow(0 0 6px rgba(127, 199, 255, 0.6));
}
.hud-label {
    position: absolute;
    z-index: 4;
    right: 1.2rem;
    bottom: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-hud);
    font-size: .62rem;
    letter-spacing: .22em;
    color: var(--accent-2);
    text-shadow: 0 0 8px rgba(127, 199, 255, 0.7);
}
.hud-label::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: #5ef0a8;
    box-shadow: 0 0 8px #5ef0a8;
    animation: ow-blink 1.6s ease-in-out infinite;
}
@keyframes ow-blink { 50% { opacity: .25; } }

/* Línea de escaneo sobre imágenes destacadas */
.hero-visual .main-image::before,
.page-hero .content-grid .media::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 30%;
    top: -30%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(127, 199, 255, 0.12) 85%, rgba(168, 225, 255, 0.45) 100%);
    animation: ow-scan 6s linear infinite;
}
@keyframes ow-scan { to { top: 100%; } }

/* Sistema orbital detrás de la imagen del hero */
.orbit-system {
    position: absolute;
    z-index: 0;
    width: 135%;
    aspect-ratio: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.orbit-system span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(127, 199, 255, 0.2);
    animation: ow-spin 60s linear infinite;
}
.orbit-system span:nth-child(2) { inset: 12%; border-style: solid; border-color: rgba(127, 199, 255, 0.1); animation-duration: 40s; animation-direction: reverse; }
.orbit-system span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -5px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 12px 3px rgba(127, 199, 255, 0.8);
}
.orbit-system span:nth-child(2)::after { left: auto; right: -4px; top: 30%; width: 8px; height: 8px; background: #b9a6ff; box-shadow: 0 0 12px 3px rgba(150, 120, 255, 0.7); }
@keyframes ow-spin { to { transform: rotate(360deg); } }

/* Ventana holográfica de diseño web */
.holo-browser {
    position: absolute;
    z-index: 5;
    left: -3.5rem;
    bottom: -2.2rem;
    width: 300px;
    border-radius: 14px;
    background: rgba(6, 16, 34, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 0 0 1px rgba(127, 199, 255, 0.2), 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(47, 118, 219, 0.35);
    transform: perspective(900px) rotateY(12deg) rotateX(4deg);
    animation: ow-holo 7s ease-in-out infinite;
}
.holo-browser img { width: 100%; height: auto; display: block; }
@keyframes ow-holo {
    0%, 100% { transform: perspective(900px) rotateY(12deg) rotateX(4deg) translateY(0); }
    50% { transform: perspective(900px) rotateY(8deg) rotateX(2deg) translateY(-10px); }
}

/* Banda espacial a pantalla completa */
.space-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 9rem 0;
    color: #fff;
    text-align: center;
    background: #02060e url("../img/tierra-red-nocturna.webp") center / cover no-repeat fixed;
}
.space-band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(2, 6, 14, 0.35), rgba(2, 6, 14, 0.88));
}
.space-band .kicker { color: var(--accent); }
.space-band .section-title { color: #fff; max-width: 20ch; margin: 0 auto; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.space-band .section-subtitle { color: var(--muted-dark); margin: 1.2rem auto 0; }
.hud-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 880px;
    margin: 3.5rem auto 0;
}
.hud-stat {
    position: relative;
    padding: 1.6rem 1rem;
    border-radius: 16px;
    background: rgba(6, 16, 34, 0.55);
    border: 1px solid rgba(127, 199, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hud-stat strong { display: block; font-size: 1.9rem; color: #fff; text-shadow: 0 0 18px rgba(127, 199, 255, 0.6); }
.hud-stat span { display: block; margin-top: .35rem; font-size: .88rem; color: var(--muted-dark); }

/* Fondos espaciales en proceso, impacto y CTA */
.section-process {
    background:
        linear-gradient(180deg, rgba(4, 10, 21, 0.96) 0%, rgba(4, 10, 21, 0.72) 50%, rgba(4, 10, 21, 0.96) 100%),
        url("../img/tierra-horizonte.webp") center / cover no-repeat;
}
.section-process .process-step { background: rgba(6, 16, 34, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.section-dark.has-nebula {
    background:
        linear-gradient(180deg, rgba(4, 10, 21, 0.9), rgba(4, 10, 21, 0.97)),
        url("../img/nebulosa.webp") center / cover no-repeat;
}
.cta {
    background:
        radial-gradient(600px 300px at 50% 0%, rgba(127, 199, 255, 0.25), transparent 70%),
        linear-gradient(160deg, rgba(19, 42, 82, 0.8) 0%, rgba(7, 18, 42, 0.86) 55%, rgba(4, 10, 21, 0.94) 100%),
        url("../img/nebulosa-orion.webp") center / cover no-repeat;
}

/* Brillo al pasar sobre tarjetas */
.impact-card { box-shadow: 0 0 0 1px rgba(127, 199, 255, 0.08); transition: box-shadow .4s ease, transform .4s var(--ease); }
.impact-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(127, 199, 255, 0.45), 0 30px 70px rgba(47, 118, 219, 0.3); }
.service-card .thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(168, 225, 255, 0.35) 50%, transparent 65%);
    transform: translateX(-100%);
    transition: transform .9s var(--ease);
}
.service-card:hover .thumb::before { transform: translateX(100%); }

.footer { isolation: isolate; }

/* Página 404 */
.error-hero { min-height: calc(100vh - 120px); display: flex; align-items: center; }
.error-wrap { text-align: center; display: flex; flex-direction: column; align-items: center; }
.error-wrap .hero-copy { margin-left: auto; margin-right: auto; }
.error-wrap .hero-actions { justify-content: center; }
.error-code {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-family: var(--font-hud);
    font-weight: 700;
    font-size: clamp(6rem, 18vw, 11rem);
    line-height: 1;
    color: transparent;
    background: linear-gradient(180deg, #fff 20%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 60px rgba(127, 199, 255, 0.25);
}
.error-planet {
    position: relative;
    width: .78em;
    height: .78em;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #a8e1ff, #2f76db 55%, #0c1d3d 100%);
    box-shadow: inset -12px -14px 30px rgba(4, 10, 21, 0.7), 0 0 50px rgba(47, 118, 219, 0.55);
    animation: ow-float 6s ease-in-out infinite;
}
.error-planet i {
    position: absolute;
    left: -30%;
    right: -30%;
    top: 42%;
    height: 16%;
    border-radius: 50%;
    border: 3px solid rgba(168, 225, 255, 0.75);
    transform: rotate(-16deg);
}

/* Selector de idioma */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: var(--font-hud);
    font-size: .66rem;
    letter-spacing: .12em;
}
.lang-switch a {
    padding: .2rem .6rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    transition: background .2s ease, color .2s ease;
}
.lang-switch a:hover { color: #fff; }
.lang-switch a.is-current { background: var(--grad-brand); color: #fff; }

@media (max-width: 1100px) {
    .holo-browser { left: .5rem; bottom: -1.5rem; width: 240px; }
    .space-band { background-attachment: scroll; }
}
@media (max-width: 700px) {
    .holo-browser { position: relative; left: auto; bottom: auto; width: 100%; max-width: 320px; margin: 1rem auto 0; transform: none; animation: none; }
    .hud-stats { grid-template-columns: 1fr; }
    .space-band { padding: 6rem 0; }
    .orbit-system { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .orbit-system span, .holo-browser, .hud-label::before,
    .hero-visual .main-image::before, .page-hero .content-grid .media::after { animation: none !important; }
}
