@font-face {
    font-family: "Anonymus-pro";
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/Anonymous_Pro/AnonymousPro-Regular.ttf");
}

@font-face {
    font-family: "Google-Sans-Flex";
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/Google_Sans_Flex/static/GoogleSansFlex_9pt-Regular.ttf");
}

@font-face {
    font-family: "Exo-2";
    font-weight: 400;
    font-style: normal;
    src: url("../fonts/Exo_2/static/Exo2-Regular.ttf");
}

:root {
    --bg: #020611;
    --panel: rgba(9, 17, 33, 0.8);
    --panel-strong: rgba(12, 22, 40, 0.95);
    --line: rgba(0, 255, 247, 0.16);
    --neon-cyan: #4bbcff;
    --neon-magenta: #ff9a2f;
    --hud-edge: rgba(202, 214, 231, 0.62);
    --hud-surface: rgba(168, 186, 207, 0.08);
    --hud-text: #edf3f9;
    --text: #e6f7ff;
    --muted: #a9bfd0;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(64, 140, 255, 0.22), transparent 24%),
        linear-gradient(180deg, #061126 0%, #050d1c 48%, #020611 100%);
    color: var(--text);
    font-family: "Google-Sans-Flex", "Exo-2", system-ui, sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(92, 155, 255, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(92, 155, 255, 0.18) 1px, transparent 1px),
        linear-gradient(rgba(255, 154, 47, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 154, 47, 0.04) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(52, 112, 255, 0.08), transparent 54%);
    background-size: 72px 72px, 72px 72px, 288px 288px, 288px 288px, 100% 100%;
    background-position: 0 0, 0 0, center;
    opacity: 0.46;
    mix-blend-mode: screen;
    animation: grid-drift 22s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(3, 5, 12, 0.178), rgba(7, 10, 22, 0.205));
}

.scene-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    perspective: 1200px;
}

header,
main {
    position: relative;
    z-index: 5;
}

.scene-image {
    position: absolute;
    inset: 0;
    background-image: url("../Imagenes/Fondo montaña.jpeg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.4;
    transform: scale(1.02);
    filter: grayscale(2) brightness(1.00) contrast(0.70);
    background-color: transparent;
    z-index: 0;
}

.scene-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 10, 24, 0.75), rgba(3, 10, 24, 0.75));
    opacity: 0.75;
    z-index: 1;
}

.scene-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-sky {
    opacity: 1;
}

.scene-mountains {
    transform-origin: center bottom;
}

.scene-mountains-far {
    opacity: 0.96;
    transform: translateY(2vh) scale(1.02);
    animation: mountains-drift-far 36s ease-in-out infinite alternate;
}

.scene-mountains-near {
    opacity: 1;
    transform: translateY(4vh) scale(1.05);
    animation: mountains-drift-near 28s ease-in-out infinite alternate;
}

.scene-roads {
    opacity: 0.95;
    filter: drop-shadow(0 0 10px rgba(0, 255, 247, 0.18)) drop-shadow(0 0 16px rgba(255, 0, 208, 0.1));
    mix-blend-mode: screen;
}

.road {
    stroke-dasharray: 12 22;
    animation: road-flow 10s linear infinite;
}

.road-a {
    stroke-width: 3;
}

.road-b {
    stroke-width: 2;
    animation-duration: 14s;
}

.road-c {
    stroke-width: 2;
    animation-duration: 18s;
}

.scene-cloud {
    position: absolute;
    border-radius: 999px;
    background:
        radial-gradient(circle at 24% 48%, rgba(7, 12, 22, 0.96) 0 14%, rgba(7, 12, 22, 0.82) 18%, rgba(5, 8, 22, 0.28) 38%, transparent 68%),
        radial-gradient(circle at 40% 34%, rgba(0, 255, 247, 0.16) 0 8%, rgba(0, 255, 247, 0.05) 14%, transparent 44%),
        radial-gradient(circle at 62% 46%, rgba(255, 0, 208, 0.08) 0 7%, rgba(255, 0, 208, 0.03) 15%, transparent 44%),
        radial-gradient(circle at 79% 42%, rgba(0, 85, 255, 0.1) 0 7%, rgba(0, 85, 255, 0.03) 14%, transparent 42%),
        linear-gradient(180deg, rgba(10, 15, 24, 0.78), rgba(5, 8, 22, 0.08));
    clip-path: polygon(8% 66%, 18% 44%, 30% 48%, 41% 28%, 55% 36%, 66% 22%, 80% 40%, 91% 34%, 97% 54%, 91% 74%, 77% 82%, 63% 78%, 48% 88%, 32% 82%, 20% 90%, 10% 80%);
    opacity: 0.96;
    filter: drop-shadow(0 0 14px rgba(0, 255, 247, 0.05)) drop-shadow(0 0 18px rgba(0, 85, 255, 0.03));
    animation: cloud-float 34s ease-in-out infinite alternate;
}

