/* Northern Industrial - V4 App Shell */
:root {
    --bg-asphalt: #121212;
    --bg-card: #1e1e1e;
    --text-silver: #E0E0E0;
    --accent-red: #FF3B30;
    /* Safety Red */
    --accent-yellow: #FFCC00;
    /* Caution Yellow */
    --font-tech: 'Space Mono', monospace;
    --font-header: 'Work Sans', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-asphalt);
    color: var(--text-silver);
    font-family: var(--font-tech);
    margin: 0;
    overflow: hidden;
    /* Prevent body scroll, handle in main */
    /* Mobile app feel */
    -webkit-tap-highlight-color: transparent;
}

/* App Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.9), transparent);
}

.brand {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.badge {
    font-size: 0.7rem;
    background: var(--accent-red);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--accent-yellow);
    /* "Live" status */
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-yellow);
}

/* Main Feed Container - Snap Scroll */
.feed-container {
    height: 100vh;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

.feed-container::-webkit-scrollbar {
    display: none;
}

/* Cards */
.feed-card {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Content at bottom like stories */
    padding: 20px;
    padding-bottom: 100px;
    /* Clear bottom nav */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Product Card Background - Position in upper area */
.product-card .card-bg {
    height: 70vh;
    top: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Light beam effect behind product image - Subtle */
.product-card .card-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 204, 0, 0.1) 0%,
        rgba(255, 59, 48, 0.05) 30%,
        transparent 70%
    );
    animation: pulse-light 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse-light {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
    /* Industrial moody look */
}

/* Hero video styling */
.hero-card .card-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product images in cards (contain instead of cover) */
.product-card .card-bg img {
    object-fit: contain;
    object-position: top center;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--bg-asphalt), transparent);
}

/* Hero card overlay - darker to cover purple tint */
.hero-card .overlay-gradient {
    height: 100%;
    background: linear-gradient(to top,
        rgba(18, 18, 18, 0.98) 0%,
        rgba(18, 18, 18, 0.9) 30%,
        rgba(18, 18, 18, 0.75) 60%,
        rgba(18, 18, 18, 0.5) 80%,
        rgba(18, 18, 18, 0.2) 100%);
}

.card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    text-align: center;
    /* Standardize center alignment */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center children like buttons/badges */
}

/* Hero card - center content vertically in mid-to-bottom area */
.hero-card {
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 140px;
}

.hero-card .card-content {
    justify-content: center;
    margin-bottom: 0;
    transform: translateY(10vh);
}

/* Hero text enhancements */
.hero-card h1 {
    font-size: 3.5rem;
    letter-spacing: -3px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 59, 48, 0.3);
    animation: fade-in-up 1.2s ease-out;
    margin-top: 10px;
}

.hero-card p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    animation: fade-in-up 1.2s ease-out 0.2s backwards;
}

.hero-card .tech-specs {
    animation: fade-in-up 1.2s ease-out 0.1s backwards, tech-specs-glow 3s ease-in-out 1.3s infinite;
}

.hero-card .cta-btn {
    animation: fade-in-up 1.2s ease-out 0.3s backwards;
    transition: all 0.3s ease;
}

.hero-card .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Adjust tech-specs for hero to be inline with animation */
.hero-card .tech-specs span {
    display: inline-block;
}

/* Remove separate centered class since default is now center */
.card-content.centered {
    margin: auto;
}

/* Typography & Elements */
.tech-specs {
    font-size: 0.9rem;
    color: #FFFFFF;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    background: rgba(255, 204, 0, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 204, 0, 0.4);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

@keyframes tech-specs-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
        border-color: rgba(255, 204, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
        border-color: rgba(255, 204, 0, 0.6);
    }
}

.tech-specs span {
    position: relative;
    padding: 0 12px;
}

.tech-specs span:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    opacity: 0.3;
}

h1 {
    font-family: var(--font-header);
    font-size: 2.8rem;
    /* Reduced from 3.5rem to fit better */
    line-height: 0.9;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

h2 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    /* Reduced from 3rem */
    line-height: 0.9;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    max-width: 80%;
}

.model-badge {
    display: inline-block;
    border: 2px solid var(--accent-red);
    padding: 5px 14px;
    font-size: 0.8rem;
    margin-bottom: 12px;
    border-radius: 20px;
    background: rgba(255, 59, 48, 0.1);
    box-shadow:
        0 0 20px rgba(255, 59, 48, 0.3),
        inset 0 0 10px rgba(255, 59, 48, 0.1);
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: badge-glow 2s ease-in-out infinite;
}

/* Shimmering effect on badge - Simplified */
.model-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 5s linear infinite;
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(255, 59, 48, 0.25),
            inset 0 0 8px rgba(255, 59, 48, 0.1);
    }
    50% {
        box-shadow:
            0 0 20px rgba(255, 59, 48, 0.35),
            inset 0 0 10px rgba(255, 59, 48, 0.15);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Cinematic Lineup Updates */

/* Massive Background Text */
.bg-model-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 35vw;
    /* Huge */
    color: rgba(255, 255, 255, 0.03);
    /* Very subtle */
    white-space: nowrap;
    z-index: 0;
    margin: 0;
    pointer-events: none;
    font-family: var(--font-header);
    /* Add a slight parallax potential or just static coolness */
}

