/* ULF Academy — Design System V2 */

/* ============================================================
   IMPORTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Backgrounds */
  --bg:          #0f172a;
  --bg-secondary:#111827;
  --bg-card:     #1e293b;
  --bg-card-alt: #162032;
  --bg-glass:    rgba(255,255,255,0.04);
  --bg-glass-hov:rgba(255,255,255,0.07);

  /* Accents */
  --blue:        #2563eb;
  --blue-light:  #3b82f6;
  --blue-dim:    rgba(37,99,235,0.15);
  --teal:        #14b8a6;
  --teal-dim:    rgba(20,184,166,0.15);

  /* Status */
  --success:     #22c55e;
  --success-dim: rgba(34,197,94,0.15);
  --warning:     #f59e0b;
  --warning-dim: rgba(245,158,11,0.15);
  --danger:      #ef4444;
  --danger-dim:  rgba(239,68,68,0.15);

  /* Text */
  --text:        #f8fafc;
  --text-muted:  #94a3b8;
  --text-dim:    #64748b;

  /* Borders */
  --border:      rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);

  /* Radii */
  --r-sm:  8px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Shadows */
  --shadow:    0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --glow-blue: 0 0 24px rgba(37,99,235,0.25);

  /* Gradients */
  --grad-blue:  linear-gradient(135deg,#1d4ed8 0%,#2563eb 50%,#3b82f6 100%);
  --grad-hero:  linear-gradient(160deg,#0f172a 0%,#0d1f3c 40%,#0f2a4a 100%);
  --grad-card:  linear-gradient(145deg,#1e293b 0%,#162032 100%);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

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

/* ============================================================
   TOPNAV
   ============================================================ */
.topnav {
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  text-decoration: none;
  display: flex; align-items: center;
}
.brand img {
  height: 36px;
  width: auto;
  display: block;
}
.topnav-actions { display: flex; align-items: center; gap: 8px; }
.topnav-actions a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.topnav-actions a:hover { color: var(--text); background: var(--bg-glass); }
.btn-nav {
  background: var(--blue) !important;
  color: var(--text) !important;
  padding: 8px 20px !important;
  border-radius: var(--r-sm) !important;
  font-weight: 600 !important;
  transition: background 0.2s, box-shadow 0.2s !important;
}
.btn-nav:hover { background: var(--blue-light) !important; box-shadow: var(--glow-blue) !important; }

/* ============================================================
   MAIN + FOOTER
   ============================================================ */
.main-content { min-height: calc(100vh - 130px); }

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
}
.site-footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--text); }
.footer-inner p + p { margin-top: 8px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer;
  border: none; transition: all 0.2s;
  line-height: 1; letter-spacing: -0.01em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(37,99,235,0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-glass-hov);
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}
.btn-success {
  background: linear-gradient(135deg,#16a34a,#22c55e);
  color: #fff;
  box-shadow: 0 2px 12px rgba(34,197,94,0.25);
}
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; }
.btn-danger:hover  { filter: brightness(1.1); }
.btn-teal {
  background: linear-gradient(135deg,#0d9488,#14b8a6);
  color: #fff;
  box-shadow: 0 2px 12px rgba(20,184,166,0.25);
}
.btn-teal:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-lg { padding: 16px 40px; font-size: 17px; border-radius: var(--r); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-xs { padding: 5px 12px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card-header {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: inherit; font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.18);
  background: rgba(255,255,255,0.06);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input[type=checkbox] {
  width: 18px; height: 18px;
  margin-top: 2px; flex-shrink: 0;
  accent-color: var(--blue);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-dim); color: #86efac; border-color: rgba(34,197,94,0.25); }
.alert-error   { background: var(--danger-dim);  color: #fca5a5; border-color: rgba(239,68,68,0.25); }
.alert-info    { background: var(--blue-dim);    color: #93c5fd; border-color: rgba(37,99,235,0.25); }
.alert-warning { background: var(--warning-dim); color: #fcd34d; border-color: rgba(245,158,11,0.25); }

/* ============================================================
   CONTAINERS
   ============================================================ */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 620px;  margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 860px;  margin: 0 auto; padding: 0 24px; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  background: linear-gradient(160deg, #0f172a 0%, #0d1f3c 60%, #0f2a4a 100%);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 48px 24px 44px;
  text-align: center;
}
.page-header h1 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 8px; }
.page-header p  { color: var(--text-muted); font-size: 15px; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  background: rgba(255,255,255,0.07);
  border-radius: 999px; height: 8px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--teal) 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-success { background: var(--success-dim); color: #86efac; }
.badge-warning { background: var(--warning-dim); color: #fcd34d; }
.badge-blue    { background: var(--blue-dim);    color: #93c5fd; }
.badge-teal    { background: var(--teal-dim);    color: #5eead4; }
.badge-gray    { background: rgba(255,255,255,0.07); color: var(--text-muted); }
.badge-danger  { background: var(--danger-dim);  color: #fca5a5; }

/* ============================================================
   LESSON GRID (Dashboard)
   ============================================================ */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.lesson-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  cursor: default;
}
.lesson-card:not(.locked):hover {
  border-color: rgba(37,99,235,0.4);
  background: rgba(37,99,235,0.06);
  transform: translateY(-1px);
}
.lesson-card.locked { opacity: 0.4; pointer-events: none; }
.lesson-card.completed { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.04); }
.lesson-card .lesson-num {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim); margin-bottom: 5px;
}
.lesson-card .lesson-title {
  font-size: 14px; font-weight: 600;
  color: var(--text); line-height: 1.3;
  margin-bottom: 10px;
}
.lesson-card .lesson-status { font-size: 12px; }

/* ============================================================
   QUIZ / EXAM QUESTIONS
   ============================================================ */
.quiz-question {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
}
.quiz-question .q-text {
  font-size: 16px; font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.5;
}
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 8px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text-muted);
}
.quiz-option:hover { border-color: rgba(37,99,235,0.5); background: var(--blue-dim); color: var(--text); }
.quiz-option input[type=radio] { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }
.quiz-option.selected { border-color: var(--blue); background: var(--blue-dim); color: var(--text); }
.quiz-option.correct   { border-color: var(--success); background: var(--success-dim); color: #86efac; }
.quiz-option.incorrect { border-color: var(--danger);  background: var(--danger-dim);  color: #fca5a5; }

/* ============================================================
   DASHBOARD STAT BOXES
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-box {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-box:hover { border-color: rgba(37,99,235,0.3); transform: translateY(-2px); }
.stat-box .stat-value {
  font-size: 40px; font-weight: 800;
  background: var(--grad-blue);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1; margin-bottom: 8px;
}
.stat-box .stat-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ============================================================
   ADMIN TABLE
   ============================================================ */
.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.admin-table th {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 13px 16px; font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-glass); }

/* ============================================================
   SIDEBAR LAYOUT (Student lessons etc.)
   ============================================================ */
.sidebar-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}
@media (max-width: 768px) { .sidebar-layout { grid-template-columns: 1fr; } }
.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  align-self: start;
}
.sidebar a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.sidebar a:hover, .sidebar a.active {
  background: var(--blue-dim);
  color: #93c5fd;
}
.sidebar .sidebar-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 14px 12px 5px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--grad-hero);
  color: var(--text);
  padding: 120px 24px 100px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 62px);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--blue-light); }
