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

:root {
    --brand: #4f46e5;
    --brand-dark: #3730a3;
    --brand-light: #e0e7ff;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fca5a5;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --warning-border: #fcd34d;
    --safe: #059669;
    --safe-bg: #ecfdf5;
    --safe-border: #6ee7b7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-800);
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }

/* ─── Navigation ───────────────────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    backdrop-filter: blur(8px);
}
.nav-inner {
    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.15rem; color: var(--gray-900);
    text-decoration: none;
}
.nav-icon { width: 24px; height: 24px; color: var(--brand); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--gray-600); font-size: .9rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; color: var(--gray-600); }

@media (max-width: 640px) {
    .nav-links {
        display: none; position: absolute; top: 60px; left: 0; right: 0;
        flex-direction: column; background: #fff;
        border-bottom: 1px solid var(--gray-200);
        padding: 1rem;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 50%, #fef3c7 100%);
}
.hero h1 {
    font-size: 2.25rem; font-weight: 800; color: var(--gray-900);
    line-height: 1.2; margin-bottom: 1rem;
    max-width: 700px; margin-left: auto; margin-right: auto;
}
.hero p {
    font-size: 1.15rem; color: var(--gray-600);
    max-width: 560px; margin: 0 auto 2rem;
}
.hero .cta-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .85rem 2rem; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    font-weight: 600; font-size: 1rem;
    text-decoration: none; transition: background .2s;
}
.hero .cta-btn:hover { background: var(--brand-dark); text-decoration: none; }

.trust-badges {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
    margin-top: 2rem; font-size: .85rem; color: var(--gray-500);
}
.trust-badges span {
    display: flex; align-items: center; gap: .35rem;
}
.trust-badges svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 1.65rem; }
    .hero p { font-size: 1rem; }
}

/* ─── How It Works ─────────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--gray-50); }
.section h2 {
    font-size: 1.5rem; font-weight: 700; text-align: center;
    margin-bottom: 2rem; color: var(--gray-900);
}

.steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.step {
    text-align: center; padding: 1.5rem;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand-light); color: var(--brand);
    font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem;
}
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.step p { font-size: .9rem; color: var(--gray-600); }

/* ─── Features / Apps ──────────────────────────────────────────── */
.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature {
    padding: 1.5rem; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); background: #fff;
}
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.feature p { font-size: .9rem; color: var(--gray-600); }

.app-grid {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
    margin-top: 1rem;
}
.app-tag {
    padding: .4rem 1rem; border-radius: 20px;
    background: var(--brand-light); color: var(--brand-dark);
    font-size: .85rem; font-weight: 500;
}

/* ─── Check Tool ───────────────────────────────────────────────── */
.tool-card {
    max-width: 640px; margin: 0 auto;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.tool-header {
    padding: 1.5rem; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
.tool-header h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
.tool-header p { font-size: .9rem; color: var(--gray-500); }
.tool-body { padding: 1.5rem; }

.tab-bar {
    display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem;
}
.tab-btn {
    flex: 1; padding: .75rem; text-align: center;
    background: none; border: none; cursor: pointer;
    font-weight: 500; font-size: .9rem; color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all .2s;
}
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Upload area */
.upload-area {
    border: 2px dashed var(--gray-300); border-radius: var(--radius);
    padding: 2rem; text-align: center; cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--brand); background: var(--brand-light);
}
.upload-area svg { width: 40px; height: 40px; color: var(--gray-400); margin-bottom: .5rem; }
.upload-area p { font-size: .9rem; color: var(--gray-500); }
.upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.upload-preview {
    display: none; align-items: center; gap: 1rem;
    padding: 1rem; background: var(--gray-50); border-radius: var(--radius);
    margin-top: 1rem;
}
.upload-preview.visible { display: flex; }
.upload-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.upload-preview .file-info { flex: 1; }
.upload-preview .file-name { font-weight: 500; font-size: .9rem; }
.upload-preview .file-size { font-size: .8rem; color: var(--gray-500); }
.upload-preview .remove-btn {
    background: none; border: none; cursor: pointer;
    color: var(--gray-400); font-size: 1.2rem;
}

/* URL input */
.url-group {
    display: flex; gap: .5rem;
}
.url-group input {
    flex: 1; padding: .7rem 1rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: .9rem;
    outline: none; transition: border-color .2s;
}
.url-group input:focus { border-color: var(--brand); }

.submit-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    width: 100%; padding: .85rem; margin-top: 1rem;
    background: var(--brand); color: #fff; border: none;
    border-radius: var(--radius); font-weight: 600; font-size: .95rem;
    cursor: pointer; transition: background .2s;
}
.submit-btn:hover { background: var(--brand-dark); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; }
.submit-btn .spinner {
    display: none; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
    border-radius: 50%; animation: spin .6s linear infinite;
}
.submit-btn.loading .spinner { display: block; }
.submit-btn.loading .btn-text { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.rate-info {
    text-align: center; font-size: .8rem; color: var(--gray-400);
    margin-top: .75rem;
}

/* ─── Results ──────────────────────────────────────────────────── */
.result-card {
    max-width: 720px; margin: 0 auto;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200); box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.verdict {
    padding: 2rem; text-align: center;
}
.verdict.safe { background: var(--safe-bg); border-bottom: 3px solid var(--safe-border); }
.verdict.warning { background: var(--warning-bg); border-bottom: 3px solid var(--warning-border); }
.verdict.danger { background: var(--danger-bg); border-bottom: 3px solid var(--danger-border); }

.verdict-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.verdict h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; }
.verdict p { font-size: .95rem; color: var(--gray-600); max-width: 500px; margin: 0 auto; }

