:root {
    --bg: #fff8ef;
    --bg-soft: #fff1df;
    --panel: rgba(255, 255, 255, 0.78);
    --panel-strong: rgba(255, 251, 245, 0.92);
    --text: #53413a;
    --muted: #7f6a60;
    --line: rgba(145, 116, 99, 0.16);
    --primary: #f39b6d;
    --secondary: #8cc9b4;
    --accent: #f2c94c;
    --shadow: 0 22px 50px rgba(187, 148, 120, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(243, 155, 109, 0.18), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(140, 201, 180, 0.22), transparent 24%),
        linear-gradient(180deg, #fff9f1 0%, #fff3e6 48%, #fffdf8 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.container,
.nav-container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(255, 248, 239, 0.76);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-container {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo,
.footer-logo {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.logo-text,
.section-title,
.hero-title {
    font-family: 'Baloo 2', cursive;
}

.logo-text {
    color: #d77e58;
    font-size: 1.6rem;
}

.logo-labs {
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    color: #84a798;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 26px;
}

.nav-link {
    position: relative;
    font-weight: 700;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.25s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: 99px;
}

section {
    padding: 105px 0;
}

.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    padding-top: 100px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(820px, calc(100% - 40px));
    margin: 0 auto;
    text-align: center;
}

.eyebrow,
.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.82rem;
    color: #9ab7ac;
    margin-bottom: 14px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.title-line {
    color: var(--muted);
    font-size: 1.02rem;
}

.title-main {
    font-size: clamp(3rem, 7vw, 5.3rem);
    line-height: 0.96;
    color: #c56e4f;
}

.title-sub,
.hero-description,
.section-subtitle {
    color: var(--muted);
}

.hero-description {
    max-width: 690px;
    margin: 24px auto 0;
    font-size: 1.08rem;
}

.hero-buttons,
.game-controls,
.game-stats,
.social-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-buttons {
    justify-content: center;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #f39b6d, #f2c94c);
    color: #543621;
    box-shadow: 0 14px 30px rgba(243, 155, 109, 0.24);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(140, 201, 180, 0.4);
    color: var(--text);
}

.btn-small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.92rem;
}

.hero-background,
.floating-shapes {
    position: absolute;
    inset: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 7s ease-in-out infinite;
    opacity: 0.75;
}

.shape-1,
.shape-4 {
    background: rgba(243, 155, 109, 0.28);
}

.shape-2,
.shape-5 {
    background: rgba(140, 201, 180, 0.28);
}

.shape-3 {
    background: rgba(242, 201, 76, 0.25);
}

.shape-1 { width: 120px; height: 120px; top: 16%; left: 8%; }
.shape-2 { width: 180px; height: 180px; top: 20%; right: 8%; animation-delay: 1s; }
.shape-3 { width: 80px; height: 80px; bottom: 18%; left: 18%; animation-delay: 2s; }
.shape-4 { width: 130px; height: 130px; bottom: 14%; right: 17%; animation-delay: 3s; }
.shape-5 { width: 52px; height: 52px; top: 52%; left: 48%; animation-delay: 4s; }

.scroll-indicator {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 3px solid #a7c6b8;
    border-bottom: 3px solid #a7c6b8;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

.section-header {
    max-width: 720px;
    margin-bottom: 32px;
}

.about-text,
.games-grid,
.team-grid,
.contact-content,
.footer-content {
    display: grid;
    gap: 22px;
}

.about-text,
.games-grid,
.team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-card,
.game-demo-section,
.game-card,
.team-member,
.contact-info,
.contact-form,
.footer {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.about-card,
.team-member,
.contact-info,
.contact-form {
    border-radius: 30px;
    padding: 28px;
}

.card-icon,
.contact-item i {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(243, 155, 109, 0.22), rgba(140, 201, 180, 0.22));
    color: #bd7858;
    font-size: 1.3rem;
    margin-bottom: 18px;
}

.game-demo-section {
    margin: 18px 0 32px;
    border-radius: 32px;
    padding: 28px;
}

.game-demo-header {
    margin-bottom: 18px;
}

.game-stats span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}

.game-container {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff8f0, #f8ecde);
    border: 1px solid rgba(145, 116, 99, 0.16);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(180deg, #fef7ee, #f6eadb);
}

.game-container .game-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 250, 245, 0.56);
    text-align: center;
}

.games-grid .game-card {
    min-height: 300px;
    overflow: hidden;
    border-radius: 28px;
}

.game-image {
    position: relative;
    height: 100%;
    padding: 20px;
    display: flex;
    align-items: end;
}

.game-image-1 { background: linear-gradient(145deg, #ffd6b5, #ffc8da); }
.game-image-2 { background: linear-gradient(145deg, #d7f1df, #d7ecff); }
.game-image-3 { background: linear-gradient(145deg, #fff0bf, #ffe0a8); }

.games-grid .game-overlay {
    width: 100%;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.member-avatar {
    width: 84px;
    height: 84px;
    border-radius: 28px;
    margin-bottom: 18px;
}

.avatar-1 { background: linear-gradient(135deg, #ffd1bc, #f39b6d); }
.avatar-2 { background: linear-gradient(135deg, #d7f1df, #8cc9b4); }
.avatar-3 { background: linear-gradient(135deg, #fff3c2, #f2c94c); }

.contact-content {
    grid-template-columns: 0.95fr 1.05fr;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.form-group + .form-group {
    margin-top: 16px;
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: #a38c82;
}

.footer {
    margin: 0 20px 20px;
    border-radius: 28px;
    padding: 34px 0 22px;
}

.footer-content {
    grid-template-columns: 1.3fr 0.8fr 0.8fr;
}

.footer-section ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.social-links a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #fff7ef;
    z-index: 2000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 68px;
    height: 68px;
    border: 6px solid rgba(243, 155, 109, 0.2);
    border-top-color: #8cc9b4;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(6px, 6px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .about-text,
    .games-grid,
    .team-grid,
    .contact-content,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: absolute;
        top: 74px;
        left: 20px;
        right: 20px;
        padding: 18px;
        border-radius: 22px;
        background: rgba(255, 249, 241, 0.96);
        border: 1px solid var(--line);
        flex-direction: column;
        display: none;
    }

    .nav-menu.active,
    .hamburger.active + .nav-menu {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}
