/* ================================================
   AuditShield — Premium SaaS Landing Page
   Dark theme, glass morphism, gradient accents
   ================================================ */

:root {
    --bg: #05070a;
    --bg-elevated: #0a0f16;
    --bg-card: #0f1620;
    --bg-card-hover: #141d2a;
    --border: #1a2535;
    --border-light: #243044;
    --text: #e4eaf0;
    --text-secondary: #8899b0;
    --text-muted: #4a5568;
    --green: #00e676;
    --green-dim: #00c853;
    --green-bg: rgba(0,230,118,0.08);
    --blue: #40a9ff;
    --blue-bg: rgba(64,169,255,0.08);
    --purple: #b37feb;
    --purple-bg: rgba(179,127,235,0.08);
    --red: #ff4d6a;
    --orange: #ff8c42;
    --yellow: #ffc53d;
    --radius: 12px;
    --radius-lg: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay */
.noise {
    position: fixed; inset: 0; pointer-events: none; z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' 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: sticky; top: 0; z-index: 100;
    background: rgba(5,7,10,0.85); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.nav-logo-icon { color: var(--green); display: flex; }
.nav-logo-text { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
    font-size: 14px; color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
    padding: 8px 18px; border-radius: 8px;
    background: var(--green); color: var(--bg) !important;
    font-weight: 600; font-size: 13px !important;
    transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--green-dim) !important; }

/* ===== HERO ===== */
.hero {
    text-align: center; padding: 100px 24px 80px; max-width: 800px; margin: 0 auto;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 13px; color: var(--text-secondary); margin-bottom: 32px;
}
.pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-title {
    font-size: clamp(36px, 6vw, 64px); font-weight: 800;
    line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 24px;
}
.hero-gradient {
    background: linear-gradient(135deg, var(--green) 0%, var(--blue) 50%, var(--purple) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px; color: var(--text-secondary); max-width: 560px;
    margin: 0 auto 40px; line-height: 1.7;
}
.hero-actions {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius);
    background: var(--green); color: var(--bg);
    font-size: 16px; font-weight: 600; text-decoration: none;
    transition: all var(--transition);
}
.btn-primary:hover { background: var(--green-dim); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0,230,118,0.2); }
.btn-primary svg { transition: transform var(--transition); }
.btn-primary:hover svg { transform: translateY(2px); }

.btn-secondary {
    display: inline-flex; align-items: center;
    padding: 14px 28px; border-radius: var(--radius);
    background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
    font-size: 16px; font-weight: 500; text-decoration: none;
    transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--border-light); background: var(--bg-card-hover); }

/* Hero stats */
.hero-stats {
    display: flex; justify-content: center; gap: 48px;
    padding-top: 20px; border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat-value {
    display: block; font-size: 24px; font-weight: 700;
    font-family: var(--font-mono); color: var(--green);
}
.hero-stat-label { font-size: 13px; color: var(--text-muted); }

/* ===== SCAN SECTION ===== */
.scan-section { padding: 40px 24px 80px; }
.scan-card {
    position: relative; max-width: 640px; margin: 0 auto;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 40px; overflow: hidden;
}
.scan-card-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(0,230,118,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.scan-card-content { position: relative; z-index: 1; }
.scan-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.scan-card p { color: var(--text-secondary); font-size: 15px; margin-bottom: 24px; }

.scan-inputs { display: flex; flex-direction: column; gap: 12px; }
.input-wrapper {
    position: relative; display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 16px; color: var(--text-muted);
    pointer-events: none;
}
.input-wrapper input {
    width: 100%; padding: 14px 16px 14px 44px;
    font-size: 15px; font-family: var(--font);
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-wrapper input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,230,118,0.1);
}
.input-wrapper input::placeholder { color: var(--text-muted); }

.btn-scan {
    width: 100%; padding: 14px; border-radius: 10px; border: none;
    font-size: 16px; font-weight: 600; font-family: var(--font);
    background: var(--green); color: var(--bg);
    cursor: pointer; transition: all var(--transition);
}
.btn-scan:hover { background: var(--green-dim); }
.btn-scan:active { transform: scale(0.98); }
.btn-scan.loading { background: var(--bg-card-hover); color: var(--text-secondary); cursor: wait; }
.btn-scan .btn-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }

.spinner {
    width: 18px; height: 18px; border: 2px solid var(--border-light);
    border-top-color: var(--green); border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-note { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 16px; }
.error-msg {
    margin-top: 16px; padding: 12px 16px; border-radius: 8px;
    background: rgba(255,77,106,0.08); border: 1px solid rgba(255,77,106,0.2);
    color: var(--red); font-size: 14px;
}

/* ===== SECTIONS ===== */
.section {
    max-width: 1100px; margin: 0 auto; padding: 80px 24px;
}
.section-label {
    text-align: center; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--green); margin-bottom: 12px;
}
.section-title {
    text-align: center; font-size: clamp(28px, 4vw, 40px);
    font-weight: 700; letter-spacing: -0.5px; margin-bottom: 16px;
}
.section-subtitle {
    text-align: center; font-size: 16px; color: var(--text-secondary);
    max-width: 500px; margin: 0 auto 48px;
}

/* ===== HOW IT WORKS ===== */
.steps {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; max-width: 800px; margin: 0 auto;
}
.step {
    text-align: center; flex: 1; position: relative; padding: 0 16px;
}
.step-number {
    font-family: var(--font-mono); font-size: 12px; font-weight: 600;
    color: var(--green); margin-bottom: 12px;
}
.step-icon-wrap {
    width: 56px; height: 56px; border-radius: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; color: var(--text-secondary);
}
.step h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.step-connector {
    width: 40px; height: 1px; background: var(--border);
    margin-top: 60px; flex-shrink: 0;
}

