/* Honeypot field - real users never see or reach this; bots that
   auto-fill every input reveal themselves by filling it in. */
.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

:root {
  --brand-start: #4338ca;
  --brand-mid: #6d28d9;
  --brand-end: #9333ea;
  --brand-solid: #4f46e5;
  --premium-gold: #f5a623;
  --accent-teal: #14b8a6;
  --surface: #f7f7fb;
  --surface-alt: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5f6272;
  --footer-bg: #0f1117;
  --border-soft: rgba(20, 20, 43, 0.08);
  --shadow-sm: 0 2px 8px rgba(20, 20, 43, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 20, 43, 0.1);
  --shadow-lg: 0 20px 50px rgba(20, 20, 43, 0.16);
  --radius: 1rem;
}

/* Deliberately no `prefers-color-scheme: dark` override - the site keeps
   this one designed light theme regardless of the visitor's OS setting,
   rather than auto-switching to an unpolished dark variant. */

* { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--surface);
  color: var(--text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a { transition: color 0.15s ease; }

.text-gradient {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-mid));
  border: none;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #372ea6, #5b21b6);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* ---- Navbar ----
   Targeting .site-navbar (not .bg-primary) so this never has to fight
   Bootstrap's own !important utility class for specificity. */
nav.site-navbar.navbar {
  background: rgba(15, 17, 23, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar .nav-link {
  font-weight: 500;
  position: relative;
}
.navbar-brand img,
.admin-brand img {
  transition: transform 0.25s ease;
}
.navbar-brand:hover img,
.admin-brand:hover img {
  transform: scale(1.08) rotate(-4deg);
}
.navbar .nav-link.active {
  color: #fff !important;
}
.navbar .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0.5rem; right: 0.5rem; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #f5a623);
  border-radius: 2px;
}

/* ---- Hero ---- */
.hero-section {
  position: relative;
  padding: 90px 0 70px;
  background: linear-gradient(160deg, #241b4d 0%, #3a1f66 45%, #5b2a86 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
}
.hero-section::before {
  width: 420px; height: 420px;
  background: rgba(147, 51, 234, 0.45);
  top: -120px; right: -80px;
}
.hero-section::after {
  width: 320px; height: 320px;
  background: rgba(245, 166, 35, 0.25);
  bottom: -100px; left: -60px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-heading {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
}
.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  max-width: 34rem;
}
.hero-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.code-window {
  background: #0f1117;
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(1deg);
}
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: #1a1c26;
}
.code-window-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.code-window-title {
  margin-left: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-family: monospace;
}
.code-window-body {
  margin: 0;
  padding: 1.25rem;
  color: #e6e6f0;
  font-size: 0.85rem;
  line-height: 1.7;
  background: transparent;
}
.code-window-body .code-comment { color: #7b8fa1; }
.code-window-body .code-string { color: #a5d6a7; }
.code-window-body .code-key { color: #82aaff; }

/* ---- Stats bar ---- */
.stats-bar {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-soft);
  padding: 2.5rem 0;
}
.stat-number {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- Section labels ---- */
.section-eyebrow {
  color: var(--brand-solid);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* ---- Step cards (How it works) ---- */
.step-card {
  position: relative;
  padding: 2rem 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  height: 100%;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
  margin-bottom: 1rem;
}

/* ---- Icon circle (features) ---- */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem; height: 3.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(147, 51, 234, 0.12));
  color: var(--brand-solid);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.icon-circle-teal {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(20, 184, 166, 0.06));
  color: var(--accent-teal);
}
.icon-circle-gold {
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.16), rgba(245, 166, 35, 0.06));
  color: #d4880f;
}

/* ---- Glass card ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
}

/* ---- Feature / Post / Pricing / Course cards ---- */
.feature-card,
.post-card,
.pricing-card,
.stat-card,
.step-card,
.course-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card,
.post-card,
.course-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
}
.feature-card:hover,
.post-card:hover,
.step-card:hover,
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md) !important;
}

.post-placeholder {
  height: 170px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(147, 51, 234, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-solid);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top-left-radius: 0.9rem;
  border-top-right-radius: 0.9rem;
}

