:root {
    color-scheme: dark;
    --bg: #111318;
    --bg-strong: #0b0d12;
    --surface: rgba(23, 26, 33, 0.86);
    --surface-solid: #171a21;
    --surface-soft: #20242d;
    --line: #2b313c;
    --text: #f4f4f5;
    --muted: #9aa4b2;
    --faint: #687386;
    --blue: #2688eb;
    --blue-strong: #1f7bdd;
    --green: #10a37f;
    --amber: #f2c94c;
    --rose: #ff6b7d;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --radius: 8px;
    --max: 1180px;
    --brand-logo-filter: brightness(0) invert(1);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f7f7f4;
    --bg-strong: #ffffff;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-soft: #eef1f5;
    --line: #d9dee7;
    --text: #1f2328;
    --muted: #697383;
    --faint: #8a94a3;
    --shadow: 0 18px 50px rgba(32, 41, 57, 0.13);
    --brand-logo-filter: none;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--blue) 12%, transparent), transparent 580px),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--blue) 58%, white);
    outline-offset: 3px;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 20;
    display: flex;
    width: min(calc(100% - 32px), var(--max));
    min-height: 64px;
    transform: translateX(-50%);
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    overflow: hidden;
    box-shadow: none;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    filter: var(--brand-logo-filter);
}

.brand-name,
.brand-note {
    display: block;
}

.brand-name {
    font-weight: 800;
    line-height: 1;
}

.brand-note {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
}

.site-nav a:hover {
    color: var(--text);
}

.header-actions,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button,
.ghost-button,
.primary-button,
.text-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button {
    width: 42px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.icon-button svg,
.text-link svg {
    width: 18px;
    height: 18px;
}

.ghost-button,
.primary-button {
    padding: 0 18px;
    font-weight: 700;
}

.ghost-button {
    background: color-mix(in srgb, var(--surface-solid) 58%, transparent);
    color: var(--text);
}

.ghost-button.dark {
    background: color-mix(in srgb, var(--bg-strong) 65%, transparent);
}

.primary-button {
    border-color: color-mix(in srgb, var(--blue) 70%, white 8%);
    background: var(--blue);
    color: #fff;
    box-shadow: 0 14px 35px color-mix(in srgb, var(--blue) 32%, transparent);
}

.primary-button.large {
    min-height: 52px;
    padding: 0 24px;
}

.icon-button:hover,
.ghost-button:hover,
.primary-button:hover,
.text-link:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
}

.hero-section {
    position: relative;
    min-height: 92vh;
    overflow: hidden;
    padding: 150px 24px 86px;
    border-bottom: 1px solid var(--line);
}

.hero-section::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 180px;
    content: "";
    background: linear-gradient(180deg, transparent, var(--bg));
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.42;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, #000 16%, transparent 86%);
}

.hero-product-visual {
    position: absolute;
    right: max(24px, calc((100vw - var(--max)) / 2));
    bottom: 54px;
    width: min(700px, 54vw);
    transform: perspective(1100px) rotateX(7deg) rotateY(-12deg);
    transform-origin: center right;
    opacity: 0.88;
}

.visual-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-solid) 94%, #000 10%);
    box-shadow: var(--shadow);
}

.visual-topbar {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.visual-topbar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--rose);
}

.visual-topbar span:nth-child(2) {
    background: var(--amber);
}

.visual-topbar span:nth-child(3) {
    background: var(--green);
}

.visual-topbar strong {
    margin-left: auto;
    color: var(--muted);
    font-weight: 600;
}

.visual-body {
    display: grid;
    min-height: 420px;
    grid-template-columns: 170px minmax(260px, 1fr) 170px;
}

.visual-sidebar,
.visual-panel,
.visual-chat {
    padding: 18px;
}

.visual-sidebar,
.visual-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-color: var(--line);
    color: var(--muted);
    font-size: 12px;
}

.visual-sidebar {
    border-right: 1px solid var(--line);
}

.visual-panel {
    border-left: 1px solid var(--line);
}

.visual-new-chat,
.visual-sidebar span,
.visual-panel span {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: color-mix(in srgb, var(--surface-soft) 55%, transparent);
}

.visual-new-chat {
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}

.visual-panel b {
    font-size: 16px;
    color: var(--text);
}

.visual-chat {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.visual-message {
    max-width: 82%;
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.45;
}

.visual-message p {
    margin: 8px 0 0;
    color: var(--muted);
}

.visual-message.user {
    align-self: flex-end;
    background: var(--blue);
    color: #fff;
}

.visual-message.ai {
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
}

.visual-models {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.visual-models span {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 9px 6px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.hero-copy {
    position: relative;
    z-index: 2;
    width: min(650px, 100%);
    margin: 0 auto;
}

@media (min-width: 1040px) {
    .hero-copy {
        width: min(600px, 50vw);
        margin-left: max(24px, calc((100vw - var(--max)) / 2));
        margin-right: 0;
    }
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(64px, 13vw, 166px);
    line-height: 0.82;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(32px, 5vw, 62px);
    line-height: 0.98;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.16;
}

.hero-lead {
    max-width: 620px;
    margin: 28px 0 30px;
    color: var(--muted);
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.45;
}

.text-link {
    border-color: transparent;
    color: var(--text);
    font-weight: 750;
}

.proof-strip {
    position: relative;
    z-index: 3;
    display: grid;
    width: min(calc(100% - 48px), var(--max));
    margin: -34px auto 0;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
}

.proof-strip div {
    min-width: 0;
    padding: 22px;
    border-right: 1px solid var(--line);
}

.proof-strip div:last-child {
    border-right: 0;
}

.proof-strip strong,
.proof-strip span {
    display: block;
}

.proof-strip strong {
    font-size: 28px;
    line-height: 1;
}

.proof-strip span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.section {
    width: min(calc(100% - 48px), var(--max));
    margin: 0 auto;
    padding: 108px 0 0;
}

.section-heading {
    display: block;
    max-width: 980px;
    margin-bottom: 40px;
}

.section-heading.narrow {
    max-width: 820px;
}

.problem-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 28px;
}

.problem-copy {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 46px);
    background: var(--surface-solid);
}

.problem-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.problem-copy p + p {
    margin-top: 22px;
}

.friction-list {
    display: grid;
    gap: 12px;
}

.friction-list div,
.feature-stack div,
.outcome-grid article {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

.friction-list div {
    display: flex;
    min-height: 86px;
    align-items: center;
    gap: 14px;
    padding: 18px;
    color: var(--text);
}

.friction-list svg,
.outcome-grid svg,
.feature-stack svg,
.pain-solution-grid svg {
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    color: var(--blue);
}

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

.pain-solution-grid article {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--blue) 9%, transparent), transparent 46%),
        color-mix(in srgb, var(--surface-solid) 88%, transparent);
    padding: 26px;
}

