/* ============================================================
   YourInfoSec.com  --  Design System & Styles
   Cybersecurity Assessment Platform
   v1.0
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Backgrounds */
  --bg:          #0a1628;
  --bg-card:     #111827;
  --bg-surface:  #1a2332;
  --bg-input:    #0f172a;

  /* Borders */
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);

  /* Text */
  --text:           #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  /* Brand */
  --primary:       #3b82f6;
  --primary-hover:  #2563eb;
  --primary-light:  #60a5fa;
  --accent:         #06b6d4;

  /* Semantic */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;

  /* Layout */
  --container:  1100px;
  --header-h:   72px;
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(59,130,246,0.15);
  --shadow-glow-accent: 0 0 20px rgba(6,182,212,0.15);

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;

  --fs-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --fs-sm:   clamp(0.8125rem, 0.775rem + 0.25vw, 0.875rem);
  --fs-base: clamp(0.9375rem, 0.875rem + 0.25vw, 1rem);
  --fs-md:   clamp(1rem, 0.925rem + 0.35vw, 1.125rem);
  --fs-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --fs-xl:   clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --fs-2xl:  clamp(1.5rem, 1.2rem + 1.25vw, 2rem);
  --fs-3xl:  clamp(1.875rem, 1.4rem + 2vw, 2.5rem);
  --fs-4xl:  clamp(2.25rem, 1.6rem + 2.75vw, 3.25rem);
  --fs-5xl:  clamp(2.75rem, 1.8rem + 3.5vw, 4rem);
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary); }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

::selection {
  background: rgba(59,130,246,0.3);
  color: var(--text);
}


/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}

.section--sm {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }


/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--text);
  text-decoration: none;
  z-index: 1010;
}
.header__logo:hover { color: var(--text); }

.header__logo img,
.header__logo svg {
  width: 32px;
  height: 32px;
}

/* Scrolled state: glass effect */
.header--scrolled {
  background: rgba(10,22,40,0.85);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.3);
}

/*
 * CRITICAL: When the mobile nav is open, backdrop-filter on a parent
 * breaks position:fixed on child elements (known CSS bug).
 * Remove backdrop-filter when nav overlay is open.
 */
.header--scrolled:has(.nav.open) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10,22,40,0.98);
}

/* Desktop nav */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}
.nav__link:hover,
.nav__link.active {
  color: var(--text);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1010;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

/* Gradient background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(6,182,212,0.08) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0d1b2e 100%);
  z-index: 0;
}

/* Subtle grid pattern overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  padding-inline: 1.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--accent);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: var(--fs-5xl);
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero__title span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 600px;
  margin-inline: auto;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Glowing shield icon */
.hero__shield {
  width: 80px;
  height: 80px;
  margin-inline: auto;
  margin-bottom: 2rem;
  position: relative;
}
.hero__shield svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 20px rgba(59,130,246,0.4)) drop-shadow(0 0 40px rgba(6,182,212,0.2));
}
.hero__shield::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%);
  animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

/* Sizes */
.btn--sm {
  font-size: var(--fs-xs);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.btn--md,
.btn {
  font-size: var(--fs-sm);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
}

.btn--lg {
  font-size: var(--fs-base);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
}

/* Primary */
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #1d4ed8);
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
  color: #fff;
}

/* Secondary (outline) */
.btn--secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-hover);
}
.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(59,130,246,0.05);
}

/* Ghost */
.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}
.btn--ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

/* Danger */
.btn--danger {
  color: #fff;
  background: var(--danger);
}
.btn--danger:hover {
  background: #dc2626;
}

/* Success */
.btn--success {
  color: #fff;
  background: var(--success);
}
.btn--success:hover {
  background: #059669;
}

/* Block (full-width) */
.btn--block {
  width: 100%;
}

/* Disabled */
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Icon-only button */
.btn--icon {
  padding: 0.6rem;
  border-radius: var(--radius-md);
}
.btn--icon svg {
  width: 18px;
  height: 18px;
}


/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

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

