/* components/entry-notice.css — GlitchZone · avviso satirico d'INGRESSO (una-tantum)
   ------------------------------------------------------------------
   Modal centrato "console d'ingresso" (grammatica 404) mostrato alla PRIMA visita:
   dichiara che GZ è satira (parodia sempre palese, BRIEFING §GZ) e offre 2 vie —
   resta su GZ / vai su Tech-Zone (rimbalzo "Double Agent"). Il disclaimer legale
   "fonte unica" resta in coda a ogni pagina (template-parts/disclaimer.php).

   DESIGN copiato dal 404 (css/pages/404.css, che al proprietario piace): status-line
   telemetria + RGB-split su parola-hero (::before/::after magenta+verde) + screen-tear
   + scanline CRT + sottotitolo magenta con glow + grammatica mono. Keyframe RINOMINATI
   gze-* (404.css è enqueue-condizionale is_404(); questo è globale → no collisioni).

   Logica show-once = glitchzone-shared.js (IIFE #6, localStorage) — Step 2.
   Dipendenza: gz-base. Caricato SEMPRE (globale, come glitch-mode).
   ⚠️ Voce: status/hero/sottotitolo/corpo/etichette = PLACEHOLDER NEUTRI → la battuta
   satirica si scrive in sessione GZ-voce. Firewall: nessun codice condiviso con TZ.

   Step 2 (FATTO): `hidden` di default → il JS (glitchzone-shared.js IIFE #6) lo rivela alla
   1ª visita, chiude coi 2 bottoni + ESC, imposta localStorage, focus-trap. Entrata = gze-enter. */

/* Overlay = backdrop scuro sfocato; il sito resta nel DOM sotto (SEO-safe). */
.gz-entry {
    position: fixed;
    inset: 0;
    z-index: 10000;                        /* sopra header e banner glitch-mode (9999) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 18, 0.85);    /* --background @ .85 */
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
/* Nascosto di default (Step 2): il JS lo rivela alla 1ª visita. `.gz-entry[hidden]` (attributo →
   specificità più alta) batte `.gz-entry{display:flex}`, altrimenti display:flex vincerebbe sull'UA. */
.gz-entry[hidden] { display: none; }

/* Box "console": superficie scura + cornice neon + scanline CRT confinata. */
.gz-entry__box {
    position: relative;
    overflow: hidden;                      /* contiene scanline + ghost RGB */
    width: min(92vw, 400px);
    box-sizing: border-box;
    padding: 34px 32px 32px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px var(--primary-glow);
    animation: gze-enter 0.45s cubic-bezier(0.7, 0, 0.3, 1) both;  /* entrata glitch (una-tantum, al reveal) */
}
/* Scanline "TV rotta" (pattern di .scanlines-404), confinata al box. */
.gz-entry__box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 0, 0, 0.18) 2px, rgba(0, 0, 0, 0.18) 3px);
    pointer-events: none;
    z-index: 2;
}
/* Contenuto sopra le scanline. */
.gz-entry__box > * { position: relative; z-index: 3; }

/* Status-line telemetria (mono) — firma del 404. */
.gz-entry__status {
    margin: 0 0 18px;
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--text-muted-strong);
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.gz-entry__status .sep { color: var(--border); }
.gz-entry__status .tok { color: var(--accent); font-weight: 700; }

/* Parola-hero con RGB-split (tecnica di .four-oh-four). */
.gz-entry__glitch {
    position: relative;
    display: inline-block;
    margin: 0 0 6px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.9rem, 9vw, 3rem);
    line-height: 0.95;
    letter-spacing: 2px;
    color: var(--text-primary);
    user-select: none;
    animation: gze-tear 6s infinite;
}
.gz-entry__glitch::before,
.gz-entry__glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.gz-entry__glitch::before {
    color: var(--accent);
    transform: translate(-4px, 0);
    mix-blend-mode: screen;
    animation: gze-rgb-a 2.4s infinite steps(2);
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.gz-entry__glitch::after {
    color: var(--primary);
    transform: translate(4px, 0);
    mix-blend-mode: screen;
    animation: gze-rgb-b 2.4s infinite steps(2);
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}
@keyframes gze-rgb-a { 0%, 100% { transform: translate(-4px, 0); } 50% { transform: translate(-1px, -1px); } }
@keyframes gze-rgb-b { 0%, 100% { transform: translate(4px, 0); } 50% { transform: translate(1px, 1px); } }
@keyframes gze-tear {
    0%, 92%, 100% { clip-path: inset(0); }
    93% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
    94% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 0); }
    95% { clip-path: inset(40% 0 30% 0); transform: translate(-1px, 0); }
}
/* Entrata glitch del box: parte al reveal (display:none→flex quando il JS toglie [hidden]). */
@keyframes gze-enter {
    0%   { opacity: 0; transform: translateY(8px) scale(0.98); clip-path: inset(46% 0 46% 0); }
    28%  { opacity: 1; clip-path: inset(0 0 62% 0); transform: translate(-5px, 0) scale(1); }
    42%  { clip-path: inset(66% 0 4% 0); transform: translate(4px, 0); }
    58%  { clip-path: inset(24% 0 30% 0); transform: translate(-2px, 0); }
    100% { opacity: 1; transform: translate(0, 0) scale(1); clip-path: inset(0); }
}

/* Sottotitolo mono magenta con glow (come .scene-title). */
.gz-entry__sub {
    margin: 0 0 14px;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--accent);
    text-shadow: 0 0 16px var(--accent-glow);
}

/* Corpo leggibile (Outfit, come .scene-quote). */
.gz-entry__text {
    margin: 0 0 24px;
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Bottoni in grammatica mono. */
.gz-entry__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.gz-entry__btn {
    flex: 1 1 120px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
                color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}
/* Primario: resta su GZ (pieno verde, testo scuro). */
.gz-entry__btn--primary {
    background: var(--primary);
    color: var(--background);
    box-shadow: 0 0 20px var(--primary-glow);
}
.gz-entry__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow), 0 0 50px var(--primary-glow);
}
/* Secondario: vai su Tech-Zone (ghost mono, hover magenta come le exit-card). */
.gz-entry__btn--secondary {
    background: transparent;
    color: var(--text-muted-strong);
    border-color: var(--border);
}
.gz-entry__btn--secondary:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 30%, transparent);
}
/* Focus visibile (a11y). */
.gz-entry__btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* reduced-motion: ferma il glitch (come fa il 404), scena statica. */
@media (prefers-reduced-motion: reduce) {
    .gz-entry__box { animation: none; }
    .gz-entry__glitch,
    .gz-entry__glitch::before,
    .gz-entry__glitch::after { animation: none; }
    .gz-entry__btn { transition: none; }
    .gz-entry__btn--primary:hover,
    .gz-entry__btn--secondary:hover { transform: none; }
}
