/* ============================================
   CARD COMPONENTS
   Feature cards, video cards with effects
   ============================================ */

/* ========== BASE CARD ========== */
.rot-card {
    container-type: inline-size;
    container-name: card;
    position: relative;
    background-color: var(--rot-surface);
    border: 1px solid var(--rot-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition:
        transform var(--duration-normal) var(--ease-smooth),
        box-shadow var(--duration-normal) var(--ease-smooth),
        border-color var(--duration-normal) var(--ease-smooth);
}

.rot-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow-magenta);
    border-color: var(--rot-magenta);
}

/* ========== FEATURE CARD ========== */
.feature {
    container-type: inline-size;
    container-name: feature;
    background-color: var(--rot-surface);
    border: 1px solid var(--rot-border);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition:
        transform var(--duration-normal) var(--ease-smooth),
        box-shadow var(--duration-normal) var(--ease-smooth);
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 0, 255, 0.05) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity var(--duration-normal);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 255, 0.2);
}

.feature:hover::before {
    opacity: 1;
}

/* Glitch scan effect on hover */
.feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(0, 255, 204, 0.3) 50%,
            transparent 100%);
    transition: left var(--duration-slow) var(--ease-smooth);
}

.feature:hover::after {
    left: 150%;
}

.feature h3 {
    margin-bottom: var(--space-4);
    font-size: var(--text-xl);
    color: var(--rot-accent);
    position: relative;
    z-index: 1;
}

.feature p {
    font-size: var(--text-sm);
    color: var(--rot-text-muted);
    position: relative;
    z-index: 1;
}

/* Container query adjustments */
@container feature (min-width: 300px) {
    .feature {
        padding: var(--space-10);
    }

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

/* ========== VIDEO CARD ========== */
.video-card {
    container-type: inline-size;
    container-name: video-card;
    background-color: var(--rot-deep);
    border: 1px solid var(--rot-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition:
        transform var(--duration-normal) var(--ease-smooth),
        box-shadow var(--duration-normal) var(--ease-smooth);
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 153, 0.2);
}

/* Scanline effect on hover */
.video-card:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0px,
            transparent 2px,
            rgba(0, 255, 204, 0.1) 2px,
            rgba(0, 255, 204, 0.1) 4px);
    z-index: 2;
    pointer-events: none;
    animation: scanline-drift 2s linear infinite;
}

.video-card img {
    width: 100%;
    display: block;
    transition: transform var(--duration-slow) var(--ease-smooth);
}

.video-card:hover img {
    transform: scale(1.05);
}

.video-card p {
    padding: var(--space-4);
    font-size: var(--text-sm);
    color: var(--rot-text-muted);
    position: relative;
    z-index: 3;
}

/* ========== TESTIMONIAL CARD ========== */
.testimonial {
    container-type: inline-size;
    container-name: testimonial;
    background-color: var(--rot-surface);
    border: 1px solid var(--rot-border);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    position: relative;
    color: var(--rot-text-muted);
    transition: border-color var(--duration-normal);
}

.testimonial::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--rot-magenta);
    position: absolute;
    top: -1rem;
    left: 1rem;
    line-height: 1;
    opacity: 0.5;
}

.testimonial:hover {
    border-color: var(--rot-aqua);
}

.testimonial:hover::before {
    color: var(--rot-aqua);
    opacity: 0.8;
}

.testimonial p {
    position: relative;
    z-index: 1;
}

.testimonial span {
    display: block;
    margin-top: var(--space-4);
    font-size: var(--text-xs);
    color: var(--rot-text-dim);
}

/* ========== MODE VARIATIONS ========== */
[data-mode="corporate"] .feature,
[data-mode="corporate"] .video-card,
[data-mode="corporate"] .testimonial {
    box-shadow: var(--shadow-sm);
}

[data-mode="corporate"] .feature:hover,
[data-mode="corporate"] .video-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

[data-mode="corporate"] .feature::after,
[data-mode="corporate"] .video-card:hover::after {
    display: none;
}