/* ═══════════════════════════════════════════════
   BELLUCCI | ANIMATIONS — all keyframes
   ═══════════════════════════════════════════════ */

/* ── Blink ── */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ── Pulse (grid-status) ── */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.25;
    }

    50% {
        opacity: 0.6;
    }
}

/* ── Glitch (locked tiles hover) ── */
@keyframes glitch {
    0% {
        transform: translate(0);
    }

    33% {
        transform: translate(-1px, 1px);
        filter: hue-rotate(40deg);
    }

    66% {
        transform: translate(1px, -1px);
    }

    100% {
        transform: translate(0);
        filter: none;
    }
}

/* ── Boot terminal cursor blink ── */
@keyframes termCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ══════════════════════════════════════════════════
   CHROMATIC ABERRATION — NORMAL (SYSTEM_OVERRIDE)
   subtle channel split on fine text
══════════════════════════════════════════════════ */
.brand-sub {
    position: relative;
}

.brand-sub::before,
.brand-sub::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.brand-sub.glitch-active::before {
    opacity: 0.65;
    color: #ff003c;
    transform: translate(-1.5px, 0);
    mix-blend-mode: screen;
    clip-path: polygon(0 0%, 100% 0%, 100% 45%, 0 45%);
}

.brand-sub.glitch-active::after {
    opacity: 0.65;
    color: #00fff9;
    transform: translate(1.5px, 0);
    mix-blend-mode: screen;
    clip-path: polygon(0 45%, 100% 45%, 100% 100%, 0 100%);
}

/* ══════════════════════════════════════════════════
   CHROMATIC ABERRATION — HEAVY (BELLUCCI TITLE)
   larger shift, partial clip on big Syne text
══════════════════════════════════════════════════ */
.brand-name {
    position: relative;
}

.brand-name::before,
.brand-name::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    letter-spacing: inherit;
}

/* glitch-heavy — wider channel splits */
.brand-name.glitch-heavy::before {
    opacity: 0.7;
    color: #ff003c;
    transform: translate(-3px, 1px);
    mix-blend-mode: screen;
    clip-path: polygon(0 10%, 100% 10%, 100% 50%, 0 50%);
}

.brand-name.glitch-heavy::after {
    opacity: 0.7;
    color: #00fff9;
    transform: translate(3px, -1px);
    mix-blend-mode: screen;
    clip-path: polygon(0 55%, 100% 55%, 100% 95%, 0 95%);
}

/* ══════════════════════════════════════════════════
   TILE SVG CORNER BRACKETS
   4 corner arms drawn by GSAP stroke-dashoffset
   Each <line> is 12 units long → dasharray = "12 1000"
══════════════════════════════════════════════════ */
.tile-svg-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    overflow: visible;
}

/* Corner bracket lines — hidden by default */
.tile-svg-border .corner-arm {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1;
    stroke-linecap: square;
    stroke-dasharray: 12 1000;
    stroke-dashoffset: 12;
    /* hidden: offset = length → invisible */
    transition: stroke 0.2s;
}

/* Scanline (horizontal sweep) */
.tile-svg-border .scan-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 1;
    opacity: 0;
}

/* When tile is FOCUSED or SELECTED, brackets stay fully drawn */
.char-tile.focused .corner-arm,
.char-tile.sel .corner-arm {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0s;
    /* instant for keyboard nav in JS */
}

/* Selected tile — brackets brighter */
.char-tile.sel .corner-arm {
    stroke: rgba(255, 255, 255, 0.95);
}