/* AI Math Plus — cyberpunk dark Mathematics Blue theme.
   Mirrors the AI STEAM Plus / AI Robotics Plus pattern, recoloured to
   the Mathematics Blue palette (#1a6fd4 accent + #5ba3f5 glow).
   Self-contained — no external CSS, no Google Fonts (uses /courses/_fonts/). */

:root {
  --amp-bg:           #0a0f1e;
  --amp-bg-elev:      #0d1428;
  --amp-surface:      #0f1629;
  --amp-surface-2:    #162040;
  --amp-surface-3:    #1c2752;
  --amp-accent:       #1a6fd4;
  --amp-accent-deep:  #0d4ba0;
  --amp-glow:         #5ba3f5;
  --amp-cyan:         #00d4ff;
  --amp-success:      #10b981;
  --amp-warning:      #f59e0b;
  --amp-error:        #ef4444;
  --amp-text:         #e2e8f0;
  --amp-text-dim:     #94a3b8;
  --amp-text-mute:    #64748b;
  --amp-border:       rgba(91, 163, 245, 0.18);
  --amp-border-strong:rgba(91, 163, 245, 0.40);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--amp-bg); color: var(--amp-text); font-family: 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; min-height: 100vh; }
body { overflow-x: hidden; }
a { color: var(--amp-glow); text-decoration: none; }
a:hover { color: var(--amp-cyan); text-decoration: underline; }
button { font-family: inherit; }

/* ============================================================
   Header / Logo (top-left always, per Rule 11)
   ============================================================ */
.amp-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 30, 0.86);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--amp-border);
}
.amp-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
}
.amp-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; letter-spacing: 0.5px;
  color: var(--amp-text); text-decoration: none;
}
.amp-logo:hover { color: var(--amp-glow); text-decoration: none; }
.amp-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--amp-accent), var(--amp-cyan));
  color: var(--amp-bg); border-radius: 8px;
  font-size: 18px; font-weight: 900;
  box-shadow: 0 0 18px rgba(91, 163, 245, 0.55);
}
.amp-logo-plus { color: var(--amp-glow); }

.amp-nav { display: flex; align-items: center; gap: 28px; }
.amp-nav a { color: var(--amp-text-dim); font-size: 14px; font-weight: 500; text-decoration: none; }
.amp-nav a:hover { color: var(--amp-glow); }
.amp-cta-small {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--amp-accent), var(--amp-accent-deep));
  color: var(--amp-text) !important;
  border-radius: 8px;
  font-weight: 600 !important;
  box-shadow: 0 0 14px rgba(91, 163, 245, 0.35);
}
.amp-cta-small:hover { text-decoration: none; box-shadow: 0 0 24px rgba(91, 163, 245, 0.55); }

/* ============================================================
   Hero — animated grid + drifting orbs
   ============================================================ */
.amp-hero {
  position: relative;
  padding: 100px 24px 120px;
  overflow: hidden;
  isolation: isolate;
}
.amp-hero-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(26, 111, 212, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
    linear-gradient(90deg, rgba(26, 111, 212, 0.07) 1px, transparent 1px) 0 0 / 50px 50px,
    radial-gradient(circle at 50% 0%, rgba(26, 111, 212, 0.18), transparent 70%);
  animation: amp-grid-pan 60s linear infinite;
  z-index: -1;
}
@keyframes amp-grid-pan {
  from { transform: translate(0,0); }
  to   { transform: translate(50px, 50px); }
}
.amp-hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.45;
  z-index: -1;
  animation: amp-orb-drift 26s ease-in-out infinite;
}
.amp-hero-orb-1 { width: 480px; height: 480px; background: var(--amp-accent); top: -120px; left: -100px; }
.amp-hero-orb-2 { width: 380px; height: 380px; background: var(--amp-cyan); bottom: -100px; right: -80px; animation-delay: -13s; }
@keyframes amp-orb-drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

