/* ── Montage Card: shared container + responsive contract ────── */
/* Imported by index.html and capacidades.html                    */

@property --bg-angle {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0deg;
}

/* ── Base layout ───────────────────────────────────────────── */

.automation-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    scroll-snap-align: start;
    z-index: 10;
    overflow: hidden;
}

.automation-text {
    flex: 1;
    max-width: 500px;
    text-align: left;
}

.automation-text h2 {
    margin-bottom: 1.5rem;
    text-align: left;
}

.automation-text .section-description {
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    line-height: 1.6;
    font-weight: 300;
    font-variation-settings: "wght" 300;
    font-synthesis: none;
}

.automation-media {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Video card ────────────────────────────────────────────── */

.video-card {
    --montage-card-radius: 16px;
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 768px;
    padding: 2px;
    border-radius: var(--montage-card-radius);
    z-index: 20;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(49, 201, 232, 0.34),
        0 0 30px rgba(137, 107, 255, 0.22);
}

.video-card::before,
.video-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        conic-gradient(from var(--bg-angle),
            rgba(49, 201, 232, 0) 0%,
            rgba(49, 201, 232, 0) 20%,
            #31c9e8 29%,
            #5aa7f3 35%,
            #5aa7f3 39%,
            #896bff 45%,
            rgba(137, 107, 255, 0) 50%,
            rgba(137, 107, 255, 0) 70%,
            #896bff 79%,
            #5aa7f3 85%,
            #5aa7f3 89%,
            #31c9e8 95%,
            rgba(49, 201, 232, 0) 100%),
        rgba(49, 201, 232, 0.16);
    z-index: -1;
}

.video-card::after {
    filter: blur(8px) brightness(1.3);
    z-index: -2;
}

.video-card-inner {
    background: #0a0a0a;
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: calc(var(--montage-card-radius) - 2px);
    padding: 0;
    z-index: 10;
}

.video-card .video-card-inner .viewport {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}



/* ── Responsive: ≤ 1279px ──────────────────────────────────── */

@media (max-width: 630px) {
    .automation-section {
        padding: 0 4%;
    }

    .scene-card {
        padding: 28px 24px;
    }
}

/* ── Responsive: ≤ 1230px ──────────────────────────────────── */

@media (max-width: 1230px) {
    .automation-section {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding: 4rem 0;
    }

    .automation-text {
        text-align: center;
        max-width: 100%;
        left: 0;
    }

    .automation-text h2 {
        text-align: center;
    }

    .video-card {
        top: 0;
        left: 0;
        margin: 0 auto;
        min-width: 0;
        width: 100%;
        flex: none;
    }
}

@media (min-width: 631px) {
    .video-card-inner {
        aspect-ratio: 1 / 1;
        height: auto;
        max-height: none;
    }

    .video-card-inner .viewport {
        height: 100%;
        aspect-ratio: auto;
        transform: none;
    }
}

@media (min-width: 631px) and (max-width: 1230px) {
    .video-card {
        max-width: min(92vw, 768px);
    }
}

@media (max-width: 630px) {
    .video-card {
        max-width: 520px;
    }

    .video-card-inner {
        height: auto;
        min-height: 380px;
        max-height: none;
    }

    .video-card-inner .viewport {
        height: auto;
        aspect-ratio: 1/1;
        transform: scale(calc(100vw / 768));
        transform-origin: top center;
    }
}

/* ── Responsive: ≤ 820px ──────────────────────────────────── */

@media (max-width: 630px) {
    .scene-card {
        padding: 28px 24px;
    }
}

/* ── Responsive: ≤ 768px ──────────────────────────────────── */

/* ── Reduced motion ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .video-card::before,
    .video-card::after {
        animation: none;
    }
}
