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

:root{

    --bg:#050505;

    --card:rgba(255,255,255,.04);

    --card-border:rgba(255,255,255,.08);

    --text:#ffffff;

    --muted:#a7a7a7;

    --accent:#ffffff;

    --radius:32px;
}

html{
    scroll-behavior:smooth;
}

body{

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:var(--bg);

    color:var(--text);

    overflow-x:hidden;
}





/* =====================
   BACKGROUND
===================== */

.background{

    position:fixed;
    inset:0;

    background:
    radial-gradient(
        circle at 15% 20%,
        rgba(50,120,255,.22),
        transparent 35%
    ),

    radial-gradient(
        circle at 80% 15%,
        rgba(140,60,255,.20),
        transparent 35%
    ),

    radial-gradient(
        circle at 50% 90%,
        rgba(0,180,255,.12),
        transparent 40%
    ),

    #050505;

    z-index:-2;
}

.background::before{

    content:"";

    position:absolute;
    inset:-20%;

    animation:
        bgMove 20s ease-in-out infinite;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.03),
            transparent 60%
        );
}

@keyframes bgMove{

    0%{
        transform:translate(0,0);
    }

    50%{
        transform:translate(-5%,3%);
    }

    100%{
        transform:translate(0,0);
    }

}





.noise{

    position:fixed;
    inset:0;

    background-image:
        radial-gradient(
            rgba(255,255,255,.02) 1px,
            transparent 1px
        );

    background-size:4px 4px;

    pointer-events:none;

    opacity:.35;

    z-index:-1;
}





/* =====================
   NAVBAR
===================== */

.navbar{

    position:fixed;

    top:24px;

    left:50%;

    transform:translateX(-50%);

    width:min(1280px,94%);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 24px;

    border-radius:24px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    backdrop-filter:
        blur(30px);

    z-index:1000;
}

.logo{

    display:flex;

    align-items:center;

    gap:14px;

    color:white;

    text-decoration:none;

    font-weight:700;

    letter-spacing:2px;
}

.logo-icon{

    width:34px;
    height:34px;
}

.nav-links{

    display:flex;
    gap:30px;
}

.nav-links a{

    color:#d2d2d2;

    text-decoration:none;

    transition:.25s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    font-weight: 750; /* Можно сделать чуть жирнее для акцента */
}





/* =====================
   HERO
===================== */

.hero{

    min-height:100vh;

    width:min(1400px,94%);

    margin:auto;

    display:grid;

    grid-template-columns:
        1.1fr .9fr;

    align-items:center;

    gap:80px;

    padding-top:140px;
}

.hero-badge{

    display:inline-flex;

    padding:10px 18px;

    border-radius:999px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.04);

    color:#cfcfcf;

    font-size:12px;

    letter-spacing:2px;

    margin-bottom:26px;
}

.hero h1{

    font-size:clamp(
        68px,
        8vw,
        130px
    );

    line-height:.95;

    margin-bottom:30px;

    letter-spacing:-4px;
}

.hero p{

    font-size:22px;

    color:var(--muted);

    line-height:1.8;

    max-width:700px;
}





.hero-buttons{

    display:flex;

    gap:18px;

    margin-top:42px;
}





/* =====================
   BUTTONS
===================== */

.btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:18px 30px;

    border-radius:18px;

    text-decoration:none;

    font-weight:600;

    transition:
        transform .25s,
        box-shadow .25s,
        opacity .25s;
}

.btn:hover{

    transform:
        translateY(-3px);
}

.primary{

    background:white;

    color:black;

    box-shadow:
        0 0 50px
        rgba(255,255,255,.15);
}

.secondary{

    color:white;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.03);
}


/* =====================
   HERO
===================== */

.hero{

    min-height:100vh;

    width:min(1400px,94%);

    margin:auto;

    display:flex;

    justify-content:center;

    align-items:center;

    text-align:center;

    padding-top:120px;
    margin-bottom: 80px;
}

.hero-content{

    max-width:1000px;
}

.hero-badge{

    display:inline-flex;

    padding:10px 18px;

    border-radius:999px;

    border:1px solid rgba(255,255,255,.08);

    background:rgba(255,255,255,.04);

    color:#cfcfcf;

    font-size:12px;

    letter-spacing:2px;

    margin-bottom:28px;
}

.hero h1{

    font-size:clamp(
        82px,
        9vw,
        150px
    );

    line-height:.9;

    letter-spacing:-5px;

    margin-bottom:32px;
}

