/* ============================================
   TYPOGRAPHY COMPONENTS
   Headings, text styles with glitch effects
   ============================================ */

/* ========== HEADINGS ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--rot-text-primary);
    font-weight: 700;
    line-height: var(--line-height-tight);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

/* ========== HERO TITLE ========== */
.hero h1 {
    font-size: var(--text-4xl);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    margin-bottom: var(--space-2);
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 0, 255, 0.2);
}

/* ========== HERO SUBTITLE ========== */
.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--rot-accent);
    margin-bottom: var(--space-4);
    text-shadow: 0 0 10px var(--rot-accent);
}

/* ========== SECTION HEADINGS ========== */
.gallery h2,
.testimonials h2,
.story-text h2 {
    color: var(--rot-accent);
    margin-bottom: var(--space-8);
    font-size: var(--text-3xl);
    text-align: center;
}

.cta h2,
.final-cta h2 {
    font-size: var(--text-3xl);
    letter-spacing: var(--letter-spacing-wide);
    margin-bottom: var(--space-4);
}

/* ========== GLITCH HEADING ========== */
.heading-glitch {
    position: relative;
    display: inline-block;
}

.heading-glitch::before,
.heading-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.heading-glitch:hover::before {
    left: 2px;
    text-shadow: -2px 0 var(--rot-aqua);
    animation: glitch-1 0.3s infinite linear alternate-reverse;
    opacity: 0.8;
}

.heading-glitch:hover::after {
    left: -2px;
    text-shadow: 2px 0 var(--rot-magenta);
    animation: glitch-2 0.3s infinite linear alternate-reverse;
    opacity: 0.8;
}

@keyframes glitch-1 {

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

    25% {
        clip-path: inset(15% 0 65% 0);
    }

    50% {
        clip-path: inset(45% 0 35% 0);
    }

    75% {
        clip-path: inset(65% 0 15% 0);
    }
}

@keyframes glitch-2 {

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

    25% {
        clip-path: inset(55% 0 25% 0);
    }

    50% {
        clip-path: inset(25% 0 55% 0);
    }

    75% {
        clip-path: inset(5% 0 75% 0);
    }
}

/* ========== NEON TEXT ========== */
.text-neon {
    color: var(--rot-aqua);
    text-shadow:
        0 0 5px var(--rot-aqua),
        0 0 10px var(--rot-aqua),
        0 0 20px var(--rot-aqua),
        0 0 40px var(--rot-aqua);
}

.text-neon-magenta {
    color: var(--rot-magenta);
    text-shadow:
        0 0 5px var(--rot-magenta),
        0 0 10px var(--rot-magenta),
        0 0 20px var(--rot-magenta),
        0 0 40px var(--rot-magenta);
}

/* ========== CHROMATIC TEXT ========== */
.text-chromatic {
    text-shadow:
        2px 0 var(--rot-aqua),
        -2px 0 var(--rot-magenta);
}

.text-chromatic:hover {
    animation: chromatic-text 0.3s steps(2) infinite;
}

@keyframes chromatic-text {

    0%,
    100% {
        text-shadow:
            2px 0 var(--rot-aqua),
            -2px 0 var(--rot-magenta);
    }

    50% {
        text-shadow:
            -2px 0 var(--rot-aqua),
            2px 0 var(--rot-magenta);
    }
}

/* ========== BODY TEXT ========== */
.text-body {
    font-size: var(--text-base);
    color: var(--rot-text-muted);
    line-height: var(--line-height-base);
}

.text-lead {
    font-size: var(--text-lg);
    color: var(--rot-text-primary);
}

.text-small {
    font-size: var(--text-sm);
    color: var(--rot-text-dim);
}

/* ========== MONOSPACE / CODE ========== */
.text-mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--rot-slime);
    background: rgba(57, 255, 20, 0.1);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

/* ========== SLOGAN TEXT ========== */
.text-slogan {
    font-size: var(--text-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    color: var(--rot-accent);
}

/* ========== LINK STYLES ========== */
.link {
    color: var(--rot-aqua);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--duration-fast);
}

.link:hover {
    color: var(--rot-magenta);
}

/* ========== MODE VARIATIONS ========== */
[data-mode="corporate"] .hero h1,
[data-mode="corporate"] .cta h2,
[data-mode="corporate"] .final-cta h2 {
    text-shadow: none;
}

[data-mode="corporate"] .text-neon,
[data-mode="corporate"] .text-neon-magenta {
    text-shadow: none;
    color: var(--rot-text-primary);
}

[data-mode="corporate"] .heading-glitch:hover::before,
[data-mode="corporate"] .heading-glitch:hover::after {
    display: none;
}

/* ========== TRUNCATION ========== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}