@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
    --night-top: #0b1b3a;
    --night-bottom: #050a1a;
    --day-top: #5b9bd5;
    --day-bottom: #a8d0f0;
    --gold-1: #f5b82e;
    --gold-2: #e89b1c;
    --gold-glow: #ffd66b;
    --brick-warm: #c9821f;
    --brick-cool: #1e3a6e;
    --text: #ffffff;
    --text-muted: #9db2d4;
    --gold-grad: linear-gradient(135deg, var(--gold-glow), var(--gold-1) 55%, var(--gold-2));
    --font-head: "Fredoka", "Arial Black", sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --maxw: 1200px;
    --header-h: 76px;
}

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

html {
    scroll-behavior: smooth;
}
html.hide #preloader {
    display: none;
}

body {
    font-family: var(--font-body);
    background: var(--night-bottom);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}
body.fixed {
    overflow: hidden;
}

img {
    max-width: 100%;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.text-gold {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-muted {
    color: var(--text-muted);
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--night-bottom);
}
#preloader img {
    width: 64px;
    height: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    padding: 13px 30px;
    font-size: 15px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}
.btn-gold {
    background: var(--gold-grad);
    color: #2a1a02;
    box-shadow:
        0 8px 26px rgba(245, 184, 46, 0.35),
        0 0 0 rgba(255, 214, 107, 0);
}
.btn-gold:hover {
    filter: brightness(1.06);
    box-shadow:
        0 12px 34px rgba(245, 184, 46, 0.55),
        0 0 24px rgba(255, 214, 107, 0.35);
    transform: translateY(-2px);
}
.btn-lg {
    padding: 17px 46px;
    font-size: 19px;
}

.btn-levitate {
    animation: levitate 3s ease-in-out infinite;
    will-change: transform;
}
.btn-levitate:hover {
    animation-play-state: paused;
}
@keyframes levitate {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0);
    }
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(8, 18, 40, 0.82);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(157, 178, 212, 0.12);
    transition:
        box-shadow 0.3s ease,
        height 0.3s ease;
}
#header.scrolled {
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(157, 178, 212, 0.12);
    height: 64px;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo {
    transition: opacity 0.3s ease;
}
.logo img {
    height: 34px;
}
.nav-desktop {
    display: flex;
    gap: 32px;
    margin-left: auto;
}
.nav-desktop .nav-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s ease;
}
.nav-desktop .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--gold-grad);
    transition: width 0.25s ease;
}
.nav-desktop .nav-link:hover {
    color: var(--text);
}
.nav-desktop .nav-link:hover::after {
    width: 100%;
}
.nav-cta {
    margin-left: 8px;
}

.burger-btn {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
}
.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px auto;
    border-radius: 2px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}
.burger-btn.act span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.act span:nth-child(2) {
    opacity: 0;
}
.burger-btn.act span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    width: min(82vw, 340px);
    height: 100vh;
    background: linear-gradient(180deg, var(--night-top), var(--night-bottom));
    border-left: 1px solid rgba(157, 178, 212, 0.15);
    padding: calc(var(--header-h) + 24px) 32px 32px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}
#mobile-menu.opened {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}
#mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
#mobile-menu .nav-link {
    font-family: var(--font-head);
    font-size: 20px;
    color: var(--text);
}
#mobile-menu .btn {
    margin-top: 12px;
    font-size: 20px;
}

section {
    position: relative;
}