.amp-hero-inner { max-width: 980px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.amp-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--amp-glow); margin-bottom: 24px;
}
.amp-hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800; line-height: 1.05;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}
.amp-grad {
  background: linear-gradient(110deg, var(--amp-glow) 0%, var(--amp-cyan) 50%, var(--amp-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(91, 163, 245, 0.4));
}
.amp-hero-sub {
  max-width: 720px; margin: 0 auto 40px;
  font-size: 18px; color: var(--amp-text-dim); line-height: 1.7;
}
.amp-hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; max-width: 720px; margin: 0 auto 48px;
}
.amp-stat {
  padding: 22px 14px;
  background: linear-gradient(180deg, rgba(15,22,41,0.8), rgba(15,22,41,0.5));
  border: 1px solid var(--amp-border);
  border-radius: 14px;
}
.amp-stat-n {
  display: block;
  font-size: 32px; font-weight: 800;
  color: var(--amp-glow);
  font-family: 'JetBrains Mono', monospace;
  filter: drop-shadow(0 0 12px rgba(91, 163, 245, 0.4));
}
.amp-stat-l {
  display: block;
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--amp-text-dim); margin-top: 6px;
}
.amp-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.amp-cta {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.amp-cta-primary {
  background: linear-gradient(135deg, var(--amp-accent), var(--amp-cyan));
  color: var(--amp-bg) !important;
  box-shadow: 0 0 26px rgba(91, 163, 245, 0.55), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.amp-cta-primary:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(91, 163, 245, 0.75), inset 0 0 0 1px rgba(255,255,255,0.3);
}
.amp-cta-ghost {
  color: var(--amp-text) !important;
  border: 1px solid var(--amp-border-strong);
  background: transparent;
}
.amp-cta-ghost:hover { background: rgba(91, 163, 245, 0.1); text-decoration: none; }

/* ============================================================
   Sections
   ============================================================ */
.amp-section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.amp-section-alt { background: var(--amp-surface); border-top: 1px solid var(--amp-border); border-bottom: 1px solid var(--amp-border); max-width: none; margin: 0; }
.amp-section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.amp-section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800; text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.amp-section-sub {
  text-align: center; color: var(--amp-text-dim);
  max-width: 700px; margin: 0 auto 56px;
  font-size: 17px; line-height: 1.7;
}

/* ============================================================
   Band cards
   ============================================================ */
.amp-band-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.amp-band {
  padding: 30px;
  background: linear-gradient(180deg, rgba(22, 32, 64, 0.6), rgba(22, 32, 64, 0.25));
  border: 1px solid var(--amp-border);
  border-radius: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.amp-band:hover {
  transform: translateY(-4px);
  border-color: var(--amp-border-strong);
  box-shadow: 0 12px 32px rgba(26, 111, 212, 0.22);
}
.amp-band header { margin-bottom: 16px; }
.amp-band-num {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(91, 163, 245, 0.12);
  border: 1px solid var(--amp-border);
  border-radius: 100px;
  color: var(--amp-glow);
  margin-bottom: 12px;
}
.amp-band h3 { font-size: 22px; font-weight: 800; color: var(--amp-text); }
.amp-band p { color: var(--amp-text-dim); margin-bottom: 16px; }
.amp-band ul { list-style: none; padding: 0; }
.amp-band li {
  color: var(--amp-text-dim);
  padding: 8px 0;
  border-top: 1px dashed rgba(91, 163, 245, 0.1);
  font-size: 14px;
}
.amp-band li:first-child { border-top: 1px solid var(--amp-border); }

.amp-band-1 { border-left: 3px solid var(--amp-cyan); }
.amp-band-2 { border-left: 3px solid var(--amp-glow); }
.amp-band-3 { border-left: 3px solid var(--amp-accent); }
.amp-band-4 { border-left: 3px solid var(--amp-accent-deep); }

/* ============================================================
   Feature cards
   ============================================================ */
.amp-feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.amp-feature {
  padding: 22px;
  background: linear-gradient(180deg, rgba(15, 22, 41, 0.8), rgba(15, 22, 41, 0.5));
  border: 1px solid var(--amp-border);
  border-radius: 12px;
}
.amp-feature h4 { font-size: 15px; font-weight: 700; color: var(--amp-glow); margin-bottom: 8px; }
.amp-feature p { font-size: 14px; color: var(--amp-text-dim); line-height: 1.55; }

/* ============================================================
   Price cards
   ============================================================ */
.amp-price-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 900px; margin: 0 auto;
}
.amp-price-card {
  padding: 36px;
  background: linear-gradient(180deg, rgba(22, 32, 64, 0.7), rgba(22, 32, 64, 0.35));
  border: 1px solid var(--amp-border);
  border-radius: 18px;
  text-align: center;
}
.amp-price-card-bundle {
  border-color: var(--amp-glow);
  box-shadow: 0 0 28px rgba(91, 163, 245, 0.28);
  position: relative;
}
.amp-price-card-bundle::before {
  content: 'Best Value';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--amp-glow); color: var(--amp-bg);
  padding: 4px 14px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.amp-price-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.amp-price {
  font-size: 56px; font-weight: 800;
  color: var(--amp-glow);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
.amp-price-bundle { color: var(--amp-cyan); filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.45)); }
.amp-price-sub { color: var(--amp-text-dim); font-size: 14px; margin: 8px 0 24px; }
.amp-price-card ul { list-style: none; padding: 0; text-align: left; margin-bottom: 28px; }
.amp-price-card li {
  padding: 10px 0 10px 26px; position: relative;
  font-size: 14px; color: var(--amp-text-dim);
  border-bottom: 1px dashed rgba(91, 163, 245, 0.1);
}
.amp-price-card li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--amp-glow); font-weight: 700;
}

