:root {
    --bg: #0a0a0f;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.08);
    --cyan: #38bdf8;
    --indigo: #818cf8;
    --green: #34d399;
    --red: #f87171;
    --text: #f1f5f9;
    --text-2: #94a3b8;
    --text-3: #64748b;
    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 3px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ——— Ambient ——— */
.ambient-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}
.glow-1 { top: -150px; right: -100px; background: var(--indigo); }
.glow-2 { bottom: -150px; left: -100px; background: var(--cyan); animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.1); } }

/* ——— Nav ——— */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.nav-right { display: flex; gap: 0.5rem; align-items: center; }
.cyan { color: var(--cyan); }
.chip {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--cyan);
    border-radius: 100px;
    color: var(--cyan);
    background: rgba(56,189,248,0.08);
    letter-spacing: 0.5px;
}
.chip.muted { border-color: var(--border); color: var(--text-2); background: transparent; }

/* ——— Layout ——— */
.main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}
.step { display: none; animation: fadeUp 0.5s var(--ease) both; }
.step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ——— Hero ——— */
.hero-card {
    text-align: center;
    padding: 6rem 3rem 5rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    backdrop-filter: blur(20px);
}
.hero-eyebrow {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    color: var(--text-2);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* ——— Input ——— */
.input-row {
    display: flex;
    gap: 0.75rem;
    max-width: 560px;
    margin: 0 auto;
}
.input-row input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.input-row input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(56,189,248,0.1);
}
.input-row button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--cyan);
    color: #0a0a0f;
    border: none;
    border-radius: 12px;
    padding: 0 1.75rem;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.input-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(56,189,248,0.25);
}

/* ——— Scanner ——— */
.scan-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    padding: 2.5rem;
}
.scan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.scan-header h2 { font-size: 1.3rem; font-weight: 600; }
.pulse-dot {
    width: 10px; height: 10px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite;
}
@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
    100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.terminal {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.terminal-chrome {
    display: flex;
    gap: 6px;
    padding: 0.65rem 0.85rem;
    background: #111;
    border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ef4444; } .dot.y { background: #eab308; } .dot.g { background: #22c55e; }
.terminal-body {
    padding: 1.25rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: #a3e635;
    height: 260px;
    overflow-y: auto;
    line-height: 1.8;
}
.terminal-line { animation: lineIn 0.25s var(--ease) both; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.progress-track { height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--indigo)); transition: width 0.2s linear; }

/* ——— Report Actions ——— */
.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); }
.btn-glow {
    background: linear-gradient(135deg, var(--cyan), var(--indigo));
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(56,189,248,0.3);
}

/* ——— Report Preview (the PDF source) ——— */
.report-preview {
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

/* Internal report styling */
.rpt-header {
    padding: 3rem;
    border-bottom: 1px solid var(--border);
}
.rpt-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.rpt-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}
.rpt-meta {
    color: var(--text-3);
    font-size: 0.85rem;
}

.rpt-section {
    padding: 2.5rem 3rem;
    border-bottom: 1px solid var(--border);
}
.rpt-section:last-child { border-bottom: none; }
.rpt-section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-3);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.rpt-summary {
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
}

/* Issue / Solution cards inside report */
.rpt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.rpt-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}
.rpt-card-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}
.rpt-card-badge.issue  { color: var(--red);   border: 1px solid rgba(248,113,113,0.25); background: rgba(248,113,113,0.08); }
.rpt-card-badge.fix    { color: var(--green); border: 1px solid rgba(52,211,153,0.25);  background: rgba(52,211,153,0.08); }
.rpt-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}
.rpt-card p {
    color: var(--text-2);
    font-size: 0.88rem;
    line-height: 1.7;
}
.rpt-impact,
.rpt-impl {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text);
}
.rpt-impact {
    background: rgba(249, 115, 22, 0.08);
    border-left: 3px solid #f97316;
}
.rpt-impl {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
}

/* Pitch footer */
.rpt-pitch {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(180deg, transparent, rgba(56,189,248,0.03));
}
.rpt-pitch h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.rpt-pitch p {
    color: var(--text-2);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}
.rpt-pitch .sig {
    margin-top: 1.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--cyan);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-card { padding: 3rem 1.5rem; }
    .rpt-grid { grid-template-columns: 1fr; }
    .rpt-header, .rpt-section { padding: 1.5rem; }
    .report-actions { flex-direction: column; gap: 1rem; }
}
