/* ------------------------------------------------------------------
   Dispattern — modern responsive styles (Lucide + Tabler Discord)
   - Mobile-first adjustments & safe-area support
   - Accessible header with mobile drawer
   - Subtle motion; respects prefers-reduced-motion
------------------------------------------------------------------- */

/* CSS variables */
:root {
    --bg-0: #070b1b;
    --bg-1: #0a0f25;
    --bg-2: #10162f;
    --card: rgba(255, 255, 255, 0.05);
    --text-0: #ffffff;
    --text-1: #d7e1ff;
    --muted: #9bb0d3;
    --primary: #00b4d8;
    --primary-200: #5cd9f0;
    --accent: #8a7cff;
    --border: rgba(92, 217, 240, 0.25);
    --glow: 0 0 24px rgba(0, 180, 216, 0.25);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
    --container: min(1120px, 92vw);
    --step-0: clamp(0.98rem, 0.35vw + 0.9rem, 1.06rem);
    --step-1: clamp(1.06rem, 0.7vw + 0.95rem, 1.26rem);
    --step-2: clamp(1.24rem, 1vw + 1.05rem, 1.6rem);
    --step-3: clamp(1.54rem, 1.6vw + 1.2rem, 2.1rem);
    --step-4: clamp(1.9rem, 2.4vw + 1.4rem, 2.7rem);
    --step-5: clamp(2.2rem, 3.5vw + 1.8rem, 3.4rem);
}

/* Reset-ish */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    color: var(--text-0);
    background: radial-gradient(1200px 600px at 70% -10%, rgba(138,124,255,0.12), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(0,180,216,0.18), transparent 60%), linear-gradient(180deg, var(--bg-1), var(--bg-0));
    line-height: 1.6;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .aos-init, .aos-animate {
        transition: none !important;
    }
}

/* Containers and sections */
.container {
    width: var(--container);
    margin-inline: auto;
    padding-inline: max(16px, env(safe-area-inset-left, 0));
    padding-inline-end: max(16px, env(safe-area-inset-right, 0));
}

.section {
    padding: clamp(50px, 8vw, 100px) 0;
}

.section--alt {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
}

.section__title {
    font-family: Orbitron, Inter, sans-serif;
    font-size: var(--step-4);
    letter-spacing: 0.02em;
    margin: 0 0 20px;
    color: var(--primary-200);
    text-align: center;
}

/* Scroll progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.05);
    z-index: 1000;
}

    .scroll-progress > span {
        display: block;
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        box-shadow: var(--glow);
        transition: width .1s linear;
    }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(5,8,18,0.74);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
/* elevate header only while the menu is open */
body.menu-open .site-header {
    z-index: 1300;
}

.header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-0);
}

.header__logo {
    height: 34px;
    width: auto;
    display: block;
}

.header__text {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1rem;
}

.header__nav {
    justify-self: center;
}

.nav__list {
    display: flex;
    gap: clamp(12px, 3vw, 26px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    color: var(--text-0);
    text-decoration: none;
    font-size: var(--step-0);
    position: relative;
    padding-block: 6px;
}

    .nav__link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -6px;
        height: 2px;
        width: 0%;
        background: var(--primary);
        transition: width .2s ease;
    }

    .nav__link:hover::after {
        width: 100%;
    }

.header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-0);
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

    .icon-btn:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.06);
        border-color: rgba(92, 217, 240, 0.5);
    }

    .icon-btn svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.9;
    }

    .icon-btn .ti {
        font-size: 20px;
        line-height: 1;
    }

.header__cta {
    display: none;
}

    .header__cta svg {
        width: 18px;
        height: 18px;
        stroke-width: 2;
    }

.header__toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-0);
}

    .header__toggle svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }

/* Mobile nav drawer */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1290;
}

    .nav-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0; /* cover from the left edge */
    width: 100vw; /* full viewport width */
    background-color: var(--bg-1); /* solid fallback (prevents transparency) */
    background-image: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform .2s ease;
    z-index: 1301;
    display: flex;
    flex-direction: column;
}

    .mobile-nav.is-open {
        transform: translateX(0%);
    }

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.mobile-nav__close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-0);
}

    .mobile-nav__close svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }

.mobile-nav__list {
    list-style: none;
    padding: 10px 16px 20px;
    margin: 0;
    display: grid;
    gap: 6px;
    flex: 1; /* fill remaining height */
    overflow-y: auto; /* scroll if content is taller than the viewport */
}

.mobile-nav__link {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-0);
    border: 1px solid transparent;
}

    .mobile-nav__link:hover {
        border-color: var(--border);
        background: rgba(255,255,255,0.03);
    }

.mobile-nav__sep {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.mobile-nav__icons {
    display: flex;
    gap: 10px;
    padding: 8px 0 12px;
}

    .mobile-nav__icons svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.9;
    }

    .mobile-nav__icons .ti {
        font-size: 20px;
        line-height: 1;
    }