.hero p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 580px; margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-price { font-size: 13px; color: var(--text-dim); margin-top: 14px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 88px 0; }
.section-alt  { background: var(--bg-secondary); }
.section-dark { background: var(--bg); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--text);
}
.section-header p {
  color: var(--text-muted);
  font-size: 17px; margin-top: 12px;
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.section-header .eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--blue-light);
  background: var(--blue-dim);
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 14px;
}

/* ============================================================
   BENEFIT / FEATURE CARDS
   ============================================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.benefit-card:hover { border-color: rgba(37,99,235,0.3); transform: translateY(-2px); }
.benefit-card .icon {
  width: 44px; height: 44px;
  background: var(--blue-dim);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--blue-light);
}
.benefit-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.benefit-card p  { color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.testimonial-card .quote {
  font-size: 15px; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 20px;
}
.testimonial-card .author { font-weight: 700; font-size: 14px; color: var(--text); }
.testimonial-card .meta   { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.stars { color: var(--warning); font-size: 15px; margin-bottom: 12px; letter-spacing: 1px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 740px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.faq-item .faq-q {
  font-weight: 600; font-size: 15px;
  cursor: pointer; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item .faq-q .faq-icon { color: var(--text-muted); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-item .faq-a {
  font-size: 15px; color: var(--text-muted);
  margin-top: 14px; line-height: 1.75;
  display: none;
}
.faq-item.open .faq-a { display: block; }

/* ============================================================
   EXIT POPUP
   ============================================================ */
