@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --bg: #07111f;
    --bg-elev: #0f1f33;
    --bg-soft: #132845;
    --surface: rgba(11, 24, 42, 0.78);
    --surface-solid: #0d223b;
    --text: #e8f1ff;
    --text-muted: #97adc8;
    --accent: #2a8cff;
    --accent-soft: rgba(42, 140, 255, 0.18);
    --accent-2: #20b7a3;
    --border: rgba(132, 168, 208, 0.2);
    --border-strong: rgba(132, 168, 208, 0.32);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 28px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sora', sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% 0%, #123763 0%, transparent 60%),
                radial-gradient(1000px 560px at 88% 16%, #0f3a44 0%, transparent 58%),
                var(--bg);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(42, 140, 255, 0.14), transparent 35%),
                radial-gradient(circle at 80% 80%, rgba(32, 183, 163, 0.12), transparent 30%);
    z-index: -2;
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(147, 179, 214, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(147, 179, 214, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 90%);
    z-index: -1;
}

.header-shell {
    position: sticky;
    top: 0;
    z-index: 120;
    backdrop-filter: blur(12px);
    background: rgba(5, 15, 28, 0.35);
    border-bottom: 1px solid rgba(132, 168, 208, 0.16);
}

.site-nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
}

.logo-img {
    width: 62px;
    height: 62px;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
    border: none;
    transition: transform 180ms ease, filter 180ms ease;
    animation: logo-glow 1.6s ease-in-out infinite alternate;
    will-change: transform, filter;
}

.logo:hover .logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px rgba(137, 178, 229, 0.55));
}

@keyframes logo-glow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px rgba(205, 224, 247, 0.32));
    }
    100% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 10px rgba(205, 224, 247, 0.58));
    }
}

.logo-text {
    font-size: clamp(1.45rem, 2.1vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.logo-guard {
    color: #e8eef8;
}

.logo-script {
    background: linear-gradient(90deg, #8ea8cb 0%, #2f70bb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nav-links > a {
    color: var(--text-muted);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 180ms ease;
}

.nav-links > a:not(.btn):hover {
    color: var(--text);
}

.btn {
    border-radius: 12px;
    padding: 0.58rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 75%, white 25%);
    outline-offset: 2px;
}

.btn-primary {
    color: #f3f8ff;
    border: 1px solid rgba(77, 161, 255, 0.65);
    background: linear-gradient(140deg, #236ee2, #31a5ff);
    box-shadow: 0 10px 20px rgba(34, 109, 224, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(34, 109, 224, 0.45);
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.btn-outline {
    color: var(--text);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-strong);
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 220ms ease, opacity 220ms ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

main {
    width: min(1200px, calc(100% - 2.2rem));
    margin: 0 auto;
}

.hero {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 2.2rem;
    padding: 2rem 0 3rem;
}

.eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-2);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4.3vw, 3.6rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-subtitle {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    max-width: 56ch;
    color: var(--text-muted);
    font-size: clamp(0.98rem, 1.6vw, 1.08rem);
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.stats-row > div {
    border: 1px solid var(--border);
    background: rgba(10, 24, 42, 0.55);
    border-radius: 12px;
    padding: 0.8rem;
}

.stats-row strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.1;
    color: #f7fbff;
}

.stats-row span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-visual {
    display: grid;
    gap: 1rem;
}

.binary-logo {
    --shield-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z' fill='black'/%3E%3C/svg%3E");
    width: 150px;
    height: 150px;
    padding: 18px;
    position: relative;
    justify-self: end;
    filter: drop-shadow(0 12px 24px rgba(3, 16, 30, 0.46));
}

.binary-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(32, 68, 110, 0.86), rgba(11, 28, 48, 0.95));
    border: 1px solid rgba(128, 171, 219, 0.32);
}

.binary-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(170, 206, 243, 0.3);
    pointer-events: none;
}

.binary-logo::before,
.binary-logo::after,
#binaryLogo {
    -webkit-mask-image: var(--shield-mask);
    mask-image: var(--shield-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

#binaryLogo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
}

.code-window {
    margin: 0;
    border-radius: 18px;
    border: 1px solid rgba(124, 170, 217, 0.2);
    background: linear-gradient(180deg, rgba(6, 18, 32, 0.95), rgba(9, 22, 38, 0.96));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.window-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(124, 170, 217, 0.15);
}

.window-title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dot.red { background: #ff6b6b; }
.dot.yellow { background: #f4c95d; }
.dot.green { background: #4ddf9f; }

.code-window pre {
    margin: 0;
    padding: 1rem;
    max-height: 330px;
    overflow: auto;
    color: #d2e4fb;
    font-size: 0.84rem;
    line-height: 1.55;
    background: transparent;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.k { color: #89b9ff; }
.s { color: #8de4d5; }
.f { color: #ffe39d; }
.c { color: #7890ab; }

.workflow {
    margin-top: 0.4rem;
    margin-bottom: 1.4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.workflow-card {
    background: rgba(8, 24, 43, 0.58);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem;
}

.workflow-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #cae2ff;
    border: 1px solid rgba(124, 170, 217, 0.35);
    background: rgba(42, 140, 255, 0.15);
    font-size: 0.78rem;
    font-weight: 700;
}

.workflow-card h3 {
    margin-top: 0.8rem;
    margin-bottom: 0.45rem;
    font-size: 1.02rem;
}

.workflow-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.features {
    padding: 1rem 0 4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.feature-card {
    background: rgba(8, 24, 43, 0.58);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem;
    transform: translateY(0);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(74, 158, 255, 0.55);
    box-shadow: 0 14px 28px rgba(3, 13, 24, 0.44);
}

.icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #97c2ff;
    border: 1px solid rgba(74, 158, 255, 0.36);
    background: rgba(42, 140, 255, 0.16);
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.02rem;
}

.feature-card p {
    margin-top: 0.45rem;
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer {
    border-top: 1px solid rgba(132, 168, 208, 0.14);
    padding: 1.3rem 1rem 2.1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(124, 170, 217, 0.35);
    transition: transform 160ms ease, border-color 160ms ease;
    cursor: pointer;
}

.nav-avatar:hover {
    transform: translateY(-1px);
    border-color: rgba(74, 158, 255, 0.85);
}

.user-nav-group {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 320ms ease, transform 320ms ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 1.5rem;
    }

    .hero-visual {
        order: -1;
    }

    .binary-logo {
        justify-self: start;
    }

    .workflow,
    .features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-nav {
        padding-inline: 0.7rem;
    }

    .logo-img {
        width: 52px;
        height: 52px;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .hamburger {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 0.7rem;
        right: 0.7rem;
        top: calc(100% + 0.6rem);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0.7rem;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: rgba(8, 21, 36, 0.96);
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links > a {
        width: 100%;
        text-align: left;
    }

    .hero {
        min-height: auto;
        padding-top: 1.2rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .workflow,
    .features {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .workflow-card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
