/* ============================================================
   CareerCompass — style.css
   Stack: Bootstrap 5 + custom CSS
   Theme: Dark space / deep indigo with vibrant accents
   ============================================================ */

/* ── Google Fonts already loaded via HTML ── */

:root {
  --bg-deep:       #08090f;
  --bg-card:       #111827;
  --bg-card-2:     #151e2d;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(99,102,241,0.5);
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --accent:        #6366f1;
  --accent-2:      #8b5cf6;
  --accent-glow:   rgba(99,102,241,0.25);
  --gold:          #f59e0b;
  --silver:        #94a3b8;
  --bronze:        #c2874a;
  --success:       #22c55e;
  --danger:        #ef4444;
  --radius-card:   18px;
  --radius-input:  12px;
  --font-head:     'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --shadow-card:   0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(99,102,241,0.15);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* ── Animated background orbs ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 14s ease-in-out infinite;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -200px; left: -150px;
  animation-delay: 0s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -5s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  top: 50%; right: 20%;
  animation-delay: -9s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(30px,-40px) scale(1.05); }
  66%       { transform: translate(-20px,30px) scale(0.95); }
}

/* ── Make all page content sit above orbs ── */
.container, .container-fluid, header, nav, footer { position: relative; z-index: 1; }

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}
.brand-icon { font-size: 1.6rem; }
.brand-name { letter-spacing: -0.02em; }

/* ── Badge pill ── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.3); }
}

/* ── Hero copy ── */
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}
.highlight {
  background: linear-gradient(135deg, #6366f1, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

/* ── Hero stats ── */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ── Form card ── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2.4rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.form-card-header {
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.form-card-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.form-card-header p { color: var(--text-secondary); margin: 0; font-size: 0.9rem; }

/* ── Inputs ── */
.form-group-custom label {
  display: block;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.required { color: #f87171; }
.optional  { color: var(--text-muted); font-weight: 400; }

.input-custom {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input-custom::placeholder { color: var(--text-muted); }
.input-custom:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Age group selection grid ── */
.age-group-grid { display: flex; flex-direction: column; gap: 8px; }

.age-group-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  position: relative;
}
.age-group-card input[type=radio] { display: none; }
.age-group-card:hover {
  border-color: var(--border-hover);
  background: rgba(99,102,241,0.06);
}
.age-group-card.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.agc-body { flex: 1; }
.agc-range { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }
.agc-desc  { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.agc-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  font-size: 0.75rem;
  transition: all .2s;
  flex-shrink: 0;
  margin-top: 2px;
}
.age-group-card.selected .agc-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Buttons ── */
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 28px;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .2s, box-shadow .2s;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
  width: 100%;
  justify-content: center;
}
.btn-start:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.45);
  color: #fff;
}
.btn-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary-action {
  background: rgba(255,255,255,0.07);
  box-shadow: none;
  border: 1px solid var(--border);
  width: auto;
}
.btn-secondary-action:hover { background: rgba(255,255,255,0.12); color:#fff; }

.btn-retake {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.84rem;
  transition: all .2s;
}
.btn-retake:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ── Alerts ── */
.alert-custom {
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

/* ── Footer ── */
.footer-bar {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer-bar a { color: var(--text-muted); }
.footer-bar a:hover { color: var(--accent); }

/* ── Fade-up animation ── */
.fade-up {
  animation: fadeUp .7s cubic-bezier(.4,0,.2,1) both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(28px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ────────────────────────────────────────────────
   TEST PAGE
   ──────────────────────────────────────────────── */
.test-page { background: var(--bg-deep); }

/* Sticky header */
.test-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,9,15,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0 8px;
}
.progress-meta { font-size: 0.82rem; color: var(--text-secondary); }
.progress-track {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width .4s ease;
}

/* Intro banner */
.test-intro-banner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.07));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-card);
  padding: 24px 28px;
}
.tib-icon { font-size: 2.2rem; flex-shrink: 0; }
.tib-track { font-size: 0.78rem; color: #a5b4fc; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.tib-title { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.tib-sub { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

/* Question card */
.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  transition: border-color .2s;
}
.question-card.has-error { border-color: rgba(239,68,68,0.5); }

.q-number { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.q-num-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.q-of-total { font-size: 0.78rem; color: var(--text-muted); }

.q-text {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.45;
}
.q-error-msg { font-size: 0.82rem; color: #f87171; margin-bottom: 10px; }

/* Answers */
.answers-grid { display: flex; flex-direction: column; gap: 8px; }

.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .15s;
}
.answer-option input[type=radio] { display: none; }
.answer-option:hover {
  border-color: var(--border-hover);
  background: rgba(99,102,241,0.06);
  transform: translateX(3px);
}
.answer-option.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.12);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.ao-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all .2s;
}
.answer-option.selected .ao-radio {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}
.ao-text { flex: 1; font-size: 0.92rem; line-height: 1.45; }
.ao-check {
  color: transparent;
  font-size: 0.9rem;
  transition: color .15s;
}
.answer-option.selected .ao-check { color: var(--accent); }

/* Submit section */
.submit-section { padding: 32px 0 20px; }
.submit-note { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 16px; }
.btn-submit { width: auto; min-width: 260px; }

/* ────────────────────────────────────────────────
   RESULTS PAGE
   ──────────────────────────────────────────────── */
.results-page { background: var(--bg-deep); }

/* Hero */
.results-confetti { font-size: 3rem; line-height: 1; margin-bottom: 16px; animation: confettiBounce .6s ease; }
@keyframes confettiBounce { 0%{transform:scale(0) rotate(-20deg)} 70%{transform:scale(1.2) rotate(5deg)} 100%{transform:scale(1) rotate(0)} }

.results-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.results-sub { color: var(--text-secondary); font-size: 1rem; max-width: 520px; margin: 0 auto 16px; }
.results-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
}

