/* ========== CRCYBER — Cyber Risk Assessment ========== */
/* Dark brand theme. Accent colour is a single variable (--accent) — */
/* adjust it to your exact brand hex if needed.                       */

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Brand surfaces (dark) */
  --bg:          #0A0D14;   /* page background */
  --bg-elev:     #10151F;   /* elevated band */
  --bg-card:     #141A24;   /* cards */
  --bg-card-2:   #1C2433;   /* inputs / nested */
  --navy:        #0B1018;   /* near-black — topbar, hero */
  --navy-dark:   #05080E;

  /* Accent — CRCYBER highlight. Change here to match brand exactly. */
  --accent:      #21C7DE;   /* primary accent (cyan) */
  --accent-2:    #17A7BC;   /* accent hover/darker */
  --accent-soft: rgba(33, 199, 222, 0.14);

  /* Text */
  --text:        #EAF0F6;
  --text-muted:  #93A1B2;
  --text-faint:  #6B7888;

  /* Lines */
  --border:      #2A3444;
  --border-light:#1F2835;

  /* Status (RAG) — tuned for dark backgrounds */
  --green:       #3FB950;
  --amber:       #E3A53B;
  --red:         #F0594A;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.55);
  --radius: 10px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.narrow    { max-width: 720px; }

/* ========== Top Bar ========== */
.topbar {
  background: var(--navy);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
}
.topbar .container { display: flex; align-items: center; }
.topbar .brand {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none; color: #fff;
}
.topbar .brand-mark {
  height: 38px; width: auto; display: block; flex-shrink: 0;
}
.topbar .brand-tag {
  font-weight: 400; font-size: 12px; color: var(--text-faint);
  padding-left: 14px; border-left: 1px solid var(--border);
  letter-spacing: 0.4px;
}
@media (max-width: 520px) {
  .topbar .brand-mark { height: 32px; }
  .topbar .brand-tag { display: none; }
}

/* ========== Hero ========== */
.hero {
  background:
    radial-gradient(900px 380px at 75% -10%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  padding: 72px 0 96px;
  text-align: center;
}
.hero .kicker {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: 1.4px; color: var(--accent);
  text-transform: uppercase; margin-bottom: 16px;
}
.hero h1 {
  font-size: 39px; font-weight: 800; margin-bottom: 14px;
  line-height: 1.14; letter-spacing: -0.5px;
}
.hero p { font-size: 17px; color: var(--text-muted); max-width: 620px; margin: 0 auto; }

/* ========== Cards & Choices ========== */
.choices {
  margin-top: -56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px;
}
@media (max-width: 700px) { .choices { grid-template-columns: 1fr; } }

.choice-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.choice-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.choice-card .tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px; border-radius: 12px;
  margin-bottom: 14px; width: fit-content;
}
.choice-card h2 { font-size: 22px; color: var(--text); margin-bottom: 10px; }
.choice-card p  { color: var(--text-muted); font-size: 14.5px; flex: 1; }
.choice-card .meta {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-muted);
}
.choice-card .meta b { color: var(--text); }
.choice-card .arrow { color: var(--accent); font-weight: 700; }

/* ========== Sub-choice ========== */
.subchoice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px; margin-bottom: 50px;
  box-shadow: var(--shadow-sm);
}
.subchoice h3 { color: var(--text); margin-bottom: 6px; font-size: 17px; }
.subchoice > p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.subchoice-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .subchoice-options { grid-template-columns: 1fr; } }
.subchoice-option {
  border: 2px solid var(--border-light);
  border-radius: 8px; padding: 18px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s;
  display: block; cursor: pointer;
}
.subchoice-option:hover { border-color: var(--accent); background: var(--bg-card-2); }
.subchoice-option h4 { color: var(--text); margin-bottom: 6px; font-size: 16px; }
.subchoice-option p  { color: var(--text-muted); font-size: 13.5px; }
.subchoice-option .time {
  display: inline-block; margin-top: 10px; font-size: 12px;
  font-weight: 700; color: var(--accent);
}

