/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ────────────────────────────────── */
:root {
    --bg:             #0c0c0c;
    --surface:        #141414;
    --card:           #181818;
    --card-hover:     #1e1e1e;
    --border:         rgba(255,255,255,0.07);
    --border-strong:  rgba(255,255,255,0.13);
    --text:           #ececec;
    --text-secondary: #888;
    --text-tertiary:  #555;
    --green:          #4ade80;   /* matches actual app green */
    --green-dim:      rgba(74,222,128,0.10);
    --green-glow:     rgba(74,222,128,0.20);
    --orange:         #fb923c;
    --orange-dim:     rgba(251,146,60,0.12);
    --ag-color:       #a78bfa;   /* Antigravity purple */
    --claude-color:   #e9784d;   /* Claude warm orange */
    --codex-color:    #60a5fa;   /* Codex blue */
    --mono:           'JetBrains Mono', 'Fira Code', monospace;
    --sans:           'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      18px;
    --radius-xl:      24px;
}

/* ── Base ──────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle noise */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Nav ───────────────────────────────────── */
.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 200;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(12,12,12,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-mark {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.nav-logo-mark img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: block;
}

.nav-title {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.nav-sub {
    font-size: 11px;
    color: var(--text-tertiary);
}

.nav-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, color 0.15s ease,
                box-shadow 0.15s ease, transform 0.15s ease,
                border-color 0.15s ease;
    white-space: nowrap;
}
.btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.btn-green {
    background: var(--green);
    color: #0c0c0c;
}
.btn-green:hover {
    background: #6ee79a;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--green-glow);
}
.btn-green:active { transform: translateY(0); }

.btn-ghost {
    background: var(--card);
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
    color: var(--text);
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.2);
}

.btn-lg {
    font-size: 14px;
    padding: 13px 24px;
    border-radius: 10px;
    gap: 9px;
}

/* ── Layout helpers ────────────────────────── */
.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

section { position: relative; z-index: 1; }

/* ── Hero ──────────────────────────────────── */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 108px 20px 80px;
    text-align: center;
    overflow: hidden;
}

/* Grid lines */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74,222,128,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74,222,128,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, black 30%, transparent 100%);
    pointer-events: none;
}

/* Center glow */
.hero-glow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 420px;
    background: radial-gradient(ellipse at 50% 20%, rgba(74,222,128,0.13) 0%, transparent 65%);
    pointer-events: none;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--card);
    border: 1px solid var(--border-strong);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 36px;
}

.hero-status .pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    flex-shrink: 0;
}

.hero-h1 {
    font-size: clamp(40px, 6.5vw, 72px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.035em;
    text-wrap: balance;
    margin-bottom: 22px;
    max-width: 760px;
}

.hero-h1 em {
    font-style: normal;
    color: var(--green);
    font-family: var(--mono);
}

.hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.65;
    text-wrap: pretty;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-pills {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 22px;
}

.pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
}
.pill svg { color: var(--text-tertiary); }

/* ── App Preview ───────────────────────────── */
.preview-wrap {
    margin-top: 72px;
    width: 100%;
    max-width: 460px;
}

/* macOS popover shell */
.popover {
    background: #1c1c1e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 2px 8px rgba(0,0,0,0.3),
        0 32px 80px rgba(0,0,0,0.7),
        0 0 60px rgba(74,222,128,0.05);
    /* Pointy top like real macOS menu popover */
    position: relative;
}

.popover::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #1c1c1e;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.popover-inner {
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Service group */
.svc-group {
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
}

.svc-group-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.svc-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.svc-group-name {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.svc-rows {
    padding: 8px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.svc-row {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 5px;
    column-gap: 12px;
}

.svc-label {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: #e5e5e5;
    align-self: center;
}

.svc-label small {
    font-weight: 400;
    color: #777;
    font-size: 12px;
}

.svc-time {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    text-align: right;
    white-space: nowrap;
    align-self: center;
}

.svc-time small {
    color: #666;
    font-size: 11px;
    font-weight: 400;
}

.svc-bar {
    grid-column: 1 / -1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.svc-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--green);
    box-shadow: 0 0 4px rgba(74,222,128,0.5);
}

/* ── Section: What it tracks ───────────────── */
.tracks {
    padding: 100px 0;
}

.tracks-head {
    margin-bottom: 56px;
}

.tracks-head h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
    margin-bottom: 14px;
}

.tracks-head p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 440px;
    line-height: 1.65;
}