.hero {
    min-height: 100vh;
    padding: calc(var(--header-h) + 40px) 0 60px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(11, 27, 58, 0.72) 0%, rgba(8, 21, 48, 0.85) 55%, var(--night-bottom) 100%),
        url("../img/hero-bg.webp") center / cover no-repeat,
        linear-gradient(180deg, var(--night-top) 0%, #081530 55%, var(--night-bottom) 100%);
    overflow: hidden;
}
.hero-glow {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, rgba(255, 214, 107, 0.22), transparent 60%);
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    color: var(--gold-glow);
    margin-bottom: 18px;
    font-weight: 600;
}
.hero-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 26px;
}
.hero-copy {
    max-width: 540px;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.hero-copy p {
    margin-bottom: 12px;
}
.hero-copy p:first-child {
    color: var(--text);
}
.hero-question {
    color: var(--text) !important;
    font-weight: 600;
    font-size: 18px;
}

.hero-visual {
    position: absolute;
    top: 66px;
    right: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 600px;
}
.swing {
    transform-origin: top center;
    animation: swing 4.5s ease-in-out infinite;
    will-change: transform;
}
@keyframes swing {
    0% {
        transform: rotate(-9deg);
    }
    50% {
        transform: rotate(9deg);
    }
    100% {
        transform: rotate(-9deg);
    }
}
.chain {
    display: none;
}
.swing-block {
    width: clamp(320px, 34vw, 460px);
    margin: 0 auto;
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.particles span {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(168, 208, 240, 0.35);
    animation: drift linear infinite;
}
.particles span:nth-child(1) {
    width: 6px;
    height: 6px;
    left: 10%;
    top: 30%;
    animation-duration: 18s;
}
.particles span:nth-child(2) {
    width: 4px;
    height: 4px;
    left: 25%;
    top: 60%;
    animation-duration: 22s;
}
.particles span:nth-child(3) {
    width: 8px;
    height: 8px;
    left: 40%;
    top: 20%;
    animation-duration: 26s;
}
.particles span:nth-child(4) {
    width: 5px;
    height: 5px;
    left: 55%;
    top: 75%;
    animation-duration: 20s;
}
.particles span:nth-child(5) {
    width: 7px;
    height: 7px;
    left: 70%;
    top: 40%;
    animation-duration: 24s;
}
.particles span:nth-child(6) {
    width: 3px;
    height: 3px;
    left: 80%;
    top: 65%;
    animation-duration: 19s;
}
.particles span:nth-child(7) {
    width: 6px;
    height: 6px;
    left: 90%;
    top: 25%;
    animation-duration: 27s;
}
.particles span:nth-child(8) {
    width: 4px;
    height: 4px;
    left: 15%;
    top: 80%;
    animation-duration: 23s;
}
.particles span:nth-child(9) {
    width: 5px;
    height: 5px;
    left: 50%;
    top: 50%;
    animation-duration: 21s;
}
.particles span:nth-child(10) {
    width: 7px;
    height: 7px;
    left: 65%;
    top: 10%;
    animation-duration: 25s;
}
@keyframes drift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) translateX(30px);
        opacity: 0;
    }
}