.scene-cloud::before {
    content: "";
    position: absolute;
    inset: 10%;
    clip-path: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 247, 0.06), transparent 62%);
    opacity: 0.42;
}

.cloud-one {
    top: 12vh;
    left: 8vw;
    width: 24vw;
    height: 10vw;
    min-width: 260px;
    min-height: 110px;
}

.cloud-two {
    top: 20vh;
    right: 12vw;
    width: 26vw;
    height: 11vw;
    min-width: 280px;
    min-height: 120px;
    animation-duration: 42s;
    animation-direction: alternate-reverse;
}

.cloud-three {
    top: 48vh;
    left: 40vw;
    width: 20vw;
    height: 8vw;
    min-width: 220px;
    min-height: 92px;
    animation-duration: 48s;
}

.scene-spark-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen;
}

.scene-spark-layer::before {
    content: "";
    position: absolute;
    inset: -24vh -10vw -8vh;
    background-image:
        linear-gradient(rgba(112, 170, 255, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 170, 255, 0.22) 1px, transparent 1px),
        linear-gradient(rgba(255, 154, 47, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 154, 47, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 50% 35%, rgba(70, 130, 255, 0.14), transparent 50%);
    background-size: 72px 72px, 72px 72px, 288px 288px, 288px 288px, 100% 100%;
    transform: perspective(1300px) rotateX(72deg) translateY(24vh) scale(1.45);
    transform-origin: center bottom;
    opacity: 0.26;
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.96) 18%, rgba(0, 0, 0, 0.88) 74%, transparent 100%);
}

.grid-spark {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    mix-blend-mode: screen;
    transform-origin: center;
    filter: drop-shadow(0 0 12px currentColor) drop-shadow(0 0 26px currentColor);
}

.grid-spark::before,
.grid-spark::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
}

.grid-spark::before {
    width: var(--spark-length, 120px);
    height: var(--spark-thickness, 3px);
    border-radius: 999px;
    opacity: 1;
    background: currentColor;
    transform-origin: 0 50%;
}

.grid-spark::after {
    width: calc(var(--spark-length, 120px) * 0.28);
    height: calc(var(--spark-thickness, 3px) * 1.5);
    border-radius: 999px;
    opacity: 0;
    background: transparent;
    filter: none;
}

.grid-spark.cyan,
.grid-spark.blue {
    color: #56b9ff;
}

.grid-spark.yellow,
.grid-spark.orange {
    color: #ff9a2f;
}

.grid-spark.horizontal-right {
    transform: rotate(0deg);
}

.grid-spark.horizontal-left {
    transform: rotate(180deg);
}

.grid-spark.diag-right {
    transform: rotate(-24deg);
}

.grid-spark.diag-left {
    transform: rotate(156deg);
}

.grid-spark.vertical-down {
    transform: rotate(90deg);
}

.grid-spark.vertical-up {
    transform: rotate(-90deg);
}

.grid-bike {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    will-change: transform;
    mix-blend-mode: screen;
}

.grid-bike__trail {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--trail-length, 110px);
    height: var(--trail-thickness, 3px);
    border-radius: 999px;
    transform-origin: 0 50%;
    opacity: 0.92;
    background: currentColor;
    filter: none;
}

.grid-bike__core {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    background-color: currentColor;
    -webkit-mask: url("../SVG/android-mask.svg") center / contain no-repeat;
    mask: url("../SVG/android-mask.svg") center / contain no-repeat;
    box-shadow: 0 0 12px currentColor, 0 0 26px currentColor;
    transform: rotate(0deg) scale(0.8);
    transform-origin: center;
}

