/*
 * WebsiteScan — stylesheet
 * @author Bas Martens
 * @date   2026-09-23
 */

:root {
  --brand: #0f766e;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --good: #16a34a;
  --ok: #65a30d;
  --mid: #d97706;
  --bad: #dc2626;
  --info: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e2e8f0;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: #1e293b;
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --card: #111a2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--ink-2); }
.block { padding-top: 56px; padding-bottom: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 600; padding: .7em 1.2em; text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { padding: .9em 1.6em; font-size: 1.05rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.link-btn { background: none; border: 0; color: var(--bad); cursor: pointer; font: inherit; padding: 0; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.logo svg { width: 28px; height: 28px; fill: var(--brand); }
.logo small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); margin-top: -3px; }
.site-header nav { display: flex; align-items: center; gap: 18px; }
.site-header nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0; font-size: .9rem; background: var(--bg-soft); }
.footer-inner p { margin: .3em 0; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 50% -80px, color-mix(in srgb, var(--brand) 16%, transparent), transparent), var(--bg); padding: 72px 0 48px; text-align: center; }
.hero-inner { max-width: 820px; }
.hero .lead { max-width: 640px; margin: 0 auto 28px; }
.scan-form { display: flex; gap: 10px; max-width: 620px; margin: 0 auto; background: var(--card); padding: 8px; border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.scan-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.1rem; padding: .6em .8em; color: var(--ink); outline: none; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 14px; }
.form-error { color: var(--bad); font-weight: 500; margin-top: 12px; }

/* Voortgang */
.progress .steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.progress .steps li { padding: 12px 16px 12px 44px; border: 1px solid var(--line); border-radius: 10px; position: relative; color: var(--muted); background: var(--card); transition: color .3s, border-color .3s; }
.progress .steps li::before { content: ""; position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 2px solid var(--line); }
.progress .steps li.active { color: var(--ink); border-color: var(--brand); }
.progress .steps li.active::before { border-color: var(--brand); border-right-color: transparent; animation: spin .8s linear infinite; }
.progress .steps li.done { color: var(--ink); }
.progress .steps li.done::before { background: var(--brand); border-color: var(--brand); }
.progressbar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progressbar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .6s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scorecirkel */
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--c, var(--brand)); stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label strong { font-size: 2.8rem; line-height: 1; }
.ring-label span { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.g-good { --c: var(--good); }
.g-ok { --c: var(--ok); }
.g-mid { --c: var(--mid); }
.g-bad { --c: var(--bad); }
.g-na { --c: var(--muted); }

/* Resultaat */
.result-head, .report-hero-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.result-head h2 { font-size: 2rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin: 28px 0; }
.cat-grid.compact { display: flex; flex-wrap: wrap; justify-content: center; }
.cat-grid.compact .cat-card { flex: 0 1 160px; min-width: 140px; }
.cat-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 6px 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink); }
.cat-grid.compact .cat-card { grid-template-columns: auto 1fr; }
.cat-grid.compact .cat-score { grid-column: 2; font-size: 1.3rem; }
.cat-grid.compact .cat-title { font-size: .85rem; }
.cat-card .bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.cat-card .bar i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.cat-title { font-weight: 600; }
.cat-score { font-weight: 800; font-size: 1.4rem; color: var(--c); }
.cat-meta { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.cat-meta b { color: var(--bad); font-weight: 600; }
.cat-meta i { color: var(--mid); font-style: normal; font-weight: 600; }
.cat-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); }
.cat-icon svg { width: 20px; height: 20px; fill: var(--c, var(--brand)); }
.cat-icon.big { width: 52px; height: 52px; }
.cat-icon.big svg { width: 26px; height: 26px; }

/* E-mailpoort */
.gate { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px; border-radius: 20px; background: var(--bg-soft); border: 1px solid var(--line); }
.ticks { padding: 0; list-style: none; }
.ticks li { padding-left: 28px; position: relative; margin: 6px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.lead-form { display: grid; gap: 14px; }
.lead-form label { display: grid; gap: 4px; font-weight: 500; font-size: .95rem; }
.lead-form input[type=text], .lead-form input[type=email], .lead-form input[type=tel], .lead-form input[type=password] { font: inherit; padding: .65em .8em; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.lead-form input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.lead-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form small { color: var(--muted); font-weight: 400; }
.check-label { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .88rem !important; color: var(--ink-2); }
.check-label input { margin-top: 4px; }
.hp { position: absolute; left: -9999px; }
.lead-done { align-self: center; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 20px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.feature .cat-icon { margin-bottom: 12px; }
.feature p { color: var(--ink-2); margin: 0; }
.feature.plain { background: var(--bg-soft); }
.cta-block { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; margin-top: 56px; border-radius: 20px; background: var(--brand); color: #fff; }
.cta-block p { margin: 0; opacity: .92; max-width: 640px; }
.cta-block .btn { background: #fff; color: var(--brand); flex: none; }

/* Rapport */
.report-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 40px 0 12px; }
.report-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); word-break: break-word; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.prio { padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: prio; }
.prio li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.category, #progress, #result, #checks { scroll-margin-top: 80px; }
.category-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.category-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: .25em .7em; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.note { background: color-mix(in srgb, var(--info) 10%, transparent); border-left: 3px solid var(--info); padding: 8px 12px; border-radius: 6px; font-size: .92rem; }
.checks { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.check { display: flex; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check h3 { margin-bottom: .2em; font-size: 1rem; }
.check p { margin: 0 0 .4em; color: var(--ink-2); }
.check-body { flex: 1; min-width: 0; }
.details { margin: 6px 0; padding: 10px 14px 10px 30px; background: var(--bg-soft); border-radius: 8px; font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.advice { background: color-mix(in srgb, var(--brand) 8%, transparent); padding: 10px 14px; border-radius: 8px; font-size: .94rem; }
.status { flex: none; display: inline-flex; flex-direction: column; align-items: center; width: 64px; }
.status b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: .9rem; }
.status em { font-style: normal; font-size: .7rem; color: var(--muted); margin-top: 3px; }
.status-pass b { background: var(--good); }
.status-warn b { background: var(--mid); }
.status-fail b { background: var(--bad); }
.status-info b { background: var(--info); }
.disclaimer { font-size: .85rem; margin-top: 24px; }
.admin-bar { padding-top: 12px; }

/* Admin */
.admin-top { display: flex; justify-content: space-between; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stats div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.stats strong { display: block; font-size: 1.6rem; }
.stats span { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 20px 0 0; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

@media (max-width: 760px) {
  .gate { grid-template-columns: 1fr; padding: 20px; }
  .scan-form { flex-direction: column; }
  .lead-form .row { grid-template-columns: 1fr; }
  .cta-block { flex-direction: column; align-items: flex-start; }
  .site-header nav a:not(.btn) { display: none; }
  .check { flex-direction: column; gap: 8px; }
  .status { flex-direction: row; gap: 8px; width: auto; }
  .status em { margin: 0; }
  .result-head, .report-hero-inner { justify-content: center; text-align: center; }
  .report-hero-inner .actions { justify-content: center; }
}

@media print {
  .site-header, .site-footer, .actions, .cta-block, .admin-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .category { break-inside: avoid-page; }
  .check { break-inside: avoid; }
  .report-hero { background: none; }
}