/* ========== Info panel ========== */
.info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px; margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}
.info-panel h3 { color: var(--text); margin-bottom: 10px; font-size: 16px; }
.info-panel ul { color: var(--text-muted); font-size: 14px; padding-left: 20px; line-height: 1.85; }
.info-panel li::marker { color: var(--accent); }

/* ========== Form / Questionnaire ========== */
.page-head { padding: 40px 0 28px; }
.page-head h1 { color: var(--text); font-size: 26px; margin-bottom: 6px; }
.page-head .crumb {
  font-size: 12px; font-weight: 700; letter-spacing: 0.9px;
  color: var(--accent); margin-bottom: 6px; text-transform: uppercase;
}
.page-head p { color: var(--text-muted); max-width: 720px; }
.page-head .back-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-muted); text-decoration: none;
  margin-bottom: 14px; transition: color 0.12s;
}
.page-head .back-link:hover { color: var(--accent); }

.progress-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 24, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
}
.progress-bar .container { display: flex; align-items: center; gap: 16px; }
.progress-track {
  flex: 1; height: 6px; background: var(--bg-card-2);
  border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--accent);
  width: 0%; transition: width 0.3s ease;
}
.progress-text { font-size: 13px; color: var(--text-muted); font-weight: 600; min-width: 110px; text-align: right; }