.section-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 26px;
}
.section-title.center {
    text-align: center;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.split-text p {
    margin-bottom: 14px;
    color: var(--text-muted);
}
.split-text p:first-of-type {
    color: var(--text);
}
.staccato {
    font-weight: 600;
    color: var(--text) !important;
    line-height: 1.9;
}
.aside {
    font-style: italic;
    color: var(--text-muted) !important;
    border-left: 2px solid var(--gold-1);
    padding-left: 16px;
    margin-top: 18px;
}
.float-soft {
    animation: floatSoft 6s ease-in-out infinite;
    will-change: transform;
}
@keyframes floatSoft {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

.feeling {
    padding: 110px 0;
    background: linear-gradient(180deg, var(--night-bottom) 0%, #0a1730 50%, #07142c 100%);
}
.feeling .split-media {
    display: flex;
    justify-content: center;
}
.feeling .split-media img {
    max-height: 520px;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}

.gameplay {
    padding: 110px 0;
    background: linear-gradient(180deg, var(--day-top) 0%, var(--day-bottom) 100%);
    color: #102a4a;
}
.gameplay .section-title {
    color: #0b1b3a;
}
.gameplay-head {
    text-align: center;
    margin-bottom: 44px;
}
.gameplay .lead {
    font-size: 20px;
    font-weight: 600;
    color: #16345c;
}
.rules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 40px;
}
.rule {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 24px 20px;
    backdrop-filter: blur(4px);
    animation: dropIn 0.6s ease both;
}
.rule-num {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 30px;
    color: rgb(11, 27, 58);
    display: block;
    margin-bottom: 8px;
}
.rule p {
    color: #15314f;
    font-weight: 500;
}
@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.gameplay-warn {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    color: #0b1b3a;
    margin-bottom: 48px;
}
.features {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.feature {
    background: linear-gradient(180deg, #0b1b3a, #112b52);
    border-radius: 18px;
    padding: 26px 18px;
    text-align: center;
    box-shadow: 0 14px 30px rgba(11, 27, 58, 0.25);
    border: 1px solid rgba(245, 184, 46, 0.25);
}
.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}
.feature h3 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 17px;
    color: var(--gold-glow);
    margin-bottom: 8px;
}
.feature p {
    color: var(--text-muted);
    font-size: 14px;
}
.gameplay-tag {
    text-align: center;
    font-family: var(--font-head);
    font-size: 22px;
    color: #0b1b3a;
    font-weight: 600;
}

.climb {
    padding: 120px 0;
    overflow: hidden;
    background: radial-gradient(circle at 70% 20%, #12152b, #04070f 70%);
}
.climb-glow {
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(245, 184, 46, 0.18), transparent 65%);
    pointer-events: none;
}
.climb .split-text p {
    color: var(--text-muted);
}
.climb .split-text p:first-of-type {
    color: var(--text);
}
.climb-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.stat-card {
    background: linear-gradient(135deg, rgba(30, 58, 110, 0.55), rgba(11, 27, 58, 0.8));
    border: 1px solid rgba(245, 184, 46, 0.3);
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}
.stat-step {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 24px;
    color: var(--gold-glow);
    display: block;
    margin-bottom: 4px;
}
.stat-card p {
    color: var(--text-muted);
}
.lean-1 {
    transform: rotate(-1deg);
}
.lean-2 {
    transform: rotate(1.5deg);
}
.lean-3 {
    transform: rotate(-3deg);
    border-color: var(--gold-1);
    box-shadow: 0 16px 40px rgba(245, 184, 46, 0.3);
}

.highscore {
    padding: 110px 0;
    background: var(--night-top);
}
.hs-intro {
    max-width: 640px;
    margin: 0 auto 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
}
.hs-intro.lead {
    color: var(--text);
    font-weight: 600;
}

.hs-towers {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(24px, 6vw, 60px);
    margin: 40px auto 38px;
    min-height: 300px;
}
.tower {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}
.tower-score {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 12px;
    color: var(--text-muted);
}
.tower-name {
    margin-top: 14px;
    font-size: 15px;
    color: var(--text-muted);
}
.tower-you .tower-name {
    color: var(--text);
    font-weight: 600;
}
.tower-stack {
    width: clamp(56px, 13vw, 80px);
    border-radius: 6px;
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 1.8s cubic-bezier(0.18, 0.7, 0.2, 1);
}
.tower-rival .tower-stack {
    transition-delay: 0.1s;
}
.tower-you .tower-stack {
    transition-delay: 0.4s;
}
.tower-friend .tower-stack {
    transition-delay: 0.2s;
}
.hs-towers.in-view .tower-stack {
    transform: scaleY(1);
}
.tower-you .tower-stack {
    background: repeating-linear-gradient(
        180deg,
        var(--gold-1) 0,
        var(--gold-1) 16px,
        var(--gold-2) 16px,
        var(--gold-2) 20px
    );
    border: 2px solid var(--gold-glow);
    box-shadow: 0 0 34px rgba(245, 184, 46, 0.4);
}
.tower-rival .tower-stack,
.tower-friend .tower-stack {
    background: repeating-linear-gradient(
        180deg,
        var(--brick-cool) 0,
        var(--brick-cool) 16px,
        #14264a 16px,
        #14264a 20px
    );
    border: 1px solid #2f4f8a;
}

.hs-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}
.hs-actions span {
    background: rgba(245, 184, 46, 0.1);
    color: var(--gold-glow);
    border: 1px solid rgba(245, 184, 46, 0.3);
    border-radius: 999px;
    padding: 9px 20px;
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 15px;
}
.hs-final {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
    font-size: 19px;
    color: var(--text-muted);
}

.cta {
    padding: 0 0 140px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(0deg, var(--night-top), var(--night-bottom));
}
.cta-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70vw;
    height: 50vw;
    max-width: 800px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(255, 214, 107, 0.18), transparent 60%);
    pointer-events: none;
}
.swing-cta {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}
.swing-cta .swing-block {
    width: clamp(220px, 26vw, 320px);
}
.cta-inner {
    position: relative;
    z-index: 2;
}
.cta-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(34px, 6vw, 64px);
    text-transform: uppercase;
    margin-bottom: 24px;
}
.cta-copy {
    max-width: 600px;
    margin: 0 auto 34px;
    color: var(--text-muted);
}
.cta-copy p {
    margin-bottom: 12px;
}
.cta-copy .aside {
    display: inline-block;
    text-align: left;
}