.hero p{

    max-width:760px;

    margin:auto;

    font-size:22px;

    line-height:1.8;

    color:#a7a7a7;
}

.hero-buttons{

    display:flex;

    justify-content:center;

    gap:18px;

    margin-top:42px;
}

.hero-highlights{

    margin-top:70px;

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:16px;
}

.hero-highlights div{

    padding:14px 22px;

    border-radius:999px;

    background:rgba(255,255,255,.04);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(20px);

    color:#d4d4d4;

    transition:.3s;
}

.hero-highlights div:hover{

    transform:translateY(-4px);

    border-color:rgba(255,255,255,.16);

    background:rgba(255,255,255,.06);
}


/* =====================
   SECTIONS
===================== */

.section,
.showcase,
.tech,
.cta{

    width:min(1400px,94%);

    margin:180px auto;
}

.section-header{

    text-align:center;

    margin-bottom:60px;
}

.section-header h2{

    font-size:64px;

    margin-bottom:16px;
}

.section-header p{

    color:var(--muted);

    font-size:20px;
}





/* =====================
   STATS
===================== */

.stats{

    width:min(1400px,94%);

    margin:auto;

    display:grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:24px;
}

.stat{

    padding:40px;

    border-radius:28px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    text-align:center;
}

.stat span{

    display:block;

    font-size:56px;

    font-weight:700;

    margin-bottom:10px;
}

.stat p{

    color:#9e9e9e;
}





/* =====================
   FEATURES
===================== */

.features-grid{

    display:grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:24px;
}

.feature-card{

    padding:36px;

    border-radius:30px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    transition:.35s;
}

.feature-card:hover{

    transform:
        translateY(-8px);

    border-color:
        rgba(255,255,255,.18);
}

.feature-icon{

    width:60px;
    height:60px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:18px;

    margin-bottom:22px;

    background:
        rgba(255,255,255,.08);
}

.feature-card h3{

    margin-bottom:14px;

    font-size:24px;
}

.feature-card p{

    color:#a4a4a4;

    line-height:1.8;
}

/* =====================
   SHOWCASE
===================== */

.showcase{

    display:grid;

    grid-template-columns:
        .9fr 1.1fr;

    gap:50px;

    align-items:center;
}

.showcase-left span{

    display:inline-block;

    margin-bottom:20px;

    color:#7f7f7f;

    letter-spacing:3px;

    font-size:12px;
}

.showcase-left h2{

    font-size:64px;

    line-height:1.05;

    margin-bottom:24px;
}

.showcase-left p{

    color:#a7a7a7;

    line-height:1.9;

    font-size:20px;
}





/* =====================
   DASHBOARD
===================== */

.dashboard{

    display:grid;

    grid-template-columns:
        repeat(2,1fr);

    gap:22px;
}

.dashboard-card{

    position:relative;

    overflow:hidden;

    padding:34px;

    min-height:180px;

    border-radius:32px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(30px);
}

.dashboard-card::before{

    content:"";

    position:absolute;

    inset:0;

    background:
        radial-gradient(
            circle at top left,
            rgba(255,255,255,.08),
            transparent 60%
        );

    pointer-events:none;
}

.dashboard-card label{

    display:block;

    color:#8c8c8c;

    margin-bottom:18px;

    font-size:14px;

    text-transform:uppercase;

    letter-spacing:2px;
}

.dashboard-card strong{

    font-size:42px;

    font-weight:700;
}





/* =====================
   TECH
===================== */

.tech-grid{

    display:grid;

    grid-template-columns:
        repeat(6,1fr);

    gap:20px;
}

.tech-grid div{

    padding:24px;

    text-align:center;

    border-radius:24px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    font-weight:600;

    transition:.3s;
}

.tech-grid div:hover{

    transform:
        translateY(-5px);

    background:
        rgba(255,255,255,.06);
}





/* =====================
   CTA
===================== */

.cta{

    position:relative;

    overflow:hidden;

    text-align:center;

    padding:100px 60px;

    border-radius:40px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);
}

.cta::before{

    content:"";

    position:absolute;

    width:700px;
    height:700px;

    left:50%;
    top:50%;

    transform:
        translate(-50%,-50%);

    background:
        radial-gradient(
            circle,
            rgba(90,140,255,.18),
            transparent 70%
        );

    pointer-events:none;
}