/* Service cards — three columns, different heights for rhythm */
.tracks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.track-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px 24px;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.track-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
}

.track-card:hover {
    border-color: var(--border-strong);
    background: var(--card-hover);
}

.track-card.ag::before   { background: var(--ag-color); }
.track-card.cl::before   { background: var(--claude-color); }
.track-card.cx::before   { background: var(--codex-color); }

.track-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.track-badge.live { color: var(--green); background: var(--green-dim); }
.track-badge.soon { color: var(--orange); background: var(--orange-dim); }

.track-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.track-name.ag { color: var(--ag-color); }
.track-name.cl { color: var(--claude-color); }
.track-name.cx { color: var(--codex-color); }

.track-what {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.track-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
}

.track-metric::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ── Section: How it works ─────────────────── */
.how {
    padding: 0 0 100px;
    border-top: 1px solid var(--border);
}

.how-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 80px;
}

.how-content h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
    margin-bottom: 16px;
}

.how-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 400px;
}

.how-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.how-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.how-num {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    background: var(--green-dim);
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.how-list li div h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.how-list li div p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    max-width: none;
}

/* Privacy card */
.privacy-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.privacy-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-paths {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.privacy-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.privacy-path code {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--green);
}

.privacy-path span {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ── Section: Install ──────────────────────── */
.install {
    padding: 0 0 100px;
    border-top: 1px solid var(--border);
}

.install h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-wrap: balance;
    margin-bottom: 14px;
    margin-top: 80px;
}

.install > .wrap > p {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.65;
    margin-bottom: 36px;
}

.tabs {
    display: flex;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    width: fit-content;
    margin-bottom: 20px;
}

.tab {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active {
    background: var(--card);
    color: var(--text);
}
.tab:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.terminal {
    background: #0e0e0e;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

.term-bar {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.term-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #febc2e; }
.term-dot.g { background: #28c840; }
.term-bar-label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.term-body {
    padding: 22px 24px 26px;
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.9;
}

.tc  { color: #404040; } /* comment */
.tp  { color: var(--text-tertiary); } /* prompt */
.tk  { color: var(--green); } /* keyword/cmd */
.ta  { color: #93c5fd; } /* argument */
.to  { color: #888; } /* output */
.ts  { color: var(--green); } /* success */

.cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: var(--green);
    vertical-align: text-bottom;
    animation: blink 1.1s step-end infinite;
}

/* ── Section: Roadmap ──────────────────────── */
.roadmap {
    padding: 0 0 100px;
    border-top: 1px solid var(--border);
}

.roadmap h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 52px;
    margin-top: 80px;
}

.rm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.rm-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.rm-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.rm-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rm-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.rm-tag {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 1.6;
}
.rm-tag.soon    { color: var(--orange); background: var(--orange-dim); }
.rm-tag.planned { color: var(--text-tertiary); background: rgba(255,255,255,0.04); }

/* ── Section: CTA ──────────────────────────── */
.cta {
    padding: 0 0 100px;
}

.cta-card {
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 72px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: -100px; left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 320px;
    background: radial-gradient(ellipse at center, rgba(74,222,128,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.cta-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px;
}

.cta-logo img {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: block;
}

.cta-card h2 {
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    text-wrap: balance;
    margin-bottom: 16px;
}

.cta-card > p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cta-req {
    margin-top: 22px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ── Footer ────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 28px 20px;
}

.footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-copy {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
}
.footer-copy a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-copy a:hover { color: var(--text); }

.footer-links {
    display: flex;
    gap: 18px;
}
.footer-links a {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

/* ── Animations ────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green); }
    50% { opacity: 0.5; box-shadow: 0 0 3px var(--green); }
}

.hero-status .pulse {
    animation: pulse 2.2s ease-in-out infinite;
}

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.08s; }
    .reveal-delay-2 { transition-delay: 0.16s; }
    .reveal-delay-3 { transition-delay: 0.24s; }
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .tracks-grid  { grid-template-columns: 1fr; }
    .how-inner    { grid-template-columns: 1fr; }
    .rm-grid      { grid-template-columns: 1fr; }
    .cta-card     { padding: 48px 24px; }
    .cta-card h2  { font-size: 28px; }
    .hero-h1      { font-size: 36px; }
    .nav-end .btn-ghost { display: none; }
    .footer-inner { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
    .wrap { padding: 0 16px; }
    .hero { padding: 96px 16px 64px; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
    .preview-wrap { max-width: 100%; }
}
