/* ============================================
   AWWWARDS LAB - Premium Card Styles
   All 5 concepts unified stylesheet
   ============================================ */

/* --- SHARED VARIABLES --- */
:root {
    --aww-accent: #4F6070;
    --aww-glow: rgba(79, 96, 112, 0.5);
    --aww-glass: rgba(255, 255, 255, 0.03);
    --aww-border: rgba(255, 255, 255, 0.08);
}

.aww-showcase {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, transparent, rgba(79, 96, 112, 0.02));
}

.aww-section-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aww-section-title .icon {
    font-size: 2rem;
}

.aww-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* ============================================
   1. LIQUID MORPHING CARDS
   ============================================ */
#liquid-demo {
    perspective: 1000px;
}

.liquid-card {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--aww-glass), transparent);
    border: 1px solid var(--aww-border);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.4s ease;
}

.liquid-card::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, var(--aww-accent), transparent);
    animation: liquidRotate 6s linear infinite;
    opacity: 0.1;
}

@keyframes liquidRotate {
    to {
        transform: rotate(360deg);
    }
}

.liquid-card:hover {
    box-shadow: 0 20px 60px -10px var(--aww-glow);
}

.liquid-card .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.liquid-card .card-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.liquid-card:hover .card-image {
    opacity: 0.7;
}

/* ============================================
   2. HOLOGRAPHIC DEPTH CARDS
   ============================================ */
#holo-demo {
    perspective: 2000px;
}

.holo-card {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 16px;
    overflow: hidden;
    transform-style: preserve-3d;
    cursor: pointer;
}

.holo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            hsla(var(--holo-hue, 260), 80%, 60%, 0.3),
            hsla(calc(var(--holo-hue, 260) + 60), 80%, 60%, 0.2),
            hsla(calc(var(--holo-hue, 260) + 120), 80%, 60%, 0.3));
    border-radius: inherit;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.holo-card:hover::before {
    opacity: 1;
}

.holo-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.holo-layer:nth-child(1) {
    z-index: 1;
    opacity: 0.3;
}

.holo-layer:nth-child(2) {
    z-index: 2;
    opacity: 0.5;
}

.holo-layer:nth-child(3) {
    z-index: 3;
    opacity: 0.7;
}

.holo-layer:nth-child(4) {
    z-index: 4;
    opacity: 0.9;
}

.holo-layer:nth-child(5) {
    z-index: 5;
}

.holo-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--aww-accent), transparent);
    z-index: 20;
    pointer-events: none;
}

.holo-content {
    position: relative;
    z-index: 15;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ============================================
   3. CRYSTALLINE SHATTER CARDS
   ============================================ */
#crystal-demo {
    perspective: 1500px;
}

.crystal-card {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(100, 150, 200, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    overflow: hidden;
    transform-style: preserve-3d;
}

.crystal-fragments {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.crystal-fragment {
    position: absolute;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crystal-fragment::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
}

.crystal-card:hover .crystal-fragment {
    box-shadow: 0 5px 20px rgba(79, 96, 112, 0.2);
}

.crystal-content {
    position: relative;
    z-index: 10;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ============================================
   4. MAGNETIC CONSTELLATION CARDS
   ============================================ */
#constellation-demo {
    position: relative;
    min-height: 600px;
}

.constellation-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.constellation-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
}

.constellation-card {
    position: relative;
    width: 100%;
    padding-top: 120%;
    /* Aspect ratio */
    background: var(--aww-glass);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    cursor: pointer;
    transition: transform 0.4s ease;
}

.constellation-card::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, #0d111c, #1a1f2e);
    clip-path: inherit;
}

.constellation-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, var(--aww-accent), transparent);
    clip-path: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.constellation-card:hover::after {
    opacity: 0.3;
}

.constellation-content {
    position: absolute;
    inset: 0;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
}

/* Floating particles around cards */
.constellation-card .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--aww-accent);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-10px) scale(1.2);
        opacity: 1;
    }
}

/* ============================================
   5. CINEMATIC REVEAL CARDS
   ============================================ */
#cinema-demo {
    position: relative;
    perspective: 1000px;
}

.cinema-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cinema-card {
    position: relative;
    width: 280px;
    height: 420px;
    /* 2:3 poster ratio */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    /* CLEAR from start - no blur */
    filter: none;
    transform: scale(1);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.cinema-card.unfocused {
    filter: blur(4px) saturate(0.7);
    transform: scale(0.95);
}

/* Card SHARP on row hover */
.cinema-row:hover .cinema-card {
    filter: blur(0) saturate(1) brightness(1);
    transform: scale(1);
    box-shadow: 0 20px 60px -10px rgba(79, 96, 112, 0.4);
}

.cinema-card .card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.cinema-card .card-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.cinema-card .card-content {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Letterbox */
.cinema-letterbox {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

.cinema-letterbox .bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    background: #000;
}

.cinema-letterbox .bar.top {
    top: 0;
}

.cinema-letterbox .bar.bottom {
    bottom: 0;
}

/* Film grain */
.cinema-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 50;
    animation: grain 0.5s steps(4) infinite;
}

@keyframes grain {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-2px, 2px);
    }

    50% {
        transform: translate(2px, -2px);
    }

    75% {
        transform: translate(-2px, -2px);
    }
}

