/**
 * ════════════════════════════════════════════════════════════════════
 * SKILLFORGE — Design System
 * ════════════════════════════════════════════════════════════════════
 * Typography: Outfit (headings) + Plus Jakarta Sans (body)
 * Palette: Deep Navy + Emerald + Warm Neutrals
 */

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

/* ── CSS Variables ────────────────────────────────────────────── */

:root {
  /* Primary palette */
  --sf-navy:        #0B1D3A;
  --sf-navy-deep:   #06111F;
  --sf-navy-light:  #122B50;
  --sf-emerald:     #00B37E;
  --sf-emerald-dk:  #009668;
  --sf-emerald-lt:  #1ADBA1;
  --sf-emerald-bg:  rgba(0, 179, 126, 0.08);

  /* Neutrals */
  --sf-white:       #FFFFFF;
  --sf-gray-50:     #F8FAFB;
  --sf-gray-100:    #F0F3F5;
  --sf-gray-200:    #E2E7EB;
  --sf-gray-300:    #C8D0D8;
  --sf-gray-400:    #95A1AD;
  --sf-gray-500:    #6B7A8A;
  --sf-gray-600:    #4A5568;
  --sf-gray-700:    #2D3748;
  --sf-gray-800:    #1A202C;
  --sf-gray-900:    #0F1419;

  /* Feedback */
  --sf-red:         #E53E3E;
  --sf-red-bg:      rgba(229, 62, 62, 0.08);
  --sf-orange:      #ED8936;
  --sf-yellow:      #ECC94B;
  --sf-blue:        #3182CE;
  --sf-blue-bg:     rgba(49, 130, 206, 0.08);

  /* Shadows */
  --sf-shadow-sm:   0 1px 3px rgba(11, 29, 58, 0.06), 0 1px 2px rgba(11, 29, 58, 0.04);
  --sf-shadow-md:   0 4px 16px rgba(11, 29, 58, 0.08), 0 2px 4px rgba(11, 29, 58, 0.04);
  --sf-shadow-lg:   0 12px 40px rgba(11, 29, 58, 0.12), 0 4px 8px rgba(11, 29, 58, 0.06);
  --sf-shadow-xl:   0 24px 64px rgba(11, 29, 58, 0.16);

  /* Radius */
  --sf-radius-sm:   8px;
  --sf-radius-md:   12px;
  --sf-radius-lg:   16px;
  --sf-radius-xl:   24px;
  --sf-radius-full: 9999px;

  /* Transitions */
  --sf-ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --sf-duration:    250ms;

  /* Font */
  --sf-font-heading: 'Outfit', sans-serif;
  --sf-font-body:    'Plus Jakarta Sans', sans-serif;
}

/* ── Reset ────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--sf-font-body);
  color: var(--sf-gray-700);
  background: var(--sf-white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--sf-emerald); text-decoration: none; transition: color var(--sf-duration) var(--sf-ease); }
a:hover { color: var(--sf-emerald-dk); }
img { max-width: 100%; display: block; }
button { font-family: var(--sf-font-body); }

/* ── Container ────────────────────────────────────────────────── */

.sf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ───────────────────────────────────────────────────── */

.sf-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--sf-duration) var(--sf-ease);
  padding: 0 24px;
}

.sf-navbar-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--sf-gray-200);
  box-shadow: var(--sf-shadow-sm);
}

.sf-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.sf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sf-font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--sf-navy);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.sf-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--sf-emerald), var(--sf-emerald-lt));
  border-radius: var(--sf-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 16px;
}

.sf-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.sf-nav-links a {
  padding: 8px 16px;
  color: var(--sf-gray-600);
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--sf-radius-sm);
  transition: all var(--sf-duration) var(--sf-ease);
  text-decoration: none;
}

.sf-nav-links a:hover {
  color: var(--sf-navy);
  background: var(--sf-gray-100);
}

/* ── Buttons ──────────────────────────────────────────────────── */

.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--sf-radius-sm);
  font-family: var(--sf-font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--sf-duration) var(--sf-ease);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.sf-btn-primary {
  background: var(--sf-emerald);
  color: var(--sf-white);
  box-shadow: 0 2px 8px rgba(0, 179, 126, 0.25);
}
.sf-btn-primary:hover {
  background: var(--sf-emerald-dk);
  color: var(--sf-white);
  box-shadow: 0 4px 16px rgba(0, 179, 126, 0.35);
  transform: translateY(-1px);
}