.grid-bike.blue {
    color: #56b9ff;
    opacity: 0.95;
}

.grid-bike.orange {
    color: #ff9a2f;
    opacity: 0.92;
}

@keyframes grid-drift {
    0% {
        background-position: 0 0, 0 0, center;
    }
    100% {
        background-position: 72px 72px, -72px 72px, center;
    }
}

@keyframes mountains-drift-far {
    from {
        transform: translateY(2vh) scale(1.02) translateX(-1.5vw);
    }
    to {
        transform: translateY(2.8vh) scale(1.03) translateX(1vw);
    }
}

@keyframes mountains-drift-near {
    from {
        transform: translateY(4vh) scale(1.05) translateX(1vw);
    }
    to {
        transform: translateY(4.6vh) scale(1.06) translateX(-1vw);
    }
}

@keyframes road-flow {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -340;
    }
}

@keyframes cloud-float {
    from {
        transform: translate3d(-1vw, 0, 0) scale(1);
    }
    to {
        transform: translate3d(1vw, -1.2vh, 0) scale(1.03);
    }
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 1rem 5vw;
    background: linear-gradient(180deg, rgba(5, 8, 22, 0.88), rgba(5, 8, 22, 0));
    backdrop-filter: blur(8px);
}

.menu_principal ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.menu_item a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 0.3rem solid #ffffff;
    border-radius: 0.3rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.03em;
    background: transparent;
    box-shadow: none;
    transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.menu_item a:hover {
    transform: translateY(-2px);
    opacity: 0.88;
    border-color: #ffffff;
    box-shadow: none;
}

.story {
    width: 100%;
}

.stage-full {
    min-height: 100vh;
    padding: 7rem 5vw 5rem;
    display: grid;
    align-items: center;
}

.hero-stage {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 255, 247, 0.05), transparent 26%),
        radial-gradient(circle at 50% 10%, rgba(255, 0, 208, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 60%);
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0, 255, 247, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 247, 0.08) 1px, transparent 1px);
    background-size: 90px 90px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
    opacity: 0.28;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    margin: 0 auto;
    text-align: center;
}

.hero-kicker,
.story-label,
.slot-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    color: var(--neon-cyan);
}

.hero-kicker::before,
.story-label::before,
.slot-title::before {
    content: "";
    width: 2.6rem;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
}

#hero-titulo {
    min-height: 1.2em;
    margin: 1rem 0 0;
    font-family: "Exo-2", sans-serif;
    font-size: clamp(1.8rem, 3.8vw, 3rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 0 22px rgba(0, 255, 247, 0.12);
}

#hero-text {
    min-height: 4.5rem;
    max-width: 62rem;
    margin: 1.2rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    line-height: 1.8;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    opacity: 1;
    transition: opacity 240ms ease, transform 240ms ease;
}

.hero-actions.hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.scroll-down-btn {
    width: 92px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 0.4rem;
    border: 0.4rem solid #ffffff;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    animation: pulse-bounce 2.2s ease-in-out infinite;
}

.scroll-down-btn:hover {
    transform: translateY(-2px);
    border-color: #ffffff;
    box-shadow: none;
}

.chevron {
    width: 14px;
    height: 14px;
    border-right: 3px solid var(--hud-text);
    border-bottom: 3px solid var(--hud-text);
    transform: rotate(45deg);
    margin-top: -8px;
}

@keyframes pulse-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