/* ---- Course cards ---- */
.course-card-illustration {
  height: 170px;
  overflow: hidden;
  border-top-left-radius: 0.9rem;
  border-top-right-radius: 0.9rem;
}
.course-card-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-level-badge {
  background: linear-gradient(135deg, var(--accent-teal), #0d9488);
  color: #fff;
  font-weight: 600;
}
.syllabus-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  height: 100%;
}
.syllabus-number {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---- Lesson list (course-detail.php) ---- */
.lesson-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-soft);
  margin-bottom: 0.5rem;
  border-radius: 0.75rem !important;
  color: var(--text);
  text-decoration: none;
}
.lesson-list-item:hover {
  background: var(--surface);
  border-color: var(--brand-start);
}

/* ---- Lesson detail page (course-lesson.php) ---- */
.lesson-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 50rem;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}
.lesson-nav-pill:hover {
  border-color: var(--brand-start);
  color: var(--brand-solid);
}
.lesson-nav-pill.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---- Subscribe section ---- */
.subscribe-section {
  padding: 3.5rem 2.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-bottom: 50px;
  border: 1px solid var(--border-soft);
}

/* ---- Post content ---- */
.post-content {
  font-size: 1.08rem;
  line-height: 1.8;
}
.post-content h3 {
  margin-top: 2rem;
  font-size: 1.4rem;
}
.post-content pre {
  background-color: #0f1117;
  color: #f8f9fa;
  padding: 1.1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  position: relative;
}
.post-content code { font-size: 0.9rem; }
.post-content pre .code-comment { color: #8a8fa3; }
.post-content pre .copy-code-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
}
.post-content pre .copy-code-btn:hover { opacity: 1; }

/* ---- Premium / paywall ---- */
.premium-badge {
  background: linear-gradient(135deg, var(--premium-gold), #e8890c);
  color: #fff;
  font-weight: 600;
}
.paywall-card {
  background: linear-gradient(160deg, #241b4d, #3a1f66);
  color: #fff;
}

/* ---- Pricing ---- */
.pricing-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.pricing-card-premium {
  background: linear-gradient(160deg, #241b4d, #3a1f66);
  color: #fff;
  border: none;
  position: relative;
}
.pricing-card-premium .text-muted { color: rgba(255, 255, 255, 0.7) !important; }

/* ---- Footer ---- */
.site-footer { background: var(--footer-bg); }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}
.footer-links a:hover { color: #fff; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  margin-right: 0.5rem;
  text-decoration: none;
}
.social-links a:hover { background: var(--brand-solid); }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1050;
}

/* ---- Admin stat cards ---- */
.stat-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease both; }

/* Scroll-reveal: only hides content once JS confirms it can un-hide it again
   (html.js-ready, set by an inline script in <head>). Without that class -
   JS disabled, blocked, or failed to load - .reveal content just stays
   visible, so nothing ever becomes permanently invisible. */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .floating-shape, .fade-in-up { animation: none !important; }
}

/* ---- Floating background blobs (site-wide, fixed, drifting) ---- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.bg-blobs .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.bg-blobs .blob-1 {
  width: 380px; height: 380px;
  top: -80px; left: -100px;
  background: radial-gradient(circle, var(--brand-end), transparent 70%);
  animation: float1 22s ease-in-out infinite;
}
.bg-blobs .blob-2 {
  width: 320px; height: 320px;
  top: 40%; right: -120px;
  background: radial-gradient(circle, var(--premium-gold), transparent 70%);
  animation: float2 26s ease-in-out infinite;
  opacity: 0.2;
}
.bg-blobs .blob-3 {
  width: 300px; height: 300px;
  bottom: -100px; left: 20%;
  background: radial-gradient(circle, var(--brand-start), transparent 70%);
  animation: float3 30s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .bg-blobs .blob { animation: none !important; }
}
@media (max-width: 767.98px) {
  .bg-blobs .blob { opacity: 0.18; }
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, 50px) scale(1.15); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -60px) scale(1.05); }
}

/* Small floating accent icons scattered in the hero */
.floating-shape {
  position: absolute;
  animation: floatY 5s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}
