/* CustomerFlood audit-tool — Phase 1 styles, designed to match customerflood.com brand.
   Brand-specific colors come from inline <style> in each view (set by env vars via app.js).
   This file owns layout, typography, components — the structural system. */

:root {
  --bg-light: #f4f4f5;
  --bg-card: #ffffff;
  --text-dark: #1a1a2e;
  --text-mid: #4a4a5e;
  --text-muted: #7a7a8e;
  --bg-hero: #131318;             /* overridden inline per-brand */
  --bg-dark: #0d0d1a;
  --accent-green: #0a8859;        /* overridden inline per-brand */
  --accent-green-bright: #15a85a;
  --accent-red: #ff3c3c;
  --border-light: rgba(26,26,46,0.08);
  --border-on-dark: rgba(255,255,255,0.18);
  --text-on-dark: #ffffff;
  --text-muted-on-dark: rgba(255,255,255,0.6);
  --grade-A: #2e7d32;
  --grade-B: #689f38;
  --grade-C: #f9a825;
  --grade-D: #ef6c00;
  --grade-F: #c62828;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; font-weight: 400; line-height: 1.6;
  color: var(--text-dark); background: var(--bg-light);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-green); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: all .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { font-size: 15px; padding: 16px 28px; }
.btn-primary { background: var(--accent-green); color: #fff; }
.btn-primary:hover { background: var(--accent-green-bright); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-dark); border-color: var(--border-light); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); color: var(--text-dark); }

/* ---------- Header ---------- */
.site-header { background: var(--bg-hero); padding: 18px 0; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border-on-dark); }
.site-header .btn-ghost { color: var(--text-on-dark); border-color: var(--border-on-dark); }
.site-header .btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--text-on-dark); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-on-dark); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.logo { height: 28px; width: auto; }
.brand-name { color: var(--text-on-dark); }

/* ---------- Kickers ---------- */
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-green);
  background: rgba(10,136,89,0.1); padding: 6px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.kicker-on-dark { background: rgba(255,255,255,0.1); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%); }
.hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-dark); margin-bottom: 16px; }
.hero-sub { font-size: 18px; color: var(--text-mid); margin-bottom: 36px; }

/* ---------- Audit form ---------- */
.audit-form { background: var(--bg-card); padding: 32px; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.06); display: grid; gap: 18px; text-align: left; border: 1px solid var(--border-light); }
.audit-form .field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.audit-form .field-full { grid-column: 1 / -1; }
.audit-form label { display: block; font-weight: 600; font-size: 13px; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.audit-form input, .audit-form select { width: 100%; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; color: var(--text-dark); transition: border-color .15s; }
.audit-form input:focus, .audit-form select:focus { outline: none; border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(10,136,89,0.12); }
.audit-form button { justify-self: stretch; margin-top: 4px; }
.form-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: -4px; }

/* ---------- Scan status ---------- */
.scan-status { background: var(--bg-card); padding: 32px; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.06); margin-top: 24px; border: 1px solid var(--border-light); text-align: left; }
.status-headline { font-weight: 700; font-size: 18px; color: var(--text-dark); margin-bottom: 16px; text-align: center; }
.status-list { list-style: none; }
.status-list li { padding: 10px 0 10px 30px; position: relative; color: var(--text-muted); transition: color .25s; font-weight: 500; }
.status-list li::before { content: '○'; position: absolute; left: 0; font-size: 18px; }
.status-list li.done { color: var(--text-dark); }
.status-list li.done::before { content: '✓'; color: var(--accent-green); font-weight: 700; }

/* ---------- Proof strip ---------- */
.proof { padding: 24px 0 80px; }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 720px; margin: 0 auto; }
.proof-card { background: var(--bg-card); padding: 24px 16px; border-radius: 12px; text-align: center; border: 1px solid var(--border-light); }
.proof-num { font-size: 32px; font-weight: 800; color: var(--text-dark); letter-spacing: -0.02em; }
.proof-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Results page ---------- */
.results-hero { background: var(--bg-hero); color: var(--text-on-dark); padding: 56px 0 40px; }
.results-head { max-width: 720px; }
.results-hero .kicker { background: rgba(255,255,255,0.1); color: #fff; }
.results-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #fff; margin-bottom: 12px; }
.audit-url { color: var(--text-muted-on-dark); font-size: 15px; word-break: break-all; }
.audit-url a { color: var(--text-muted-on-dark); }
.audit-url a:hover { color: #fff; }

.results-body { padding: 40px 0 80px; }

/* ---------- Score grid ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0 40px; }
.score-card { background: var(--bg-card); padding: 24px; border-radius: 14px; border: 1px solid var(--border-light); box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: transform .15s, box-shadow .15s; }
.score-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.score-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.score-card .metric { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mid); }
.score-card .grade { font-size: 48px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.score-card .flag { font-size: 14px; color: var(--text-mid); line-height: 1.5; }
.score-card.grade-A .grade { color: var(--grade-A); }
.score-card.grade-B .grade { color: var(--grade-B); }
.score-card.grade-C .grade { color: var(--grade-C); }
.score-card.grade-D .grade { color: var(--grade-D); }
.score-card.grade-F .grade { color: var(--grade-F); }

/* ---------- Email gate ---------- */
.email-gate { background: var(--bg-hero); color: var(--text-on-dark); padding: 48px; border-radius: 20px; margin: 40px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.email-gate-text h2 { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 12px; color: #fff; }
.email-gate-text p { color: var(--text-muted-on-dark); font-size: 15px; }
.email-gate-form { display: grid; gap: 12px; }
.email-gate-form input { padding: 16px; border: 1px solid var(--border-on-dark); background: rgba(255,255,255,0.06); color: #fff; border-radius: 10px; font-size: 16px; font-family: inherit; }
.email-gate-form input::placeholder { color: rgba(255,255,255,0.5); }
.email-gate-form input:focus { outline: none; border-color: var(--accent-green); background: rgba(255,255,255,0.1); }
.privacy-line { font-size: 12px; color: var(--text-muted-on-dark); text-align: center; margin-top: 4px; }

/* ---------- CTA cluster ---------- */
.cta-cluster { text-align: center; margin: 56px 0; }
.cta-cluster h2 { font-size: 24px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; letter-spacing: -0.01em; }

/* ---------- AdSense slots ---------- */
.adsense-slot { min-height: 100px; background: rgba(0,0,0,0.04); border: 1px dashed rgba(0,0,0,0.18); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 16px 0; }
.adsense-slot span { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0; background: var(--bg-dark); color: var(--text-muted-on-dark); font-size: 14px; }
.site-footer a { color: var(--text-muted-on-dark); }
.site-footer a:hover { color: #fff; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; }

/* ---------- Thanks page ---------- */
.thanks-page { padding: 96px 0; text-align: center; }
.thanks-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(10,136,89,0.1); color: var(--accent-green); font-size: 32px; font-weight: 700; margin-bottom: 20px; }
.thanks-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.thanks-sub { font-size: 17px; color: var(--text-mid); margin-bottom: 24px; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .hero { padding: 48px 0 32px; }
  .audit-form { padding: 24px; }
  .audit-form .field-row { grid-template-columns: 1fr; }
  .email-gate { grid-template-columns: 1fr; padding: 32px; }
  .email-gate-text h2 { font-size: 22px; }
  .results-hero { padding: 32px 0 24px; }
  .header-row .btn-ghost { display: none; }  /* keep header clean on small screens */
  .proof-grid { grid-template-columns: 1fr; }
  .score-card .grade { font-size: 40px; }
}
