:root {
    --reference-width: 1920px;
    --gradient-start: #003460;
    --gradient-mid: #6034a1;
    --gradient-end: #710185;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    position: relative;
    background: url('images/background_logo.png');
    background-size: 100%;
    background-position: center;
    background-attachment: scroll;
    background-repeat: repeat-y;
}

/* Gradient overlay that tints the background */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 100vh;
    background: linear-gradient(to bottom,
            var(--gradient-start) 0%,
            var(--gradient-start) 14%,
            var(--gradient-mid) 62%,
            var(--gradient-end) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.hero-banner {
    width: 100%;
    height: auto;
    display: block;
    z-index: 2;
    position: relative;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.65vw;
    /* 70px / 1920px */
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
    margin: 4.17vw 0 2.08vw 0;
    /* Top: 80px, Bottom: 40px */
    font-weight: normal;
}

.web-games-title {
    font-size: 0.3vw;
    color: white;
}

/* Frame grid container - proportional scaling with viewport */
.frame-grid-container {
    width: 100%;
    position: relative;
    z-index: 2;
    padding: 2.08vw 3.125vw 4.17vw 3.125vw;
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.04vw;
    width: 93.75vw;
    /* 1800px / 1920px */
    margin: 0 auto;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.frame-item {
    width: 100%;
    height: auto;
    aspect-ratio: 539 / 705;
    /* Maintains exact frame proportions */
    overflow: hidden;
    position: relative;

}

.frame-item {
    width: 100%;
    height: auto;
    aspect-ratio: 539 / 705;
    overflow: visible;
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.frame-item:hover {
    transform: scale(1.08);
    z-index: 10;
}

.game-screenshot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.frame-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 2;
}

.icon-row {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1vw;
    z-index: 3;
}

.frame-icon {
    width: 4vw;
    height: auto;
    display: block;
}

.game-name {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2vw;
    color: white;
    font-weight: 400;
    margin-top: 0.8vw;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* At 1920x1080, frames will be exactly 539x705px */

/* Web Games Section */
.web-games-section {
    width: 100%;
    position: relative;
    z-index: 2;
    padding: 6.25vw 3.125vw 8.33vw 3.125vw;
    text-align: center;
}

.web-games-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.65vw;
    color: white;
    font-weight: normal;
    margin-bottom: 3.125vw;
}

.web-games-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.08vw;
    /*max-width: 93.75vw;*/
    margin: 0 auto;
}

.web-game-icon {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.web-game-image {
    width: 20vw;
    height: auto;
    object-fit: contain;
    border-radius: 1.04vw;
    box-shadow: 0 0.6vw 1.25vw rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.web-game-icon:hover .web-game-image {
    transform: scale(1.05);
}

.web-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.web-game-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25vw;
    color: white;
    margin-top: 1.04vw;
    text-align: center;
    font-weight: normal;
    width: 20vw;
}