/* drift // sql linter landing. same bones as pulse.css, indigo-blue accent
   instead of rust orange. structured-data vibe, cold monitor glow. */

:root {
    --bg: #0c0d10;
    --bg-soft: #14161b;
    --bg-card: #17191f;
    --fg: #e6e7ea;
    --dim: #8b8f98;
    --dim-strong: #b4b7be;
    --line: #23262d;
    --accent: #6aa0ff;
    --accent-deep: #274a8a;
    --cy: #5eead4;
    --ok: #9ece6a;
    --warn: #e0af68;
    --err: #f7768e;
    --kw: #bb9af7;
    --str: #9ece6a;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code, pre, .mono { font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace; }

a { color: var(--cy); text-decoration: none; }
a:hover { color: var(--accent); }

.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* nav */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 40px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 56px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--fg);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}
.nav-logo:hover { color: var(--accent); }
.nav-cta {
    padding: 8px 16px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* hero */
.hero { margin-bottom: 88px; }
.hero-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}
.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5.4vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin: 0 0 22px;
    color: var(--fg);
}
.hero-title .grad {
    background: linear-gradient(90deg, #6aa0ff 0%, #5eead4 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--dim-strong);
    max-width: 720px;
    margin: 0 0 40px;
}
.hero-sub code {
    color: var(--accent);
    background: var(--bg-soft);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* plain terminal block */
.term {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.55;
    color: var(--fg);
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}
.term-sm { font-size: 14px; padding: 20px 24px; }
.term .dim { color: var(--dim); }
.term .accent { color: var(--accent); }
.term .bold { font-weight: 700; }
.term .ok { color: var(--ok); }
.term .warn { color: var(--warn); }
.term .err { color: var(--err); }
.term .cy { color: var(--cy); }

/* animated terminal with mac chrome */
.term-frame {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin: 0;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}
.term-chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--line);
}
.term-chrome .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.term-chrome .dot.d-r { background: #ff5f57; }
.term-chrome .dot.d-y { background: #febc2e; }
.term-chrome .dot.d-g { background: #28c840; }
.term-chrome .term-title {
    margin-left: auto;
    margin-right: auto;
    padding-right: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: var(--dim);
    letter-spacing: 0.02em;
}

.term-stage {
    position: relative;
    min-height: 280px;
    padding: 24px 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.55;
    color: var(--fg);
    overflow: hidden;
}

.term-frame-content {
    position: absolute;
    inset: 24px 28px;
    margin: 0;
    white-space: pre;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    font-family: inherit;
}
.term-frame-content.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.term-frame-content .dim { color: var(--dim); }
.term-frame-content .accent { color: var(--accent); }
.term-frame-content .bold { font-weight: 700; }
.term-frame-content .ok { color: var(--ok); }
.term-frame-content .warn { color: var(--warn); }
.term-frame-content .err { color: var(--err); }
.term-frame-content .cy { color: var(--cy); }
.term-frame-content .kw { color: var(--kw); font-weight: 500; }
.term-frame-content .str { color: var(--str); }

/* pitch one-liner */
.pitch { margin: 0 0 96px; padding: 0; }
.pitch p {
    font-size: 19px;
    line-height: 1.6;
    color: var(--dim-strong);
    max-width: 760px;
    margin: 0;
}
.pitch code {
    color: var(--accent);
    background: var(--bg-soft);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.88em;
}

/* why grid */
.why {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 96px;
}
.why-card {
    background: var(--bg-card);
    padding: 28px 26px 26px;
    position: relative;
}
.why-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}
.why-card h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 10px;
    letter-spacing: -0.005em;
}
.why-card p {
    color: var(--dim-strong);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
}
.why-card code {
    color: var(--cy);
    background: var(--bg-soft);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.88em;
}

/* categories teaser (reuses sentinels class hooks) */
.sentinels { margin-bottom: 96px; }
.sentinels h2,
.compare h2,
.install h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin: 0 0 12px;
    color: var(--fg);
}
.sentinels-sub {
    color: var(--dim);
    margin: 0 0 24px;
    font-size: 15px;
}
.sentinels-foot {
    color: var(--dim);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 22px 0 0;
    max-width: 720px;
}
.sentinels-foot code {
    color: var(--cy);
    background: var(--bg-soft);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* compare */
.compare { margin-bottom: 96px; }
.table {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 22px 26px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--fg);
    overflow-x: auto;
    white-space: pre;
    margin: 20px 0 0;
}
.table .dim { color: var(--dim); }
.table .ok { color: var(--ok); font-weight: 600; }
.table .warn { color: var(--warn); }
.table .err { color: var(--err); }
.compare-foot {
    color: var(--dim-strong);
    font-size: 15px;
    line-height: 1.6;
    margin-top: 22px;
    max-width: 760px;
}