.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Glass variant */
.card--glass {
  background: rgba(17,24,39,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: rgba(59,130,246,0.1);
  color: var(--primary-light);
}
.card__icon svg {
  width: 24px;
  height: 24px;
}

.card__icon--accent {
  background: rgba(6,182,212,0.1);
  color: var(--accent);
}

.card__icon--success {
  background: rgba(16,185,129,0.1);
  color: var(--success);
}

.card__icon--warning {
  background: rgba(245,158,11,0.1);
  color: var(--warning);
}

.card__icon--danger {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
}

.card__title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Large card variant */
.card--lg {
  padding: 2rem;
  border-radius: var(--radius-lg);
}


/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section-header__label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-header__title {
  margin-bottom: 1rem;
}

.section-header__subtitle {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ---------- Form Inputs ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: 0.3rem;
}

.form-input--error {
  border-color: var(--danger);
}
.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}


/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.badge--primary {
  color: var(--primary-light);
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.2);
}

.badge--accent {
  color: var(--accent);
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.2);
}

.badge--success {
  color: var(--success);
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.2);
}

.badge--warning {
  color: var(--warning);
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.2);
}

.badge--danger {
  color: var(--danger);
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.2);
}

.badge--neutral {
  color: var(--text-secondary);
  background: rgba(148,163,184,0.1);
  border: 1px solid rgba(148,163,184,0.15);
}

/* Grade badges (large) */
.badge--grade {
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 0.35rem 0.85rem;
}


