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

:root {
    --color-bg: #fafaf7;
    --color-surface: #ffffff;
    --color-ink: #2c2c2c;
    --color-ink-soft: #5a5a5a;
    --color-accent: #1a4a6e;
    --color-accent-light: #e8f0f6;
    --color-rule: #d6d6d0;
    --font-display: "DM Serif Display", Georgia, serif;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --max-width: 740px;
}

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-bg);
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

/* ——— Page Shell ——— */
.page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* ——— Header ——— */
.header {
    text-align: center;
    padding-bottom: 2.6rem;
    margin-bottom: 2.8rem;
    border-bottom: 2px solid var(--color-accent);
}

.header__label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-accent-light);
    padding: 0.3em 1em;
    border-radius: 3px;
    margin-bottom: 1.4rem;
}

.header h1 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 400;
    color: var(--color-accent);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.header__company {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: 0.25rem;
}

.header__date {
    font-size: 0.88rem;
    color: var(--color-ink-soft);
    font-style: italic;
}

/* ——— Sections ——— */
section {
    margin-bottom: 2.4rem;
}

section h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 0.7rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--color-rule);
}

section p {
    margin-bottom: 0.85rem;
    color: var(--color-ink);
}

section p:last-child {
    margin-bottom: 0;
}

/* ——— Contact Card ——— */
.contact-card {
    background: var(--color-accent-light);
    border-left: 3px solid var(--color-accent);
    padding: 1.2rem 1.5rem;
    margin-top: 0.6rem;
    border-radius: 0 6px 6px 0;
}

.contact-card p {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.contact-card strong {
    color: var(--color-accent);
}

/* ——— Footer / Reference ——— */
.reference {
    margin-top: 3.2rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--color-rule);
    font-size: 0.85rem;
    color: var(--color-ink-soft);
}

.reference a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent-light);
    transition: border-color 0.2s;
}

.reference a:hover {
    border-bottom-color: var(--color-accent);
}

/* ——— Responsive ——— */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }
    .page {
        padding: 2.5rem 1.2rem 4rem;
    }
    .header h1 {
        font-size: 2rem;
    }
}

/* ——— Carousel ——— */
#games-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3rem;
    position: relative;
    /* Using a more responsive height */
    min-height: 400px;
    overflow: hidden;
}

.carousel-item {
    flex-direction: column;
    align-items: center;
    width: 200px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.carousel-item--active {
    display: flex;
    z-index: 2;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.carousel-item--preview-left {
    display: flex;
    z-index: 1;
    opacity: 0.6;
    transform: translateX(-120px) scale(0.85);
    pointer-events: none;
    /* Fixed mask-image syntax */
    mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
        to left,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0) 100%
    );
}

.carousel-item--preview-right {
    display: flex;
    z-index: 1;
    opacity: 0.6;
    transform: translateX(120px) scale(0.85);
    pointer-events: none;
    /* Fixed mask-image syntax */
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 30%,
        rgba(0, 0, 0, 0) 100%
    );
}

.carousel-media {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-pill {
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    border-radius: 50px;
    text-align: center;
    width: calc(var(--max-width) * 0.8);
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s ease;
}

.carousel-item--preview-left .carousel-pill,
.carousel-item--preview-right .carousel-pill {
    display: none;
}

.carousel-pill h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: 0.2rem;
}

.carousel-pill .date {
    font-weight: 600;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.4rem;
    color: var(--color-ink-soft);
}

.carousel-pill .desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-ink);
}

/* Navigation buttons */
.carousel-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.carousel-nav-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav-prev {
    left: 20px;
}

.carousel-nav-next {
    right: 20px;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
    #games-carousel-wrapper {
        min-height: 350px;
    }

    .carousel-item {
        width: 180px;
    }

    .carousel-media {
        width: 180px;
        height: 180px;
    }

    .carousel-nav-button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .carousel-nav-prev {
        left: 10px;
    }

    .carousel-nav-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    #games-carousel-wrapper {
        min-height: 300px;
    }

    .carousel-item {
        width: 150px;
    }

    .carousel-media {
        width: 150px;
        height: 150px;
    }

    .carousel-pill {
        width: 90%;
        padding: 0.6rem 1rem;
    }

    .carousel-nav-button {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}