/* ============================================================
   Footer
   ============================================================ */
.amp-footer {
  padding: 40px 24px;
  background: var(--amp-surface);
  border-top: 1px solid var(--amp-border);
  text-align: center;
  color: var(--amp-text-mute); font-size: 13px;
}
.amp-footer p { margin: 6px 0; }

/* ============================================================
   Dashboard / course / lab pages — reusable building blocks
   ============================================================ */
body[data-page="dashboard"] {
  background: var(--amp-bg);
  min-height: 100vh;
}
.amp-dash {
  max-width: 1200px;
  margin: 0 auto; padding: 28px 24px 60px;
}
.amp-dash-hello {
  font-size: 28px; font-weight: 800; margin-bottom: 6px;
}
.amp-dash-sub { color: var(--amp-text-dim); margin-bottom: 32px; }
.amp-dash-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.amp-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(15,22,41,0.85), rgba(15,22,41,0.6));
  border: 1px solid var(--amp-border);
  border-radius: 14px;
}
.amp-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--amp-glow); margin-bottom: 14px;
}

/* Unit accordion (course.html) */
.amp-unit-list { display: grid; gap: 12px; }
.amp-unit {
  padding: 22px;
  background: rgba(22, 32, 64, 0.5);
  border: 1px solid var(--amp-border);
  border-radius: 12px;
}
.amp-unit h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: var(--amp-text); }
.amp-unit .amp-unit-num { color: var(--amp-glow); font-family: 'JetBrains Mono', monospace; font-size: 12px; margin-right: 8px; }
.amp-unit p { color: var(--amp-text-dim); font-size: 14px; margin-bottom: 12px; }
.amp-session-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin-top: 10px;
  background: rgba(10, 15, 30, 0.5);
  border: 1px solid rgba(91, 163, 245, 0.08);
  border-radius: 8px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.amp-session-row:hover { border-color: var(--amp-border); background: rgba(10, 15, 30, 0.8); }
.amp-session-row a { color: var(--amp-text); text-decoration: none; flex: 1; font-weight: 500; }
.amp-session-row a:hover { color: var(--amp-glow); }
.amp-session-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; margin-right: 12px;
  color: var(--amp-bg); font-weight: 700;
}
.amp-session-type-instruction { background: var(--amp-glow); }
.amp-session-type-lab        { background: var(--amp-cyan); }
.amp-session-type-practice   { background: var(--amp-accent); color: white; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .amp-band-grid { grid-template-columns: 1fr; }
  .amp-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .amp-price-grid { grid-template-columns: 1fr; }
  .amp-hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .amp-nav a:not(.amp-cta-small) { display: none; }
  .amp-feature-grid { grid-template-columns: 1fr; }
}

/* Accessibility — respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .amp-hero-grid, .amp-hero-orb { animation: none; }
}
