/* ============================================
   NEURAPHIC — Product-first brand
   Bone white + Rich black + Gray
   Instrument Serif + DM Sans
   ============================================ */

:root {
    --bg:       #f0f1f3;
    --black:    #131314;
    --gray:     #6b7280;

    --head:     'Space Grotesk', -apple-system, system-ui, sans-serif;
    --sans:     'Inter', -apple-system, system-ui, sans-serif;

    --w:        1280px;
    --nav-h:    64px;
}

/* Preloader */
.preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .5s ease, visibility .5s ease;
}

.preloader.done {
    opacity: 0; visibility: hidden; pointer-events: none;
}

.preloader__text {
    font-family: var(--sans);
    font-size: 20px; font-weight: 700; color: var(--black);
    letter-spacing: -0.04em; text-transform: uppercase;
    animation: preloaderPulse 1.2s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.3 }
    50% { opacity: 1 }
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box }
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--gray);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none }
img, video, svg { display: block; max-width: 100% }
button { font-family: inherit; cursor: pointer; border: none; background: none }
input { font-family: inherit }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px) }

/* ============================================
   NAV
   ============================================ */

.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: 80px;
    background: transparent;
    transition: background .25s, backdrop-filter .25s;
}

.header--s {
    background: rgba(240, 241, 243, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(19, 19, 20, 0.06);
}

.nav {
    max-width: var(--w); margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}

.nav__right-group { display: flex; align-items: center; gap: 8px }

.nav__brand {
    display: flex; align-items: center;
    padding: 6px 4px 6px 0;
    transition: opacity .2s;
}
.nav__brand:hover { opacity: 0.6 }

.nav__name {
    font-family: var(--head);
    font-size: 22px; font-weight: 700; color: var(--black);
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.nav__links { display: flex; gap: 0 }
.nav__links a {
    font-family: var(--sans);
    font-size: 16px; font-weight: 500; color: var(--black);
    padding: 10px 20px; border-radius: 8px;
    transition: opacity .2s;
}
.nav__links a:hover { opacity: 0.6 }

.nav__cta {
    display: inline-flex; align-items: center;
    background: var(--black); color: var(--bg);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 14px; font-weight: 500;
    padding: 8px 16px;
    transition: background .2s;
}
.nav__cta:hover { background: #2a2a2e }

.burger { display: none; flex-direction: column; gap: 4px; padding: 8px }
.burger span { width: 18px; height: 1.5px; background: var(--black); transition: all .2s }

.mobile-menu {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--bg); z-index: 99; padding: 24px;
    flex-direction: column; overflow-y: auto;
}
.mobile-menu.active { display: flex }
.mobile-menu a {
    font-family: var(--sans);
    font-size: 16px; font-weight: 500; color: var(--black);
    padding: 16px 0; border-bottom: 1px solid rgba(19, 19, 20, 0.08);
}
.mobile-menu hr { border: none; border-top: 1px solid rgba(19, 19, 20, 0.08); margin: 8px 0 }

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

.hero {
    padding-top: calc(var(--nav-h) + 160px);
    padding-bottom: 120px;
}

.hero .wrap { position: relative; z-index: 1 }

.hero__title {
    font-family: var(--head);
    font-size: clamp(56px, 7.5vw, 96px);
    font-weight: 700;
    color: var(--black);
    line-height: 1.02;
    letter-spacing: -0.045em;
    max-width: 100%;
    margin-bottom: 28px;
}

.hero__sub {
    font-family: var(--sans);
    font-size: clamp(16px, 1.8vw, 18px);
    color: var(--gray);
    max-width: 580px;
    line-height: 1.7;
    margin-bottom: 48px;
}

.hero__products {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero__products span {
    font-family: var(--sans);
    font-size: 16px;
    color: var(--gray);
    letter-spacing: 0.01em;
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap }

.hero__btn {
    font-family: var(--sans);
    font-size: 15px; font-weight: 500;
    padding: 12px 28px;
    border-radius: 100px;
    border: 1px solid var(--black);
    background: var(--black); color: var(--bg);
    transition: all .2s ease;
}
.hero__btn:hover { background: #2a2a2e; border-color: #2a2a2e }

.hero__btn--ghost {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}
.hero__btn--ghost:hover {
    background: rgba(19, 19, 20, 0.04);
    border-color: var(--black);
}

/* ============================================
   PRODUCTS
   ============================================ */

.products-dark {
    background: var(--black);
    padding: clamp(120px, 16vh, 200px) 0;
}

.products-dark__title {
    font-family: var(--head);
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 700;
    color: var(--bg);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 28px;
}

.products-dark__sub {
    font-family: var(--sans);
    font-size: clamp(16px, 1.8vw, 20px);
    color: #6b7280;
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.products-dark__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 48px 0 56px;
}

.products-dark__item h3 {
    font-family: var(--head);
    font-size: 22px;
    font-weight: 600;
    color: var(--bg);
    margin-bottom: 8px;
}

.products-dark__item p {
    font-family: var(--sans);
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.products-dark__btn {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--bg);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 12px 28px;
    display: inline-block;
    transition: all .2s;
}

.products-dark__btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.4);
}

/* ============================================
   MISSION + LINKS
   ============================================ */

.section {
    padding: clamp(100px, 12vh, 160px) 0;
}

.section--mission {
    border-top: none;
}

.mission-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(48px, 6vw, 96px);
    align-items: start;
}

.mission-statement {
    font-family: var(--head);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 500;
    font-style: normal;
    color: var(--black);
    line-height: 1.3;
    letter-spacing: -0.02em;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.mission-right {
    display: flex;
    flex-direction: column;
}

.mission-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(19, 19, 20, 0.1);
    transition: opacity .2s ease;
}

.mission-link:last-child {
    border-bottom: 1px solid rgba(19, 19, 20, 0.1);
}

.mission-link:hover { opacity: 0.6 }

.mission-link__title {
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
}

.mission-link__arrow {
    font-size: 18px;
    color: var(--black);
    transition: transform .2s ease;
    margin-left: 24px;
    flex-shrink: 0;
}

.mission-link:hover .mission-link__arrow {
    transform: translateX(4px);
}

/* ============================================
   RELEASES
   ============================================ */

.releases {
    padding: 100px 0 140px;
}

.releases__title {
    font-family: var(--head);
    font-size: 24px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 40px;
}

.releases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.release-card {
    background: #e6e7e9;
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.release-card:hover {
    background: #dddee1;
}

.release-card h3 {
    font-family: var(--head);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 10px;
}

.release-card p {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.release-card__link {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: 0;
}

.release-card__footer {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--black);
    padding: clamp(64px, 8vh, 100px) 0 clamp(32px, 4vh, 48px);
}

.footer__main {
    display: grid;
    grid-template-columns: 160px repeat(4, 1fr);
    gap: clamp(24px, 3vw, 40px);
    margin-bottom: clamp(48px, 6vh, 80px);
}

.footer__brand-col {
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: space-between;
}

.footer__logo {
    font-family: var(--sans);
    font-size: 24px; font-weight: 700;
    color: var(--bg);
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.footer__col h5 {
    font-family: var(--sans);
    font-size: 13px; font-weight: 600;
    color: var(--bg);
    margin-bottom: 16px;
}

.footer__col-sep {
    margin-top: 28px;
}

.footer__col a {
    display: block;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--gray);
    padding: 4px 0;
    transition: color .2s ease;
    line-height: 1.6;
}
.footer__col a:hover { color: var(--bg) }

.footer__bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: clamp(24px, 3vh, 36px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 16px; flex-wrap: wrap;
}

.footer__social { display: flex; gap: 18px }
.footer__social a { color: var(--gray); transition: color .2s ease }
.footer__social a:hover { color: var(--bg) }

.footer__copy {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--gray);
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .4s ease }
.reveal.visible { opacity: 1; transform: none }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
    .nav__links, .nav__right-group { display: none }
    .burger { display: flex }

    .hero {
        padding-top: calc(var(--nav-h) + 100px);
        padding-bottom: 80px;
    }

    .products-grid { grid-template-columns: 1fr }

    .product-card {
        padding: 32px 0;
    }

    .product-card:not(:last-child) {
        padding-right: 0;
    }

    .releases__grid { grid-template-columns: 1fr 1fr }

    .mission-layout { grid-template-columns: 1fr; gap: 40px }
    .mission-statement { position: static }

    .footer__main { grid-template-columns: repeat(3, 1fr) }
    .footer__brand-col { grid-column: 1 / -1; margin-bottom: 8px }
}