/* Flash effect */
.cinema-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 200;
    pointer-events: none;
}

/* ============================================
   SHARED TYPOGRAPHY
   ============================================ */
.aww-card-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.aww-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.aww-card-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--aww-glow);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .aww-grid {
        grid-template-columns: 1fr;
    }

    .cinema-card {
        width: 100%;
        height: 200px;
    }

    .constellation-card {
        padding-top: 100%;
    }
}

/* Hide letterbox when no-letterbox class is present */
#cinema-demo.no-letterbox .cinema-letterbox {
    display: none !important;
}

/* ============================================
   CINEMA ROWS - Full Width Alternating Layout
   with Liquid Morphing Cards & Scroll Reveal
   ============================================ */
.cinema-rows {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.cinema-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6rem;
    width: 100%;
}

/* Reverse row: card on right, description on left */
.cinema-row.reverse {
    flex-direction: row-reverse;
}

/* HOVER REVEAL SYSTEM - Card blurred, description hidden */

/* ============================================
   LIQUID MORPHING CINEMA CARD
   ============================================ */
.cinema-rows .cinema-card {
    position: relative;
    width: 320px;
    height: 450px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25% 75% 75% 25% / 25% 75% 75% 25%;
    /* Relaxed radius to show more image */
    overflow: hidden;
    cursor: pointer;
    /* CLEAR from start - no blur */
    filter: none;
    transform: scale(1);
    transition: filter 0.6s ease, transform 0.5s ease, box-shadow 0.5s ease, border-radius 0.8s ease;
    animation: liquidMorph 15s ease-in-out infinite;
    /* Calmer, slower animation */
}

/* Card SHARP on hover */
.cinema-row:hover .cinema-card {
    filter: blur(0) saturate(1) brightness(1);
    transform: scale(1);
    box-shadow: 0 30px 80px -15px rgba(79, 96, 112, 0.5);
}

@keyframes liquidMorph {

    0%,
    100% {
        border-radius: 40% 60% 60% 40% / 40% 60% 60% 40%;
    }

    25% {
        border-radius: 60% 40% 40% 60% / 60% 40% 40% 60%;
    }

    50% {
        border-radius: 45% 55% 55% 45% / 45% 55% 55% 45%;
    }

    75% {
        border-radius: 55% 45% 45% 55% / 55% 45% 45% 55%;
    }
}

.cinema-rows .cinema-card::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, var(--aww-accent, #4F6070), transparent);
    animation: liquidRotate 6s linear infinite;
    opacity: 0.15;
    z-index: 1;
}

.cinema-rows .cinema-card:hover {
    box-shadow: 0 30px 80px -15px rgba(79, 96, 112, 0.5);
}

.cinema-rows .cinema-card .card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    /* Increased base visibility */
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 0;
}

.cinema-rows .cinema-card:hover .card-bg {
    opacity: 0.9;
    transform: scale(1.1);
}

.cinema-rows .cinema-card .card-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 75%, rgba(0, 0, 0, 0.7) 100%);
    /* Expanded reveal for more visibility */
    z-index: 2;
}

.cinema-rows .cinema-card .card-content {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* ============================================
   DESCRIPTION - No Box, Clean & Spread
   ============================================ */
.cinema-row .cinema-desc {
    flex: 1 !important;
    max-width: 500px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    /* Force space between tag and title */
    padding: 0;
    background: transparent;
    border: none;
    /* VISIBLE from start */
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Reverse: slide from left */
.cinema-row.reverse .cinema-desc {
    transform: translateX(-60px);
}

/* Description VISIBLE on hover */
.cinema-row:hover .cinema-desc {
    opacity: 1;
    transform: translateX(0);
}

.cinema-row .cinema-desc .desc-tag {
    display: block !important;
    width: fit-content !important;
    padding: 0.4rem 1rem;
    background: rgba(79, 96, 112, 0.2);
    border: 1px solid rgba(79, 96, 112, 0.3);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #72808D;
    margin-bottom: 0 !important;
}

.cinema-row .cinema-desc .desc-title {
    display: block !important;
    width: 100% !important;
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0 !important;
    line-height: 1.1;
}

.cinema-desc .desc-text {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cinema-desc .desc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid rgba(79, 96, 112, 0.5);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #72808D;
    transition: all 0.3s ease;
}

.cinema-desc .desc-btn:hover {
    background: rgba(79, 96, 112, 0.2);
    border-color: #4F6070;
    color: #fff;
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1100px) {

    .cinema-row,
    .cinema-row.reverse {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .cinema-rows {
        gap: 5rem;
    }

    .cinema-desc {
        max-width: 100%;
        order: 2;
    }

    .cinema-rows .cinema-card {
        order: 1;
    }

    .cinema-desc .desc-title {
        font-size: 2rem;
    }

    .cinema-row .cinema-desc {
        align-items: center !important;
    }
}

@media (max-width: 640px) {
    .cinema-rows {
        gap: 4rem;
    }

    .cinema-rows .cinema-card {
        width: 260px;
        height: 380px;
    }

    .cinema-row .cinema-desc .desc-title {
        font-size: 1.6rem !important;
    }

    .cinema-desc .desc-text {
        font-size: 0.95rem;
    }

    .cinema-desc .desc-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .cinema-rows .cinema-card {
        width: 220px;
        height: 320px;
    }
}