.sf-btn-secondary {
  background: var(--sf-white);
  color: var(--sf-navy);
  border: 1.5px solid var(--sf-gray-200);
}
.sf-btn-secondary:hover {
  border-color: var(--sf-gray-300);
  background: var(--sf-gray-50);
  color: var(--sf-navy);
}

.sf-btn-navy {
  background: var(--sf-navy);
  color: var(--sf-white);
}
.sf-btn-navy:hover {
  background: var(--sf-navy-light);
  color: var(--sf-white);
  transform: translateY(-1px);
}

.sf-btn-ghost {
  background: transparent;
  color: var(--sf-gray-600);
  padding: 8px 16px;
}
.sf-btn-ghost:hover { color: var(--sf-navy); background: var(--sf-gray-100); }

.sf-btn-danger { background: var(--sf-red); color: white; }
.sf-btn-danger:hover { background: #c53030; color: white; }

.sf-btn-sm { padding: 8px 18px; font-size: 14px; }
.sf-btn-lg { padding: 16px 36px; font-size: 17px; }
.sf-btn-full { width: 100%; }

.sf-btn:disabled, .sf-btn-loading {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Spinner ──────────────────────────────────────────────────── */

.sf-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: sfSpin 0.6s linear infinite;
}

@keyframes sfSpin {
  to { transform: rotate(360deg); }
}

/* ── Mobile Nav ───────────────────────────────────────────────── */

.sf-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--sf-navy);
}

.sf-mobile-toggle svg { display: block; }

@media (max-width: 768px) {
  .sf-mobile-toggle { display: block; }

  .sf-nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--sf-white);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--sf-gray-200);
    box-shadow: var(--sf-shadow-lg);
    transform: translateY(-110%);
    opacity: 0;
    transition: all 300ms var(--sf-ease);
    pointer-events: none;
  }

  .sf-nav-links.sf-nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sf-nav-links a {
    display: block;
    padding: 12px 16px;
    font-size: 16px;
  }

  .sf-nav-links .sf-btn {
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
}

/* ── Hero ─────────────────────────────────────────────────────── */

.sf-hero {
  padding: 160px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(175deg, var(--sf-gray-50) 0%, var(--sf-white) 50%, var(--sf-emerald-bg) 100%);
}

.sf-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 179, 126, 0.06), transparent 70%);
  border-radius: 50%;
}

.sf-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--sf-emerald-bg);
  color: var(--sf-emerald-dk);
  border-radius: var(--sf-radius-full);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 28px;
  border: 1px solid rgba(0, 179, 126, 0.15);
}

.sf-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.sf-hero h1 span {
  background: linear-gradient(135deg, var(--sf-emerald), var(--sf-emerald-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sf-hero p {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--sf-gray-500);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.sf-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section ──────────────────────────────────────────────────── */

.sf-section {
  padding: 100px 24px;
}

.sf-section-alt {
  background: var(--sf-gray-50);
}

.sf-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.sf-section-header h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.sf-section-header p {
  font-size: 18px;
  color: var(--sf-gray-500);
}

.sf-section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sf-emerald);
  margin-bottom: 12px;
}

/* ── Feature Cards ────────────────────────────────────────────── */

.sf-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.sf-feature-card {
  padding: 36px 32px;
  background: var(--sf-white);
  border: 1px solid var(--sf-gray-200);
  border-radius: var(--sf-radius-lg);
  transition: all var(--sf-duration) var(--sf-ease);
}

.sf-feature-card:hover {
  border-color: var(--sf-emerald);
  box-shadow: var(--sf-shadow-md);
  transform: translateY(-4px);
}

.sf-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--sf-radius-md);
  background: var(--sf-emerald-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--sf-emerald);
}

.sf-feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.sf-feature-card p {
  font-size: 15px;
  color: var(--sf-gray-500);
  line-height: 1.7;
}

/* ── Steps / How It Works ─────────────────────────────────────── */

.sf-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
  counter-reset: step;
}

