/* =============================================================
   BJH Design Upgrade — v2 (2026-06-21)
   Stack: custom CSS / Django templates
   Font: Lexend (headings) + Source Sans 3 (body) — Google Fonts
   Style: Premium SaaS + Glassmorphism
   Applies on top of style.css — never removes, only overrides.
   ============================================================= */

/* ── 1. DESIGN TOKENS ────────────────────────────────────────── */
:root {
  /* Typography */
  --font-sans: 'Source Sans 3', 'Avenir Next', 'Segoe UI', sans-serif;
  --font-heading: 'Lexend', 'Avenir Next', 'Segoe UI', sans-serif;

  /* Refined light palette */
  --bg:           #f7faf8;
  --bg-2:         #eef5f2;
  --surface:      rgba(255, 255, 255, 0.82);
  --surface-solid:#ffffff;
  --surface-alt:  #e8f4ee;
  --text:         #0d1f1a;
  --muted:        #4a6359;
  --line:         rgba(15, 118, 110, 0.12);

  /* Refined shadows */
  --shadow:      0 20px 50px rgba(8, 60, 54, 0.12);
  --shadow-soft: 0 8px 28px rgba(8, 60, 54, 0.07);

  /* Radii */
  --radius:    22px;
  --radius-sm: 14px;

  /* Transition speeds */
  --t-fast: 150ms ease;
  --t-base: 200ms ease;
  --t-slow: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg:           #06100d;
  --bg-2:         #0b1a14;
  --surface:      rgba(10, 25, 19, 0.78);
  --surface-solid:#0f2219;
  --surface-alt:  #0e2018;
  --text:         #e2f7ee;
  --muted:        #8abba6;
  --line:         rgba(52, 211, 153, 0.18);
  --shadow:      0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.32);
}