.cta h2{

    position:relative;

    font-size:72px;

    line-height:1.05;

    margin-bottom:24px;
}

.cta p{

    position:relative;

    max-width:760px;

    margin:auto;

    color:#a7a7a7;

    line-height:1.9;

    font-size:20px;

    margin-bottom:40px;
}

.cta .btn{

    position:relative;
}





/* =====================
   REVEAL ANIMATION
===================== */

.reveal{

    opacity:0;

    transform:
        translateY(60px);

    transition:
        opacity .9s ease,
        transform .9s ease;
}

.reveal.visible{

    opacity:1;

    transform:
        translateY(0);
}





/* =====================
   SCROLLBAR
===================== */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:#080808;
}

::-webkit-scrollbar-thumb{

    background:
        rgba(255,255,255,.15);

    border-radius:999px;
}





/* =====================
   TABLET (≤1200px)
===================== */

@media(max-width:1200px){

    .hero{
        grid-template-columns:1fr;
        text-align:center;
    }

    .hero-content{
        margin:auto;
    }

    .hero p{
        margin:auto;
    }

    .hero-buttons{
        justify-content:center;
    }

    .showcase{
        grid-template-columns:1fr;
    }

    .features-grid{
        grid-template-columns:
            repeat(2,1fr);
    }

    .tech-grid{
        grid-template-columns:
            repeat(3,1fr);
    }

    .stats{
        grid-template-columns:
            repeat(2,1fr);
    }

}





/* =====================
   MOBILE (≤768px)
===================== */

@media(max-width:768px){
body{
        padding-top:30px;
    }
    /* --- Navbar: компактная горизонтальная --- */
    .navbar{
        top:12px;
        padding:14px 18px;
        flex-direction:column;
        gap:14px;
        border-radius:18px;
    }

    .nav-links{
        gap:0;
        width:100%;
        display:grid;
        grid-template-columns:repeat(4,1fr);
    }

    .nav-links a{
        text-align:center;
        padding:8px 4px;
        font-size:13px;
    }

    /* --- Hero --- */
    .hero{
        padding-top:160px;
        padding-bottom:20px;
        margin-bottom:40px;
    }

    .hero h1{
        font-size:clamp(44px,13vw,72px);
        letter-spacing:-2px;
        line-height:.95;
    }

    .hero p{
        font-size:17px;
        line-height:1.75;
    }

    .hero-badge{
        font-size:11px;
        letter-spacing:1.5px;
        padding:8px 14px;
    }

    .hero-buttons{
        flex-direction:column;
        gap:12px;
        margin-top:32px;
    }

    .hero-buttons .btn{
        width:100%;
        justify-content:center;
    }

    /* --- Секции --- */
    .section,
    .showcase,
    .tech,
    .cta{
        margin:80px auto;
    }

    .section-header{
        margin-bottom:40px;
    }

    .section-header h2{
        font-size:clamp(32px,9vw,46px);
        letter-spacing:-1.5px;
    }

    .section-header p{
        font-size:17px;
    }

    /* --- Статистика --- */
    .stats{
        grid-template-columns:repeat(2,1fr);
        gap:16px;
    }

    .stat{
        padding:28px 20px;
    }

    .stat span{
        font-size:42px;
    }

    /* --- Фичи --- */
    .features-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .feature-card{
        padding:28px;
    }

    .feature-card h3{
        font-size:20px;
    }

    /* --- Showcase --- */
    .showcase{
        gap:36px;
    }

    .showcase-left h2{
        font-size:clamp(32px,9vw,48px);
        letter-spacing:-1.5px;
    }

    .showcase-left p{
        font-size:17px;
    }

    /* --- Dashboard --- */
    .dashboard{
        grid-template-columns:repeat(2,1fr);
        gap:14px;
    }

    .dashboard-card{
        padding:22px 18px;
        min-height:130px;
    }

    .dashboard-card strong{
        font-size:28px;
    }

    .dashboard-card label{
        font-size:12px;
        letter-spacing:1.5px;
        margin-bottom:12px;
    }

    /* --- Tech --- */
    .tech-grid{
        grid-template-columns:repeat(3,1fr);
        gap:12px;
    }

    .tech-grid div{
        padding:18px 10px;
        font-size:14px;
    }

    /* --- CTA --- */
    .cta{
        padding:60px 28px;
        border-radius:28px;
    }

    .cta h2{
        font-size:clamp(34px,9vw,52px);
        letter-spacing:-2px;
        margin-bottom:20px;
    }

    .cta p{
        font-size:17px;
        line-height:1.8;
        margin-bottom:32px;
    }

    /* --- Firmware hero --- */
    .firmware-hero{
        padding-top:160px;
    }

    .firmware-hero h1{
        font-size:clamp(38px,11vw,60px);
        letter-spacing:-2px;
    }

    .firmware-hero p{
        font-size:17px;
    }

    /* --- Firmware cards --- */
    .firmware-card{
        padding:24px;
        border-radius:24px;
        gap:24px;
    }

    .firmware-version{
        font-size:22px;
    }

    .device-card{
        padding:24px;
    }

    .fan-visual{
        width:220px;
        height:220px;
    }

}