/* Floating Wheel Animation */
@keyframes float {
    0% {
        transform: scale(0.8) translateY(0px);
    }

    50% {
        transform: scale(0.8) translateY(-20px);
    }

    100% {
        transform: scale(0.8) translateY(0px);
    }
}

.product-card .card-bg img.floating-wheel {
    animation: float 6s ease-in-out infinite;
    z-index: 1;
    /* Above text */
    position: relative;
    /* Reset the specific scale from previous rule if needed */
    /* We are handling scale in the animation now */
}

/* Tech Grid (HUD Style) */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 5px;
    border-radius: 4px;
}

.tech-item .label {
    font-size: 0.6rem;
    color: var(--accent-red);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.tech-item .val {
    font-size: 0.9rem;
    font-weight: 700;
}

.cta-btn {
    background: var(--text-silver);
    color: var(--bg-asphalt);
    border: none;
    padding: 15px 30px;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 20px;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    text-decoration: none;
    display: inline-block;
}

.icon-stack {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--text-silver);
}

.nav-item .icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-item .label {
    font-size: 0.6rem;
    font-weight: 700;
}

/* Desktop Adjustment - Center the "Phone" */
@media (min-width: 768px) {
    body {
        background: #000;
        display: flex;
        justify-content: center;
    }

    /* Make the mobile view a centered column */
    .app-header,
    .feed-container,
    .bottom-nav {
        max-width: 450px;
        width: 450px;
        /* Phone width */
        left: 50%;
        transform: translateX(-50%);
        border-right: 1px solid #333;
        border-left: 1px solid #333;
    }

    .feed-container {
        scrollbar-width: none;
        /* Keep hidden */
    }
}

/* V5 Industrial Glitch & 3D Updates */

/* Contrast Fixes */
h2,
.model-badge,
.cta-btn {
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
    /* Heavy shadow for contrast */
}

/* Glitch Text Effect - Simplified */
.glitch-text {
    position: relative;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--text-silver);
    text-shadow:
        0 4px 10px rgba(0, 0, 0, 0.9),
        1px 1px 0 rgba(255, 59, 48, 0.2);
}

/* CRT Overlay - Refined Subtle */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Much finer gradient stops for thinner lines */
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    /* Back to 2px/3px */
    pointer-events: none;
    z-index: 999;
    opacity: 0.15;
    /* Subtle */
}

/* Vertical Watermark (Fixed messy text) */
.bg-model-text {
    position: absolute;
    top: 50%;
    right: 0;
    left: auto;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center right;
    font-size: 20vh;
    color: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    z-index: 0;
    font-family: var(--font-header);
    letter-spacing: 10px;
    pointer-events: none;
}

/* 3D Card Container REMOVED - Flat V6 */
.feed-card {
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    /* Stack from top */
    justify-content: space-between;
    align-items: center;
    /* Space for Header */
    padding-top: 80px;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Product Card Layout - Image Top, Content Bottom */
.product-card {
    justify-content: flex-start;
    background: radial-gradient(ellipse at top, rgba(30, 30, 30, 0.6) 0%, transparent 70%);
    overflow: hidden;
    padding-top: 60px;
}

/* Static background pattern for product cards */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 59, 48, 0.02) 2px,
            rgba(255, 59, 48, 0.02) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 204, 0, 0.015) 2px,
            rgba(255, 204, 0, 0.015) 4px
        );
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}


/* Zoom-Drift Animation (Scroll Triggered) */
/* Default State: Zoomed IN (Close up) */
.feed-card .card-bg img {
    /* Specificity override */
    transition: transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.6s ease;
    transform: scale(1.3);
    filter: blur(8px) brightness(0.6);
    will-change: transform, filter;
    object-fit: cover;
}

/* Product cards have their own animation states */
.product-card .card-bg img {
    transition: transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 1.6s ease;
    transform: translateX(-50%) scale(1.05);
    filter: blur(4px) brightness(0.7) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    will-change: transform, filter;
}

/* Active State: Zoomed OUT (Fit to screen) */
.feed-card.active .card-bg img {
    transform: scale(0.9);
    filter: blur(0px) brightness(0.9);
}

.product-card.active .card-bg img {
    transform: translateX(-50%) scale(0.95);
    filter: blur(0px) brightness(0.95) drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7));
}

/* Product Image Container & Logic */
.product-image-container {
    width: 100%;
    /* Strict Height Limit to prevent overlap */
    height: 45vh;
    flex-shrink: 0;
    /* Prevent shrinking but don't grow indefinitely */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Slight adjustment */
    transform: translateY(0);
    margin-bottom: 10px;
}