/* ECG viz · indigo remix */
.viz {
    position: relative;
    margin: 88px 0 100px;
    padding: 48px 0 40px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ecg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 19px, rgba(106, 160, 255, 0.15) 19px 20px),
        repeating-linear-gradient(90deg, transparent 0 19px, rgba(106, 160, 255, 0.15) 19px 20px),
        repeating-linear-gradient(0deg, transparent 0 99px, rgba(106, 160, 255, 0.35) 99px 100px),
        repeating-linear-gradient(90deg, transparent 0 99px, rgba(106, 160, 255, 0.35) 99px 100px);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 30%, transparent 85%);
}

.ecg {
    position: absolute;
    top: 30%;
    left: 0;
    transform: translateY(-50%);
    width: 200%;
    height: 160px;
    z-index: 2;
    animation: ecg-sweep 8s linear infinite;
    will-change: transform;
    opacity: 0.75;
}

@keyframes ecg-sweep {
    from { transform: translate(0, -50%); }
    to   { transform: translate(-50%, -50%); }
}

.ecg-line {
    stroke-dasharray: 5200;
    stroke-dashoffset: 5200;
    animation: ecg-draw 8s linear infinite;
}

@keyframes ecg-draw {
    0%   { stroke-dashoffset: 5200; }
    40%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 0; }
}

.ecg-head {
    animation: ecg-head-move 8s linear infinite;
    filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 4px #6aa0ff);
}

@keyframes ecg-head-move {
    from { cx: 0; opacity: 1; }
    40%  { cx: 2400px; opacity: 1; }
    41%  { opacity: 0; }
    100% { opacity: 0; }
}

.ecg-label {
    position: relative;
    z-index: 3;
    margin-top: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--fg);
    text-align: center;
}
.ecg-label .word {
    background: linear-gradient(180deg, #ffffff 0%, #6aa0ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ecg-label .blink {
    display: inline-block;
    width: 0.6em;
    color: var(--accent);
    animation: blink 1s steps(1) infinite;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.drift-svg {
    position: relative;
    z-index: 2;
    display: inline-block;
    width: 60%;
    max-width: 520px;
    height: auto;
    margin-top: 18px;
    filter:
        drop-shadow(0 0 24px rgba(106, 160, 255, 0.55))
        drop-shadow(0 0 4px rgba(106, 160, 255, 0.75))
        drop-shadow(0 2px 0 rgba(39, 74, 138, 0.5));
    animation: drift-breath 2.8s ease-in-out infinite;
    shape-rendering: crispEdges;
}

@keyframes drift-breath {
    0%, 100% {
        filter:
            drop-shadow(0 0 20px rgba(106, 160, 255, 0.4))
            drop-shadow(0 0 3px rgba(106, 160, 255, 0.55));
        transform: scale(1);
    }
    50% {
        filter:
            drop-shadow(0 0 34px rgba(106, 160, 255, 0.7))
            drop-shadow(0 0 5px rgba(106, 160, 255, 0.9));
        transform: scale(1.012);
    }
}

.viz-caption {
    position: relative;
    z-index: 3;
    margin-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--dim);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    text-align: center;
}

@media (max-width: 720px) {
    .viz { min-height: 280px; margin: 56px 0 72px; }
    .ecg { height: 120px; }
    .ecg-label { font-size: 18px; }
    .drift-svg { width: 82%; max-width: 360px; }
}

@media (prefers-reduced-motion: reduce) {
    .ecg, .ecg-line, .ecg-head, .blink, .drift-svg { animation: none; }
}

/* install section */
.install { margin-bottom: 80px; }
.install-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 24px;
}
.install-card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.install-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    text-transform: lowercase;
    letter-spacing: 0.1em;
}
.install-line {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--fg);
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.45;
}
.install-line code { color: var(--fg); background: transparent; padding: 0; font-size: inherit; }
.install-note {
    margin: 0;
    color: var(--dim);
    font-size: 13px;
    line-height: 1.45;
    max-width: 680px;
}
.install-note code {
    background: rgba(106, 160, 255, 0.08);
    color: var(--accent);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}
.install-foot {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--dim);
    text-align: center;
    opacity: 0.7;
}

@media (max-width: 860px) {
    .install-tabs { grid-template-columns: 1fr; }
}

/* footer */
.footer {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--dim); }
.footer-links a:hover { color: var(--accent); }

/* responsive */
@media (max-width: 640px) {
    .page { padding: 20px 16px 60px; }
    .nav { margin-bottom: 40px; padding-bottom: 28px; }
    .hero { margin-bottom: 64px; }
    .pitch, .why, .sentinels, .compare, .install { margin-bottom: 72px; }
    .term, .table { font-size: 11.5px; padding: 16px 18px; }
    .term-stage { font-size: 11.5px; padding: 18px 18px; min-height: 320px; }
    .term-frame-content { inset: 18px 18px; }
    .sentinels h2, .compare h2, .install h2 { font-size: 26px; }
    .footer-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
}