/* =====================
   SMALL MOBILE (≤420px)
===================== */

@media(max-width:420px){

    .stats{
        grid-template-columns:1fr;
    }

    .dashboard{
        grid-template-columns:1fr;
    }

    .tech-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .hero h1{
        font-size:clamp(40px,12vw,60px);
    }

    .nav-links a{
        font-size:12px;
    }

}



/* =====================
   FIRMWARE HERO
===================== */

.firmware-hero{

    min-height:50vh;

    display:flex;

    align-items:center;

    justify-content:center;

    text-align:center;

    padding-top:140px;

    width:min(1400px,94%);

    margin:auto;
}

.firmware-hero-content{

    max-width:900px;
}

.hero-label{

    display:inline-flex;

    padding:10px 18px;

    border-radius:999px;

    background:rgba(255,255,255,.04);

    border:1px solid rgba(255,255,255,.08);

    color:#cfcfcf;

    font-size:12px;

    letter-spacing:2px;

    margin-bottom:24px;
}

.firmware-hero h1{

    font-size:clamp(
        56px,
        7vw,
        100px
    );

    line-height:.95;

    letter-spacing:-3px;

    margin-bottom:24px;
}

.firmware-hero p{

    color:#a7a7a7;

    font-size:22px;

    line-height:1.8;

    max-width:700px;

    margin:auto;
}





/* =====================
   FIRMWARE PAGE
===================== */

.firmware-page{

    width:min(1400px,94%);

    margin:100px auto 200px;
}

.dev-section{

    margin-top:140px;
}





/* =====================
   FIRMWARE GRID
===================== */

.firmware-grid{

    display:grid;

    grid-template-columns:
        repeat(auto-fill,minmax(420px,1fr));

    gap:28px;
}





/* =====================
   FIRMWARE CARD
===================== */

.firmware-card{

    position:relative;

    overflow:hidden;

    display:flex;

    flex-direction:column;

    justify-content:space-between;

    gap:30px;

    min-height:320px;

    padding:34px;

    border-radius:32px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.08);

    backdrop-filter:
        blur(30px);

    transition:
        transform .3s ease,
        border-color .3s ease;
}

.firmware-card:hover{

    transform:
        translateY(-8px);

    border-color:
        rgba(255,255,255,.16);
}

.firmware-card::before{

    content:"";

    position:absolute;

    top:0;
    left:0;
    right:0;

    height:1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.4),
            transparent
        );
}





/* =====================
   BADGES
===================== */

.firmware-badge{

    display:inline-flex;

    align-items:center;

    padding:8px 14px;

    border-radius:999px;

    background:
        rgba(80,255,170,.12);

    border:
        1px solid rgba(80,255,170,.25);

    color:#7dffbe;

    font-size:12px;

    font-weight:600;

    letter-spacing:1px;

    margin-bottom:20px;
}

.dev-badge{

    display:inline-flex;

    align-items:center;

    padding:8px 14px;

    border-radius:999px;

    background:
        rgba(255,180,60,.12);

    border:
        1px solid rgba(255,180,60,.25);

    color:#ffcb75;

    font-size:12px;

    font-weight:600;

    letter-spacing:1px;

    margin-bottom:20px;
}

.firmware-card--latest {
    border-color: #1A73E8;
    box-shadow: 0 0 0 1px #1A73E8;
}

.firmware-badge--latest,
.dev-badge.firmware-badge--latest {
    background: rgba(26, 115, 232, 0.15) !important;
    border-color: rgba(26, 115, 232, 0.4) !important;
    color: #6aabff !important;
}



/* =====================
   CARD CONTENT
===================== */

