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

:root {
    --primary:      #4f46e5;
    --primary-dark: #3730a3;
    --primary-light:#ede9fe;
    --success:      #059669;
    --success-light:#d1fae5;
    --warning:      #d97706;
    --warning-light:#fef3c7;
    --danger:       #dc2626;
    --danger-light: #fee2e2;
    --text:         #111827;
    --text-muted:   #6b7280;
    --border:       #e5e7eb;
    --bg:           #f9fafb;
    --white:        #ffffff;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg:    0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.main-content { min-height: calc(100vh - 120px); }

/* ===== Navbar ===== */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: .95rem;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-plan {
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.plan-free    { background:#f3f4f6; color:#374151; }
.plan-starter { background:#dbeafe; color:#1d4ed8; }
.plan-pro     { background:#ede9fe; color:#6d28d9; }
.plan-agency  { background:#fef3c7; color:#92400e; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary  { background: var(--primary); color:#fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; }
.btn-outline  { border-color: var(--border); background: var(--white); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger   { background: var(--danger); color:#fff; }
.btn-danger:hover { background: #b91c1c; color:#fff; }

.btn-sm  { padding: .35rem .8rem; font-size: .82rem; }
.btn-lg  { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: .4rem;
    color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .6rem .85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.hint { font-size: .8rem; color: var(--text-muted); font-weight: 400; }

/* ===== Alerts ===== */
.alert {
    padding: .85rem 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 1.5rem;
    font-size: .9rem;
}
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: var(--danger-light);  color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.badge-pending    { background:#fef3c7; color:#92400e; }
.badge-processing { background:#dbeafe; color:#1d4ed8; }
.badge-completed  { background:#d1fae5; color:#065f46; }
.badge-failed     { background:#fee2e2; color:#991b1b; }
.badge-active     { background:#d1fae5; color:#065f46; }

/* ===== Tables ===== */
.scan-table-wrap { overflow-x: auto; }
.scan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.scan-table th {
    text-align: left;
    padding: .75rem 1rem;
    border-bottom: 2px solid var(--border);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
}
.scan-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.scan-table tr:last-child td { border-bottom: none; }
.url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Scores ===== */
.score { font-weight: 600; }
.score-good { color: var(--success); }
.score-fair { color: var(--warning); }
.score-poor { color: var(--danger); }
.score-pending { color: var(--text-muted); }

/* ===== Section ===== */
.section { margin-top: 2rem; }
.section h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 1.5rem; margin-top: 3rem; }
.footer-container { max-width: 1100px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: .875rem; }

/* ===== Screen reader only ===== */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ===== Code blocks ===== */
.code-block {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: .85rem 1rem;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .75rem 0;
    overflow-x: auto;
}
.code-block code { flex: 1; white-space: nowrap; }

/* Toggle checkbox */
.toggle-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    cursor: pointer;
    font-size: .95rem;
}
.toggle-label input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }

/* ===== Landing Page ===== */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.hero-content { flex: 1; }
.hero-headline { font-size: 2.75rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.25rem; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 520px; }
.hero-cta { display: flex; flex-direction: column; gap: .75rem; }
.hero-scan-form { display: flex; gap: .75rem; }
.hero-url-input {
    flex: 1; padding: .7rem 1rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 1rem;
}
.hero-note { font-size: .85rem; color: var(--text-muted); }

.hero-visual { flex: 0 0 300px; }
.score-demo {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    text-align: center;
}
.demo-score { font-size: 4rem; font-weight: 800; color: var(--warning); line-height: 1; }
.demo-label { color: var(--text-muted); font-size: .9rem; margin: .5rem 0 1rem; }
.demo-issues { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.badge-demo { padding: .3rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-demo.high { background: var(--danger-light); color:#991b1b; }
.badge-demo.med  { background: var(--warning-light); color:#92400e; }
.badge-demo.low  { background: #f3f4f6; color:#374151; }

.problem-section { background: var(--white); padding: 4rem 2rem; text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.problem-section h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.stats-row { display: flex; gap: 2rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.stat-block strong { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-block span { font-size: .9rem; color: var(--text-muted); }

.features-section { padding: 5rem 2rem; }
.features-section h2 { text-align: center; font-size: 1.75rem; margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p  { color: var(--text-muted); font-size: .95rem; }

.pricing-section { background: var(--white); padding: 5rem 2rem; border-top: 1px solid var(--border); }
.pricing-section h2 { text-align: center; font-size: 1.75rem; margin-bottom: .5rem; }
.pricing-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.pricing-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; position: relative; }
.pricing-featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color:#fff; font-size: .75rem; font-weight: 600; padding: .2rem .75rem; border-radius: 999px; }
.pricing-card h3 { font-size: 1.1rem; margin-bottom: .75rem; }
.price-main { font-size: 2rem; font-weight: 800; }
.price-per  { color: var(--text-muted); font-size: .9rem; }
.pricing-price { margin-bottom: 1.5rem; }
.pricing-features { list-style: none; margin-bottom: 1.5rem; }
.pricing-features li { padding: .4rem 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.pricing-features li:last-child { border: none; }

.cta-section { text-align: center; padding: 5rem 2rem; }
.cta-section h2 { font-size: 2rem; margin-bottom: 1rem; }
.cta-section p  { color: var(--text-muted); margin-bottom: 2rem; }

/* ===== Responsiveness ===== */
@media (max-width: 768px) {
    .hero { flex-direction: column; padding: 3rem 1.5rem; }
    .hero-visual { display: none; }
    .hero-headline { font-size: 2rem; }
    .hero-scan-form { flex-direction: column; }
    .nav-links { gap: 1rem; font-size: .875rem; }
}
