:root {
    color-scheme: light;
    --page-bg: #f8fafc;
    --page-bg-end: #f1f5f9;
    --text: #111827;
    --muted: #6b7280;
    --muted-strong: #4b5563;
    --border: rgba(229, 231, 235, 0.72);
    --surface: rgba(255, 255, 255, 0.68);
    --surface-solid: #ffffff;
    --primary: #14b8a6;
    --primary-dark: #0f9f90;
    --primary-soft: rgba(20, 184, 166, 0.12);
    --footer-border: rgba(229, 231, 235, 0.8);
}

:root.dark {
    color-scheme: dark;
    --page-bg: #020617;
    --page-bg-end: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --border: rgba(51, 65, 85, 0.78);
    --surface: rgba(30, 41, 59, 0.68);
    --surface-solid: #1e293b;
    --primary: #2dd4bf;
    --primary-dark: #14b8a6;
    --primary-soft: rgba(20, 184, 166, 0.18);
    --footer-border: rgba(30, 41, 59, 0.82);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: var(--page-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; }
.container { width: min(calc(100% - 48px), 1152px); margin: 0 auto; }

.page-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, var(--page-bg) 0%, var(--page-bg-end) 100%);
}
.ambient-grid { position: absolute; inset: 0; pointer-events: none; opacity: .9; background-image: linear-gradient(rgba(20, 184, 166, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 184, 166, .035) 1px, transparent 1px); background-size: 64px 64px; }
.ambient-grid::before, .ambient-grid::after { content: ""; position: absolute; width: 384px; height: 384px; border-radius: 50%; filter: blur(56px); background: rgba(20, 184, 166, .09); }
.ambient-grid::before { top: -160px; right: -160px; }
.ambient-grid::after { bottom: -160px; left: -160px; opacity: .75; }

.site-header, .main-content, .site-footer { position: relative; z-index: 1; }
.site-header { padding: 16px 0; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.brand-mark { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: 12px; box-shadow: 0 7px 16px rgba(15, 23, 42, .12); }
.brand-mark img { display: block; width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .nav-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 8px; color: var(--muted); background: transparent; border-radius: 8px; transition: background .2s, color .2s; }
.icon-button:hover, .nav-link:hover { color: var(--text); background: rgba(148, 163, 184, .12); }
.icon-button svg, .nav-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.login-link { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 12px; color: #fff; background: #111827; border-radius: 999px; font-size: 12px; font-weight: 600; transition: background .2s; }
.login-link:hover { background: #374151; }
:root.dark .login-link { background: #1e293b; }
:root.dark .login-link:hover { background: #334155; }
.sun-icon { display: none; }
:root.dark .moon-icon { display: none; }
:root.dark .sun-icon { display: block; }

.main-content { flex: 1; padding: 64px 0 48px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 64px; margin-bottom: 48px; }
.hero-copy { flex: 1; min-width: 0; text-align: left; }
.hero-copy h1 { margin: 0 0 16px; font-size: clamp(42px, 5.6vw, 64px); line-height: 1; letter-spacing: -.03em; font-weight: 750; }
.hero-copy p { margin: 0 0 32px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }
.button { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 32px; border-radius: 8px; font-size: 16px; font-weight: 650; transition: transform .2s, background .2s, box-shadow .2s; }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 12px 24px rgba(20, 184, 166, .25); }
.button-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 16px 28px rgba(20, 184, 166, .3); }
.button-primary span { font-size: 22px; line-height: 1; }

.terminal { flex: 1; width: min(100%, 480px); min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid rgba(30, 41, 59, .34); border-radius: 12px; background: #0f172a; box-shadow: 0 24px 48px rgba(15, 23, 42, .18); }
.terminal-header { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 16px; color: #94a3b8; background: #1e293b; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #22c55e; }
.terminal-body { min-height: 170px; overflow-x: auto; padding: 24px; color: #e2e8f0; font: 13px/2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prompt { color: #34d399; }
.command { color: #60a5fa; }
.flag { color: #c084fc; }
.url { color: #fbbf24; }
.comment { color: #64748b; }
.success { color: #34d399; }
.response { color: #cbd5e1; }
.cursor { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: #e2e8f0; animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.pill-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; min-width: 0; margin-bottom: 48px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--muted-strong); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 4px 12px rgba(15, 23, 42, .04); backdrop-filter: blur(8px); font-size: 14px; font-weight: 600; }
.pill svg { width: 17px; height: 17px; fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 48px; }
.feature-card { min-width: 0; min-height: 190px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); backdrop-filter: blur(8px); transition: transform .25s, box-shadow .25s, border-color .25s; }
.feature-card:hover { border-color: rgba(20, 184, 166, .35); transform: translateY(-3px); box-shadow: 0 20px 38px rgba(15, 23, 42, .1); }
.feature-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 12px; color: #fff; box-shadow: 0 9px 18px rgba(15, 23, 42, .13); }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feature-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.feature-icon.teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.feature-icon.purple { background: linear-gradient(135deg, #a855f7, #9333ea); }
.feature-card h2 { margin: 0 0 8px; color: var(--text); font-size: 18px; line-height: 1.35; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }

.models-section { margin-bottom: 32px; }
.section-heading { margin-bottom: 24px; text-align: center; }
.section-heading h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.3; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.model-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.model-chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid rgba(20, 184, 166, .26); border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px rgba(20, 184, 166, .09); backdrop-filter: blur(8px); color: var(--muted-strong); font-size: 14px; font-weight: 600; }
.model-chip.upcoming { border-color: var(--border); opacity: .62; box-shadow: none; }
.model-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 800; }
.model-badge.orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.model-badge.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.model-badge.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.model-badge.pink { background: linear-gradient(135deg, #f43f5e, #db2777); }
.model-badge.gray { background: linear-gradient(135deg, #64748b, #475569); }
.model-chip em { padding: 2px 6px; border-radius: 4px; color: #0d9488; background: rgba(20, 184, 166, .12); font-size: 10px; font-style: normal; font-weight: 650; white-space: nowrap; }
.upcoming em { color: var(--muted); background: rgba(148, 163, 184, .14); }

.site-footer { padding: 24px 0 32px; border-top: 1px solid var(--footer-border); }
.footer-content { display: flex; align-items: center; justify-content: center; gap: 20px; color: var(--muted); font-size: 14px; }
.footer-content p { margin: 0; }
.footer-content a { transition: color .2s; }
.footer-content a:hover { color: var(--text); }

@media (max-width: 760px) {
    .container { width: min(calc(100vw - 32px), 600px); }
    .nav-actions { gap: 2px; }
    .login-link { padding-right: 10px; padding-left: 10px; }
    .main-content { padding-top: 40px; }
    .hero, .pill-row, .feature-grid, .models-section { width: 100%; min-width: 0; }
    .hero { flex-direction: column; align-items: stretch; gap: 40px; margin-bottom: 40px; }
    .hero-copy { text-align: center; }
    .terminal { flex: none; width: min(100%, calc(100vw - 32px)); }
    .feature-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { min-height: 0; }
    .pill-row { gap: 8px; }
    .pill { padding: 9px 10px; font-size: 13px; }
    .model-chip { padding: 10px 14px; }
    .footer-content { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