.contact-card, .section-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 26px; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.section-card h2 { color: var(--text); font-size: 18px; margin-bottom: 4px; }
.section-card h2 .sec-num { color: var(--accent); }
.section-card .section-intro { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--text); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-card-2); font-family: inherit; color: var(--text);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select option { background: var(--bg-card-2); color: var(--text); }
.field textarea { resize: vertical; min-height: 70px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.field.required label::after { content: " *"; color: var(--accent); }

/* ========== Questions ========== */
.question { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.question:last-child { border-bottom: none; }
.question-text { font-size: 15px; color: var(--text); margin-bottom: 10px; font-weight: 500; }

.answer-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.answer-option {
  flex: 1; min-width: 90px;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card-2);
  color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.12s; text-align: center;
}
.answer-option:hover { border-color: var(--accent); color: var(--text); }
.answer-option.selected {
  border-color: var(--green); background: var(--green); color: #062E13;
}
.answer-option.selected.no     { border-color: var(--red);   background: var(--red);   color: #2A0906; }
.answer-option.selected.unsure { border-color: var(--amber); background: var(--amber); color: #2A1C04; }

/* For invert questions (e.g. "have you had a breach?"), Yes is the bad answer
   and No is the good one — swap the colours so the visual feedback matches. */
.question[data-invert="true"] .answer-option.selected {
  border-color: var(--red); background: var(--red); color: #2A0906;
}
.question[data-invert="true"] .answer-option.selected.no {
  border-color: var(--green); background: var(--green); color: #062E13;
}

.note-field {
  width: 100%; padding: 8px 10px; font-size: 13.5px;
  border: 1px solid var(--border-light); border-radius: 6px;
  background: var(--bg-card-2); color: var(--text);
  font-family: inherit; resize: vertical; min-height: 36px;
}
.note-field::placeholder { color: var(--text-faint); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; font-size: 15px; font-weight: 700;
  border-radius: 6px; border: none; cursor: pointer;
  text-decoration: none; transition: all 0.12s; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #04222A; }
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:disabled { background: #3A4756; color: var(--text-faint); cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-large { padding: 14px 32px; font-size: 16px; }

.actions { display: flex; gap: 12px; justify-content: space-between; padding: 30px 0 50px; }
.actions .btn { min-width: 160px; justify-content: center; }
@media (max-width: 600px) {
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
}

/* ========== Captcha ========== */
.captcha-wrap { display: flex; justify-content: center; margin: 12px 0 8px; }

/* ========== Banner / Alert ========== */
.banner {
  background: rgba(227, 165, 59, 0.12);
  border: 1px solid rgba(227, 165, 59, 0.4);
  border-left: 4px solid var(--amber);
  border-radius: 6px; padding: 14px 16px; margin-bottom: 18px;
  font-size: 14px; color: #F2C879;
}
.banner.error {
  background: rgba(240, 89, 74, 0.12);
  border-color: rgba(240, 89, 74, 0.4);
  border-left-color: var(--red); color: #F4998E;
}
.banner.success {
  background: rgba(63, 185, 80, 0.12);
  border-color: rgba(63, 185, 80, 0.4);
  border-left-color: var(--green); color: #84D58F;
}

/* ========== Loading overlay ========== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(5, 8, 14, 0.88);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.overlay.active { display: flex; }
.overlay-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 40px 50px; border-radius: var(--radius);
  text-align: center; max-width: 360px;
}
.overlay-content h3 { color: var(--text); margin-bottom: 8px; }
.overlay-content p  { color: var(--text-muted); font-size: 14px; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid var(--bg-card-2);
  border-top-color: var(--accent);
  border-radius: 50%; margin: 0 auto 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Thank-you page ========== */
.thanks { text-align: center; padding: 80px 20px; max-width: 600px; margin: 0 auto; }
.thanks .icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  background: var(--accent-soft); border: 2px solid var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 38px;
}
.thanks h1 { color: var(--text); font-size: 30px; margin-bottom: 14px; }
.thanks p  { color: var(--text-muted); font-size: 16px; margin-bottom: 8px; }
.thanks p b { color: var(--text); }

/* ========== Footer ========== */
.footer {
  padding: 40px 0;
  color: var(--text-muted); font-size: 13px;
  border-top: 1px solid var(--border-light);
  margin-top: 40px; background: var(--navy-dark);
}
.footer .container { text-align: center; }
.footer .foot-contact {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer .foot-contact span { color: var(--text); }
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .foot-fine { color: var(--text-faint); font-size: 12px; margin-top: 6px; }

/* ========== Misc ========== */
.hidden { display: none !important; }
.spacer-md { height: 30px; }

/* ========== Domain Health Check ========== */
.scan-status {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 8px;
}
.scan-status .mini-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.scan-status.success { color: var(--green); border-color: rgba(63,185,80,0.4); }
.scan-status.error   { color: var(--red);   border-color: rgba(240,89,74,0.4); }

.scan-results { margin-top: 14px; }
.scan-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.scan-summary .tile {
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  text-align: center;
}
.scan-summary .tile .num {
  font-size: 22px; font-weight: 700; color: var(--text);
  display: block; line-height: 1;
}
.scan-summary .tile .lbl {
  font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.6px; text-transform: uppercase; margin-top: 4px;
  display: block;
}
.scan-summary .tile.pass .num { color: var(--green); }
.scan-summary .tile.warn .num { color: var(--amber); }
.scan-summary .tile.fail .num { color: var(--red); }
.scan-summary .tile.info .num { color: var(--accent); }
@media (max-width: 600px) { .scan-summary { grid-template-columns: repeat(2, 1fr); } }

.scan-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--accent); text-transform: uppercase;
  margin: 16px 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.scan-cat:first-child { margin-top: 0; }

.scan-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.scan-item:last-child { border-bottom: none; }
.scan-item .icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.scan-item.pass .icon { background: rgba(63,185,80,0.18);  color: var(--green); }
.scan-item.warn .icon { background: rgba(227,165,59,0.18); color: var(--amber); }
.scan-item.fail .icon { background: rgba(240,89,74,0.18);  color: var(--red); }
.scan-item.info .icon { background: var(--accent-soft);    color: var(--accent); }

.scan-item .title { font-size: 14px; font-weight: 600; color: var(--text); }
.scan-item .evidence {
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px;
  font-family: -apple-system, "SF Mono", Menlo, monospace;
  word-break: break-word;
}
.scan-item .rec {
  font-size: 12.5px; color: var(--text-muted);
  margin-top: 4px; line-height: 1.5;
}
