/* =====================================================
   PRIDE GOOD NEWS 2024
   Clone of cannesprlions.com/en/lionsnews/
   Magazine-style poster cards with 3D effects
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

:root {
    --black: #000;
    --white: #fff;
    --gray: #f5f5f5;
    --pink: #f28c8c;
    --yellow: #f7e74a;
    --blue: #4a7af7;
    --purple: #8b5cf6;
    --green: #10b981;
    --orange: #f97316;
    --magenta: #ec4899;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(ellipse at center, var(--white) 0%, var(--gray) 100%);
    color: var(--black);
    cursor: none;
}

/* === Preloader === */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
}

.preloader.hide {
    transform: translateY(-100%);
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    transform: scale(0.8);
    opacity: 0;
    animation: logoReveal 1s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

@keyframes logoReveal {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.preloader-line {
    width: 0;
    height: 2px;
    background: var(--white);
    margin-top: 2rem;
    animation: lineGrow 1.5s cubic-bezier(0.23, 1, 0.32, 1) 0.5s forwards;
}

@keyframes lineGrow {
    to {
        width: 200px;
    }
}

/* === Page reveal animations === */
.header {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

body.loaded .header {
    opacity: 1;
    transform: translateY(0);
}

/* Card animation is handled by CardStackAnimation in JS */

.scroll-hint {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.8s;
}

body.loaded .scroll-hint {
    opacity: 1;
    transform: translateY(0);
}

/* === Animated Background === */
.bg-scattered {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-img {
    position: absolute;
    width: 150px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

body.loaded .bg-img {
    opacity: 0.15;
    transform: scale(1);
}

.bg-img-1 {
    top: 5%;
    left: 5%;
    background: linear-gradient(135deg, #f28c8c 0%, #f7e74a 100%);
    transform: rotate(-12deg);
    animation: floatBg 20s ease-in-out infinite;
}

.bg-img-2 {
    top: 60%;
    left: 8%;
    background: linear-gradient(135deg, #4a7af7 0%, #8b5cf6 100%);
    transform: rotate(8deg);
    animation: floatBg 25s ease-in-out infinite reverse;
}

.bg-img-3 {
    top: 20%;
    right: 15%;
    background: linear-gradient(135deg, #10b981 0%, #4a7af7 100%);
    transform: rotate(15deg);
    animation: floatBg 22s ease-in-out infinite;
}

.bg-img-4 {
    top: 70%;
    right: 10%;
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    transform: rotate(-8deg);
    animation: floatBg 18s ease-in-out infinite reverse;
}

.bg-img-5 {
    top: 40%;
    left: 25%;
    width: 100px;
    height: 140px;
    background: linear-gradient(135deg, #f7e74a 0%, #10b981 100%);
    transform: rotate(20deg);
    animation: floatBg 24s ease-in-out infinite;
}

.bg-img-6 {
    top: 10%;
    right: 30%;
    width: 120px;
    height: 160px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    transform: rotate(-15deg);
    animation: floatBg 21s ease-in-out infinite reverse;
}

.bg-img-7 {
    bottom: 15%;
    left: 40%;
    width: 90px;
    height: 120px;
    background: linear-gradient(135deg, #f97316 0%, #f28c8c 100%);
    transform: rotate(10deg);
    animation: floatBg 19s ease-in-out infinite;
}

.bg-img-8 {
    bottom: 30%;
    right: 25%;
    width: 110px;
    height: 150px;
    background: linear-gradient(135deg, #4a7af7 0%, #10b981 100%);
    transform: rotate(-5deg);
    animation: floatBg 23s ease-in-out infinite reverse;
}

body.loaded .bg-img-1 { transition-delay: 0.2s; }
body.loaded .bg-img-2 { transition-delay: 0.3s; }
body.loaded .bg-img-3 { transition-delay: 0.4s; }
body.loaded .bg-img-4 { transition-delay: 0.5s; }
body.loaded .bg-img-5 { transition-delay: 0.6s; }
body.loaded .bg-img-6 { transition-delay: 0.7s; }
body.loaded .bg-img-7 { transition-delay: 0.8s; }
body.loaded .bg-img-8 { transition-delay: 0.9s; }

@keyframes floatBg {
    0%, 100% {
        transform: translate(0, 0) rotate(var(--rotate, 0deg));
    }
    25% {
        transform: translate(20px, -30px) rotate(calc(var(--rotate, 0deg) + 5deg));
    }
    50% {
        transform: translate(-15px, 20px) rotate(calc(var(--rotate, 0deg) - 3deg));
    }
    75% {
        transform: translate(25px, 15px) rotate(calc(var(--rotate, 0deg) + 8deg));
    }
}

/* === Custom Cursor === */
.cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--black);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border 0.2s ease, opacity 0.3s ease;
}

/* Cursor hover states */
.cursor.hover {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.1);
    mix-blend-mode: normal;
}

.cursor-follower.hover {
    width: 70px;
    height: 70px;
    border: 1px solid rgba(0,0,0,0.5);
}

.cursor.click {
    transform: translate(-50%, -50%) scale(0.8);
}

.cursor-follower.click {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Hide on cards */
.cursor.on-card {
    opacity: 0.5;
    width: 8px;
    height: 8px;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }

    body {
        cursor: auto;
    }
}

@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }

    body {
        cursor: auto;
    }
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: transparent;
}

.header-left, .header-center, .header-right {
    flex: 1;
}

.header-center {
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: block;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--black);
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.6;
}

.lang-switch {
    display: flex;
    gap: 0.75rem;
}

.lang {
    padding: 0.4rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--black);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.lang.active {
    border-color: var(--black);
}

.lang:hover {
    background: rgba(0,0,0,0.05);
}

/* === Main === */
.main {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    background: radial-gradient(ellipse at center, var(--white) 60%, #b5b5b5 100%);
}

/* === Background Scattered Images === */
.bg-scattered {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.4;
}

.bg-img {
    position: absolute;
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
}

.bg-img-1 {
    width: 120px; height: 80px;
    top: 10%; left: 5%;
    background-image: url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?w=200');
    transform: rotate(-5deg);
}

.bg-img-2 {
    width: 100px; height: 70px;
    top: 60%; left: 8%;
    background-image: url('https://images.unsplash.com/photo-1511632765486-a01980e01a18?w=200');
    transform: rotate(3deg);
}

.bg-img-3 {
    width: 80px; height: 100px;
    top: 25%; left: 15%;
    background-image: url('https://images.unsplash.com/photo-1529333166437-7750a6dd5a70?w=200');
    transform: rotate(-8deg);
}

.bg-img-4 {
    width: 90px; height: 60px;
    top: 75%; left: 20%;
    background-image: url('https://images.unsplash.com/photo-1556156653-e5a7676f4468?w=200');
    transform: rotate(5deg);
}

.bg-img-5 {
    width: 110px; height: 75px;
    top: 15%; right: 15%;
    background-image: url('https://images.unsplash.com/photo-1573497019940-1c28c88b4f3e?w=200');
    transform: rotate(7deg);
}

.bg-img-6 {
    width: 85px; height: 110px;
    top: 50%; right: 10%;
    background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=200');
    transform: rotate(-4deg);
}

.bg-img-7 {
    width: 95px; height: 65px;
    top: 80%; right: 20%;
    background-image: url('https://images.unsplash.com/photo-1516321497487-e288fb19713f?w=200');
    transform: rotate(10deg);
}

.bg-img-8 {
    width: 70px; height: 90px;
    top: 35%; right: 5%;
    background-image: url('https://images.unsplash.com/photo-1528605248644-14dd04022da1?w=200');
    transform: rotate(-6deg);
}

/* === Carousel === */
.carousel {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5vw;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    perspective: 1000px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    gap: 3rem;
    padding: 0 10vw;
    align-items: center;
    min-height: 100%;
}

/* === Card Base === */
.card {
    flex-shrink: 0;
    width: 224px;
    aspect-ratio: 9 / 16;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
    transform: translateY(-20px) rotateY(-5deg) rotateX(5deg) scale(1.05);
    z-index: 100;
}

.card-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card-inner {
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-inner {
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.35),
        0 30px 60px -30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* === Card Content === */
.card-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
    opacity: 0.6;
}

.card-label-light {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.8;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.02em;
    margin: auto 0;
    color: var(--black);
}

.card-title-large {
    font-size: 5rem;
}

.card-title-bold {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--black);
    margin-top: auto;
}

.card-title-white {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--white);
    margin: auto 0;
}

.card-title-huge {
    font-size: 4rem;
}

.card-name {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 1rem;
}

.card-category {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 1rem;
    opacity: 0.8;
}

.card-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.card-subtitle-white {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: auto;
    color: var(--white);
    opacity: 0.8;
}

.card-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.card-num {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
}

/* === Card Image Variants === */
.card-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    z-index: 1;
}

.card-image img {
    width: 100%;
    height: auto;
    filter: grayscale(30%);
    transition: filter 0.4s, transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.card-image-full {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    overflow: hidden;
}

.card-image-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-image-full img {
    transform: scale(1.1);
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.3;
    overflow: hidden;
}

.card-image-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s, opacity 0.4s;
}

.card:hover .card-image-overlay img {
    transform: scale(1.1);
    opacity: 0.5;
}

/* === Card Collage === */
.card-collage {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    height: 55%;
    z-index: 1;
}

.card-collage img {
    position: absolute;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.collage-1 {
    width: 70%;
    top: 10%;
    left: 15%;
    z-index: 3;
}

.collage-2 {
    width: 40%;
    top: 0;
    right: 0;
    z-index: 2;
    transform: rotate(5deg);
}

.collage-3 {
    width: 35%;
    bottom: 0;
    left: 0;
    z-index: 1;
    transform: rotate(-3deg);
}

.card:hover .collage-1 {
    transform: translateY(-10px) rotate(-2deg);
}

.card:hover .collage-2 {
    transform: translateY(-5px) rotate(8deg);
}

.card:hover .collage-3 {
    transform: translateY(-8px) rotate(-6deg);
}

/* === Featured Card === */
.card-featured {
    width: 266px;
    aspect-ratio: 9 / 16;
}

.card-featured .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}

/* === Card Description === */
.card-description {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    padding: 1rem 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-description {
    opacity: 1;
    transform: translateY(0);
}

.card-description p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--black);
    opacity: 0.7;
}

/* === Scroll Hint === */
.scroll-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    opacity: 0.5;
    animation: fadeInUp 1s ease 1s both;
}

.scroll-hint svg {
    animation: bounceRight 1.5s ease infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 0.5;
        transform: translate(-50%, 0);
    }
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* === Parallax on scroll === */
.card:nth-child(odd) {
    transform: translateY(30px);
}

.card:nth-child(even) {
    transform: translateY(-30px);
}

.card:nth-child(odd):hover {
    transform: translateY(10px) rotateY(-5deg) rotateX(5deg) scale(1.05);
}

.card:nth-child(even):hover {
    transform: translateY(-50px) rotateY(-5deg) rotateX(5deg) scale(1.05);
}

/* === Responsive === */
@media (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .header-center {
        display: none;
    }

    .carousel-track {
        gap: 1.5rem;
        padding: 0 5vw;
    }

    .card {
        width: 196px;
        aspect-ratio: 9 / 16;
    }

    .card-featured {
        width: 210px;
        aspect-ratio: 9 / 16;
    }

    .card-title {
        font-size: 3rem;
    }

    .card-title-large {
        font-size: 4rem;
    }

    .card-title-white {
        font-size: 2.5rem;
    }
}

/* === Page Transition === */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--black);
    z-index: 9998;
    transform: scaleY(0);
    transform-origin: bottom;
}

.page-transition.active {
    animation: pageIn 0.6s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

@keyframes pageIn {
    0% { transform: scaleY(0); transform-origin: bottom; }
    50% { transform: scaleY(1); transform-origin: bottom; }
    50.1% { transform-origin: top; }
    100% { transform: scaleY(0); transform-origin: top; }
}

/* === Card Transition Animation (3D flip) === */
.card-transition-wrapper {
    pointer-events: none;
}

.card-transition-clone {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-transition-clone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* === Card Image Cover (Full poster images) === */
.card-image-cover {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.card-image-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* === About Modal === */
.about-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.about-modal.open {
    opacity: 1;
    visibility: visible;
}

.about-inner {
    background: var(--white);
    max-width: 600px;
    width: 100%;
    padding: 3rem;
    position: relative;
    border-radius: 4px;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-modal.open .about-inner {
    transform: translateY(0) scale(1);
}

.about-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: none;
    border: 1px solid var(--black);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.about-close:hover {
    background: var(--black);
    color: var(--white);
}

.about-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

.about-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.about-footer p {
    font-size: 0.9rem;
    opacity: 0.6;
}
