/* Explain: Layout utilities for textured sections and image galleries. */
.texture-section {
    position: relative;
    overflow: hidden;
}

.texture-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 30% 10%, black 0%, transparent 62%);
}

.texture-section > * {
    position: relative;
    z-index: 1;
}

.hero-cinema::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 28%;
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, rgba(184, 115, 51, 0.18), transparent 58%);
}

.gallery-mosaic {
    display: grid;
    grid-auto-rows: 260px;
    gap: 1rem;
}

.gallery-frame {
    overflow: hidden;
    border-radius: 1.75rem;
    background: rgba(245, 242, 234, 0.08);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
    .gallery-mosaic {
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 220px;
    }

    .gallery-frame:nth-child(1) {
        grid-column: span 4;
        grid-row: span 2;
    }

    .gallery-frame:nth-child(2) {
        grid-column: span 2;
    }

    .gallery-frame:nth-child(3) {
        grid-column: span 2;
    }

    .gallery-frame:nth-child(4),
    .gallery-frame:nth-child(5),
    .gallery-frame:nth-child(6) {
        grid-column: span 2;
    }
}

/* ============================================================
   HOLOGRAM THEME — dynamic digital grid atmosphere
   ============================================================ */
html[data-theme="holo"] body {
    background-color: var(--background-color);
    background-image:
        radial-gradient(circle at 50% -10%, rgba(0, 240, 255, 0.16), transparent 45%),
        radial-gradient(circle at 100% 100%, rgba(191, 85, 236, 0.14), transparent 45%),
        linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(191, 85, 236, 0.06) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 46px 46px, 46px 46px;
    background-attachment: fixed;
    animation: holo-grid-drift 18s linear infinite;
}

@keyframes holo-grid-drift {
    from {
        background-position: 0 0, 0 0, 0 0, 0 0;
    }
    to {
        background-position: 0 0, 0 0, 46px 46px, 46px 46px;
    }
}

html[data-theme="holo"] .texture-section::before {
    background-size: 40px 40px;
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme="holo"] body {
        animation: none;
    }
}

@media (max-width: 767px) {
    .hero-cinema {
        min-height: auto;
    }
}

/* ============================================================
   HOLOGRAM THEME — HUD frame on hero
   ============================================================ */
html[data-theme="holo"] .hero-cinema::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 1.75rem;
    box-shadow: inset 0 0 70px rgba(0, 240, 255, 0.10), 0 0 40px rgba(0, 240, 255, 0.12);
    pointer-events: none;
    z-index: 3;
}