@media (max-width: 640px) {
    .hero {
        padding-top: calc(var(--nav-h) + 80px);
        padding-bottom: 60px;
    }

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

    .products { padding: 80px 0 100px }

    .section { padding: 80px 0 }

    .releases__grid { grid-template-columns: 1fr }

    .footer__main { grid-template-columns: 1fr 1fr }
    .footer__brand-col { grid-column: 1 / -1 }
    .footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px }
}

/* ============================================
   PAGE HERO + PAGE CONTENT (subpages)
   ============================================ */

.page-hero {
    padding-top: calc(var(--nav-h) + clamp(80px, 12vh, 140px));
    padding-bottom: clamp(40px, 6vh, 80px);
}

.page-hero__title {
    font-family: var(--head);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 20px;
}

.page-hero__sub {
    font-family: var(--sans);
    font-size: clamp(16px, 1.8vw, 20px);
    color: var(--gray);
    max-width: 620px;
    line-height: 1.7;
}

.page-content {
    padding-bottom: clamp(80px, 12vh, 160px);
}

.page-content .wrap {
    max-width: 820px;
}

.page-section {
    margin-bottom: 56px;
}

.page-section:last-child {
    margin-bottom: 0;
}

.page-section h2 {
    font-family: var(--head);
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.page-section h3 {
    font-family: var(--head);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    margin-top: 32px;
}

.page-section p {
    font-family: var(--sans);
    font-size: 16px;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.page-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
}

.page-section ul li {
    font-family: var(--sans);
    font-size: 16px;
    color: var(--gray);
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.page-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gray);
}