/* Result cards */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px 24px;
  height: 100%;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(99,102,241,0.12);
}
.rank-gold   { border-top: 3px solid var(--gold); }
.rank-silver { border-top: 3px solid var(--silver); }
.rank-bronze { border-top: 3px solid var(--bronze); }

.rc-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.rank-gold   .rc-rank-badge { color: var(--gold); }
.rank-silver .rc-rank-badge { color: var(--silver); }
.rank-bronze .rc-rank-badge { color: var(--bronze); }

.rc-icon { font-size: 2.6rem; line-height: 1; }
.rc-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.rc-desc { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.55; margin: 0; }

/* Score bar */
.rc-score-wrap { }
.rc-score-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.rc-score-num { font-weight: 700; color: var(--text-primary); }
.rc-score-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.rc-score-fill {
  height: 100%;
  border-radius: 100px;
  width: 0;
}
.rank-gold   .rc-score-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rank-silver .rc-score-fill { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.rank-bronze .rc-score-fill { background: linear-gradient(90deg, #c2874a, #d97706); }

/* Careers */
.rc-careers-label, .rc-traits-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.rc-careers-list, .rc-traits-list { display: flex; flex-wrap: wrap; gap: 6px; }

.career-tag {
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.77rem;
  white-space: nowrap;
}
.trait-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.76rem;
}

/* Chart */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.chart-sub { color: var(--text-muted); font-size: 0.84rem; margin: 0; }
.chart-legend { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-wrap { position: relative; height: 300px; }

/* Next steps */
.ns-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.ns-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  height: 100%;
  transition: border-color .2s, transform .2s;
}
.ns-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.ns-icon { font-size: 1.8rem; margin-bottom: 10px; }
.ns-card h5 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.ns-card p  { color: var(--text-secondary); font-size: 0.86rem; margin: 0; line-height: 1.55; }

.cta-note { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 12px; }

/* ── Scroll animations for results ── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Print styles ── */
@media print {
  .bg-orbs, .test-header, .btn-retake, .submit-section, footer { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .result-card, .chart-card, .ns-card { break-inside: avoid; border: 1px solid #ddd !important; }
  .highlight { -webkit-text-fill-color: #4f46e5 !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .form-card { padding: 1.6rem; }
  .hero-title { font-size: 2rem; }
  .test-intro-banner { flex-direction: column; gap: 12px; }
  .question-card { padding: 20px 16px; }
  .result-card { padding: 20px 18px; }
  .chart-card { padding: 18px 14px; }
  .hero-stats { gap: 14px; }
}