.pain-solution-grid h3 {
    max-width: 95%;
}

.pain-solution-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.pain-solution-grid strong {
    display: block;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.outcome-grid p,
.platform-copy p {
    color: var(--muted);
    line-height: 1.55;
}

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

.outcome-grid article {
    min-height: 270px;
    padding: 28px;
}

.outcome-grid h3 {
    margin-top: 28px;
}

.platform-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
    gap: 56px;
    align-items: center;
}

.platform-copy p {
    max-width: 560px;
    margin: 24px 0 26px;
    font-size: 18px;
}

.feature-stack {
    display: grid;
    gap: 12px;
}

.feature-stack div {
    display: grid;
    min-height: 92px;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.cta-section {
    width: min(calc(100% - 48px), 940px);
    margin: 110px auto 0;
    padding: 56px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--blue) 18%, transparent), transparent 54%),
        var(--surface-solid);
    text-align: center;
    box-shadow: var(--shadow);
}

.cta-section p:not(.eyebrow) {
    max-width: 620px;
    margin: 20px auto 30px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.5;
}

.centered {
    justify-content: center;
}

.site-footer {
    display: flex;
    width: min(calc(100% - 48px), var(--max));
    margin: 80px auto 0;
    padding: 28px 0 42px;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

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

.site-footer a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--text);
    text-decoration: underline;
}

.auth-consents {
    display: grid;
    gap: 8px;
    margin: 2px 0 0;
    padding: 12px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.auth-consents label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.auth-consents input { width: auto; min-height: auto; margin: 2px 0 0; }
.auth-consents a { color: var(--blue); }

.hidden {
    display: none !important;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.auth-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, 0.74);
    backdrop-filter: blur(12px);
}

.auth-dialog {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-solid);
    box-shadow: var(--shadow);
    padding: 24px;
}

.auth-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
}

.auth-close svg {
    width: 18px;
    height: 18px;
}

.auth-dialog-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-right: 42px;
}

.auth-dialog-head h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.auth-dialog-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 24px 0;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-strong) 58%, transparent);
}

.auth-tab {
    min-height: 40px;
    border: 0;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}

.auth-tab.is-active {
    background: var(--blue);
    color: #fff;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
}

.auth-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-strong) 72%, transparent);
    color: var(--text);
    padding: 0 13px;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--blue);
}

.auth-password-field {
    position: relative;
    display: block;
}

.auth-password-field input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    transform: translateY(-50%);
}

.auth-password-toggle:hover {
    color: var(--text);
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
}

.auth-link {
    justify-self: center;
    border: 0;
    background: transparent;
    color: var(--blue);
    font-weight: 700;
}

.auth-hint,
.auth-message {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.auth-message {
    min-height: 18px;
    text-align: center;
}

.auth-message.is-error {
    color: #ff8c9a;
}

.auth-message.is-ok,
.auth-hint.is-ok {
    color: #28c99a;
}

.auth-hint.is-error {
    color: #ff8c9a;
}

@media (max-width: 1080px) {
    .site-nav {
        display: none;
    }

    .hero-product-visual {
        right: 24px;
        width: min(720px, calc(100% - 48px));
        opacity: 0.28;
    }

    .hero-copy {
        width: min(720px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .problem-layout,
    .platform-section {
        grid-template-columns: 1fr;
    }

    .pain-solution-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .site-header {
        top: 10px;
        width: min(calc(100% - 20px), var(--max));
    }

    .brand {
        min-width: auto;
    }

    .brand-note {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .primary-button {
        padding: 0 14px;
    }

    .hero-section {
        min-height: 940px;
        padding: 130px 20px 72px;
    }

    .hero-product-visual {
        top: 530px;
        right: 20px;
        bottom: auto;
        left: 20px;
        width: auto;
        transform: none;
        opacity: 0.44;
    }

    .hero-actions {
        flex-wrap: wrap;
    }

.proof-strip,
.outcome-grid,
.pain-solution-grid {
    grid-template-columns: 1fr;
}

    .proof-strip div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .proof-strip div:last-child {
        border-bottom: 0;
    }

    .section,
    .proof-strip,
    .cta-section,
    .site-footer {
        width: min(calc(100% - 28px), var(--max));
    }

    .section {
        padding-top: 78px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .problem-copy p {
        font-size: 17px;
    }

    .visual-body {
        grid-template-columns: 1fr;
    }

    .visual-sidebar,
    .visual-panel {
        display: none;
    }

    .cta-section {
        margin-top: 82px;
        padding: 34px 20px;
    }

    .site-footer {
        display: grid;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