.product-image {
    width: 100%;
    max-width: 600px;
    height: 100%;
    object-fit: contain;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Active State: Zoom In */
.feed-card.active .product-image {
    transform: scale(1.05);
}

.feed-card .product-image {
    transform: scale(0.85);
    /* Start smaller */
}

/* Overlay Info */
.product-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 5;
    pointer-events: none;
}

.product-model {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-white);
    border: 1px solid var(--text-white);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    /* Readability: Dark Background */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Tech Grid Progress Style */
.tech-grid {
    width: 100%;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    /* Force to bottom of card */
    margin-top: auto;
    padding-bottom: 110px;
    /* Clear Bottom Nav */
    z-index: 10;
}

/* Base Tech Item: Image-Based Silhouette */
.tech-item {
    background: transparent;
    /* No default bg */
    border: none;
    position: relative;
    /* Center text in the "car" */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Padding to fit text inside the image shape */
    padding: 15px 5px 5px 5px;
    height: 60px;
    /* Fixed height for consistent car size */
    width: 100%;

    /* Animation Init */
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.2s;
}

/* Background Car Image (Flipped) */
.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/car_shape.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    /* Flip to face Right */
    transform: scaleX(-1);

    /* Color Adjustment: Invert to White & Fade */
    filter: invert(1) opacity(0.3);

    z-index: -1;
    /* Behind text */
}

/* Active State: "Cautious Driver" Animation (Slow & Smooth) */
.feed-card.active .tech-item {
    animation: brake-slide 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Staggered Delays - Reversed & Slowed */
.feed-card.active .tech-item:nth-child(3) {
    animation-delay: 0.2s;
}

.feed-card.active .tech-item:nth-child(2) {
    animation-delay: 0.7s;
}

.feed-card.active .tech-item:nth-child(1) {
    animation-delay: 1.2s;
}

/* Remove Skew from animation to maintain Sedan Shape integrity */
@keyframes brake-slide {
    0% {
        opacity: 0;
        transform: translateX(-100px);
        /* Start sharp */
    }

    60% {
        opacity: 1;
        transform: translateX(10px);
        /* Overshoot upright */
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        /* Stop Fast (Skewed) */
    }
}

/* Loading bar effect (Underglow) */
.tech-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 60, 0.2));
    transform: translateX(-100%);
    animation: load-bar 1s ease-out 0.8s forwards;
}

@keyframes load-bar {
    100% {
        transform: translateX(0);
    }
}

/* Text Prominence: Scrim Background */
.product-card .card-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
    padding: 0px 20px 95px 20px;
    /* Extend bottom for Nav */
    margin: auto -20px -100px -20px;
    /* Negative margin to span full width, auto top to push to bottom */
    width: calc(100% + 40px);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 28vh;
    /* Content at bottom - compact to give images more space */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Decorative scan line effect for product cards - Slower */
.product-card .card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-red),
        var(--accent-yellow),
        var(--accent-red),
        transparent
    );
    animation: scan-line 8s linear infinite;
    opacity: 0.4;
}

@keyframes scan-line {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(50vh);
        opacity: 0;
    }
}


/* Boost Text Shadow since we have a scrim */
h2 {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 10;
}

/* Product card entrance animations - Simplified */
.product-card.active .model-badge {
    animation: badge-glow 2s ease-in-out infinite, slide-up 0.6s ease-out;
}

.product-card.active .glitch-text {
    animation: fade-in-scale 0.8s ease-out 0.2s backwards;
}

.product-card .model-badge,
.product-card .glitch-text {
    opacity: 0;
}

.product-card.active .model-badge,
.product-card.active .glitch-text {
    opacity: 1;
}

@keyframes slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fade-in-scale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Text Card Styling - Make it more dynamic */
.text-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
    overflow: hidden;
}

.text-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 59, 48, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 204, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Animated grid pattern */
.text-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    animation: grid-drift 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes grid-drift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.text-card .card-content {
    z-index: 2;
    position: relative;
}

.text-card .icon-stack {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: pulse-glow 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.4));
    display: inline-block;
}

/* Text card entrance animation when scrolled into view */
.text-card.active .icon-stack {
    animation: pulse-glow 3s ease-in-out infinite, icon-entrance 0.8s ease-out;
}

.text-card.active h2 {
    animation: slide-in-left 0.8s ease-out 0.2s backwards;
}

.text-card.active p {
    animation: fade-in 1s ease-out 0.4s backwards;
}

@keyframes icon-entrance {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.9;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(255, 204, 0, 0.6));
    }
}

.text-card h2 {
    font-size: 3.2rem;
    line-height: 0.95;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #999999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -2px;
}

.text-card p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 90%;
    color: var(--text-silver);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Animated border accent */
.text-card .card-content::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    animation: expand-line 2s ease-in-out infinite;
}

@keyframes expand-line {
    0%, 100% {
        width: 60px;
        opacity: 1;
    }
    50% {
        width: 120px;
        opacity: 0.6;
    }
}