.exit-popup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center; justify-content: center;
}
.exit-popup-overlay.show { display: flex; }
.exit-popup-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px; max-width: 480px; width: 90%;
  text-align: center; position: relative;
  box-shadow: var(--shadow-lg);
}
.exit-popup-close {
  position: absolute; top: 16px; right: 18px;
  font-size: 22px; cursor: pointer;
  color: var(--text-dim);
  transition: color 0.2s;
}
.exit-popup-close:hover { color: var(--text); }
.exit-popup-box h2 { font-size: 22px; color: var(--text); margin-bottom: 12px; }
.exit-popup-box p  { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; line-height: 1.6; }

/* ============================================================
   EMAIL CAPTURE
   ============================================================ */
.email-capture {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #0d1f3c 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 72px 24px;
  text-align: center;
}
.email-capture h2 { font-size: 28px; margin-bottom: 10px; }
.email-capture p  { color: var(--text-muted); margin-bottom: 28px; }
.email-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; }
.email-form input {
  flex: 1; padding: 14px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text); font-size: 15px;
  font-family: inherit; min-width: 200px;
}
.email-form input::placeholder { color: var(--text-dim); }
.email-form input:focus { outline: none; border-color: var(--blue); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.auth-box h1 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 6px;
}
.auth-box .auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-dim); }
.auth-footer a { color: var(--blue-light); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  max-width: 1000px; margin: 40px auto;
  padding: 0 24px;
}
@media (max-width: 768px) { .checkout-layout { grid-template-columns: 1fr; } }
.order-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px; align-self: start;
}
.order-summary h2 { font-size: 16px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.order-line {
  display: flex; justify-content: space-between;
  padding: 11px 0; font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}
.order-line span:last-child { color: var(--text); font-weight: 500; }
.order-total {
  display: flex; justify-content: space-between;
  padding: 16px 0 0; font-size: 18px; font-weight: 700;
  color: var(--text);
}

/* ============================================================
   LESSON VIEW
   ============================================================ */
.lesson-layout { max-width: 820px; margin: 0 auto; padding: 48px 24px 64px; }
.lesson-header { margin-bottom: 36px; }
.lesson-header .lesson-meta {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--blue-light);
  margin-bottom: 10px;
}
.lesson-header h1 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--text);
}
.lesson-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px 48px;
  margin-bottom: 28px;
  font-size: 16px; line-height: 1.8;
}
.lesson-body h2 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 32px 0 14px; color: var(--text);
}
.lesson-body h2:first-child { margin-top: 0; }
.lesson-body h3 { font-size: 17px; font-weight: 600; margin: 24px 0 10px; color: var(--text); }
.lesson-body p { margin-bottom: 16px; color: var(--text-muted); }
.lesson-body ul, .lesson-body ol { padding-left: 24px; margin-bottom: 16px; }
.lesson-body li { margin-bottom: 8px; color: var(--text-muted); line-height: 1.75; }
.lesson-body strong { color: var(--text); font-weight: 600; }
.lesson-body a { color: var(--blue-light); text-decoration: underline; }

