/* ==========================================================
   VentBot — light diagnostic theme
   Tokens
   ========================================================== */

:root {
    --bg: #ffffff;
    --bg-sunken: #fbfaff;
    --panel: #ffffff;
    --panel-alt: #f7f6fd;

    --ink: #14121c;
    --ink-soft: #6b6878;
    --ink-faint: #a3a0b0;

    --line: #e7e4f2;
    --line-strong: #d6d2ea;

    --accent: #5b3ff0;
    --accent-ink: #ffffff;
    --accent-soft: #efebff;
    --accent-soft-line: #ddd5fb;

    --good: #0f9d68;
    --good-soft: #e7f8f0;

    --warn: #b6551a;
    --warn-soft: #fdf1e7;

    --radius: 14px;
    --radius-sm: 8px;

    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --font-body: "Inter", Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: var(--font-body);
    color: var(--ink);

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px,
        var(--bg-sunken);
}

/* ==========================================================
   Site header
   ========================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;

    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    max-width: 840px;
    margin: 0 auto;
    padding: 16px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    font-size: 20px;
    line-height: 1;
}

.brand-name {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-nav {
    display: flex;
    gap: 22px;
}

.site-nav a {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;

    transition: color 0.15s ease;
}

.site-nav a:hover {
    color: var(--accent);
}

/* ==========================================================
   Page — vertical stack of app card + about section
   ========================================================== */

.page {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 40px 16px;
}

/* ==========================================================
   Frame — the HUD bracket that wraps the app card
   ========================================================== */

.frame {
    position: relative;
    width: min(720px, 100%);
    padding: 22px;
    scroll-margin-top: 90px;
}

.corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--accent);
    opacity: 0.55;
}

.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

/* ==========================================================
   Container
   ========================================================== */

.container {
    width: 100%;
    padding: 36px 40px 40px;

    background: var(--panel);

    border: 1px solid var(--line);
    border-radius: var(--radius);

    box-shadow:
        0 1px 2px rgba(20, 18, 28, 0.04),
        0 20px 60px -20px rgba(91, 63, 240, 0.18);

    text-align: center;
}

/* ==========================================================
   Status bar
   ========================================================== */

.statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
    padding-bottom: 14px;

    border-bottom: 1px dashed var(--line-strong);

    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

.statusbar-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 3px var(--good-soft);
    animation: pulse 2.4s ease-in-out infinite;
}

.statusbar-id {
    color: var(--ink-faint);
}

/* ==========================================================
   Hero
   ========================================================== */

.hero {
    margin-bottom: 28px;
}

.logo {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 10px;
}

h1 {
    margin: 0 0 6px;

    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.tagline {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
}

/* ==========================================================
   Input panel
   ========================================================== */

.panel {
    text-align: left;
}

.field-label {
    display: block;
    margin-bottom: 8px;

    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--ink-faint);
    text-transform: uppercase;
}

textarea {
    width: 100%;
    min-height: 170px;

    padding: 16px 18px;

    font-family: var(--font-body);
    font-size: 15.5px;
    line-height: 1.5;
    color: var(--ink);

    background: var(--panel-alt);

    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    resize: vertical;

    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea::placeholder {
    color: var(--ink-faint);
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
    width: 100%;
    margin-top: 14px;

    padding: 15px 24px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-ink);
    text-transform: uppercase;

    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);

    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 8px 20px -8px rgba(91, 63, 240, 0.55);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -8px rgba(91, 63, 240, 0.6);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-arrow {
    transition: transform 0.15s ease;
}

button:hover:not(:disabled) .btn-arrow {
    transform: translateX(3px);
}

/* ==========================================================
   Loading state
   ========================================================== */

#loadingState {
    margin-top: 28px;
}

.scan-track {
    position: relative;
    height: 3px;
    width: 100%;

    background: var(--line);
    border-radius: 3px;
    overflow: hidden;

    margin-bottom: 14px;
}

.scan-bar {
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;

    background: linear-gradient(90deg, transparent, var(--accent), transparent);

    animation: scan 1.3s ease-in-out infinite;
}

#loadingText {
    margin: 0;

    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

/* ==========================================================
   Results
   ========================================================== */

#resultBox {
    margin-top: 28px;
    text-align: left;
}

.result-card {
    margin-bottom: 14px;
    padding: 20px 22px;

    background: var(--panel-alt);

    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
}

.result-card:last-child {
    margin-bottom: 0;
}

.result-card h3 {
    margin: 0 0 8px;

    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.result-card p {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink);
}

.empathy {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
}

.offer {
    margin-top: 16px;
    padding: 14px 16px;

    display: flex;
    align-items: flex-start;
    gap: 8px;

    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-soft);

    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.hidden {
    display: none;
}

/* ==========================================================
   About section
   ========================================================== */

.about {
    width: min(720px, 100%);
    margin-top: 44px;
    scroll-margin-top: 90px;
}

.about-inner {
    padding: 40px;

    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);

    text-align: left;
}

.about-inner h2 {
    margin: 8px 0 14px;

    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--ink);
}

.about-lead {
    margin: 0 0 26px;

    font-size: 15.5px;
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 56ch;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;

    margin-bottom: 22px;
}

.about-item {
    padding: 20px;

    background: var(--panel-alt);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
}

.about-item h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.about-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.about-note {
    padding: 16px 18px;

    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-line);
    border-radius: var(--radius-sm);
}

.about-note-label {
    display: block;
    margin-bottom: 6px;

    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.about-note p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* ==========================================================
   Site footer
   ========================================================== */

.site-footer {
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    max-width: 840px;
    margin: 0 auto;
    padding: 22px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;

    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.03em;
    color: var(--ink-faint);
}

.site-footer-sub {
    color: var(--ink-faint);
}

/* ==========================================================
   Motion
   ========================================================== */

@keyframes scan {
    0% { left: -35%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .dot,
    .scan-bar {
        animation: none;
    }
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 560px) {
    .container {
        padding: 28px 22px 32px;
    }

    h1 {
        font-size: 28px;
    }

    .corner {
        width: 16px;
        height: 16px;
    }

    .about-inner {
        padding: 26px 22px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}