.w-100 {
    width: 100%;
}

.no-scroll {
    overflow: hidden;
}

/* Hero */
.section--hero {
    padding-top: clamp(20px, 6vw, 50px);
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(20px, 4vw, 48px);
    align-items: center;
}

.hero__title {
    font-family: Orbitron, Inter, sans-serif;
    font-size: var(--step-5);
    margin: 0 0 10px;
}

.brand {
    color: var(--primary-200);
}

.hero__subtitle {
    color: var(--text-1);
    font-size: var(--step-1);
    margin: 0 0 20px;
}

.hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .hero__actions svg {
        width: 18px;
        height: 18px;
        stroke-width: 2;
    }

.hero__media {
    justify-self: end;
}

.hero__logo {
    width: min(520px, 90%);
    height: auto;
    display: block;
    filter: drop-shadow(var(--glow));
    animation: float 6s ease-in-out infinite;
    max-width: 440px;
}

@keyframes float {
    0%,100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

/* Clean divider */
.divider--glow {
    height: 14px;
    background: radial-gradient(1000px 12px at 50% 50%, rgba(0,180,216,0.52), rgba(0,180,216,0.14) 40%, transparent 70%);
    filter: blur(6px);
    margin: 6px 0 0;
}

/* Card + CTA grid */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: clamp(18px, 3vw, 32px);
}

.card--glass {
    backdrop-filter: blur(6px);
}

.lead {
    color: var(--text-1);
    font-size: var(--step-1);
    margin: 0 0 22px;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}

.cta {
    display: grid;
    place-items: center;
    height: 110px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
    color: var(--text-0);
    text-decoration: none;
    font-weight: 600;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

    .cta svg {
        width: 24px;
        height: 24px;
        stroke-width: 1.9;
        color: var(--primary);
        margin-bottom: 6px;
    }

    .cta:hover {
        transform: translateY(-2px);
        border-color: rgba(92,217,240,0.5);
        background: rgba(255,255,255,0.05);
    }

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(14px, 3vw, 24px);
    margin-top: 12px;
}

.stat {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: clamp(16px, 3vw, 26px);
}

    .stat svg {
        width: 24px;
        height: 24px;
        stroke-width: 1.9;
        color: var(--primary);
        margin-bottom: 8px;
    }

.stat__number {
    font-family: Orbitron, Inter, sans-serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    letter-spacing: 0.02em;
    color: var(--primary-200);
}

.stat__label {
    color: var(--muted);
    font-size: var(--step-0);
}

/* Tooltips for stats */
.stat[data-tooltip] {
    position: relative;
}

    .stat[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 50%;
        bottom: calc(100% + 10px);
        transform: translateX(-50%);
        white-space: nowrap;
        background: rgba(0,0,0,0.9);
        color: #fff;
        font-size: 12px;
        padding: 6px 8px;
        border-radius: 6px;
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease;
    }

    .stat[data-tooltip]:hover::after {
        opacity: 1;
    }

/* Promo */
.promo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: clamp(14px, 3vw, 24px);
}

.promo__card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: radial-gradient(800px 300px at 20% -20%, rgba(138,124,255,0.18), transparent 60%), radial-gradient(600px 250px at 120% 120%, rgba(0,180,216,0.16), transparent 60%), linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--border);
    min-height: 300px;
    display: grid;
    place-items: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .promo__card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-soft);
    }

.promo__overlay {
    text-align: center;
    padding: 24px;
    width: 100%;
}

.promo__icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.9;
    color: var(--primary);
    margin-bottom: 8px;
    display: inline-block;
}

.promo__overlay h3 {
    margin: 4px 0 8px;
    font-size: var(--step-2);
    color: var(--primary-200);
}

.promo__overlay p {
    margin: 0 0 14px;
    color: var(--text-1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-0);
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

    .btn:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.06);
        border-color: rgba(92,217,240,0.5);
    }

.btn--primary {
    background: linear-gradient(180deg, #09c6e3, var(--primary));
    border-color: rgba(0,0,0,0.15);
    box-shadow: 0 6px 18px rgba(0,180,216,0.25);
    color: #061018;
}

    .btn--primary:hover {
        box-shadow: 0 10px 26px rgba(0,180,216,0.35);
    }

.btn--ghost {
    background: transparent;
}

/* Footer */
.site-footer {
    background: rgba(5,8,18,0.74);
    border-top: 1px solid var(--border);
    margin-top: 36px;
}

.footer {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer__logo {
    height: 26px;
    width: auto;
}

.footer__text strong {
    display: block;
    line-height: 1.2;
    font-size: 0.98rem;
}

.footer__text small {
    color: var(--muted);
    font-size: 0.86rem;
}

.footer__nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer__link {
    color: var(--text-1);
    text-decoration: none;
    font-size: var(--step-0);
}

    .footer__link:hover {
        color: var(--text-0);
    }

.footer__social {
    display: flex;
    gap: 8px;
}

    .footer__social svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.9;
    }

    .footer__social .ti {
        font-size: 20px;
        line-height: 1;
    }

.footer__legal {
    padding: 8px 0 22px;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
}

/* Mobile CTA bar */
.mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    grid-template-columns: 48px 1fr 48px;
    gap: 10px;
    align-items: center;
    padding: max(10px, env(safe-area-inset-bottom, 10px)) max(14px, env(safe-area-inset-left, 14px)) max(14px, env(safe-area-inset-right, 14px)) max(14px, env(safe-area-inset-left, 14px));
    background: rgba(6, 10, 22, 0.88);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    transition: transform .2s ease, opacity .2s ease;
}

    .mobile-cta.is-hidden {
        transform: translateY(100%);
        opacity: 0;
    }

