/* ============================================
   emailscan.noirworx.com — Email Security Scanner
   Light theme matching noirworx.com
   Primary accent: #ff1745 (NoirWorx red)
   ============================================ */

:root {
    --bg: #ffffff;
    --bg-soft: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --bg-dark: #1a1a2e;
    --accent: #ff1745;
    --accent-hover: #e0133d;
    --accent-glow: rgba(255, 23, 69, 0.08);
    --text: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888aa;
    --green: #22C55E;
    --yellow: #EAB308;
    --red: #EF4444;
    --orange: #F97316;
    --cyan: #06B6D4;
    --border: #e5e7eb;
    --border-light: #f0f0f5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 80px 0; }

/* ---- HERO ---- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 60%);
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(255, 23, 69, 0.25);
    background: rgba(255, 23, 69, 0.04);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--bg-dark);
    animation: fadeInUp 0.6s ease 0.1s both;
}

.accent { color: var(--accent); }

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* ---- SCAN INPUT ---- */
.scan-input-wrap {
    display: flex;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 16px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 23, 69, 0.1);
}

.input-prefix {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 8px;
}

#domain-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 14px 0;
    outline: none;
}

#domain-input::placeholder { color: var(--text-muted); }

.btn-scan {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(255, 23, 69, 0.25);
}

.btn-scan:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 23, 69, 0.3); }
.btn-scan:active { transform: translateY(0); }
.btn-scan:disabled { opacity: 0.5; cursor: not-allowed; }

.hero-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.trust-bar .dot {
    width: 4px;
    height: 4px;
    background: var(--border);
    border-radius: 50%;
}

/* ---- SCANNING STATE ---- */
.scanning-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.scanning-title {
    font-size: 1.8rem;
    margin-bottom: 48px;
    color: var(--bg-dark);
}

.scan-progress {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.scan-step { text-align: center; min-width: 100px; }

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.step-icon.pending { background: var(--bg-soft); color: var(--text-muted); border: 2px solid var(--border); }
.step-icon.checking { background: var(--accent-glow); color: var(--accent); border: 2px solid var(--accent); animation: pulse 1s infinite; }
.step-icon.pass { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 2px solid var(--green); }
.step-icon.warn { background: rgba(234, 179, 8, 0.1); color: var(--yellow); border: 2px solid var(--yellow); }
.step-icon.fail { background: rgba(239, 68, 68, 0.1); color: var(--red); border: 2px solid var(--red); }

.step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* ---- RESULTS ---- */
.results-section { padding-top: 60px; }

.grade-wrap {
    text-align: center;
    margin-bottom: 48px;
}

.grade-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 4px solid var(--border);
    background: var(--bg);
    transition: border-color 0.5s, box-shadow 0.5s;
}

.grade-ring.grade-a { border-color: var(--green); box-shadow: 0 0 40px rgba(34, 197, 94, 0.15); }
.grade-ring.grade-b { border-color: var(--cyan); box-shadow: 0 0 40px rgba(6, 182, 212, 0.15); }
.grade-ring.grade-c { border-color: var(--yellow); box-shadow: 0 0 40px rgba(234, 179, 8, 0.15); }
.grade-ring.grade-d { border-color: var(--orange); box-shadow: 0 0 40px rgba(249, 115, 22, 0.15); }
.grade-ring.grade-f { border-color: var(--red); box-shadow: 0 0 40px rgba(239, 68, 68, 0.15); }

.grade-letter {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
}

.grade-ring.grade-a .grade-letter { color: var(--green); }
.grade-ring.grade-b .grade-letter { color: var(--cyan); }
.grade-ring.grade-c .grade-letter { color: var(--yellow); }
.grade-ring.grade-d .grade-letter { color: var(--orange); }
.grade-ring.grade-f .grade-letter { color: var(--red); }

.results-domain {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.grade-label {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ---- CHECK CARDS ---- */
.checks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.check-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.check-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }

.check-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.check-status {
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.check-status.pass { background: rgba(34, 197, 94, 0.1); color: var(--green); }
.check-status.warn { background: rgba(234, 179, 8, 0.1); color: var(--yellow); }
.check-status.fail { background: rgba(239, 68, 68, 0.1); color: var(--red); }

.check-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

.check-result {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.check-record {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 8px 10px;
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.4;
    border: 1px solid var(--border-light);
}

/* ---- IMPLICATIONS ---- */
.implications-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.implications-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.implications-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.implications-box p:last-child { margin-bottom: 0; }

/* ---- EMAIL GATE ---- */
.report-gate {
    background: linear-gradient(135deg, rgba(255, 23, 69, 0.04), rgba(255, 23, 69, 0.01));
    border: 1px solid rgba(255, 23, 69, 0.15);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-bottom: 48px;
}

.report-gate h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--bg-dark);
}

.report-gate > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.gate-form {
    display: flex;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto 12px;
}

.gate-form input {
    flex: 1;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.gate-form input:focus { border-color: var(--accent); }

.btn-report {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(255, 23, 69, 0.2);
}

.btn-report:hover { background: var(--accent-hover); }

.gate-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- CTAs ---- */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.cta-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.cta-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.cta-icon { font-size: 2rem; margin-bottom: 12px; }

.cta-card h4 { font-size: 1rem; margin-bottom: 8px; color: var(--bg-dark); }

.cta-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.btn-cta {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.btn-cta:hover { background: var(--accent); color: #fff; }

/* ---- SCAN ANOTHER ---- */
.scan-another { text-align: center; margin-bottom: 40px; }

.btn-scan-another {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
}

.btn-scan-another:hover { border-color: var(--accent); color: var(--accent); }

/* ---- FOOTER ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-soft);
}

.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-legal {
    margin-top: 8px;
    font-size: 0.7rem;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .scan-input-wrap { flex-direction: column; }
    .btn-scan { width: 100%; }
    .checks-grid { grid-template-columns: 1fr; }
    .cta-grid { grid-template-columns: 1fr; }
    .scan-progress { gap: 20px; }
    .trust-bar { flex-wrap: wrap; gap: 8px; }
    .gate-form { flex-direction: column; }
    .grade-ring { width: 120px; height: 120px; }
    .grade-letter { font-size: 3rem; }
}