.sf-step {
  text-align: center;
  counter-increment: step;
}

.sf-step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sf-navy);
  color: var(--sf-white);
  font-family: var(--sf-font-heading);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.sf-step h3 { font-size: 19px; margin-bottom: 8px; }
.sf-step p { font-size: 15px; color: var(--sf-gray-500); }

/* ── CTA Banner ───────────────────────────────────────────────── */

.sf-cta-banner {
  background: var(--sf-navy);
  padding: 80px 24px;
  text-align: center;
  color: white;
  border-radius: var(--sf-radius-xl);
  max-width: 1100px;
  margin: 0 auto;
}

.sf-cta-banner h2 {
  color: white;
  font-size: clamp(26px, 3vw, 38px);
  margin-bottom: 16px;
}

.sf-cta-banner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer ───────────────────────────────────────────────────── */

.sf-footer {
  padding: 60px 24px 40px;
  background: var(--sf-navy-deep);
  color: rgba(255, 255, 255, 0.6);
}

.sf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.sf-footer-brand { max-width: 320px; }
.sf-footer-brand .sf-logo { color: white; margin-bottom: 14px; }
.sf-footer-brand p { font-size: 14px; line-height: 1.7; }

.sf-footer-col h4 {
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.sf-footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--sf-duration);
}

.sf-footer-col a:hover { color: var(--sf-emerald); }

.sf-footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

/* ── Messages ─────────────────────────────────────────────────── */

.sf-message {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--sf-radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
}

.sf-message-success { background: rgba(0, 179, 126, 0.08); color: var(--sf-emerald-dk); border: 1px solid rgba(0, 179, 126, 0.15); }
.sf-message-error   { background: var(--sf-red-bg);          color: var(--sf-red);        border: 1px solid rgba(229, 62, 62, 0.15); }
.sf-message-info    { background: var(--sf-blue-bg);         color: var(--sf-blue);       border: 1px solid rgba(49, 130, 206, 0.15); }

/* ── Toast ────────────────────────────────────────────────────── */

.sf-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.sf-toast {
  background: var(--sf-white);
  border: 1px solid var(--sf-gray-200);
  border-radius: var(--sf-radius-md);
  padding: 14px 18px;
  box-shadow: var(--sf-shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 300ms var(--sf-ease);
  font-size: 14px;
}

.sf-toast-show { transform: translateX(0); opacity: 1; }
.sf-toast-body { display: flex; align-items: center; gap: 10px; }
.sf-toast-icon { flex-shrink: 0; }
.sf-toast-close { background: none; border: none; font-size: 20px; color: var(--sf-gray-400); cursor: pointer; padding: 0 4px; }

.sf-toast-success { border-left: 4px solid var(--sf-emerald); }
.sf-toast-success .sf-toast-icon { color: var(--sf-emerald); }
.sf-toast-error { border-left: 4px solid var(--sf-red); }
.sf-toast-error .sf-toast-icon { color: var(--sf-red); }
.sf-toast-info { border-left: 4px solid var(--sf-blue); }
.sf-toast-info .sf-toast-icon { color: var(--sf-blue); }

/* ── Global Loader ────────────────────────────────────────────── */

.sf-global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.sf-global-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sf-gray-200);
  border-top-color: var(--sf-emerald);
  border-radius: 50%;
  animation: sfSpin 0.7s linear infinite;
}

/* Page loader (for protected pages during auth check) */
.sf-page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 16px;
  color: var(--sf-gray-400);
  font-size: 14px;
}

/* ── Scroll Animations ────────────────────────────────────────── */

.sf-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--sf-ease), transform 600ms var(--sf-ease);
}

.sf-animate.sf-visible {
  opacity: 1;
  transform: translateY(0);
}

.sf-animate-delay-1 { transition-delay: 100ms; }
.sf-animate-delay-2 { transition-delay: 200ms; }
.sf-animate-delay-3 { transition-delay: 300ms; }

/* ── Utility ──────────────────────────────────────────────────── */

.sf-text-center { text-align: center; }
.sf-mt-4 { margin-top: 16px; }
.sf-mt-8 { margin-top: 32px; }
.sf-mb-4 { margin-top: 16px; }
.sf-hidden { display: none !important; }
