/* ══════════════════════════════════════════════════════════════
   FortiNova Design System v2.0
   ══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:           #F7F4EF;
  --surface:      #FFFFFF;
  --surface-soft: #FBF8F3;
  --ink:          #251037;
  --muted:        #685D73;
  --line:         #E7DED2;
  --line-strong:  #D9CCBA;
  --accent:       #C09A45;
  --accent-dark:  #A57E2A;
  --accent-soft:  #F3E9D6;
  --brand:        #221033;
  --success:      #2B7A56;
  --success-soft: #E7F5EE;
  --danger:       #B84A3A;
  --danger-soft:  #FBE6E1;
  --warn:         #92601A;
  --warn-soft:    #FDF3E2;

  --shadow-xs:   0 1px 3px rgba(27,16,40,.06);
  --shadow-sm:   0 2px 8px rgba(27,16,40,.07);
  --shadow:      0 8px 28px rgba(27,16,40,.09);
  --shadow-card: 0 1px 3px rgba(27,16,40,.05), 0 8px 24px rgba(27,16,40,.07);
  --shadow-pop:  0 20px 60px rgba(27,16,40,.2);

  --radius-sm:   8px;
  --radius:      16px;
  --radius-lg:   22px;
  --radius-xl:   26px;
  --radius-full: 9999px;

  --ease:        0.18s ease;

  --header-h:    68px;
  --w-site:      1180px;
  --w-content:   760px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--brand);
}
p { color: var(--muted); }

/* ── Site Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247,244,239,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
}
.header-logo img { height: 30px; width: auto; }

.header-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Layout ──────────────────────────────────────────────────── */
.site-main {
  min-height: calc(100vh - var(--header-h));
  padding: 48px 0 80px;
}

.container {
  max-width: var(--w-site);
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow {
  max-width: var(--w-content);
  margin: 0 auto;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid rgba(217,204,186,.72);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  box-shadow: var(--shadow-card);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  transition: all var(--ease);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--brand);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #D3AA51;
  border-color: #D3AA51;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192,154,69,.3);
}

.btn-secondary {
  background: var(--surface-soft);
  color: var(--brand);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.btn-lg { padding: 17px 36px; font-size: 1.05rem; }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-input {
  width: 100%;
  padding: 15px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-input::placeholder { color: #9B93A6; }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,154,69,.14);
}

.form-stack { display: flex; flex-direction: column; gap: 20px; }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-wrap { margin-bottom: 32px; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

.progress-track {
  height: 5px;
  background: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ── Likert scale (S1) ───────────────────────────────────────── */
.likert-labels {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.77rem;
  color: #978C79;
  margin-bottom: 10px;
  padding: 0 2px;
  line-height: 1.3;
}

.likert-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}

.likert-btn {
  aspect-ratio: 1;
  min-height: 56px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--brand);
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all var(--ease);
}
.likert-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}
.likert-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(192,154,69,.28);
}

/* ── Question card ───────────────────────────────────────────── */
.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.question-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.question-text {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.48;
  color: var(--brand);
  margin-bottom: 28px;
  flex: 1;
}

/* ── Info icon ───────────────────────────────────────────────── */
.info-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
  font-style: italic;
  font-family: Georgia, serif;
  user-select: none;
}
.info-icon:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* ── Point distribution (S2 / S3) ───────────────────────────── */
.dist-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.dist-row {
  display: grid;
  grid-template-columns: 32px 1fr auto 40px 42px 40px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  transition: border-color var(--ease), background var(--ease);
}
.dist-row.has-points {
  border-color: rgba(192,154,69,.4);
  background: var(--surface);
}

.dist-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dist-text {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.45;
}

.dist-ctrl {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--brand);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
  line-height: 1;
  padding-bottom: 1px;
}
.dist-ctrl:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dist-ctrl:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.dist-score {
  width: 42px;
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--brand);
}

/* ── Status bar ──────────────────────────────────────────────── */
.dist-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--ease);
}
.dist-status.neutral { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
.dist-status.ok      { background: var(--success-soft); border-color: rgba(43,122,86,.4); color: var(--success); }
.dist-status.over    { background: var(--danger-soft);  border-color: rgba(184,74,58,.4); color: var(--danger); }

/* ── Modal / Tooltip overlay ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(34,16,51,.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

.modal-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-pop);
  animation: slideUp 0.2s ease;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
}
.modal-close:hover { background: var(--line); color: var(--ink); }

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 10px;
}

.modal-body {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
}

@keyframes fadeIn  { from { opacity: 0; }                            to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0;} to { transform: translateY(0); opacity: 1; } }

/* ── Home: scan cards ────────────────────────────────────────── */
.scan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 44px;
}

.scan-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-sm);
  cursor: default;
}
.scan-card:hover {
  border-color: rgba(192,154,69,.5);
  box-shadow: 0 8px 32px rgba(192,154,69,.14);
  transform: translateY(-3px);
}

.scan-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  width: fit-content;
}
.badge-s1 { background: #FFF0E0; color: #B84A00; }
.badge-s2 { background: #E6F2FF; color: #1A5FAD; }
.badge-s3 { background: #F0E8FF; color: #6B00AD; }

.scan-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--brand); }

.scan-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.scan-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

/* ── Info/uitleg boxes ───────────────────────────────────────── */
.info-box {
  background: var(--accent-soft);
  border: 1px solid rgba(192,154,69,.25);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
}

.info-box-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.scale-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 0.9rem;
}
.scale-list strong { color: var(--accent-dark); font-weight: 700; }
.scale-list span { color: var(--ink); }

.tip-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.tip-list li {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}
.tip-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Page hero ───────────────────────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 8px 0 52px;
}
.page-hero .hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.page-hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Divider & utils ─────────────────────────────────────────── */
.divider { height: 1px; background: var(--line); margin: 28px 0; }
.text-center { text-align: center; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 28px;
  transition: color var(--ease);
}
.back-link:hover { color: var(--ink); }
.back-link::before { content: '←'; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.interim-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

/* ── Scale color chips ───────────────────────────────────────── */
.chip-F  { background: #FFF0EC; color: #C0392B; }
.chip-FL { background: #FFF3E0; color: #CC5500; }
.chip-L  { background: #FFFDE7; color: #BF8000; }
.chip-LE { background: #EAFAF1; color: #1E8449; }
.chip-E  { background: #E0F7FA; color: #00838F; }
.chip-ES { background: #EBF5FB; color: #1565C0; }
.chip-S  { background: #F5EEF8; color: #6C3483; }
.chip-SF { background: #FDEDEC; color: #A93226; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .scan-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 28px 24px; }
  .site-main { padding: 32px 0 60px; }
  .page-hero { padding-bottom: 36px; }
}

@media (max-width: 600px) {
  .likert-grid { gap: 5px; }
  .likert-btn { min-height: 46px; font-size: 0.92rem; }
  .dist-row {
    grid-template-columns: 28px 1fr auto 36px 38px 36px;
    gap: 7px;
    padding: 11px 12px;
  }
  .dist-text { font-size: 0.86rem; }
  .page-hero h1 { font-size: 1.55rem; }
  .card { padding: 22px 18px; }
  .modal-panel { padding: 26px 22px; }
}
