#title {
    font-family: "Familjen Grotesk", sans-serif !important;
    font-weight: 700;
}

:root {
    --crack-delay: 3s;
    --crack-duration: 100ms;
}

html,
body {
    height: 100dvh;

    /* altura definida, no min-height */
    margin: 0;
}

body {
    min-height: 100dvh;

    /* min-height en vez de height */
    margin: 0;
    display: grid;
    place-items: center;
    background-color: #000;
    overflow: hidden;

    /* opcional: evita scroll si algo desborda */
}

svg {
    width: min(100%, 1000px);
    height: auto;
    max-height: 100dvh;
    display: block;
    object-fit: contain;
}

#title-text {
    animation-name: scale, blur, quiver, shake;
    animation-duration: 3s, 142ms, 100ms, 50ms;
    animation-iteration-count: 1, 14, 10, 20;
    animation-delay: 0s, 1s, 1s, 2s;
    animation-direction: normal, alternate-reverse, alternate-reverse,
    alternate-reverse;
    animation-timing-function: linear, linear, ease-in, ease-in;
    animation-fill-mode: forwards, none, forwards, forwards;
    transform-origin: center;
}

#title-left {
    --crack-clip: polygon(
    7.76% 9.16%,
    18.81% 39.67%,
    27.09% 45.26%,
    41.57% 66.95%,
    43.11% 84.74%,
    20.18% 84.74%,
    -2.07% 85.26%,
    -1.55% 11.69%
  );
    animation-name: crack-left;
    animation-delay: var(--crack-delay);
    animation-duration: var(--crack-duration);
    animation-fill-mode: forwards;
}

#title-right {
    --crack-clip: polygon(
    70% 24.4%,
    100.52% 23.9%,
    100.52% 88.3%,
    64.31% 87.8%,
    43.96% 42.04%,
    40.33% 27.3%
  );
    animation-name: crack-right;
    animation-delay: var(--crack-delay);
    animation-duration: var(--crack-duration);
    animation-fill-mode: forwards;
}

#title-middle {
    --crack-clip: polygon(
    41.73% 23.68%,
    48.4% 38.16%,
    55.62% 59.29%,
    65.64% 78.93%,
    65.44% 86.84%,
    43.28% 86.84%,
    43.88% 69.39%,
    38.63% 66.75%,
    26.69% 46.24%,
    21.12% 44.58%,
    18.23% 43.47%,
    14.06% 23.7%
  );
    animation-name: crack;
    animation-delay: var(--crack-delay);
    animation-duration: var(--crack-duration);
    animation-fill-mode: forwards;
}

#crack {
    animation-name: show;
    animation-delay: var(--crack-delay);
    animation-duration: var(--crack-duration);
    animation-fill-mode: forwards;
}

@keyframes scale {
    to {
        scale: 1.05;
    }
}

@keyframes blur {
    to {
        filter: blur(0.1em);
    }
}

@keyframes quiver {
    to {
        translate: 0 -1px;
    }
}

@keyframes shake {
    to {
        translate: 0 -5px;
    }
}

@keyframes crack {
    to {
        clip-path: var(--crack-clip);
    }
}

@keyframes crack-right {
    to {
        clip-path: var(--crack-clip);
        translate: 1% -1%;
    }
}

@keyframes crack-left {
    to {
        clip-path: var(--crack-clip);
        translate: -0.45% 0.35%;
    }
}

@keyframes show {
    to {
        opacity: 1;
    }
}

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