.story-section {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.story-section.section-right {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
}

.story-copy,
.story-widget-slot,
.widgets-shell {
    width: 100%;
}

.story-copy {
    align-self: center;
    padding: clamp(1.2rem, 2vw, 2rem);
    border: 1px solid rgba(0, 255, 247, 0.12);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    box-shadow: var(--shadow);
}

.story-copy h2,
.widgets-header h2 {
    margin: 0.8rem 0 0;
    font-family: "Exo-2", sans-serif;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.02;
}

.story-copy p,
.widgets-header p,
.slot-card p {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.9;
}

.story-widget-slot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-card {
    width: min(100%, 520px);
    min-height: 320px;
    display: grid;
    align-content: center;
    gap: 0.75rem;
    padding: 2rem;
    border-radius: 30px;
    border: 1px solid rgba(202, 214, 231, 0.22);
    background:
        linear-gradient(180deg, rgba(14, 20, 30, 0.95), rgba(8, 12, 19, 0.94)),
        radial-gradient(circle at top, rgba(202, 214, 231, 0.08), transparent 42%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), var(--shadow);
}

.widgets-shell {
    width: min(1280px, calc(100% - 10vw));
    margin: 0 auto;
    padding: 6rem 0 5rem;
}

.widgets-header {
    max-width: 62rem;
    margin-bottom: 2rem;
}

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.widget-card {
    min-height: 220px;
    padding: 1.4rem;
    border-radius: 22px;
    background: rgba(8, 16, 31, 0.82);
    border: 1px solid rgba(0, 255, 247, 0.14);
    box-shadow: var(--shadow);
}

.placeholder-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(202, 214, 231, 0.22);
}

.placeholder-card h3,
.placeholder-card p,
.widget-card h3 {
    margin: 0;
}

.placeholder-card p {
    color: var(--muted);
    margin-top: 0.75rem;
}

.btn,
input,
textarea,
select {
    font-family: "Anonymus-pro", monospace;
}

.btn {
    min-height: 36px;
    padding: 0.4rem 0.85rem;
    border-radius: 0.3rem;
    border: 0.3rem solid #ffffff;
    background: transparent;
    color: #ffffff;
    letter-spacing: 0.04em;
    box-shadow: none;
    transition: transform 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: 0.88;
    border-color: #ffffff;
    box-shadow: none;
}

.btn-primary {
    background: transparent;
}

input {
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(202, 214, 231, 0.28);
    background: rgba(7, 11, 18, 0.88);
    color: var(--hud-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

input::placeholder {
    color: rgba(202, 214, 231, 0.5);
}

a, p, h3 {
    font-family: "Anonymus-pro", monospace;
}

h1, h2 {
    color: var(--text);
}

@media (max-width: 1024px) {
    .story-section,
    .story-section.section-right {
        grid-template-columns: 1fr;
    }

    .story-section.section-left .story-copy,
    .story-section.section-right .story-copy,
    .story-section.section-left .story-widget-slot,
    .story-section.section-right .story-widget-slot {
        order: initial;
    }

    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .widgets-shell {
        width: min(1280px, calc(100% - 6vw));
    }

    .hero-copy {
        text-align: left;
    }

    .hero-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    header {
        padding-inline: 1rem;
    }

    .menu_principal ul {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .stage-full {
        padding-top: 6.5rem;
        padding-bottom: 4rem;
    }

    .story-copy,
    .slot-card {
        border-radius: 22px;
    }

    .scroll-down-btn {
        width: 84px;
        height: 48px;
    }
}

/* ── Audit Widget ─────────────────────────────────────────── */
.audit-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-title {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

.audit-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.audit-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.audit-input {
    flex: 1;
    min-width: 0;
}

.audit-btn {
    white-space: nowrap;
    cursor: pointer;
}

/* Loading */
.audit-loading {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--muted);
    font-family: "Anonymus-pro", monospace;
    font-size: 0.88rem;
}

.audit-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px var(--neon-cyan);
    animation: audit-pulse 1.1s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes audit-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.6); }
}

.audit-dots::after {
    content: "";
    animation: audit-dot-cycle 1.5s steps(4, end) infinite;
}

@keyframes audit-dot-cycle {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
}

/* Error */
.audit-error {
    color: #ff6b6b;
    font-family: "Anonymus-pro", monospace;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 107, 107, 0.28);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 107, 107, 0.06);
}

/* Score grid */
.audit-score-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
}

.audit-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--hud-surface);
}

.audit-score-value {
    font-family: "Exo-2", sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: var(--muted);
    transition: color 0.3s ease;
}

.audit-score-value.score-good   { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.4); }
.audit-score-value.score-mid    { color: #facc15; text-shadow: 0 0 12px rgba(250, 204, 21, 0.4); }
.audit-score-value.score-bad    { color: #f87171; text-shadow: 0 0 12px rgba(248, 113, 113, 0.4); }

.audit-score-label {
    font-family: "Anonymus-pro", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

.hidden { display: none !important; }