.legal-page {
    padding: calc(var(--header-h) + 60px) 0 90px;
    background: linear-gradient(180deg, var(--night-top), var(--night-bottom));
    min-height: 80vh;
}
.legal-content {
    max-width: 860px;
    margin: 0 auto;
    color: var(--text-muted);
}
.legal-content h1 {
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(30px, 5vw, 46px);
    color: var(--text);
    margin-bottom: 28px;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.legal-content h2 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--gold-glow);
    font-size: 24px;
    margin: 36px 0 14px;
}
.legal-content p {
    margin-bottom: 14px;
}
.legal-content strong {
    color: var(--text);
}
.legal-content ul,
.legal-content ol {
    margin: 0 0 16px 24px;
}
.legal-content li {
    margin-bottom: 8px;
}
.legal-content li p {
    margin-bottom: 4px;
}
.legal-content a {
    color: var(--gold-1);
    word-break: break-word;
}
.legal-content a:hover {
    color: var(--gold-glow);
}

#footer {
    position: relative;
    padding: 56px 0 36px;
    background: var(--night-bottom);
    overflow: hidden;
}
.footer-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 120%, rgba(245, 184, 46, 0.12), transparent 60%);
    pointer-events: none;
}
.footer-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-logo {
    height: 30px;
    margin-bottom: 8px;
}
.footer-left p,
.footer-center p {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-right a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s ease;
}
.footer-right a:hover {
    color: var(--gold-glow);
}
.footer-right .sep {
    color: rgba(157, 178, 212, 0.4);
}

@media (max-width: 1024px) {
    .hero-inner {
        gap: 30px;
    }
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
    .rules {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .hero-visual.desktop {
        display: block;
    }
    .hero-visual.mobile {
        display: none;
    }
}
@media (max-width: 768px) {
    .hero-visual.desktop {
        display: none;
    }
    .hero-visual.mobile {
        display: block;
    }
    .nav-desktop,
    .nav-cta {
        display: none;
    }
    .burger-btn {
        display: block;
    }
    .hero {
        min-height: auto;
        padding-bottom: 0;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0;
    }
    .hero-content {
        order: 1;
    }
    .hero-visual {
        position: relative;
        top: unset;
        right: unset;
        order: 2;
        min-height: 420px;
        margin-top: 0;
    }
    .hero-copy {
        margin-left: auto;
        margin-right: auto;
    }
    .hero .btn-levitate,
    .cta .btn-lg {
        display: flex;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 20px 36px;
        font-size: 21px;
    }
    body.fixed .logo {
        opacity: 0;
        pointer-events: none;
    }
    .swing-block {
        width: clamp(240px, 60vw, 300px);
    }
    .split {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .feeling .split-media,
    .climb .split-media {
        order: 2;
    }
    .feeling,
    .gameplay,
    .climb,
    .highscore {
        padding: 80px 0;
    }
    .feeling {
        padding-top: 36px;
    }
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }
    .footer-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        order: 1;
    }
    .footer-right {
        order: 2;
    }
    .footer-center {
        order: 3;
    }
}
@media (max-width: 640px) {
    .features {
        grid-template-columns: 1fr;
    }
    .rules {
        grid-template-columns: 1fr;
    }
    .btn-lg {
        padding: 15px 36px;
        font-size: 17px;
    }
    .hero-title {
        font-size: clamp(32px, 11vw, 48px);
    }
}