/* Special content boxes */
.exercise-box {
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--r);
  padding: 22px 26px;
  margin: 28px 0;
}
.exercise-box h3 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--blue-light);
  margin-bottom: 10px; margin-top: 0;
}
.exercise-box p { color: var(--text-muted); margin-bottom: 0; }

.reflection-box {
  background: rgba(20,184,166,0.07);
  border: 1px solid rgba(20,184,166,0.2);
  border-radius: var(--r);
  padding: 22px 26px;
  margin: 28px 0;
}
.reflection-box h3 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #5eead4;
  margin-bottom: 10px; margin-top: 0;
}
.reflection-box p { color: var(--text-muted); margin-bottom: 0; }

.coming-up-box {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--r);
  padding: 16px 22px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.coming-up-box strong { color: #fcd34d; }

@media (max-width: 640px) {
  .lesson-body { padding: 28px 22px; }
}

/* ============================================================
   CERTIFICATE PREVIEW / PAGE
   ============================================================ */
.cert-preview {
  max-width: 680px; margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.cert-preview .cert-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-dim);
}
.cert-preview h2 { font-size: 28px; font-weight: 800; color: var(--text); margin: 12px 0; }
.cert-preview .cert-name {
  font-size: 22px; color: var(--blue-light);
  font-weight: 700; margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.certificate-page { background: var(--bg); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}
@media (max-width: 900px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}
.admin-sidebar .sidebar-heading {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 18px 20px 6px;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 20px;
  color: var(--text-muted);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.15s; border-left: 2px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  color: var(--text);
  background: var(--bg-glass);
  border-left-color: var(--blue);
}
.admin-main { padding: 36px; background: var(--bg); }
.admin-page-title {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 28px;
}

/* Admin KPI cards */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.admin-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  transition: border-color 0.2s;
}
.admin-kpi:hover { border-color: rgba(37,99,235,0.3); }
.admin-kpi .kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-dim); margin-bottom: 10px; }
.admin-kpi .kpi-value { font-size: 36px; font-weight: 800; color: var(--text); line-height: 1; }
.admin-kpi .kpi-sub { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* ============================================================
   DIVIDERS / SEPARATORS
   ============================================================ */
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ============================================================
   UTILITY
   ============================================================ */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 28px !important; }
.mb-4 { margin-bottom: 48px !important; }
.p-0  { padding: 0 !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted) !important; }
.text-dim     { color: var(--text-dim) !important; }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; }
.text-blue    { color: var(--blue-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1  { gap: 8px; }
.gap-2  { gap: 16px; }
.gap-3  { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }
.w-100  { width: 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .topnav-inner { padding: 0 16px; }
  .hero { padding: 80px 16px 70px; }
  .section { padding: 56px 0; }
  .auth-box { padding: 32px 24px; }
  .card { padding: 20px; }
  .admin-main { padding: 20px 16px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar a { padding: 9px 16px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .btn-lg { padding: 14px 28px; font-size: 15px; }
  .checkout-layout { margin-top: 20px; }
}

/* ============================================================
   STRIPE ELEMENT OVERRIDES
   ============================================================ */
#payment-element {
  background: transparent;
}
#stripe-form .card {
  background: var(--bg-card);
}

/* ============================================================
   BACKWARD-COMPAT ALIASES
   (inline PHP template styles reference these old variable names)
   ============================================================ */
:root {
  --navy:       #f8fafc;
  --navy-mid:   #0d1f3c;
  --accent:     #14b8a6;
  --silver:     #94a3b8;
  --bg-dark:    #0b1629;
  --white:      #f8fafc;
  --text-light: #94a3b8;
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.5);
  --radius:     12px;
  --radius-lg:  16px;
}

/* ============================================================
   SCROLLBAR (Webkit)
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ============================================================
   DISPLAY FONT — Bricolage Grotesque for hero headlines
   ============================================================ */
.display { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; }

/* ============================================================
   HERO — ATMOSPHERIC CANVAS + ORB LAYER
   ============================================================ */
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; letter-spacing: -0.035em; }