.confidence-bar {
    width: 200px; height: 8px; background: var(--gray-200);
    border-radius: 4px; margin: 1rem auto 0; overflow: hidden;
}
.confidence-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.confidence-fill.safe { background: var(--safe); }
.confidence-fill.warning { background: var(--warning); }
.confidence-fill.danger { background: var(--danger); }

.results-body { padding: 1.5rem; }
.results-section { margin-bottom: 1.5rem; }
.results-section h3 {
    font-size: .95rem; font-weight: 600; margin-bottom: .75rem;
    color: var(--gray-700); text-transform: uppercase; letter-spacing: .03em;
}

.match-list { list-style: none; }
.match-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .75rem 0; border-bottom: 1px solid var(--gray-100);
}
.match-item:last-child { border-bottom: none; }
.match-thumb {
    width: 48px; height: 48px; object-fit: cover;
    border-radius: var(--radius); flex-shrink: 0; background: var(--gray-100);
}
.match-info { flex: 1; min-width: 0; }
.match-title {
    font-size: .9rem; font-weight: 500; color: var(--gray-800);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-domain { font-size: .8rem; color: var(--gray-500); }
.match-link {
    font-size: .8rem; display: inline-block; margin-top: .15rem;
}

.no-results { text-align: center; padding: 1.5rem; color: var(--gray-500); font-size: .9rem; }

.results-actions {
    padding: 1.5rem; border-top: 1px solid var(--gray-200);
    text-align: center;
}
.results-actions a {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.5rem; border-radius: var(--radius);
    background: var(--brand); color: #fff;
    font-weight: 600; font-size: .9rem; text-decoration: none;
}

/* ─── Blog ─────────────────────────────────────────────────────── */
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.blog-card {
    border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    overflow: hidden; background: #fff; transition: box-shadow .2s;
}
.blog-card:hover { box-shadow: var(--shadow-lg); }
.blog-card-body { padding: 1.25rem; }
.blog-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; line-height: 1.3; }
.blog-card h3 a { color: var(--gray-900); }
.blog-card p { font-size: .9rem; color: var(--gray-600); margin-bottom: .75rem; }
.blog-card .meta { font-size: .8rem; color: var(--gray-400); }

.blog-content { max-width: 720px; margin: 0 auto; }
.blog-content h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; line-height: 1.25; }
.blog-content .meta { font-size: .85rem; color: var(--gray-500); margin-bottom: 2rem; }
.blog-content h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .75rem; }
.blog-content h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.blog-content p { margin-bottom: 1rem; }
.blog-content ul, .blog-content ol { margin: 0 0 1rem 1.5rem; }
.blog-content li { margin-bottom: .35rem; }
.blog-content blockquote {
    border-left: 3px solid var(--brand); padding-left: 1rem;
    color: var(--gray-600); margin: 1rem 0; font-style: italic;
}

/* ─── Legal Pages ──────────────────────────────────────────────── */
.legal-content { max-width: 720px; margin: 0 auto; }
.legal-content h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.legal-content .updated { font-size: .85rem; color: var(--gray-500); margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.legal-content p { margin-bottom: .75rem; font-size: .95rem; }

/* ─── FAQ Schema Section ───────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
    border-bottom: 1px solid var(--gray-200); padding: 1rem 0;
}
.faq-q {
    font-weight: 600; font-size: 1rem; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-q::after { content: "+"; font-size: 1.2rem; color: var(--gray-400); }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    font-size: .9rem; color: var(--gray-600); line-height: 1.6;
}
.faq-item.open .faq-a { max-height: 500px; padding-top: .5rem; }

/* ─── CTA Banner ───────────────────────────────────────────────── */
.cta-banner {
    background: var(--brand); color: #fff; text-align: center;
    padding: 3rem 1rem; margin-top: 2rem;
}
.cta-banner h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
.cta-banner p { font-size: 1rem; opacity: .9; margin-bottom: 1.5rem; }
.cta-banner a {
    display: inline-flex; padding: .75rem 2rem; border-radius: var(--radius);
    background: #fff; color: var(--brand); font-weight: 600;
    text-decoration: none; transition: opacity .2s;
}
.cta-banner a:hover { opacity: .9; text-decoration: none; }

/* ─── Footer ───────────────────────────────────────────────────── */
.footer {
    background: var(--gray-900); color: var(--gray-400);
    padding: 3rem 0 1.5rem; margin-top: 3rem;
}
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.footer-col h3 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: .75rem; }
.footer-col p { font-size: .85rem; line-height: 1.5; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .35rem; }
.footer-col a { color: var(--gray-400); font-size: .85rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--gray-700); padding-top: 1rem;
    font-size: .8rem; text-align: center;
}

/* ─── Utilities ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.alert {
    padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem;
    font-size: .9rem;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.alert-info { background: var(--brand-light); color: var(--brand-dark); }
