/* ============================================
   TSHWEESH - Glitch Art Landing Page
   Pure CSS3 | Cyberpunk Aesthetic
   ============================================ */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------- CSS VARIABLES ---------- */
:root {
    /* Colors */
    --bg: #050505;
    --text: #FFFFFF;
    --cyan: #00FFFF;
    --magenta: #FF00FF;

    /* Typography */
    --font-heading: 'Changa', sans-serif;
    --font-body: 'Cairo', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ---------- GLOBAL ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---------- TYPOGRAPHY ---------- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 800;
}

/* ---------- HERO SECTION ---------- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
}

.hero__content {
    text-align: center;
    max-width: 800px;
}

/* ---------- GLITCH TITLE (THE MAGIC) ---------- */
.glitch-title {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    color: var(--text);
    letter-spacing: 0.05em;
    animation: glitch-skew 1.5s infinite;
}

/* Pseudo-element layers for RGB split */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Cyan layer */
.glitch-title::before {
    color: var(--cyan);
    z-index: -1;
    animation: glitch-cyan 1.5s infinite;
}

/* Magenta layer */
.glitch-title::after {
    color: var(--magenta);
    z-index: -2;
    animation: glitch-magenta 1.5s infinite;
}

/* ============================================
   HEARTBEAT RHYTHM KEYFRAMES
   0-80%: SILENCE (stable, clean)
   81-100%: EXPLOSION (heavy glitch burst)
   ============================================ */

/* Cyan Layer - Heartbeat Burst */
@keyframes glitch-cyan {

    /* SILENCE PHASE: 0% - 80% */
    0%,
    80% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0, 0);
    }

    /* EXPLOSION PHASE: 81% - 100% */
    81% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-8px, 5px);
    }

    84% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(10px, -4px);
    }

    87% {
        clip-path: inset(30% 0 40% 0);
        transform: translate(-6px, 8px);
    }

    90% {
        clip-path: inset(50% 0 25% 0);
        transform: translate(8px, -6px);
    }

    93% {
        clip-path: inset(5% 0 80% 0);
        transform: translate(-10px, 3px);
    }

    96% {
        clip-path: inset(85% 0 5% 0);
        transform: translate(7px, -8px);
    }

    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0, 0);
    }
}

/* Magenta Layer - Heartbeat Burst */
@keyframes glitch-magenta {

    /* SILENCE PHASE: 0% - 80% */
    0%,
    80% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0, 0);
    }

    /* EXPLOSION PHASE: 81% - 100% */
    82% {
        clip-path: inset(60% 0 20% 0);
        transform: translate(10px, -6px);
    }

    85% {
        clip-path: inset(15% 0 70% 0);
        transform: translate(-8px, 8px);
    }

    88% {
        clip-path: inset(45% 0 35% 0);
        transform: translate(6px, -10px);
    }

    91% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-10px, 5px);
    }

    94% {
        clip-path: inset(25% 0 55% 0);
        transform: translate(8px, -7px);
    }

    97% {
        clip-path: inset(90% 0 0% 0);
        transform: translate(-6px, 10px);
    }

    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0, 0);
    }
}

/* Main Skew - Heartbeat Burst */
@keyframes glitch-skew {

    /* SILENCE PHASE: 0% - 80% */
    0%,
    80% {
        transform: skew(0deg) translateX(0);
    }

    /* EXPLOSION PHASE: 81% - 100% */
    82% {
        transform: skew(5deg) translateX(-4px);
    }

    85% {
        transform: skew(-6deg) translateX(5px);
    }

    88% {
        transform: skew(4deg) translateX(-3px);
    }

    91% {
        transform: skew(-5deg) translateX(6px);
    }

    94% {
        transform: skew(3deg) translateX(-5px);
    }

    97% {
        transform: skew(-4deg) translateX(4px);
    }

    100% {
        transform: skew(0deg) translateX(0);
    }
}

/* Hover: MAXIMUM CHAOS (faster heartbeat) */
.glitch-title.glitch-intense::before {
    animation-duration: 0.4s;
}

.glitch-title.glitch-intense::after {
    animation-duration: 0.4s;
}

.glitch-title.glitch-intense {
    animation-duration: 0.4s;
}

/* ---------- SLOGAN ---------- */
.slogan {
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin-top: var(--spacing-lg);
    opacity: 0.9;
    letter-spacing: 0.02em;
}

/* ---------- MANIFESTO ---------- */
.manifesto {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    max-width: 600px;
    margin: var(--spacing-xl) auto;
    line-height: 1.8;
    opacity: 0.75;
    font-weight: 400;
}

/* ---------- CTA BUTTON ---------- */
.cta-button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--bg);
    background: var(--text);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    color: var(--text);
    background: transparent;
    border-color: var(--cyan);
    box-shadow:
        0 0 10px var(--cyan),
        0 0 20px var(--cyan),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
}

.cta-button:hover::before {
    left: 100%;
}

/* Focus state for accessibility */
.cta-button:focus {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

/* ---------- FOOTER ---------- */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    font-size: 0.85rem;
    opacity: 0.5;
    font-family: var(--font-body);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- SCANLINE OVERLAY ---------- */
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 2px,
            rgba(0, 0, 0, 0.15) 4px);
    pointer-events: none;
    opacity: 0.4;
    z-index: 10;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .glitch-title {
        font-size: clamp(3rem, 20vw, 5rem);
    }

    .slogan {
        font-size: 1.1rem;
    }

    .manifesto {
        font-size: 0.95rem;
        padding: 0 var(--spacing-md);
    }

    .cta-button {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 1rem;
    }
}