.firmware-version{
    font-size:32px;
    font-weight:700;
    line-height:1.2;

    /* ВАЖНО */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;

    max-width: 100%;
}

.firmware-meta{

    color:#8f8f8f;

    font-size:15px;

    margin-bottom:24px;
}

.firmware-list{

    list-style:none;
}

.firmware-list li{

    position:relative;

    padding-left:20px;

    color:#c8c8c8;

    margin-bottom:12px;

    line-height:1.7;
}

.firmware-list li::before{

    content:"";

    position:absolute;

    left:0;
    top:10px;

    width:6px;
    height:6px;

    border-radius:50%;

    background:white;
}

.dev-description{

    color:#a7a7a7;

    line-height:1.8;

    margin-top:20px;
}





/* =====================
   DOWNLOAD BUTTON
===================== */

.download-btn{

    display:flex;

    align-items:center;

    justify-content:center;

    width:100%;

    height:56px;

    border-radius:18px;

    text-decoration:none;

    font-weight:600;

    color:black;

    background:white;

    transition:
        transform .25s,
        box-shadow .25s;
}

.download-btn:hover{

    transform:
        translateY(-2px);

    box-shadow:
        0 0 40px
        rgba(255,255,255,.12);
}





/* =====================
   FIRMWARE MOBILE
===================== */

@media(max-width:900px){

    .firmware-grid{
        grid-template-columns:1fr;
    }

    .firmware-version{
        font-size:26px;
    }

    .firmware-hero h1{
        font-size:clamp(38px,10vw,60px);
        letter-spacing:-2px;
    }

    .firmware-hero p{
        font-size:18px;
    }

}

/* =====================
   DOCUMENTATION
===================== */

.docs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1280px;
    margin: 140px auto;
    gap: 80px;
    padding: 0 40px;
}

.sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #999;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255,255,255,0.08);
    color: white;
}

.doc-content {
    max-width: 780px;
}

.doc-content h1 {
    font-size: 52px;
    letter-spacing: -2px;
    margin-bottom: 32px;
}

.doc-content h2 {
    font-size: 32px;
    margin-top: 52px;
    margin-bottom: 16px;
}

.doc-content p, .doc-content li {
    font-size: 19px;
    line-height: 1.75;
    color: #ddd;
}

.doc-content code {
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: ui-monospace, monospace;
}

.doc-content pre {
    background: #111;
    padding: 24px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 28px 0;
}

/* Mobile for docs */
@media(max-width:900px){

    .docs-layout{
        grid-template-columns:1fr;
        gap:32px;
        margin:120px auto 80px;
        padding:0 20px;
    }

    .sidebar{
        position:static;
        display:grid;
        grid-template-columns:repeat(2,1fr);
        gap:4px;
        padding:10px;
        border-radius:18px;
        background:rgba(255,255,255,.03);
        border:1px solid rgba(255,255,255,.07);
    }

    .sidebar a{
        padding:10px 14px;
        border-radius:10px;
        font-size:14px;
        margin-bottom:0;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .doc-content h1{
        font-size:clamp(30px,8vw,48px);
        letter-spacing:-1.5px;
        margin-bottom:24px;
    }

    .doc-content h2{
        font-size:26px;
    }

    .doc-content p,
    .doc-content li{
        font-size:17px;
    }

    .doc-content pre{
        padding:18px;
        font-size:14px;
    }

}

@media(max-width:480px){

    .sidebar{
        grid-template-columns:1fr;
    }

    .sidebar a{
        white-space:normal;
    }

}

.auth-btn {
    background: rgba(255,255,255,.08);
    padding: 8px 18px !important;
    border-radius: 999px !important;
}

.auth-btn:hover {
    background: rgba(255,255,255,.15);
}

/* =========================
   DOCS IMAGE LIGHTBOX
========================= */

.doc-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform .2s ease;
}

.doc-content img:hover {
    transform: scale(1.02);
}

.image-modal {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,.9);

    opacity: 0;
    visibility: hidden;

    transition: .2s ease;

    z-index: 99999;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    max-width: 95vw;
    max-height: 95vh;

    border-radius: 12px;

    object-fit: contain;
}

.image-modal-close {
    position: absolute;

    top: 20px;
    right: 30px;

    font-size: 42px;
    line-height: 1;

    cursor: pointer;
    color: white;

    user-select: none;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    transition: transform 0.1s ease;
    transform-origin: center center;
    cursor: grab;
    user-select: none;
}