/* ============================================================
   RESET + BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    height: 100%;
    background-color: #000;
    overflow: hidden;

    /* Evita bounce-scroll en iOS */
    position: fixed;
    width: 100%;

    /* Respeta notch / safe area */
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
#blackhole {
    height: 100%;
    width: 100%;
    position: relative;
    display: flex;
}

canvas {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: auto;
    display: block;
}

/* ============================================================
   CÍRCULO "ENTER" — responsivo
   ============================================================ */
.centerHover {
    /* Tamaño fluido: 42% del lado más corto del viewport,
       acotado entre 180px y 380px.
       Coincide con maxorbit del JS (min(cw,ch) * 0.42). */
    width: clamp(180px, 42vmin, 380px);
    height: clamp(180px, 42vmin, 380px);
    background-color: transparent;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;

    /* Centrado moderno (antes: márgenes negativos fijos) */
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: pointer;

    /* Centrado del span sin line-height fijo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 500ms;
}

.centerHover.open {
    opacity: 0;
    pointer-events: none;
}

.centerHover:hover span {
    color: #DDD;
}

.centerHover:hover span:before {
    background-color: #DDD;
}

.centerHover:hover span:after {
    background-color: #DDD;
}

.centerHover span {
    color: #666666;
    font-family: "Poppins", sans-serif;
    font-weight: 600;   /* ← aquí eliges el peso */
    /* Antes: 17px fijo → ahora fluido */
    font-size: clamp(13px, 2.2vmin, 17px);
    letter-spacing: 2px;
    position: relative;
    transition: all 500ms;
}

.centerHover span:before {
    content: '';
    display: inline-block;
    height: 1px;
    width: clamp(10px, 1.6vmin, 16px);
    margin-right: clamp(6px, 1.2vmin, 12px);
    margin-bottom: 4px;
    background-color: #666;
    transition: all 500ms;
    vertical-align: middle;
}

.centerHover span:after {
    content: '';
    display: inline-block;
    height: 1px;
    width: clamp(10px, 1.6vmin, 16px);
    margin-left: clamp(6px, 1.2vmin, 12px);
    margin-bottom: 4px;
    background-color: #666;
    transition: all 500ms;
    vertical-align: middle;
}

/* ============================================================
   TRAUMA-XP — fade + blur + giro antihorario sutil
   ============================================================ */
.traumaText {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    z-index: 3;
    pointer-events: none;

    opacity: 0;
    filter: blur(16px);

    transition: opacity 1400ms ease-in-out,
        filter  1400ms ease-in-out;

    font-family: "Poppins", sans-serif;
    font-weight: 600;   /* ← aquí eliges el peso */
    font-size: clamp(14px, 3vmin, 30px);          /* ← nuevo tamaño */
    letter-spacing: clamp(0.3px, 0.4vmin, 1.2px); /* ← nuevo espaciado */
    color: #666666;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    will-change: opacity, filter, transform;
    backface-visibility: hidden;
}

.centerHover.open ~ .traumaText {
    opacity: 1;
    filter: blur(0px);
    animation: traumaSpin 8s ease-in-out infinite;
}

@keyframes traumaSpin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    50%  { transform: translate(-50%, -50%) rotate(-2deg); }
    100% { transform: translate(-50%, -50%) rotate(0deg); }
}

/* ============================================================
   MEDIA QUERIES — ajustes por dispositivo
   ============================================================ */

/* --- Móviles pequeños (iPhone SE, etc.) --- */
@media (max-width: 380px) {
    .centerHover {
        width: clamp(150px, 55vmin, 220px);
        height: clamp(150px, 55vmin, 220px);
    }

    .centerHover span {
        font-size: 13px;
        letter-spacing: 1.5px;
    }

    .traumaText {
        letter-spacing: 0.3px;
    }
}

/* --- Móviles en general (hasta 600px) --- */
@media (max-width: 600px) {
    /* El font-size de .traumaText ahora lo controla el clamp base.
       Este query se deja vacío intencionalmente para futuros ajustes. */
}

/* --- iPad vertical y tablets (768px–1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .centerHover {
        width: clamp(220px, 45vmin, 340px);
        height: clamp(220px, 45vmin, 340px);
    }

    .traumaText {
        letter-spacing: 1px;
    }
}

/* --- iPad horizontal y tablets grandes (1025px–1366px) --- */
@media (min-width: 1025px) and (max-width: 1366px) {
    .traumaText {
        letter-spacing: 1px;
    }
}

/* --- Desktop grande (≥1367px) --- */
@media (min-width: 1367px) {
    .traumaText {
        letter-spacing: 1.2px;
    }
}

/* --- Móvil horizontal (poca altura) --- */
@media (max-height: 500px) and (orientation: landscape) {
    .centerHover {
        width: clamp(120px, 60vmin, 200px);
        height: clamp(120px, 60vmin, 200px);
    }
}

/* --- Accesibilidad: respeta "reducir movimiento" --- */
@media (prefers-reduced-motion: reduce) {
    .traumaText {
        transition: opacity 1400ms ease-in-out;
        animation: none !important;
    }
}


/* 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;
    }
}