/* ===== SCAN GRID ===== */
.scan-grid-section { padding: 80px 24px; }
.scan-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.scan-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    transition: all var(--transition);
}
.scan-item:hover { border-color: var(--border-light); transform: translateY(-2px); }
.scan-item-icon { font-size: 28px; margin-bottom: 8px; }
.scan-item-num {
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    color: var(--green); margin-bottom: 8px;
}
.scan-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.scan-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== TRUST ===== */
.trust-section { padding: 80px 24px; }
.trust-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.trust-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    transition: all var(--transition);
}
.trust-card:hover { border-color: var(--border-light); }
.trust-icon { font-size: 32px; margin-bottom: 16px; }
.trust-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.trust-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== FAQ ===== */
.faq-section { padding: 80px 24px 100px; }
.faq-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 16px;
}
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
}
.faq-item h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border); padding: 32px 24px;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-brand p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; font-size: 13px; color: var(--text-muted); }

/* ===== RESULTS PAGE (kept for continuity) ===== */
.results-page { padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
.results-header { margin-bottom: 30px; }
.back-link { color: var(--text-secondary); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--green); }
.results-header h1 { font-size: 28px; margin: 8px 0; }
.scan-meta { display: flex; gap: 16px; font-size: 14px; }
.scan-url { color: var(--green); font-family: var(--font-mono); }
.scan-id { color: var(--text-muted); font-family: var(--font-mono); }

.progress-section { margin-bottom: 30px; }
.progress-bar-container { height: 6px; background: var(--bg-card); border-radius: 3px; overflow: hidden; }
.progress-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--green), var(--blue));
    transition: width 0.4s ease;
}
.progress-text { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; }
.progress-text span:first-child { font-family: var(--font-mono); color: var(--green); }

.status-badge { padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.status-badge.queued { background: rgba(255,197,61,0.15); color: var(--yellow); }
.status-badge.running { background: rgba(64,169,255,0.15); color: var(--blue); }
.status-badge.completed { background: rgba(0,230,118,0.15); color: var(--green); }
.status-badge.failed { background: rgba(255,77,106,0.15); color: var(--red); }

.steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 30px; }
.step-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--bg-card); font-size: 14px; border-left: 3px solid var(--border); }
.step-card.completed { border-left-color: var(--green); }
.step-card.running { border-left-color: var(--blue); animation: pulse-border 2s infinite; }
.step-card.failed { border-left-color: var(--red); }
@keyframes pulse-border { 50% { border-left-color: var(--green); } }
.step-icon { font-size: 16px; width: 20px; }
.step-card.completed .step-icon { color: var(--green); }
.step-card.running .step-icon { color: var(--blue); }
.step-card.failed .step-icon { color: var(--red); }
.step-name { flex: 1; }
.step-status { font-size: 12px; color: var(--text-muted); text-transform: capitalize; }

.findings-section { margin-top: 40px; }
.findings-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.findings-header h2 { font-size: 22px; }
.severity-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.sev-badge { padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.sev-badge.critical { background: var(--red); color: #fff; }
.sev-badge.high { background: var(--orange); color: #fff; }
.sev-badge.medium { background: var(--yellow); color: var(--bg); }
.sev-badge.low { background: var(--green); color: var(--bg); }
.sev-badge.info { background: var(--blue); color: #fff; }
.sev-badge.total { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }

.finding-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; border-left: 4px solid var(--border); }
.finding-card.critical { border-left-color: var(--red); }
.finding-card.high { border-left-color: var(--orange); }
.finding-card.medium { border-left-color: var(--yellow); }
.finding-card.low { border-left-color: var(--green); }
.finding-card.info { border-left-color: var(--blue); }
.finding-header { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.finding-severity { padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.finding-severity.critical { background: var(--red); color: #fff; }
.finding-severity.high { background: var(--orange); color: #fff; }
.finding-severity.medium { background: var(--yellow); color: var(--bg); }
.finding-severity.low { background: var(--green); color: var(--bg); }
.finding-severity.info { background: var(--blue); color: #fff; }
.finding-step { font-size: 12px; color: var(--text-muted); }
.finding-title { font-size: 17px; margin-bottom: 8px; }
.finding-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.finding-evidence { margin-bottom: 10px; }
.finding-evidence strong { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.finding-evidence pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); overflow-x: auto; white-space: pre-wrap; word-break: break-all; max-height: 200px; overflow-y: auto; }
.finding-remediation strong { font-size: 13px; color: var(--green); display: block; margin-bottom: 4px; }
.finding-remediation p { font-size: 14px; color: var(--text-secondary); }
.no-findings { text-align: center; padding: 40px; font-size: 18px; color: var(--green); background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 60px 20px 60px; }
    .hero-stats { gap: 24px; }
    .hero-title { font-size: 32px; }
    .steps { flex-direction: column; align-items: center; }
    .step-connector { width: 1px; height: 24px; margin: 0; }
    .scan-grid, .trust-grid, .faq-grid { grid-template-columns: 1fr; }
    .faq-grid { grid-template-columns: 1fr; }
    .nav-links a:not(.nav-cta) { display: none; }
    .steps-grid { grid-template-columns: 1fr; }
    .scan-card { padding: 24px; }
}
