/* ============================================================
   MAKO DESIGN — SIGNATURE INTRO (Hybrid)
   Reveal diagonale + logo a strisce/graffi + tagline
   Solo transform / opacity / filter / clip-path (GPU)
   ============================================================ */

:root {
    --mako-intro-bg: #03060c;
    --mako-intro-accent: #b0127e;
    --mako-intro-accent-2: #ff2fb3;
    --mako-intro-duration: 1600ms;
}

#makoIntro {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    overflow: hidden;
    pointer-events: auto;
    contain: strict;
    background: var(--mako-intro-bg);
    will-change: clip-path, opacity;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition: clip-path 700ms cubic-bezier(0.83, 0, 0.17, 1);
}

/* Reveal diagonale: la tendina scorre verso l'alto-destra */
#makoIntro.is-revealing {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}

#makoIntro.is-hidden {
    opacity: 0;
    pointer-events: none;
}

#makoIntro img,
#makoIntro video { max-width: none; max-height: none; }

/* ============ BAGLIORE DI FONDO ============ */
#makoIntro .mi-backdrop {
    position: absolute;
    inset: 0;
    background: var(--mako-intro-bg);
}

#makoIntro .mi-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90vmax;
    height: 90vmax;
    transform: translate(-50%, -50%) scale(0.5);
    background: radial-gradient(
            circle,
            rgba(176, 18, 126, 0.32) 0%,
            rgba(176, 18, 126, 0.1) 30%,
            transparent 65%
    );
    opacity: 0;
    animation: miGlowIn 1300ms cubic-bezier(0.16, 1, 0.3, 1) 100ms forwards;
    pointer-events: none;
    filter: blur(30px);
}

/* ============ LOGO (strisce / graffi / ring / shine) ============ */
#makoIntro .mi-stage {
    position: absolute;
    top: 46%;
    left: 50%;
    opacity: 0;
    z-index: 3;
    will-change: transform, opacity;
}

#makoIntro .mi-stage::before {
    content: "";
    position: absolute;
    inset: -70% -25%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 47, 179, 0.28) 38%, transparent 70%);
    filter: blur(22px);
    z-index: -1;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 260ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

#makoIntro .mi-stage.is-hit::before { opacity: 1; transform: scale(1); }

#makoIntro .mi-logo-wrap {
    position: relative;
    width: clamp(260px, 50vw, 700px);
    aspect-ratio: 2000 / 475;
}

#makoIntro .mi-slice {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: transform, opacity, filter;
}

#makoIntro .mi-logo {
    display: block;
    width: 100%;
    height: auto;
}

#makoIntro .mi-shine {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.9) 50%, transparent 58%);
    background-size: 300% 100%;
    mix-blend-mode: screen;
}

#makoIntro .mi-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(260px, 50vw, 700px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid rgba(255, 47, 179, 0.9);
    box-shadow: 0 0 40px rgba(255, 47, 179, 0.6), inset 0 0 40px rgba(255, 47, 179, 0.4);
    opacity: 0;
    pointer-events: none;
}

#makoIntro .mi-slashes {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    transform: rotate(-14deg);
}

#makoIntro .mi-slashes i {
    position: absolute;
    left: -20%;
    width: 140%;
    height: 3px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 47, 179, 0.9) 30%, #fff 50%, rgba(255, 47, 179, 0.9) 70%, transparent);
    box-shadow: 0 0 18px rgba(255, 47, 179, 0.9);
}

#makoIntro .mi-slashes i:nth-child(1) { top: 40%; }
#makoIntro .mi-slashes i:nth-child(2) { top: 47%; height: 4px; }
#makoIntro .mi-slashes i:nth-child(3) { top: 54%; }

/* ============ TAGLINE ============ */
#makoIntro .mi-tagline {
    position: absolute;
    left: 50%;
    top: calc(46% + clamp(70px, 14vw, 190px));
    transform: translateX(-50%);
    display: flex;
    gap: 0.35em;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(0.62rem, 1.4vw, 0.85rem);
    letter-spacing: 0.32em;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    z-index: 4;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    animation: miTaglineIn 200ms ease 950ms forwards;
}

#makoIntro .mi-tagline span {
    display: inline-block;
    opacity: 0;
    transform: translateY(120%);
    animation: miLetterIn 550ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-shadow: 0 0 20px rgba(255, 47, 179, 0.5);
}

/* ============ LINEA DI VELOCITÀ ============ */
#makoIntro .mi-speedline {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
            90deg,
            transparent 0%,
            var(--mako-intro-accent) 45%,
            #ffffff 50%,
            var(--mako-intro-accent-2) 55%,
            transparent 100%
    );
    transform: translateX(-100%) scaleX(0.3);
    opacity: 0;
    filter: blur(0.5px);
    box-shadow: 0 0 24px rgba(255, 47, 179, 0.9);
    animation: miSpeedline 700ms cubic-bezier(0.7, 0, 0.3, 1) 1150ms forwards;
    pointer-events: none;
    z-index: 4;
}

/* ============ FLASH FINALE ============ */
#makoIntro .mi-flash {
    position: absolute;
    inset: 0;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 47, 179, 0.55) 30%, rgba(74, 12, 34, 0.6) 70%);
    animation: miFlash 450ms ease-out 1250ms forwards;
}

/* ============ UI ============ */
#makoIntro .mi-skip {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 10px 20px;
    border-radius: 999px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    animation: miFadeIn 400ms ease 400ms forwards;
    transition: background-color 250ms ease, border-color 250ms ease, transform 250ms ease;
}

#makoIntro .mi-skip:hover {
    background: rgba(255, 47, 179, 0.25);
    border-color: var(--mako-intro-accent-2);
    transform: translateY(-1px);
}

#makoIntro .mi-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    z-index: 10;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--mako-intro-accent), var(--mako-intro-accent-2));
    box-shadow: 0 0 16px var(--mako-intro-accent-2);
}

/* ============ KEYFRAMES ============ */
@keyframes miGlowIn {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    60%  { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1.15); }
}

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

@keyframes miLetterIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes miSpeedline {
    0%   { opacity: 0; transform: translateX(-100%) scaleX(0.3); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%) scaleX(1.4); }
}

@keyframes miFlash {
    0%   { opacity: 0; }
    30%  { opacity: 0.85; }
    100% { opacity: 0; }
}

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

/* ============ BODY LOCK ============ */
body.mako-intro-active {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
}

@media (prefers-reduced-motion: reduce) {
    #makoIntro { display: none !important; }
    body.mako-intro-active { overflow: auto; height: auto; touch-action: auto; }
}

@media (max-width: 640px) {
    #makoIntro .mi-skip { top: 16px; right: 16px; padding: 9px 16px; }
    #makoIntro .mi-logo-wrap, #makoIntro .mi-ring { width: 82vw; }
    #makoIntro .mi-tagline { top: calc(46% + 110px); font-size: 0.6rem; letter-spacing: 0.28em; }
    #makoIntro .mi-glow { filter: blur(40px); animation-duration: 900ms; }
    #makoIntro .mi-speedline { animation-duration: 500ms; }
}