/* ShipOS marketing home — pixel-close to grok.com shell */

:root,
html[data-gx-theme="light"] {
    color-scheme: light;
    --gx-bg: #ffffff;
    --gx-fg: #0a0a0a;
    --gx-muted: #8a8a8a;
    --gx-soft: #f4f4f4;
    --gx-soft-2: #ebebeb;
    --gx-line: #e8e8e8;
    --gx-menu: #2a2a2a;
    --gx-menu-fg: #f5f5f5;
    --gx-menu-hover: #3a3a3a;
    --gx-menu-active: #444;
    --gx-accent: #f4b804;
    --gx-accent-ink: #182038;
    --gx-code-bg: #ffffff;
    --gx-code-border: #ececec;
    --gx-code-fg: #111111;
    --gx-tabs-bg: #ffffff;
    --gx-font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --gx-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --gx-signup-bg: #0a0a0a;
    --gx-signup-fg: #ffffff;
    --gx-focus: #111;
    --gx-atmosphere: none;
}

html[data-gx-theme="dark"] {
    color-scheme: dark;
    --gx-bg: #000000;
    --gx-fg: #f5f5f5;
    --gx-muted: #8a8a8a;
    --gx-soft: #1a1a1a;
    --gx-soft-2: #242424;
    --gx-line: #2a2a2a;
    --gx-menu: #2a2a2a;
    --gx-menu-fg: #f5f5f5;
    --gx-menu-hover: #3a3a3a;
    --gx-menu-active: #444;
    --gx-accent: #f4b804;
    --gx-accent-ink: #182038;
    --gx-code-bg: #141414;
    --gx-code-border: rgba(255, 255, 255, 0.08);
    --gx-code-fg: #f5f5f5;
    --gx-tabs-bg: #141414;
    --gx-signup-bg: #ffffff;
    --gx-signup-fg: #0a0a0a;
    --gx-focus: #fff;
    --gx-atmosphere:
        radial-gradient(ellipse 60% 42% at 50% -8%, rgba(122, 162, 255, 0.07), transparent 62%),
        radial-gradient(ellipse 46% 38% at 100% 100%, rgba(244, 184, 4, 0.06), transparent 60%);
}

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

html { -webkit-text-size-adjust: 100%; }

body.gx-site {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--gx-font);
    font-size: 14px;
    line-height: 1.4;
    color: var(--gx-fg);
    background-color: var(--gx-bg);
    background-image: var(--gx-atmosphere);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
}

body.gx-site a {
    color: inherit;
    text-decoration: none;
}

body.gx-site a:focus-visible,
body.gx-site button:focus-visible {
    outline: 2px solid var(--gx-focus);
    outline-offset: 2px;
}

.gx-skip {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 50;
    padding: 10px 12px;
    background: #111;
    color: #fff;
    border-radius: 8px;
}
.gx-skip:focus { top: 12px; }

/* ---- Header ---- */
.gx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
}

.gx-mark {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 36px;
    padding: 0 2px;
    border-radius: 10px;
    color: var(--gx-fg);
    cursor: pointer;
}
.gx-mark img {
    display: block;
    height: 32px;
    width: 32px;
    border-radius: 7px;
}

.gx-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gx-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gx-fg);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.gx-icon-btn:hover { background: var(--gx-soft); }
.gx-icon-btn svg { width: 18px; height: 18px; }

.gx-imagine-btn {
    padding-left: 8px;
}
.gx-imagine-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1px solid var(--gx-line);
}
.gx-imagine-icon svg { width: 14px; height: 14px; }

.gx-settings {
    position: relative;
}
.gx-settings-trigger {
    width: 36px;
    padding: 0;
    border: 1px solid var(--gx-line);
    background: transparent;
}
.gx-settings-trigger:hover {
    background: var(--gx-soft);
}
.gx-settings-trigger[aria-expanded="true"] {
    background: var(--gx-soft);
}

.gx-settings-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: 220px;
    padding: 8px;
    border-radius: 14px;
    background: var(--gx-menu);
    color: var(--gx-menu-fg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.gx-theme-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 6px;
    padding: 2px;
}
.gx-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.gx-theme-btn svg { width: 18px; height: 18px; }
.gx-theme-btn:hover { background: var(--gx-menu-hover); }
.gx-theme-btn.is-active {
    background: var(--gx-menu-active);
}

.gx-settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.gx-settings-item:hover { background: var(--gx-menu-hover); }
.gx-settings-item-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}
.gx-settings-item-icon svg { width: 18px; height: 18px; }

.gx-lang-menu {
    display: grid;
    gap: 2px;
    margin: 0 0 6px;
    padding: 0 2px 4px;
}
.gx-lang-menu[hidden] { display: none !important; }
.gx-lang-item {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    color: inherit;
    font-size: 13px;
}
.gx-lang-item:hover { background: var(--gx-menu-hover); }
.gx-lang-item.is-active { background: var(--gx-menu-active); }

.gx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.gx-btn.gx-btn-signin {
    background: transparent;
    border-color: transparent;
    color: var(--gx-fg);
    font-weight: 500;
}
.gx-btn.gx-btn-signin:hover { background: var(--gx-soft); }
.gx-btn.gx-btn-signup {
    background: var(--gx-signup-bg);
    color: var(--gx-signup-fg);
    border-color: var(--gx-signup-bg);
}
.gx-btn.gx-btn-signup:hover { filter: brightness(0.92); }

/* ---- Main stage ---- */
.gx-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 48px;
    gap: 28px;
}

.gx-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gx-fg);
}
.gx-brand-lockup {
    display: block;
    height: 64px;
    width: 64px;
    max-width: min(100%, 64px);
    border-radius: 14px;
}

