/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Import Chill K Sans Font */
@font-face {
    font-family: 'Chill K Sans';
    src: url('../fonts/han-chan-kuan-hei-ti.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Color Palette */
    --primary-dark-brown: #6D4C41;
    --secondary-dark-brown: #563A2E;
    --primary-light-beige: #F4F3ED;
    --accent-gold-beige: #E9D7AF;
    --accent-beige: #EFE6C9;
    --gradient-brown-start: #8C6E63;
    --gradient-brown-end: #5E4138;
    --text-white: #FFFFFF;
    --text-dark: #563A2E;
    --footer-bg: #4A332A;
}

body {
    font-family: 'Chill K Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--primary-light-beige);
}

/* Typography */
h1 {
    font-weight: normal;
    font-size: 3.5rem;
    line-height: 1.2;
}

h2 {
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
}

h3 {
    font-weight: normal;
    font-size: 1.5rem;
}

p {
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
}

.small-label {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Hero Section */
.hero-section {
    background-color: var(--primary-dark-brown);
    color: var(--text-white);
    padding: 40px 5% 80px;
    border-bottom-left-radius: 80px;
    border-bottom-right-radius: 80px;
}

.hero-header {
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.hero-logo {
    height: 70px;
    display: block;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: -35px;
    max-width: 1200px;
    max-height: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-text {
    flex: 1;
    max-width: 50%;
}

.hero-title {
    color: var(--text-white);
    margin-bottom: 16px;
    white-space: pre-line;
}

.hero-subtitle {
    color: var(--text-white);
    opacity: 0.9;
    font-size: 1.2rem;
}

.hero-image-wrapper {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-image-wrapper picture {
    display: flex;
    justify-content: flex-end;
}

.hero-image {
    max-width: 120%;
    height: auto;
    display: block;
}

/* Feature Cards */
.feature-cards {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.feature-card {
    background-color: var(--accent-gold-beige);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.feature-text {
    color: var(--primary-dark-brown);
    font-weight: 700;
    font-size: 1rem;
    white-space: pre-line;
}

/* About/Stats Section */
.stats-section {
    background-color: var(--primary-light-beige);
    padding: 80px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-label {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.section-title {
    color: var(--text-dark);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-item {
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.bento-item-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    min-height: 500px;
}

.bento-item-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.bento-item-3 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

.bento-item-4 {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    overflow: visible;
}

/* Office Image Card */
.office-card {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.office-card picture {
    width: 100%;
    height: 100%;
    display: block;
}

.office-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
    display: block;
}

.office-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 200px;
    z-index: 2;
}

/* Stats Cards */
.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stats-label {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.stats-badges {
    display: flex;
    gap: 12px;
    align-items: center;
}

.stats-badges picture {
    display: block;
}

.store-badge {
    max-width: 100%;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

/* Downloads Card */
.downloads-card {
    position: relative;
    background-size: cover;
    background-position: left;
    background-repeat: no-repeat;
    color: var(--text-white);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 240px;
    height: 100%;
}

.downloads-card>* {
    position: relative;
    z-index: 2;
}

.bento-item-2 picture,
.bento-item-3 picture {
    width: 100%;
    height: 100%;
    display: block;
}

/* Value Card */
.value-card {
    position: relative;
    color: var(--text-white);
    padding: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    height: 100%;
    overflow: visible;
    background-color: #8c6a61;
    border-radius: 30px;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: left;
    background-repeat: no-repeat;
    z-index: 0;
}

.value-card picture {
    position: absolute;
    top: -20%;
    width: 100%;
    height: 120%;
    z-index: 0;
}

.value-card>* {
    position: relative;
    z-index: 2;
}

.value-text {
    flex: 1;
    font-size: 1.5rem;
    line-height: 1.4;
    white-space: pre-line;
    position: relative;
    z-index: 2;
}

.value-highlight {
    font-size: 2.5rem;
}

.value-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 80% center;
    display: block;
}

/* Showcase Section */
.showcase-section {
    background-color: var(--accent-gold-beige);
    padding: 40px 5% 0;
    border-top-left-radius: 80px;
    border-top-right-radius: 80px;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: flex-end;
    gap: 60px;
    margin: 0 auto;
}

.showcase-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.showcase-woman {
    flex: 0 0 35%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    overflow: visible;
    order: 0;
}

.woman-image {
    max-height: 110%;
    height: auto;
    position: absolute;
}

.showcase-header {
    color: var(--primary-dark-brown);
    margin-bottom: 32px;
    display: block;
}

.showcase-section>.showcase-header {
    display: none;
}

.showcase-content .showcase-header {
    text-align: left;
}

.game-list {
    display: flex;
    gap: 20px;
    overflow: hidden;
    padding-bottom: 16px;
    position: relative;
}

.game-list::before,
.game-list::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.game-list-inner {
    display: flex;
    gap: 20px;
    animation: carousel-scroll 40s linear infinite;
    will-change: transform;
}

.game-list:hover .game-list-inner {
    animation-play-state: paused;
}

@keyframes carousel-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.game-card {
    flex: 0 0 auto;
    width: 200px;
}

.game-poster {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.game-title {
    text-align: center;
    color: var(--primary-dark-brown);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--text-white);
    padding: 40px 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    height: 70px;
    max-width: 200px;
}

.footer-info {
    text-align: left;
    line-height: 1.6;
}

.footer-info p {
    font-size: 15px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 30px 40px 35px;
        max-height: none;
        border-bottom-left-radius: 50px;
        border-bottom-right-radius: 50px;
    }

    .hero-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        margin-bottom: 40px;
        max-height: none;
    }

    .hero-text {
        max-width: 100%;
        margin-bottom: 30px;
    }

    .value-text {
        font-size: 1.25rem;
    }

    .value-highlight {
        font-size: 2rem;
    }

    .hero-title {
        text-align: center;
    }

    .hero-subtitle {
        text-align: center;
    }

    .hero-image {
        max-width: 100%;
    }

    .hero-image-wrapper {
        max-width: unset;
        margin-left: -40px;
        margin-right: -40px;
    }

    /* Feature Cards Mobile */
    .feature-cards {
        flex-direction: column;
        gap: 16px;
    }

    /* Stats Section Mobile */
    .stats-section {
        padding: 60px 5%;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }

    .bento-item-1,
    .bento-item-2,
    .bento-item-3,
    .bento-item-4 {
        grid-column: 1;
        grid-row: auto;
        min-height: 300px;
    }

    .bento-item-4 {
        aspect-ratio: 3 / 4;
        min-height: unset;
        overflow: hidden;
    }

    .value-card {
        flex-direction: column;
        text-align: left;
    }

    .value-card picture {
        object-position: center bottom;
    }

    .value-image {
        max-width: 100%;
        object-position: center bottom;
    }

    /* Showcase Section Mobile */
    .showcase-section {
        padding: 0;
        border-top-left-radius: 40px;
        border-top-right-radius: 40px;
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
        background-color: var(--primary-light-beige);
    }

    .showcase-section>.showcase-header {
        display: block;
        order: 1;
        padding: 60px 5% 0;
        margin-bottom: 0;
    }

    .showcase-content .showcase-header {
        display: none;
    }

    .showcase-woman {
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        order: 2;
        justify-content: center;
        overflow: hidden;
    }

    .woman-image {
        position: relative;
        max-height: 100%;
        max-width: 100%;
        margin-right: -15%;
    }

    .showcase-content {
        order: 3;
        background-color: var(--accent-gold-beige);
        padding: 60px 5% 20px;
        margin-top: -130px;
        position: relative;
        z-index: 2;
    }

    .game-list {
        justify-content: flex-start;
    }

    .game-card {
        width: 160px;
    }

    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        text-align: left;
        gap: 24px;
        align-items: start;
        padding-left: 10px;
    }

    .footer-info {
        text-align: left;
    }
}