/* ---------- Assessment UI: Progress Bar ---------- */
.progress {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress--lg {
  height: 12px;
}

.progress--sm {
  height: 6px;
}

/* Colored variants */
.progress__bar--success { background: linear-gradient(90deg, var(--success), #34d399); }
.progress__bar--warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress__bar--danger  { background: linear-gradient(90deg, var(--danger), #f87171); }
.progress__bar--accent  { background: linear-gradient(90deg, var(--accent), #22d3ee); }

/* Progress info row */
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: var(--fs-sm);
}

.progress-info__label {
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-info__value {
  color: var(--text);
  font-weight: 600;
}


/* ---------- Assessment UI: Question Card ---------- */
.assessment {
  max-width: 760px;
  margin-inline: auto;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 3rem;
  padding-inline: 1.5rem;
}

.assessment__progress-wrapper {
  margin-bottom: 2rem;
}

.assessment__step-label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.assessment__step-label strong {
  color: var(--text);
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  text-align: center;
}

.question-card__category {
  margin-bottom: 1rem;
}

.question-card__title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.question-card__description {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 560px;
  margin-inline: auto;
}


/* ---------- Assessment UI: Option Cards ---------- */
.options-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

/* Selectable tile style -- no radio buttons visible */
.option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition-fast);
  text-align: left;
}

.option-card:hover {
  border-color: var(--border-hover);
  background: rgba(26,35,50,0.8);
}

/* Selected state */
.option-card.selected,
.option-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(59,130,246,0.06);
  box-shadow: 0 0 0 1px var(--primary), 0 0 16px rgba(59,130,246,0.1);
}

/* Hide native radio/checkbox */
.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom indicator circle */
.option-card__indicator {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.option-card.selected .option-card__indicator,
.option-card:has(input:checked) .option-card__indicator {
  border-color: var(--primary);
  background: var(--primary);
}

.option-card__indicator::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform var(--transition-fast);
}

.option-card.selected .option-card__indicator::after,
.option-card:has(input:checked) .option-card__indicator::after {
  transform: scale(1);
}

.option-card__content {
  flex: 1;
  min-width: 0;
}

.option-card__label {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
}

.option-card__hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Focus-visible for keyboard navigation */
.option-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


/* ---------- Assessment UI: Navigation ---------- */
.assessment__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

.assessment__nav--center {
  justify-content: center;
}


/* ---------- Results UI ---------- */
.results {
  max-width: 760px;
  margin-inline: auto;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 3rem;
  padding-inline: 1.5rem;
}

.results__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results__title {
  font-size: var(--fs-3xl);
  margin-bottom: 0.75rem;
}

.results__subtitle {
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

/* Grade circle */
.grade-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 1.5rem;
  position: relative;
  border: 3px solid transparent;
}

.grade-circle__letter {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.grade-circle__score {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  margin-top: 0.25rem;
}

/* Grade colors */
.grade-circle--a {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: rgba(16,185,129,0.3);
  box-shadow: 0 0 30px rgba(16,185,129,0.2);
}
.grade-circle--b {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  border-color: rgba(14,165,233,0.3);
  box-shadow: 0 0 30px rgba(14,165,233,0.2);
}
.grade-circle--c {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border-color: rgba(245,158,11,0.3);
  box-shadow: 0 0 30px rgba(245,158,11,0.2);
}
.grade-circle--d {
  background: linear-gradient(135deg, #ea580c, #f97316);
  border-color: rgba(249,115,22,0.3);
  box-shadow: 0 0 30px rgba(249,115,22,0.2);
}
.grade-circle--f {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border-color: rgba(239,68,68,0.3);
  box-shadow: 0 0 30px rgba(239,68,68,0.2);
}


/* ---------- Results UI: Score Bars ---------- */
.score-bars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.score-bar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.score-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-bar__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.score-bar__value {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}

.score-bar__track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.score-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Score bar colors */
.score-bar__fill--excellent { background: linear-gradient(90deg, #059669, #10b981); }
.score-bar__fill--good      { background: linear-gradient(90deg, #0284c7, #0ea5e9); }
.score-bar__fill--fair      { background: linear-gradient(90deg, #d97706, #f59e0b); }
.score-bar__fill--poor      { background: linear-gradient(90deg, #ea580c, #f97316); }
.score-bar__fill--critical  { background: linear-gradient(90deg, #dc2626, #ef4444); }


/* ---------- Results UI: Recommendation Cards ---------- */
.recommendations {
  margin-bottom: 2.5rem;
}

.recommendations__title {
  font-size: var(--fs-xl);
  font-weight: 700;
  margin-bottom: 1rem;
}

.recommendation-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: border-color var(--transition);
}

.recommendation-card:last-child {
  margin-bottom: 0;
}

.recommendation-card:hover {
  border-color: var(--border-hover);
}

.recommendation-card__priority {
  flex-shrink: 0;
  width: 6px;
  border-radius: 3px;
  align-self: stretch;
}
.recommendation-card__priority--high   { background: var(--danger); }
.recommendation-card__priority--medium { background: var(--warning); }
.recommendation-card__priority--low    { background: var(--success); }

.recommendation-card__content {
  flex: 1;
  min-width: 0;
}

.recommendation-card__title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.recommendation-card__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Share / Actions */
.results__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}


/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  background: var(--bg);
}

.footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer__link {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__link:hover {
  color: var(--text-secondary);
}


/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  flex: 1;
  min-width: 200px;
  line-height: 1.6;
}

.cookie-banner__text a {
  color: var(--primary-light);
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}


/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle entrance for hero content */
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__content > * {
  animation: heroFadeIn 0.7s ease both;
}
.hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.hero__content > *:nth-child(2) { animation-delay: 0.2s; }
.hero__content > *:nth-child(3) { animation-delay: 0.35s; }
.hero__content > *:nth-child(4) { animation-delay: 0.5s; }
.hero__content > *:nth-child(5) { animation-delay: 0.6s; }


/* ---------- Utility Classes ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

.text-primary   { color: var(--primary-light); }
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: 0.5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }
.mb-4  { margin-bottom: 2rem; }
.mb-5  { margin-bottom: 3rem; }

.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }

.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.gap-xl { gap: 2rem; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }


/* ============================================================
   Responsive: Tablet (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Navigation: mobile overlay */
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(10,22,40,0.98);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 1005;
    padding: 2rem;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--text);
  }

  .nav__link::after {
    display: none;
  }

  /* Grid fallbacks */
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-block: calc(var(--header-h) + 3rem) 3rem;
  }

  .hero__shield {
    width: 60px;
    height: 60px;
  }

  /* Assessment */
  .question-card {
    padding: 1.5rem;
  }

  /* Results */
  .grade-circle {
    width: 120px;
    height: 120px;
  }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  /* Cookie banner */
  .cookie-banner__inner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-banner__actions {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   Responsive: Mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
  }

  .btn--lg {
    font-size: var(--fs-sm);
    padding: 0.75rem 1.5rem;
  }

  .question-card {
    padding: 1.25rem;
  }

  .question-card__title {
    font-size: var(--fs-xl);
  }

  .option-card {
    padding: 0.85rem 1rem;
  }

  .assessment__nav {
    flex-direction: column;
  }
  .assessment__nav .btn {
    width: 100%;
  }

  .grade-circle {
    width: 110px;
    height: 110px;
  }

  .results__actions {
    flex-direction: column;
  }
  .results__actions .btn {
    width: 100%;
  }
}


/* ============================================================
   Print
   ============================================================ */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .hamburger { display: none; }

  body {
    background: #fff;
    color: #111;
  }

  .card,
  .question-card,
  .recommendation-card {
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: none;
  }

  .hero { min-height: auto; padding: 2rem 0; }
  .hero::before,
  .hero::after { display: none; }
}