.mobile-cta__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-0);
    text-decoration: none;
}

    .mobile-cta__icon svg {
        width: 22px;
        height: 22px;
        stroke-width: 2;
    }

    .mobile-cta__icon .ti {
        font-size: 22px;
    }

.mobile-cta__primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(180deg, #09c6e3, var(--primary));
    color: #061018;
    box-shadow: 0 8px 18px rgba(0,180,216,0.28);
}

    .mobile-cta__primary svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.2;
    }

/* To top button */
.to-top {
    position: fixed;
    right: 16px;
    bottom: 82px; /* lifted above mobile cta */
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(5,8,18,0.7);
    backdrop-filter: blur(8px);
    color: var(--text-0);
    box-shadow: var(--shadow-soft);
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 998;
}

    .to-top svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }

    .to-top.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

/* Responsive */
@media (max-width: 1060px) {
    .header {
        /* brand | actions */
        grid-template-columns: 1fr auto;
    }

    .header__nav {
        display: none;
    }

    .header__cta {
        display: none;
    }

    .header__toggle {
        display: inline-grid;
        place-items: center;
    }

    .header__actions {
        justify-self: end;
        margin-left: auto;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__media {
        justify-self: center;
    }

    .hero__logo {
        max-width: 360px;
    }
}

@media (max-width: 820px) {
    .cta-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .promo {
        grid-template-columns: 1fr;
    }

    .footer {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
}

@media (max-width: 720px) {
    .mobile-cta {
        display: grid;
    }

    .section {
        padding: 44px 0;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .header__logo {
        height: 30px;
    }

    .header__text {
        display: none;
    }
    /* saves space */
    .hero__logo {
        max-width: 300px;
    }

    .promo__card {
        min-height: 260px;
    }
}

/* --- Mobile nav: force full-screen & opaque (wins cascade) --- */
.mobile-nav {
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    background-color: var(--bg-1) !important; /* solid */
    background-image: linear-gradient(180deg, var(--bg-2), var(--bg-1)) !important; /* keep your look */
    z-index: 1301 !important;
}

.nav-backdrop {
    z-index: 1290 !important;
}

body.menu-open .site-header {
    z-index: 1300 !important;
}

/* --- Mobile nav: override any conflicting JS/CSS (wins cascade) --- */
body.menu-open #mobileNav {
    transform: translateX(0%) !important;
}

body.menu-open #navBackdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Break the fixed-position containment from backdrop-filter/filters on header. */
body.menu-open .site-header {
    z-index: 1300 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
}

/* Make sure the drawer truly covers the whole viewport and sits on top. */
#mobileNav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    background-color: var(--bg-1) !important; /* opaque base */
    background-image: linear-gradient(180deg, var(--bg-2), var(--bg-1)) !important;
    z-index: 2147483647 !important; /* above anything */
}

/* Backdrop just under the drawer */
#navBackdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483646 !important;
}

/* ===== Mobile menu: tighter spacing between links ===== */
.mobile-nav__list {
    gap: 4px;
}
/* compact rhythm */
.mobile-nav__link {
    padding: 10px 12px;
}
/* comfy targets */

/* ===== Mobile menu: fix icon row styling ===== */
.mobile-nav__icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-0);
    text-decoration: none;
}

    .mobile-nav__icons a:hover {
        background: rgba(255,255,255,0.06);
        border-color: rgba(92,217,240,0.5);
    }

.mobile-nav__icons svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
}

.mobile-nav__icons .ti {
    font-size: 20px;
    line-height: 1;
}

/* ===== Mobile menu: remove huge vertical gaps (grid stretch fix) ===== */
.mobile-nav__list {
    align-content: start; /* do not stretch rows to fill column */
    justify-content: stretch;
    grid-auto-rows: max-content; /* rows size to content */
}

    .mobile-nav__list > li {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

/* === Prevent off-canvas from being revealed on desktop === */
html, body {
    max-width: 100%;
    overflow-x: hidden; /* fallback */
    overflow-x: clip; /* preferred where supported */
}

@media (min-width: 1061px) {
    #mobileNav,
    #navBackdrop {
        display: none !important;
    }
}
