/* =========================
   Global Styles
========================= */

:root {
    --bg-header: rgba(10, 16, 35, 0.42);
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --accent-blue: #38bdf8;
    --accent-purple: #8b5cf6;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent-soft: #f3d7ff;

    --border-color: rgba(255, 255, 225, 0.12);
    --border-soft: rgba(255, 255, 255, 0.22);

    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-glass-strong: rgba(20, 20, 35, 0.35);

    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 6px 18px rgba(0, 0, 0, 0.15);
    --shadow-card-hover: 0 10px 24px rgba(0, 0, 0, 0.22);
    --shadow-header: 0 4px 18px rgba(0, 0, 0, 0.18);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: "Exo", sans-serif;
    font-size: 16px;
    scroll-behavior: smooth;
}

body, h1, h2, h3, h4, p, ul {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

.main-content {
    position: relative;
}

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

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

.subtitle, .role, .meta, .footer-description {
    color: var(--text-muted);
}

.studio-name {
    color: var(--accent-blue);
}

header, footer {
    background-color: var(--bg-secondary);
}

a:focus-visible, button:focus-visible, .button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

/* =========================
   Shared Section Layout
========================= */

#home, #about, #games, #team, #news {
    width: calc(100% - 2rem);
    margin: 2rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

#about, #games, #team, #news {
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.section-header {
    max-width: 42rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.section-header h2, .mission-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.section-header h2::after, .mission-content h2::after {
    content: "";
    display: block;
    width: 100%;
    height: 3px;
    margin-top: 0.75rem;
    background: linear-gradient(90deg, #3db8ff, #c9a3ff);
    opacity: 0.85;
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    animation: lineReveal 0.8s ease forwards;
}

.section-header p, .mission-content p, .hero-content p, .game-card p, .team-card p, .news-card p {
    color: var(--text-accent-soft);
}

.section-header .subtitle {
    font-size: 1.3rem;
    line-height: 1.6;
}

/* =========================
   Header
========================= */

header {
    position: relative;
    border-bottom: solid 1px var(--border-color);
    background: var(--bg-header);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: var(--shadow-header);
}

header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

header .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 6rem;
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
}

header .logo {
    display: inline-flex;
    padding-left: 0.5rem;
}

header .logo img {
    height: 5rem;
    width: auto;
}

header nav {
    flex: 1 1 420px;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    list-style-type: none;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

header nav a {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    font-size: 1.375rem;
    color: #f2ecff;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    transition: color 0.3s ease,
    background-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

header nav a:hover {
    color: var(--accent-purple);
    background: var(--border-color);    
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(180, 140, 255, 0.28);
}

/* =========================
   Hero Section
========================= */

#home {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43.75rem;
    background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url("../images/hero-background.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 48rem;
    padding: 2rem 3rem;
    margin: 1rem;
    animation: fadeUp 1s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    background: var(--surface-glass-strong);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border: 1px solid var(--border-soft);
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
}

.hero-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: clamp(2.4rem, 4vw, 3.7rem);
    line-height: 1.1;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.6;
    max-width: 32rem;
}

/* =========================
   Mission Section
========================= */

.mission-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 40rem;
    padding: 2rem 2.5rem;
    margin: 0 auto;
    animation: fadeUp 1s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.mission-content p {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    line-height: 1.6;
    max-width: 32rem;
}

/* =========================
   Games Section
========================= */

.games-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0 0;
}

.game-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    text-align: center;
    background: var(--surface-glass);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.game-card .image-container {
    overflow: hidden;
    border-radius: 0.6rem;
    margin-bottom: 1rem;
}

.game-card .image-container img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.game-card h3 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.game-card p {
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* =========================
   Team Section
========================= */

.team-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.team-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    text-align: center;
    background: var(--surface-glass);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.team-card .image-container {
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.team-card .image-container img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.team-card h3 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.team-card .role {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.team-card .description {
    line-height: 1.6;
}

/* =========================
   News Section
========================= */

.news-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--surface-glass);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.news-card .image-container, .news-card .video-container {
    overflow: hidden;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.news-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.video-container video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-card h3 {
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.news-card p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card .button, .news-card .btn-secondary {
    align-self: flex-start;
}

/* =========================
   Buttons
========================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: min(100%, 220px);
    min-height: 56px;
    padding: 1rem 2rem;
    border-radius: 0.4rem;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    padding: 0.85rem 1.4rem;
    border-radius: 0.4rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-primary);
    text-decoration: none;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

/* =========================
   Footer
========================= */

footer {
    width: 100%;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 1rem 1.5rem;
}

.content-footer {
    width: min(100%, 75rem);
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.logo-section {
    display: grid;
    gap: 1rem;
    justify-items: start;
}

.footer-logo img {
    height: 4rem;
    width: auto;
}

.footer-description {
    max-width: 35rem;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.footer-links-group h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.footer-navigation ul {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.footer-navigation a {
    color: var(--text-secondary);
}

.footer-navigation a:hover {
    color: var(--accent-purple);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-purple);
    transform: translateY(-1px);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-nav a {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-purple);
    transform: translateY(-1px);
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================
   Animations
========================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineReveal {
    to {
        transform: scaleX(1);
    }
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {

    #home, #about, #games, #team, #news {
        width: calc(100% - 1rem);
        margin: 1rem auto;
    }

    /* Header */

    header .content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    header .logo {
        margin: 0.5rem 0;
    }

    header .logo img {
        height: 3.5rem;
    }

    header nav {
        flex: none;
        width: 100%;
    }

    header nav ul {
        justify-content: center;
        gap: 0.6em 0.8rem;
    }

    header nav a {
        padding: 0.25rem 0.55rem;
        font-size: 1rem;
        border-radius: 0.4rem;
    }

    /* Hero Section */

    #home {
        min-height: 30rem;
    }

    .hero-content {
        max-width: 100%;
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.75rem, 6vw, 2.4rem);
    }

    .hero-content p, .mission-content p, .section-header p {
        font-size: 1rem;
    }

    .mission-content {
        padding: 1.5rem;
    }

    .mission-content h2, .section-header h2 {
        font-size: clamp(1.55rem, 6vw, 2rem);
    }

      /* Cards */

    .games-section, .team-section, .news-section {
        grid-template-columns: 1fr;
    }

    .game-card, .team-card, .news-card {
        padding: 1.25rem;
    }

    .button {
        width: min(100%, 220px);
        min-height: 52px;
        font-size: 1rem;
        padding: 0.85rem 1.25rem;
    }

    .btn-secondary {
        min-height: 44px;
        padding: 0.75rem 1.2rem;
    }

    /* Footer */

    footer {
        padding: 2rem 1rem 1.25rem;
    }

    .logo-section {
        justify-items: center;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-links-group {
        text-align: center;
    }

    .footer-navigation ul {
        justify-items: center;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}
