/* ===== CSS Variables ===== */
:root {
    --color-yellow: #FFE500;
    --color-black: #000000;
    --color-blue: #0085FF;
    --color-dark-gray: #1a1a1a;
    --color-white: #ffffff;

    --font-display: 'Be Vietnam Pro', sans-serif;
    --font-body: 'Duru Sans', sans-serif;
    --font-nav: 'Inter', sans-serif;

    --header-height: 70px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-yellow);
    color: var(--color-black);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--color-yellow);
    z-index: 1000;
    padding: 0 20px;
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-family: var(--font-nav);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--color-black);
    transition: opacity 0.3s ease;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-nav);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--color-black);
    color: var(--color-yellow);
}

.btn-subscribe {
    background-color: var(--color-black);
    color: var(--color-white);
}

.btn-watch {
    background-color: var(--color-yellow);
    color: var(--color-black);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    margin-top: var(--header-height);
    overflow: hidden;
    border-radius: 16px;
    margin-left: 10px;
    margin-right: 10px;
}

.hero-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.hero-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-background {
    z-index: 1;
}

.hero-background img {
    object-position: center top;
}

.hero-characters {
    z-index: 3;
    position: absolute;
    bottom: -10%;
    right: -10%;
    top: auto;
    left: auto;
    width: 60%;
    height: 85%;
    overflow: hidden;
}

.hero-characters img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top center;
    transform: scale(0.9);
    transform-origin: bottom right;
}

.hero-caution-tape {
    z-index: 4;
    position: absolute;
    bottom: -5%;
    left: -10%;
    width: 80%;
    height: auto;
    transform: rotate(-8deg);
    transform-origin: bottom left;
}

.hero-caution-tape img {
    position: relative;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-content {
    position: absolute;
    z-index: 5;
    top: 20%;
    left: 80px;
    max-width: 450px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--color-white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.btn-subscribe {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 14px 28px;
    font-weight: 600;
}

.btn-subscribe .btn-icon {
    width: 24px;
    height: 24px;
}

/* ===== Sections ===== */
.section {
    padding: 80px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    text-align: center;
    margin-bottom: 40px;
}

/* ===== Trailer Section ===== */
.trailer-section {
    background-color: var(--color-black);
    padding: 0;
}

.asphalt-bg {
    background-image: url('../assets/images/asphalt-texture.jpg');
    background-size: cover;
    background-position: center;
    padding: 80px 20px;
}

.trailer-section .section-title {
    color: var(--color-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.trailer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.trailer-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.trailer-card:hover {
    transform: scale(1.02);
}

.trailer-thumb {
    position: relative;
    aspect-ratio: 16/9;
}

.trailer-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: background-color 0.3s ease;
}

.play-button svg {
    width: 24px;
    height: 24px;
}

.trailer-card:hover .play-button {
    background-color: rgba(0, 0, 0, 0.9);
}

.trailer-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.label-accent {
    width: 4px;
    height: 40px;
    background-color: #ff0000;
}

.label-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    color: var(--color-white);
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== About Section ===== */
.about-section {
    background-color: var(--color-black);
    color: var(--color-white);
}

.about-section .section-title {
    color: var(--color-yellow);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

/* ===== Gallery Section ===== */
.gallery-section {
    background-color: var(--color-black);
    padding: 40px 0;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.poster-item {
    border-radius: 12px;
    overflow: hidden;
}

.poster-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Carousel ===== */
.bts-carousel {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px;
}

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

.carousel-slide {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 300px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--color-white);
}

/* ===== CTA Section ===== */
.cta-section {
    background-color: var(--color-yellow);
    text-align: center;
    padding: 100px 20px;
}

.cta-subtitle {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 900;
    margin-bottom: 20px;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 40px;
}

/* ===== Watch Section ===== */
.watch-section {
    background-color: var(--color-blue);
    padding: 80px 20px;
}

.watch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.watch-card {
    text-align: center;
}

.watch-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: 30px;
    line-height: 1.2;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    background-color: var(--color-white);
    padding: 10px;
    border-radius: 8px;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--color-dark-gray);
    padding: 60px 20px;
    text-align: center;
}

.footer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-link {
    font-family: var(--font-nav);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-white);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

.footer-logo img {
    height: 80px;
    margin: 0 auto;
    filter: grayscale(100%) brightness(0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        min-height: 600px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        top: 10%;
    }

    .hero-title {
        font-size: 36px;
    }

    .carousel-slide {
        flex: 0 0 calc(50% - 10px);
        min-width: 250px;
    }

    .poster-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        flex: 0 0 calc(100% - 40px);
        min-width: 200px;
    }
}

/* ===== Parallax Animation Smoothing ===== */
.hero-layer {
    transition: transform 0.1s ease-out;
}

/* ===== Spring Animation for Parallax ===== */
@keyframes settleSpring {
    0% { transform: translateY(var(--spring-offset, 0px)); }
    25% { transform: translateY(calc(var(--spring-offset, 0px) * -0.5)); }
    50% { transform: translateY(calc(var(--spring-offset, 0px) * 0.25)); }
    75% { transform: translateY(calc(var(--spring-offset, 0px) * -0.1)); }
    100% { transform: translateY(0); }
}