/* ── 2. GLOBAL TYPOGRAPHY ────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.7rem); }

p { line-height: 1.72; }

/* ── 3. BODY BACKGROUND ──────────────────────────────────────── */
body {
  background:
    radial-gradient(900px 500px at -5% -5%, rgba(15, 118, 110, 0.1) 0%, transparent 55%),
    radial-gradient(900px 500px at 105% -5%, rgba(14, 165, 163, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #f9fffe 0%, var(--bg) 30%, var(--bg-2) 100%);
}

[data-theme="dark"] body {
  background:
    radial-gradient(900px 500px at -5% -5%, rgba(52, 211, 153, 0.12) 0%, transparent 55%),
    radial-gradient(900px 500px at 105% -5%, rgba(45, 212, 191, 0.1) 0%, transparent 55%),
    linear-gradient(180deg, #05100d 0%, var(--bg) 30%, var(--bg-2) 100%);
}

/* ── 4. CARDS — premium glassmorphism ────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid rgba(15, 118, 110, 0.11);
  border-radius: var(--radius);
  padding: 1.35rem;
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-base);
}

[data-theme="dark"] .card {
  border-color: rgba(52, 211, 153, 0.14);
}

/* lift — smoother, less aggressive */
.lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.2);
}

[data-theme="dark"] .lift:hover {
  border-color: rgba(52, 211, 153, 0.28);
}

/* ── 5. BUTTONS ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.68rem 1.1rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), opacity var(--t-fast);
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #0f766e 0%, #0ea5a3 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.28);
  border: none;
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.38);
  opacity: 0.96;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--line);
  color: var(--text);
  backdrop-filter: blur(6px);
}

[data-theme="dark"] .btn-ghost {
  background: rgba(16, 50, 40, 0.6);
  border-color: rgba(52, 211, 153, 0.22);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 118, 110, 0.28);
}

[data-theme="dark"] .btn-ghost:hover {
  background: rgba(16, 50, 40, 0.85);
}

/* ── 6. FOCUS STATES — WCAG 2.1 AA ──────────────────────────── */
:focus-visible {
  outline: 2.5px solid #0f766e;
  outline-offset: 3px;
  border-radius: 4px;
}

[data-theme="dark"] :focus-visible {
  outline-color: #34d399;
}

/* ── 7. FORM INPUTS ──────────────────────────────────────────── */
input,
textarea,
select {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  border: 1.5px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  padding: 0.72rem 0.88rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: rgba(10, 28, 22, 0.9);
  border-color: rgba(52, 211, 153, 0.22);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

/* ── 8. HERO SECTION ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(237, 252, 246, 0.9) 100%);
  border-bottom: 1px solid rgba(15, 118, 110, 0.09);
}

[data-theme="dark"] .hero {
  background: linear-gradient(160deg,
    rgba(6, 18, 14, 0.96) 0%,
    rgba(8, 25, 19, 0.94) 100%);
  border-bottom-color: rgba(52, 211, 153, 0.12);
}

/* ── 9. SECTION ALT — consistent across modes ────────────────── */
.section.alt {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .section.alt {
  background: rgba(10, 26, 20, 0.55);
  border-top-color: rgba(52, 211, 153, 0.1);
  border-bottom-color: rgba(52, 211, 153, 0.08);
}

/* ── 10. EYEBROW / BADGE ─────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

[data-theme="dark"] .eyebrow {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
}

/* ── 11. STATS / KPI CARDS ───────────────────────────────────── */
.stat {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .stat {
  background: rgba(12, 32, 24, 0.78);
  border-color: rgba(52, 211, 153, 0.16);
}

/* ── 12. CTA STRIP ───────────────────────────────────────────── */
.cta-row {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .cta-row {
  background: rgba(10, 28, 22, 0.82);
  border-color: rgba(52, 211, 153, 0.16);
}

/* ── 13. FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background:
    radial-gradient(600px 250px at 0% 0%, rgba(14, 165, 163, 0.08), transparent 60%),
    radial-gradient(600px 250px at 100% 0%, rgba(22, 163, 74, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.8), rgba(238,248,244,0.9));
}

[data-theme="dark"] .site-footer {
  background:
    radial-gradient(600px 250px at 0% 0%, rgba(52, 211, 153, 0.07), transparent 60%),
    radial-gradient(600px 250px at 100% 0%, rgba(45, 212, 191, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(6, 16, 12, 0.96), rgba(8, 20, 16, 0.98));
}

/* ── 14. NAVBAR REFINEMENTS ──────────────────────────────────── */
.nb-header {
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
}

.nb-link,
.nb-drop-btn {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
}

/* ── 15. DASHBOARD SHELL ─────────────────────────────────────── */
.mgmt-center-shell {
  background: #f4f7f9;
}

[data-theme="dark"] .mgmt-center-shell {
  background: var(--bg);
}

.mgmt-kpi-card,
.mgmt-metric-card,
.mgmt-topbar,
.mgmt-analytic-panel {
  border-radius: 16px;
  transition: box-shadow var(--t-base);
}

.mgmt-kpi-card:hover,
.mgmt-metric-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}

/* ── 16. MENTOR CARDS ────────────────────────────────────────── */
.mentor-card {
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  border-radius: 18px;
}

.mentor-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(15, 118, 110, 0.2);
}

[data-theme="dark"] .mentor-card:hover {
  border-color: rgba(52, 211, 153, 0.3);
}

/* ── 17. PROGRESS BARS ───────────────────────────────────────── */
.progress-track {
  height: 8px;
  background: rgba(15, 118, 110, 0.1);
  border-radius: 999px;
}

[data-theme="dark"] .progress-track {
  background: rgba(52, 211, 153, 0.15);
}

/* ── 18. ALERTS & MESSAGES ───────────────────────────────────── */
.alert {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.alert-success {
  background: rgba(236, 253, 245, 0.9);
  border-color: rgba(52, 211, 153, 0.4);
  color: #065f46;
}

.alert-info {
  background: rgba(239, 246, 255, 0.9);
  border-color: rgba(96, 165, 250, 0.4);
  color: #1e40af;
}

[data-theme="dark"] .alert-success {
  background: rgba(6, 78, 59, 0.25);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

[data-theme="dark"] .alert-info {
  background: rgba(30, 64, 175, 0.2);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

/* ── 19. SCROLL REVEAL — enhanced ────────────────────────────── */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.js-enabled .reveal-delay-1 { transition-delay: 0.08s; }
.js-enabled .reveal-delay-2 { transition-delay: 0.16s; }
.js-enabled .reveal-delay-3 { transition-delay: 0.24s; }

/* ── 20. SKIP LINK ───────────────────────────────────────────── */
.skip-link {
  font-family: var(--font-sans);
  font-weight: 700;
  background: #0f766e;
  color: #fff;
  border-radius: 0 0 8px 0;
  padding: 0.6rem 1rem;
}

/* ── 21. TABLE REFINEMENTS ───────────────────────────────────── */
.mgmt-table th {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── 22. FILTER BUTTONS ──────────────────────────────────────── */
.filter-btn {
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.filter-btn:hover {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.filter-btn.active {
  background: linear-gradient(135deg, #0f766e, #0ea5a3);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

/* ── 23. CURSOR POINTER on all interactive elements ──────────── */
[role="button"],
label[for],
.option-card,
.starter-chip,
.impact-tab,
.learning-chip,
.filter-btn,
.accordion-trigger,
.feature-dropdown summary,
.nb-drop-btn {
  cursor: pointer;
}

/* ── 24. PREFERS-REDUCED-MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js-enabled .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── 25. RESPONSIVE TOUCH TARGETS ────────────────────────────── */
@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    padding: 0.72rem 1rem;
  }

  .nb-link,
  .nb-drawer-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  input,
  textarea,
  select {
    font-size: 1rem; /* prevent iOS zoom */
    min-height: 44px;
  }
}

/* ── 26. LOADING BUTTON STATE ────────────────────────────────── */
.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── 27. SMOOTH SCROLLBAR TRACK ──────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(15, 118, 110, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 118, 110, 0.38);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.2);
}

/* ── 28. SELECTION COLOR ─────────────────────────────────────── */
::selection {
  background: rgba(15, 118, 110, 0.2);
  color: var(--text);
}

[data-theme="dark"] ::selection {
  background: rgba(52, 211, 153, 0.25);
}
