@import url('./theme.css');

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--cb-text);
    background: #0f1013;
    font-family: var(--cb-font);
}

body::selection {
    color: #17191e;
    background: var(--cb-accent);
}

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

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

button {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px clamp(16px, 4vw, 54px);
    transition: background .2s ease, border-color .2s ease;
}

.site-header.active {
    background: rgba(15, 16, 19, .88);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 900;
    letter-spacing: 0;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand span {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-nav {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(21, 23, 28, .72);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    backdrop-filter: blur(12px);
}

.site-nav a {
    padding: 10px 13px;
    color: #c8ccd5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
}

.site-nav a:hover {
    color: var(--cb-text);
    background: rgba(255,255,255,.08);
}

.header-actions {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn,
.btn-small,
.user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    color: #17191e;
    background: var(--cb-accent);
    border: 1px solid rgba(255, 212, 90, .6);
    border-radius: 8px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-small {
    min-height: 40px;
    font-size: 13px;
}

.btn-ghost {
    color: var(--cb-text);
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.12);
}

.btn-quiet {
    color: var(--cb-accent);
    background: transparent;
    border-color: rgba(255,255,255,.14);
}

.user-pill {
    cursor: pointer;
    color: var(--cb-text);
    background: rgba(21, 23, 28, .76);
    border-color: rgba(255,255,255,.12);
    text-transform: none;
}

.user-pill img {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    display: grid;
    gap: 4px;
    padding: 8px;
    background: #17191f;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(0,0,0,.4);
}

.dropdown-menu a {
    padding: 10px 12px;
    color: #dfe2ea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.dropdown-menu a:hover {
    background: rgba(255,255,255,.08);
}

.hidden {
    display: none;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--cb-text);
    background: rgba(21, 23, 28, .76);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
}

.hero {
    position: relative;
    min-height: 86vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    align-items: center;
    gap: clamp(22px, 5vw, 76px);
    padding: 118px clamp(18px, 7vw, 96px) 72px;
    overflow: hidden;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10,11,14,.94) 0%, rgba(10,11,14,.72) 48%, rgba(10,11,14,.36) 100%),
        linear-gradient(180deg, rgba(10,11,14,.22), rgba(10,11,14,.92));
}

.hero-inner,
.hero-logo {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cb-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hero h1,
.section h2,
.final-cta h2 {
    margin: 0;
    color: var(--cb-text);
    font-size: clamp(42px, 8vw, 96px);
    line-height: .94;
    letter-spacing: 0;
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: #d4d8e2;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-logo {
    justify-self: center;
    width: min(360px, 80vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.hero-logo img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    filter: drop-shadow(0 28px 70px rgba(0,0,0,.65));
}

.status-band {
    width: min(1180px, calc(100% - 32px));
    margin: -38px auto 0;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

.status-item,
.status-cta {
    min-height: 112px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: #15171d;
}

.status-item i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--cb-accent);
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    font-size: 24px;
}

.status-item strong {
    display: block;
    color: var(--cb-text);
    font-size: 26px;
    line-height: 1;
}

.status-item span,
.section p,
.system-card p,
.store-preview span,
.site-footer {
    color: var(--cb-muted);
}

#status-text[data-status="online"] {
    color: #7ee59d;
}

#status-text[data-status="offline"] {
    color: #ff7b7b;
}

.status-cta {
    justify-content: center;
}

.status-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cb-accent);
    font-weight: 900;
}

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 0;
}

.split,
.store-section,
.final-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
    align-items: center;
    gap: clamp(22px, 5vw, 68px);
}

.section h2,
.final-cta h2 {
    max-width: 780px;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1.02;
}

.section p {
    max-width: 650px;
    margin: 18px 0 0;
    font-size: 16px;
    line-height: 1.75;
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 11px;
    color: #dfe2ea;
    background: #17191f;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    font-weight: 700;
}

.feature-list i {
    color: var(--cb-accent);
}

.media-panel {
    margin: 0;
    min-height: 420px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #15171d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}

.media-panel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 22px;
}

.section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 28px;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.system-card {
    min-height: 210px;
    padding: 22px;
    background: #15171d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}

.system-card i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: #17191e;
    background: var(--cb-accent);
    border-radius: 10px;
    font-size: 24px;
}

.system-card h3 {
    margin: 24px 0 0;
    color: var(--cb-text);
    font-size: 20px;
}

.system-card p {
    margin-top: 10px;
}

.store-section .btn {
    margin-top: 26px;
}

.store-preview {
    display: grid;
    gap: 12px;
}

.store-preview article {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: #15171d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}

.store-preview img {
    width: 88px;
    height: 76px;
    object-fit: contain;
    background: #101116;
    border-radius: 8px;
}

.store-preview strong {
    display: block;
    color: var(--cb-text);
    margin-bottom: 6px;
}

.final-cta {
    grid-template-columns: 110px minmax(0, 1fr) auto;
    margin-top: 96px;
    padding: 26px;
    background: #15171d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
}

.final-cta img {
    width: 110px;
    height: 90px;
    object-fit: contain;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer span {
    color: var(--cb-text);
    font-weight: 900;
}

.site-footer div {
    display: flex;
    gap: 10px;
}

.site-footer a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--cb-text);
    background: #15171d;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: auto auto;
    }

    .site-nav {
        position: fixed;
        top: 76px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .site-nav.active {
        display: flex;
    }

    .site-nav a {
        text-align: center;
    }

    .header-actions {
        justify-self: end;
    }

    .menu-toggle {
        display: grid;
    }

    .hero,
    .split,
    .store-section,
    .final-cta {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 108px;
    }

    .hero-logo {
        justify-self: start;
        width: min(250px, 70vw);
    }

    .status-band,
    .systems-grid {
        grid-template-columns: 1fr 1fr;
    }

    .final-cta {
        justify-items: start;
    }
}

@media (max-width: 640px) {
    .brand span {
        display: none;
    }

    .btn,
    .btn-small,
    .user-pill {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .header-actions {
        min-width: 0;
    }

    .user-pill span {
        display: none;
    }

    .hero-actions,
    .status-band,
    .systems-grid,
    .store-preview article {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .status-band {
        margin-top: 0;
        width: 100%;
        border-radius: 0;
        border-inline: 0;
    }

    .section {
        padding-top: 70px;
    }

    .media-panel {
        min-height: 300px;
    }

    .store-preview article {
        justify-items: start;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
