/*
 * Copyright (c) 2025-2025 godolang.org
 */

:root {
    --bg: #0b0b0f;
    --surface: #12121a;
    --text: #f6f6f8;
    --muted: #b8b8c7;
    --brand: #7c3aed;
    --brand-2: #9a6bff;
    --brand-glow: 0 0 24px rgba(124, 58, 237, .55), 0 0 48px rgba(124, 58, 237, .25);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

/* ======= Header / Nav ======= */
header {
    position: fixed;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(140%) blur(10px);
    background: linear-gradient(180deg, rgba(11, 11, 15, .85), rgba(11, 11, 15, .55));
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    width: 100%;
}

.nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.brand svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 4px 10px rgba(124, 58, 237, .45));
}

.brand span {
    font-size: 1.05rem;
}

.menu {
    display: flex;
    gap: 22px;
    align-items: center;
}

.menu a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    transition: color .2s, background .2s;
}

.menu a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .04);
}

.cta-nav {
    margin-left: 8px;
}

/* Add a spacer utility for fixed header */
.header-spacer {
    display: block;
    width: 100%;
    height: 86px; /* 36px beta-warning + 50px nav (approx) */
}

/* ======= Mobile Navigation ======= */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, .08);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 1px;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .menu {
        position: fixed;
        top: 86px; /* match .header-spacer height */
        right: -100%;
        width: 100%;
        height: calc(100vh - 86px);
        background: linear-gradient(180deg, rgba(11, 11, 15, .95), rgba(11, 11, 15, .9));
        backdrop-filter: saturate(140%) blur(20px);
        border-left: 1px solid rgba(255, 255, 255, .06);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 40px 20px;
        gap: 30px;
        transition: right 0.3s ease-in-out;
        z-index: 999;
    }

    .menu.active {
        right: 0;
    }

    .menu a {
        font-size: 1.2rem;
        padding: 15px 20px;
        width: 100%;
        text-align: center;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

    .menu a:hover {
        background: rgba(124, 58, 237, .15);
        color: var(--text);
        transform: translateY(-2px);
    }

    .cta-nav {
        margin-left: 0;
        margin-top: 20px;
        width: 80%;
        justify-content: center;
        font-size: 1.1rem;
        padding: 16px 24px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(124, 58, 237, .12), rgba(124, 58, 237, .06));
    color: var(--text);
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: var(--brand-glow);
    transition: transform .2s, box-shadow .2s, background .2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(154, 107, 255, .6), 0 0 44px rgba(124, 58, 237, .35);
    cursor: pointer;
}

.btn.primary {
    background: linear-gradient(180deg, var(--brand), #5b21b6);
    border-color: transparent;
}

/* ======= Hero ======= */
.hero {
    position: relative;
    isolation: isolate;
    padding-top: 86px; /* Ensure hero is below header+banner */
}

.hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 90px 20px 40px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 980px) {
    .hero-inner {
        grid-template-columns: 1fr;
        padding: 72px 20px 20px;
    }
}

.kicker {
    color: var(--brand-2);
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-size: .8rem;
}

.title {
    font-size: clamp(2rem, 4.8vw, 4rem);
    line-height: 1.1;
    margin: .4rem 0 1rem;
    font-weight: 800;
}

.subtitle {
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.3rem);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.globe {
    width: min(560px, 90vw);
    aspect-ratio: 1/1;
    margin-inline: auto;
    position: relative;
    background: radial-gradient(120% 120% at 50% 60%, rgba(124, 58, 237, .25), rgba(18, 18, 26, 0) 50%),
    radial-gradient(60% 60% at 40% 35%, rgba(154, 107, 255, .24), rgba(18, 18, 26, 0) 70%),
    radial-gradient(45% 45% at 70% 70%, rgba(124, 58, 237, .18), rgba(18, 18, 26, 0) 60%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 0 40px 120px rgba(124, 58, 237, .18), inset 0 0 80px rgba(124, 58, 237, .22);
    animation: float 6s ease-in-out infinite;
}

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

.orbit {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, .08);
}

.sat {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--brand);
    border-radius: 50%;
    box-shadow: var(--brand-glow);
}

.sat:nth-child(2) {
    animation: orbit 36s linear infinite;
    transform-origin: -140px -140px;
}

.sat:nth-child(3) {
    animation: orbit 20s linear infinite reverse;
    transform-origin: -70px 70px;
}

.sat:nth-child(4) {
    animation: orbit 14s linear infinite;
    transform-origin: 80px -80px;
}

.sat:nth-child(5) {
    animation: orbit 22s linear infinite reverse;
    transform-origin: 90px 90px;
}

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

.parallax {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
}

.shape.p1 {
    width: 420px;
    height: 420px;
    background: #2f1766;
    top: -80px;
    left: -60px;
}

.shape.p2 {
    width: 560px;
    height: 560px;
    background: #441a9c;
    bottom: -160px;
    right: -120px;
}