.hero-tools-strip {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: center; gap: 0;
  flex-wrap: wrap;
}
.hero-tools-strip .tools-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim);
  margin-right: 16px;
}
.hero-tools-strip .tool-pill {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 999px;
  margin: 4px 4px;
  transition: color 0.2s, border-color 0.2s;
}
.hero-tools-strip .tool-pill:hover { color: var(--text); border-color: rgba(37,99,235,0.4); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  transition: opacity 0.65s cubic-bezier(0.23,1,0.32,1),
              transform 0.65s cubic-bezier(0.23,1,0.32,1);
  opacity: 1;
  transform: translateY(0);
}
.reveal.pending {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   BUTTON MICRO-INTERACTIONS (Emil Kowalski)
   ============================================================ */
.btn { transition: all 0.18s cubic-bezier(0.23,1,0.32,1); }
.btn:active { transform: scale(0.97) translateY(0) !important; }
.btn-primary:active { box-shadow: 0 1px 6px rgba(37,99,235,0.3) !important; }

/* ============================================================
   BENEFIT CARDS — enhanced hover glow
   ============================================================ */
.benefit-card {
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.benefit-card:hover {
  border-color: rgba(37,99,235,0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37,99,235,0.12), 0 0 0 1px rgba(37,99,235,0.15);
}
.benefit-card .icon { font-size: 22px; }

/* ============================================================
   WHO THIS IS FOR
   ============================================================ */
.who-for-section { background: var(--bg); }
.who-for-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  max-width: 1000px; margin: 0 auto;
}
.who-for-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.2s, background 0.2s;
}
.who-for-item:hover {
  border-color: rgba(37,99,235,0.35);
  background: rgba(37,99,235,0.04);
}
.who-for-check {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  color: #22c55e; font-size: 13px;
}
.who-for-item p { font-size: 15px; color: var(--text-muted); line-height: 1.55; }
.who-for-item p strong { color: var(--text); font-weight: 600; }

/* ============================================================
   COURSE CARD — TRUST SIGNALS
   ============================================================ */
.trust-row {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px; color: var(--text-dim);
}
.trust-row span { display: flex; align-items: center; gap: 5px; }

/* ============================================================
   MEET YOUR INSTRUCTOR
   ============================================================ */
.instructor-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.instructor-inner {
  max-width: 900px; margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px; align-items: start;
}
@media (max-width: 700px) {
  .instructor-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .instructor-avatar-wrap { margin: 0 auto; }
  .instructor-timeline { padding-left: 0; }
  .instructor-timeline::before { display: none; }
  .timeline-item { padding-left: 0; }
  .timeline-item::before { display: none; }
}
.instructor-avatar-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.instructor-avatar {
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
  border: 3px solid rgba(37,99,235,0.3);
  box-shadow: 0 0 40px rgba(37,99,235,0.2);
}
.instructor-name {
  font-size: 20px; font-weight: 800;
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  letter-spacing: -0.02em; color: var(--text);
  text-align: center;
}
.instructor-title { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 2px; }

.instructor-content h2 {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 20px;
}
.instructor-lead {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 28px;
}
.instructor-timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid rgba(37,99,235,0.25);
  display: flex; flex-direction: column; gap: 20px;
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute; left: -29px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg-secondary);
  box-shadow: 0 0 8px rgba(37,99,235,0.5);
}
.timeline-item .t-era {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue-light);
  margin-bottom: 3px;
}
.timeline-item .t-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}
.timeline-item .t-text strong { color: var(--text); }

.instructor-quote {
  margin-top: 28px;
  padding: 18px 22px;
  background: rgba(37,99,235,0.07);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15px; font-style: italic;
  color: var(--text-muted); line-height: 1.7;
}