/* ---- Install card (Grok Build analogue) ---- */
.gx-card {
    width: min(100%, 760px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
    gap: 20px;
    align-items: stretch;
    background: var(--gx-soft);
    border: 1px solid var(--gx-line);
    border-radius: 24px;
    padding: 22px 22px 22px 24px;
    position: relative;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

html[data-gx-theme="light"] .gx-card {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.gx-card-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    padding-right: 4px;
}

.gx-card-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.gx-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.gx-pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--gx-accent-ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    background: var(--gx-accent);
    text-decoration: none;
}
.gx-pill:hover {
    filter: brightness(1.06);
}

.gx-card-desc {
    margin: 0;
    max-width: 36ch;
    color: var(--gx-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.gx-tabs {
    display: inline-flex;
    gap: 2px;
    margin-top: 8px;
    width: fit-content;
    padding: 3px;
    background: var(--gx-tabs-bg);
    border: 1px solid var(--gx-line);
    border-radius: 999px;
}

.gx-tab {
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gx-muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.gx-tab[aria-selected="true"] {
    background: var(--gx-fg);
    color: var(--gx-bg);
}

.gx-card-right {
    min-width: 0;
    display: flex;
    align-items: center;
}

.gx-code {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 104px;
    background: var(--gx-code-bg);
    border: 1px solid var(--gx-code-border);
    border-radius: 16px;
    overflow: hidden;
}

.gx-code-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 12px;
    border-bottom: 1px solid var(--gx-code-border);
    background: color-mix(in srgb, var(--gx-code-bg) 84%, var(--gx-fg) 6%);
}
.gx-code-chrome span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #3a3a3a;
}
html[data-gx-theme="dark"] .gx-code-chrome span:nth-child(1) { background: #ff5f57; }
html[data-gx-theme="dark"] .gx-code-chrome span:nth-child(2) { background: #febc2e; }
html[data-gx-theme="dark"] .gx-code-chrome span:nth-child(3) { background: #28c840; }
html[data-gx-theme="light"] .gx-code-chrome span:nth-child(1) { background: #ff5f57; }
html[data-gx-theme="light"] .gx-code-chrome span:nth-child(2) { background: #febc2e; }
html[data-gx-theme="light"] .gx-code-chrome span:nth-child(3) { background: #28c840; }

.gx-code-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    padding: 14px 10px 14px 14px;
}

.gx-code code {
    flex: 1;
    margin: 0;
    font-family: var(--gx-mono);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--gx-code-fg);
    white-space: pre-wrap;
    word-break: break-word;
}

.gx-copy {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--gx-muted);
    cursor: pointer;
}
.gx-copy:hover {
    background: var(--gx-soft-2);
    color: var(--gx-fg);
}
.gx-copy svg { width: 16px; height: 16px; }

.gx-card-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gx-muted);
    cursor: pointer;
}
.gx-card-close:hover {
    background: var(--gx-soft-2);
    color: var(--gx-fg);
}
.gx-card-close svg { width: 14px; height: 14px; }

.gx-panel[hidden] { display: none !important; }

/* ---- Feedback dialog ---- */
.gx-feedback-dialog {
    width: min(100vw - 32px, 440px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--gx-line);
    border-radius: 20px;
    background: var(--gx-soft);
    color: var(--gx-fg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.gx-feedback-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}
.gx-feedback-shell {
    display: grid;
    gap: 14px;
    padding: 20px;
}
.gx-feedback-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.gx-feedback-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}
.gx-feedback-header p {
    margin: 0;
    color: var(--gx-muted);
    font-size: 13px;
    line-height: 1.45;
}
.gx-feedback-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gx-muted);
    cursor: pointer;
}
.gx-feedback-close:hover {
    background: var(--gx-soft-2);
    color: var(--gx-fg);
}
.gx-feedback-close svg { width: 14px; height: 14px; }
.gx-feedback-types {
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gx-feedback-types legend {
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    color: var(--gx-muted);
    font-size: 12px;
    font-weight: 600;
}
.gx-feedback-type {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--gx-line);
    border-radius: 999px;
    background: var(--gx-code-bg);
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}
.gx-feedback-type input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.gx-feedback-type:has(input:checked) {
    border-color: var(--gx-fg);
    background: var(--gx-fg);
    color: var(--gx-bg);
}
.gx-feedback-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 550;
}
.gx-feedback-field span { color: var(--gx-muted); font-weight: 600; font-size: 12px; }
.gx-feedback-field textarea,
.gx-feedback-field input {
    width: 100%;
    border: 1px solid var(--gx-line);
    border-radius: 12px;
    background: var(--gx-code-bg);
    color: var(--gx-fg);
    font: inherit;
    font-size: 14px;
    padding: 10px 12px;
}
.gx-feedback-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.45;
}
.gx-feedback-note {
    margin: 0;
    color: var(--gx-muted);
    font-size: 12px;
    line-height: 1.4;
}
.gx-feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- Footer ---- */
.gx-footer {
    padding: 0 16px 20px;
    text-align: center;
    color: var(--gx-muted);
    font-size: 12px;
}
.gx-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gx-footer a:hover { color: var(--gx-fg); }

@media (max-width: 720px) {
    .gx-card {
        grid-template-columns: 1fr;
        width: min(100%, 440px);
        padding: 18px 16px 16px;
    }
    .gx-brand-lockup { height: 44px; width: 44px; max-width: 44px; }
    .gx-mark img { height: 28px; width: 28px; }
    .gx-icon-label { display: none; }
    .gx-main {
        justify-content: flex-start;
        padding-top: 18vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