/* ======= Main Sections ======= */
section {
    padding: 84px 20px;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-sub {
    text-align: center;
    color: var(--muted);
    margin-bottom: 20px;
}

/* Features grid */
.features,
.features-double {
    display: grid;
    gap: 28px;
}

.features {
    grid-template-columns: 1.1fr .9fr;
}

.features-double {
    grid-template-columns: 1fr;
    justify-items: center;
}

@media (max-width: 980px) {
    .features,
    .features-double {
        grid-template-columns: 1fr;
    }
}

.features-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 600px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s, transform .7s;
}

.card.revealed {
    opacity: 1;
    transform: none;
}


.card + .card {
    margin-top: 14px;
}

.feat {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.feat .icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(124, 58, 237, .15), rgba(124, 58, 237, .05));
    display: grid;
    place-items: center;
    flex: none;
    box-shadow: inset 0 0 20px rgba(124, 58, 237, .25);
    font-size: 1.2rem;
}

.feat h4 {
    margin: 2px 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

.feat p {
    margin: 0;
    color: var(--muted);
}

/* Custom colors for feature columns */
#features .features-col .feat h4 {
    color: #22c55e;
}

.icon {
    width: 64px;
    height: 64px;
}

/* Compare rows */
.compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.compare-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 10px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, .12);
    border: 1px solid rgba(124, 58, 237, .25);
    font-weight: 600;
}

.ok {
    color: #9ef0b6;
}

.no {
    color: #ffa6b0;
}

/* ======= Languages Grid ======= */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

@media (max-width: 1100px) {
    .lang-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .lang-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 680px) {
    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.lang {
    position: relative;
    aspect-ratio: 5/3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #1a1a24 center/cover no-repeat;
    cursor: pointer;
    transform: translateZ(0);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.lang:hover {
    transform: scale(1.04);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), var(--brand-glow);
    border-color: rgba(124, 58, 237, .35);
}

.lang::after {
    content: attr(data-name);
    position: absolute;
    inset: auto 8px 8px 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .25));
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: 0;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}

/* ======= Screenshot Cards ======= */
.shot {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0));
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.shot:hover img {
    transform: scale(1.06);
}

.shot .cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(11, 11, 15, 0), rgba(11, 11, 15, .75));
    font-weight: 600;
}

/* ======= CTA Band ======= */
.cta-band {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(120deg, #7c3aed, #5b21b6, #7c3aed);
    background-size: 200% 200%;
    animation: grad 8s ease-in-out infinite;
    padding: 34px;
}

@keyframes grad {
    0% {
        background-position: 0 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

.cta-band .inner {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cta-band h3 {
    margin: 0;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
}

/* ======= Footer ======= */
footer {
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    color: var(--muted);
}

.foot {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.links {
    display: flex;
    gap: 18px;
}

.social {
    display: flex;
    gap: 12px;
}

.social a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    transition: background .2s;
}

.social a:hover {
    background: rgba(124, 58, 237, .18);
}

/* ======= Reveal on Scroll ======= */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s, transform .7s;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* Utility */
.mt-6 {
    margin-top: 24px;
}

.center {
    text-align: center;
}

/* ======= Download CTA ======= */
.download-cta {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 30px;
    padding: 15px 20px;
    text-align: center;
    box-shadow: var(--brand-glow);
}

.download-cta h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.download-cta p {
    color: #f6f6f8;
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    gap: 14px;
    padding-bottom: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-buttons a {
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .3s, color .3s;
}

.download-buttons a.primary {
    background: #fff;
    color: var(--brand);
}

.download-buttons a.primary:hover {
    background: #e5e5ff;
}

.download-buttons a.secondary {
    border: 2px solid #fff;
    color: #fff;
}

.download-buttons a.secondary:hover {
    background: rgba(255, 255, 255, .1);
}

/* ======= Slideshow ======= */
.slideshow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 20px;
    margin-top: 30px;
}

.slide-window {
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.slide-track {
    display: flex;
    transition: transform 0.6s ease;
}

.slide {
    min-width: 100%;
    flex-shrink: 0;
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: var(--radius);
}

.slide .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .8)) center;
    color: #fff;
    padding: 20px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.slide .overlay h3,
.slide .overlay p {
    text-shadow: 0 2px 6px rgba(0, 0, 0, .8);
    margin: 0 0 8px;
}

.slideshow-nav {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: var(--brand-glow);
    transition: background .3s;
}

.slideshow-nav:hover {
    background: var(--brand-2);
}

.overlay {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* ======= Checksum Popup ======= */
.checksum-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 15, 0.65);
    z-index: 9999;
}

.checksum-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    color: var(--text);
    border-radius: 24px;
    box-shadow: var(--shadow), var(--brand-glow);
    padding: 32px 28px 24px;
    z-index: 10000;
    min-width: 320px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.checksum-popup h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.checksum-popup table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.checksum-popup th, .checksum-popup td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    font-size: 0.98rem;
}

.checksum-popup th {
    color: var(--brand-2);
    font-weight: 600;
    background: rgba(124, 58, 237, 0.08);
}

.checksum-popup tr:last-child td {
    border-bottom: none;
}

.checksum-popup button.btn.primary {
    display: block;
    margin: 0 auto;
    min-width: 120px;
}