.page-section a {
    color: var(--black);
    font-weight: 500;
    border-bottom: 1px solid rgba(19, 19, 20, 0.2);
    transition: border-color .2s;
}

.page-section a:hover {
    border-color: var(--black);
}

.page-section strong {
    color: var(--black);
    font-weight: 600;
}

/* Status indicators */
.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(19, 19, 20, 0.08);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.status-name {
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
}

.status-label {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--gray);
    margin-left: auto;
}

/* Pricing cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.pricing-card {
    background: #e6e7e9;
    border-radius: 14px;
    padding: 32px;
}

.pricing-card h3 {
    font-family: var(--head);
    font-size: 22px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
    margin-top: 0;
}

.pricing-card .pricing-desc {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 24px;
}

.pricing-card .pricing-cta {
    display: inline-flex;
    align-items: center;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    border: none;
    border-bottom: 1px solid rgba(19,19,20,0.2);
    padding: 0;
    transition: border-color .2s;
}

.pricing-card .pricing-cta:hover {
    border-color: var(--black);
}

/* Changelog entries */
.changelog-entry {
    padding: 24px 0;
    border-bottom: 1px solid rgba(19, 19, 20, 0.08);
}

.changelog-date {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 8px;
}

.changelog-title {
    font-family: var(--head);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.changelog-desc {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--gray);
    line-height: 1.7;
}

/* Blog / News list */
.post-list {
    display: flex;
    flex-direction: column;
}

.post-item {
    display: block;
    padding: 24px 0;
    border-bottom: 1px solid rgba(19, 19, 20, 0.08);
    transition: opacity .2s;
}

.post-item:hover {
    opacity: 0.7;
}

.post-date {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 6px;
}

.post-title {
    font-family: var(--head);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 6px;
}

.post-excerpt {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--gray);
    line-height: 1.6;
}

/* Docs grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.docs-card {
    background: #e6e7e9;
    border-radius: 14px;
    padding: 28px;
    transition: background .2s;
}

.docs-card:hover {
    background: #dddee1;
}

.docs-card h3 {
    font-family: var(--head);
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
    margin-top: 0;
}

.docs-card p {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Console sign-in button */
.console-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: 100px;
    background: var(--black);
    color: var(--bg);
    border: 1px solid var(--black);
    transition: all .2s;
    margin-top: 24px;
}

.console-btn:hover {
    background: #2a2a2e;
    border-color: #2a2a2e;
}

/* Feature grid (for product pages) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.feature-card {
    background: #e6e7e9;
    border-radius: 14px;
    padding: 28px;
}

.feature-card h3 {
    font-family: var(--head);
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
    margin-top: 0;
}

.feature-card p {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Code block */
.code-block {
    background: var(--black);
    color: #e6e7e9;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    line-height: 1.7;
    margin: 16px 0 24px;
}

/* Contact grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 40px;
}

.contact-item h3 {
    font-family: var(--head);
    font-size: 18px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.contact-item p {
    font-size: 15px;
    color: var(--gray);
    margin-bottom: 8px;
}

.contact-item a {
    color: var(--black);
    font-weight: 500;
}

@media (max-width: 640px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ============================================
   MISC
   ============================================ */

::selection { background: #d5d6da; color: var(--black) }
::-webkit-scrollbar { width: 4px; height: 4px }
::-webkit-scrollbar-track { background: var(--bg) }
::-webkit-scrollbar-thumb { background: rgba(19, 19, 20, 0.15); border-radius: 2px }
