*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange: #0062ff;
    --orange2: #ff8c00;
    --white: #eee8de;
    --dim: rgba(238, 232, 222, 0.35);
    --bg: #050505;
    --mono: "Courier New", Courier, monospace;
}

html {
    scroll-behavior: auto;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow: hidden;
    cursor: none;
    width: 100vw;
    height: 100vh;
}

/* ── Custom cursor ─────────────────────────────────────────── */
#cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, opacity 0.2s;
    mix-blend-mode: screen;
    top: 0;
    left: 0;
}

#cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 77, 0, 0.5);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
    top: 0;
    left: 0;
}

body:has(.webgl:hover) #cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--orange);
}

/* ── Fixed canvas ─────────────────────────────────────────── */
.webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* ── Nav ──────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--white);
    opacity: 1.0;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--orange);
    opacity: 0;
}

.nav-status .dot-live {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

/* ── HUD decorations (ancladas a la pantalla) ─────────────── */
.hud-corner {
    position: fixed;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
}

.hud-corner svg {
    display: block;
}

.hud-tl {
    top: 5rem;
    left: 3rem;
}

.hud-br {
    bottom: 2.5rem;
    right: 3rem;
}

.hud-readout {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

/* ── Hero content wrapper ─────────────────────────────────── */
/* Ocupa toda la pantalla pero centra el contenido interior */
.content-wrapper {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 6rem 3rem 3rem;
}

/* El bloque interior queda centrado con max-width */
.content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

/* ── Hero top ─────────────────────────────────────────────── */
.hero-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2vh;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 6.5rem);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    text-align: center;
    text-transform: uppercase;
}

.hero-title .accent {
    color: var(--orange);
}

.hero-meta {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    margin-top: 1.6rem;
}

.hero-meta .tag {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--orange);
    display: block;
    margin-bottom: 0.8rem;
}

.hero-meta .desc {
    font-size: 0.82rem;
    color: var(--dim);
    max-width: 40ch;
    line-height: 1.6;
    margin: 0 auto;
}

/* ── Hero bottom ──────────────────────────────────────────── */
.hero-bottom {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    width: 100%;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: all;
    cursor: none;
}

.cta-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--dim);
}

.cta-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background 0.3s;
    animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.cta-arrow:hover {
    border-color: var(--orange);
    background: rgba(255, 77, 0, 0.08);
}

/* ── Coords (ancladas a la esquina del viewport) ──────────── */
.hero-coords {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    opacity: 0;
    line-height: 1.8;
    white-space: pre-line;
    z-index: 100;
}

/* ── Hover hint (centrada en la pantalla) ─────────────────── */
.hover-hint {
    position: fixed;
    bottom: 13rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    opacity: 0;
    z-index: 100;
    pointer-events: none;
}

/* ── Scan line overlay ────────────────────────────────────── */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.08) 3px,
    rgba(0, 0, 0, 0.08) 4px
  );
    pointer-events: none;
    z-index: 5;
    opacity: 0.4;
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-height: 700px) {
    .hover-hint {
        bottom: 9rem;
    }

    .hero-title {
        font-size: clamp(2rem, 5vw, 4rem);
    }

    .content-wrapper {
        padding-top: 5rem;
    }
}

@media (max-width: 640px) {
    nav {
        padding: 1.2rem 1.5rem;
    }

    .hud-tl {
        top: 4rem;
        left: 1.5rem;
    }

    .hud-br {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .hero-coords {
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 0.5rem;
    }

    .hover-hint {
        bottom: 10rem;
        font-size: 0.5rem;
    }

    .content-wrapper {
        padding: 5rem 1.5rem 1.5rem;
    }
}

/* ESTILOS GENERICOS */
html {
    -webkit-text-size-adjust: 100%;

    /* evita que iOS agrande el texto al rotar */
}

body {
    overscroll-behavior: none;

    /* evita pull-to-refresh accidental */
}

* {
    -webkit-tap-highlight-color: transparent;

    /* quita el flash azul al tocar en iOS */
}



/* ==========================================
   TRAUMA-XP — INTERACTION GUIDE
========================================== */

#xp-interaction-guide {
    position: fixed;
    left: 40px;
    bottom: 40px;
    z-index: 999;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Poppins', sans-serif;
}

/* TYPOGRAPHY */

#xp-interaction-guide .xp-guide-words {
    display: flex;
    flex-direction: column;
    gap: 0;

    font-family: inherit;
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

#xp-interaction-guide .xp-guide-words span {
    display: block;
    font-family: inherit;
    font-weight: 900;
    color: #fff;
}

#xp-interaction-guide .xp-guide-words span:first-child {
    color: #0062ff;
}

/* DESCRIPTION */

#xp-interaction-guide p {
    margin: 18px 0 0;
    font-family: inherit;
    font-size: 9px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE */

@media (max-width: 600px) {

    #xp-interaction-guide {
        left: 20px;
        bottom: 24px;
    }

    #xp-interaction-guide .xp-guide-words {
        font-size: clamp(32px, 8vw, 38px);
    }

    #xp-interaction-guide p {
        font-size: 8px;
        max-width: 230px;
    }
}