/* ============================================================
   Conscious Collective Academy Homepage Installer
   assets/css/cca-homepage.css — v3.0.0

   This stylesheet is only enqueued on the Academy page created by
   the plugin (see cca_enqueue_assets()), and every selector is
   scoped under .cca-homepage, so it never affects the rest of the
   site, the Enfold theme, or LearnPress.

   IMPORTANT: the .cca-digital-david__embed panel intentionally has
   NO overflow:hidden, NO height, NO aspect-ratio, and does not force
   the size of its children. The [digital_david] shortcode renders at
   its own natural size, exactly as it does anywhere else on the site.
   ============================================================ */

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

.cca-homepage {
  --cca-midnight: #05060f;
  --cca-deep-blue: #0b0f24;
  --cca-deep-blue-2: #10173a;
  --cca-purple: #7c4dff;
  --cca-purple-light: #a78bfa;
  --cca-gold: #f0c869;
  --cca-gold-light: #ffe3a3;
  --cca-aqua: #35e0d0;
  --cca-aqua-light: #7bf5e8;
  --cca-white: #ffffff;
  --cca-white-soft: rgba(255, 255, 255, 0.95);
  --cca-white-faint: rgba(255, 255, 255, 0.88);
  --cca-glass-bg: rgba(255, 255, 255, 0.05);
  --cca-glass-bg-strong: rgba(255, 255, 255, 0.08);
  --cca-glass-border: rgba(255, 255, 255, 0.14);
  --cca-font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cca-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --cca-radius-xl: 28px;
  --cca-radius-lg: 22px;
  --cca-radius-md: 16px;
  --cca-shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.45);
  --cca-glow-gold: 0 0 44px rgba(240, 200, 105, 0.35);
  --cca-glow-aqua: 0 0 44px rgba(53, 224, 208, 0.3);

  font-family: var(--cca-font-body);
  color: var(--cca-white-soft);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Full-bleed sections: escape the theme's centered content
   container regardless of which Enfold page template/sidebar layout is
   active, so there are no unwanted white side margins. ---------- */
.cca-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ---------- Shared eyebrow / titles ---------- */
.cca-homepage .cca-eyebrow {
  display: inline-block;
  font-family: var(--cca-font-body);
  font-size: 12.5px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--cca-aqua-light);
  margin-bottom: 22px;
  font-weight: 600;
}
.cca-homepage .cca-eyebrow--pill {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(53, 224, 208, 0.35);
  background: rgba(53, 224, 208, 0.06);
  box-shadow: 0 0 24px rgba(53, 224, 208, 0.15);
}
.cca-homepage .cca-section-title {
  font-family: var(--cca-font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cca-white);
  margin: 0 0 18px;
}
.cca-homepage .cca-section-subtitle {
  font-weight: 400;
  font-size: clamp(15.5px, 1.7vw, 18px);
  line-height: 1.75;
  color: var(--cca-white-faint);
  max-width: 700px;
  margin: 0 0 32px;
}

/* ---------- Buttons: premium, glowing, modern ---------- */
.cca-homepage .cca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 999px;
  font-family: var(--cca-font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, background 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cca-homepage .cca-btn:hover { transform: translateY(-3px); }
.cca-homepage .cca-btn--gold {
  background: linear-gradient(135deg, var(--cca-gold) 0%, var(--cca-gold-light) 100%);
  color: var(--cca-midnight);
  box-shadow: var(--cca-glow-gold);
}
.cca-homepage .cca-btn--gold:hover { box-shadow: 0 0 64px rgba(240, 200, 105, 0.5); color: var(--cca-midnight); }
.cca-homepage .cca-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cca-white);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.cca-homepage .cca-btn--ghost:hover {
  background: rgba(53, 224, 208, 0.1);
  color: var(--cca-white);
  border-color: var(--cca-aqua);
  box-shadow: var(--cca-glow-aqua);
}

/* ---------- Donation banner ----------
   position: sticky keeps this pinned to the very top of the viewport
   once the page scrolls past it, without permanently covering the
   theme's own site header on first load (unlike position: fixed,
   which would sit on top of it immediately). z-index is high enough
   to stay above the rest of the Academy page content while scrolling. */
/* v4.1.0 -- glass banner: same sticky/backend behavior (same PayPal/Venmo
   URLs, same settings, same markup) restyled as a translucent glass
   strip with a soft ambient glow instead of a flat solid-color bar. */
.cca-homepage.cca-donate-banner {
  display: block;
  position: sticky;
  top: 0;
  z-index: 9999;
  background: linear-gradient(180deg, rgba(20,32,68,0.82) 0%, rgba(14,22,50,0.86) 100%);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(240, 200, 105, 0.18);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255,0.06) inset;
  padding: 12px 24px;
}
.cca-donate-banner__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
.cca-donate-banner__text {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}
.cca-donate-banner__actions { display: inline-flex; gap: 10px; }
.cca-donate-banner__subtext {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 500;
  color: var(--cca-gold-light);
}
/* Animated CTA glow -- a slow breathing halo behind each donate button,
   purely decorative (::before), never affecting the clickable link
   itself or its href/target/backend handling. */
.cca-mini-btn {
  display: inline-block;
  position: relative;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}
.cca-mini-btn::before {
  content: "";
  position: absolute; inset: -4px; z-index: -1; border-radius: inherit;
  background: radial-gradient(circle, rgba(240,200,105,0.35), transparent 70%);
  opacity: 0.6;
  animation: cca-mini-btn-glow 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cca-mini-btn-glow {
  0%, 100% { opacity: 0.35; transform: scale(0.94); }
  50%      { opacity: 0.75; transform: scale(1.08); }
}
.cca-mini-btn--paypal:hover { background: #ffc439; border-color: #ffc439; color: #05060f; box-shadow: 0 0 20px rgba(255,196,57,0.5); }
.cca-mini-btn--venmo:hover { background: #3d95ce; border-color: #3d95ce; color: #fff; box-shadow: 0 0 20px rgba(61,149,206,0.5); }
@media (prefers-reduced-motion: reduce) {
  .cca-mini-btn::before { animation: none; }
}

/* ---------- Hero ---------- */
.cca-homepage.cca-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 160px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(124, 77, 255, 0.5), transparent 42%),
    radial-gradient(circle at 82% 25%, rgba(53, 224, 208, 0.28), transparent 42%),
    radial-gradient(circle at 50% 95%, rgba(240, 200, 105, 0.22), transparent 45%),
    linear-gradient(180deg, var(--cca-midnight) 0%, var(--cca-deep-blue) 55%, var(--cca-deep-blue-2) 100%);
}
.cca-hero__bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.cca-hero__geometry {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(85vw, 820px);
  height: min(85vw, 820px);
  transform: translate(-50%, -50%);
  animation: cca-rotate-slow 90s linear infinite;
  opacity: 0.9;
}
.cca-hero__particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cca-gold);
  box-shadow: 0 0 16px 3px rgba(240, 200, 105, 0.65);
  animation: cca-float 7s ease-in-out infinite, cca-pulse-glow 4s ease-in-out infinite;
}
.cca-hero__particle.p1 { top: 16%; left: 12%; }
.cca-hero__particle.p2 { top: 28%; left: 84%; background: var(--cca-aqua); box-shadow: 0 0 16px 3px rgba(53, 224, 208, 0.65); animation-delay: 1.2s; }
.cca-hero__particle.p3 { top: 70%; left: 18%; background: var(--cca-purple-light); box-shadow: 0 0 16px 3px rgba(167, 139, 250, 0.65); animation-delay: 2s; }
.cca-hero__particle.p4 { top: 78%; left: 80%; animation-delay: 0.6s; }
.cca-hero__particle.p5 { top: 45%; left: 50%; background: var(--cca-aqua); box-shadow: 0 0 16px 3px rgba(53, 224, 208, 0.65); animation-delay: 1.8s; }
.cca-hero__particle.p6 { top: 8%; left: 60%; background: var(--cca-purple-light); box-shadow: 0 0 16px 3px rgba(167, 139, 250, 0.65); animation-delay: 0.9s; }

.cca-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  animation: cca-fade-up 1.1s ease both;
}
.cca-hero__headline {
  font-family: var(--cca-font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--cca-white);
  margin: 0 0 24px;
  text-shadow: 0 0 60px rgba(124, 77, 255, 0.35);
}
.cca-hero__subheadline {
  font-weight: 400;
  font-size: clamp(16px, 1.9vw, 19.5px);
  line-height: 1.75;
  color: var(--cca-white-faint);
  margin: 0 0 40px;
  max-width: 760px;
}
.cca-hero__actions { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }

/* ---------- v3.0.0 Hero two-column layout (left copy / right David
   mentor card) — reuses the existing Digital David embed panel styling
   (.cca-digital-david__embed, .cca-david__halo, .cca-digital-david__prompt)
   so the mentor card looks identical to the old standalone section, just
   relocated into the hero. ---------- */
.cca-hero__grid {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.05fr);
  gap: 56px;
  align-items: center;
  text-align: left;
}
.cca-hero__grid.cca-hero__grid--solo {
  grid-template-columns: 1fr;
  max-width: 920px;
  text-align: center;
}
.cca-hero__grid .cca-hero__inner--left {
  align-items: flex-start;
  text-align: left;
  max-width: none;
  margin: 0;
  padding: 0;
  animation: cca-fade-up 1.1s ease both;
}
.cca-hero__grid--solo .cca-hero__inner--left {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}
.cca-hero__grid .cca-hero__inner--left .cca-hero__actions { justify-content: flex-start; }
.cca-hero__grid--solo .cca-hero__inner--left .cca-hero__actions { justify-content: center; }
.cca-hero__david-col {
  position: relative;
  animation: cca-fade-up 1.1s ease 0.15s both;
}
.cca-hero__david-embed {
  /* Same unconstrained panel as the old standalone section — no crop,
     no forced aspect-ratio, no overflow-hidden. David's own widget
     controls its size. */
}
.cca-hero__david-caption {
  margin: 16px 4px 0;
  font-size: 13px;
  color: var(--cca-white-faint);
  text-align: center;
}

/* ---------- Digital David ----------
   No circle. No crop. No aspect-ratio. No forced height. No overflow
   hidden. The embed panel below is a plain, unconstrained container. */
.cca-homepage.cca-digital-david {
  position: relative;
  padding: 140px 24px;
  background: linear-gradient(180deg, var(--cca-midnight), var(--cca-deep-blue));
}
.cca-digital-david__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 1.15fr);
  gap: 72px;
  align-items: center;
}
.cca-digital-david__text-col { text-align: left; }
.cca-digital-david__prompt {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cca-gold-light);
  background: rgba(240, 200, 105, 0.08);
  border: 1px solid rgba(240, 200, 105, 0.3);
  border-radius: 999px;
  padding: 9px 20px;
  margin-bottom: 26px;
}
.cca-digital-david__subheading {
  font-family: var(--cca-font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--cca-aqua-light);
  margin: -8px 0 20px;
}
.cca-digital-david__embed-col { width: 100%; }
.cca-digital-david__embed {
  width: 100%;
  padding: 28px;
  border-radius: var(--cca-radius-xl);
  background: var(--cca-glass-bg-strong);
  border: 1px solid var(--cca-glass-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--cca-shadow-soft), var(--cca-glow-aqua);
  /* Intentionally: no overflow, no height, no aspect-ratio, no forced
     sizing of children — the shortcode's own widget controls its size. */
}

/* ---------- Course section ---------- */
.cca-homepage.cca-course-section {
  padding: 140px 24px;
  background: linear-gradient(180deg, var(--cca-deep-blue), var(--cca-midnight));
}
.cca-course-section__inner { max-width: 1320px; margin: 0 auto; }
.cca-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 24px;
}
.cca-course-card {
  background: var(--cca-glass-bg);
  border: 1px solid var(--cca-glass-border);
  border-radius: var(--cca-radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.cca-course-card:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 200, 105, 0.5);
  box-shadow: var(--cca-glow-gold);
}
.cca-course-card__image {
  height: 200px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.cca-course-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 6, 15, 0.55) 100%);
}
.cca-course-card__image--1 { background: linear-gradient(135deg, #10173a, #7c4dff); }
.cca-course-card__image--2 { background: linear-gradient(135deg, #7c4dff, #f0c869); }
.cca-course-card__image--3 { background: linear-gradient(135deg, #05060f, #35e0d0); }
.cca-course-card__image--4 { background: linear-gradient(135deg, #10173a, #a78bfa); }
.cca-course-card__image--5 { background: linear-gradient(135deg, #35e0d0, #10173a); }
.cca-course-card__image--6 { background: linear-gradient(135deg, #f0c869, #7c4dff); }
.cca-course-card__body { padding: 26px 24px 28px; }
.cca-course-card__title {
  font-family: var(--cca-font-display);
  font-weight: 800 !important;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 22px rgba(240, 200, 105, 0.28);
  margin: 0 0 10px;
  -webkit-text-fill-color: #ffffff;
}
.cca-course-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--cca-white-faint) !important;
  margin: 0 0 22px;
}
.cca-course-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cca-course-card__btn {
  flex: 1 1 auto;
  padding: 12px 18px;
  font-size: 13.5px;
}
.cca-course-card__btn--pending { opacity: 0.5; cursor: default; }
.cca-course-card__btn--pending:hover { transform: none; }

/* ---------- Motion ---------- */
@keyframes cca-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes cca-pulse-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes cca-fade-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cca-rotate-slow { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .cca-homepage *, .cca-homepage *::before, .cca-homepage *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Mobile: Digital David text stays first (source order),
   embed panel follows underneath. ---------- */
@media (max-width: 960px) {
  .cca-digital-david__inner { grid-template-columns: 1fr; text-align: center; }
  .cca-digital-david__text-col { text-align: center; }
  /* v3.0.0 — hero stacks the same way: headline/CTAs first (source
     order), David's mentor card follows underneath. */
  .cca-hero__grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .cca-hero__grid .cca-hero__inner--left { align-items: center; text-align: center; margin: 0 auto; }
  .cca-hero__grid .cca-hero__inner--left .cca-hero__actions { justify-content: center; }
}
@media (max-width: 600px) {
  .cca-homepage.cca-hero { min-height: auto; padding: 120px 20px 80px; }
  .cca-homepage.cca-digital-david,
  .cca-homepage.cca-course-section { padding: 80px 18px; }
  .cca-donate-banner__inner { flex-direction: column; gap: 8px; }
  .cca-course-grid { grid-template-columns: 1fr; }
  .cca-course-card__actions { flex-direction: column; }
}

/* ============================================================
   v1.8.0 ADDITIONS — starfield/aurora canvas, scroll-reveal,
   cursor light-glow, animated course-card border glow + subtle
   3D tilt, and the Course Pathway progression map. All purely
   additive: nothing above this line was removed or restructured,
   and every effect here is progressive-enhancement /
   reduced-motion / no-JS safe (see cca-homepage.js).
   ============================================================ */

.cca-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Scroll reveal — content is ALWAYS fully visible by default. Only
   once JS adds .cca-js-ready to <html> do .cca-reveal elements start
   hidden/offset, waiting for .cca-in-view (added by IntersectionObserver
   the moment each element scrolls into view). If JS never loads, this
   selector never matches anything, so nothing is ever stuck hidden. */
html.cca-js-ready .cca-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
html.cca-js-ready .cca-reveal.cca-in-view {
  opacity: 1;
  transform: translateY(0);
}
html.cca-js-ready .cca-reveal--delay-1 { transition-delay: 0.08s; }
html.cca-js-ready .cca-reveal--delay-2 { transition-delay: 0.16s; }
html.cca-js-ready .cca-reveal--delay-3 { transition-delay: 0.24s; }

/* Cursor light trail — a pure ambient glow that only ever ADDS light
   (mix-blend-mode: screen) and never intercepts clicks/hover
   (pointer-events: none), shown only over .cca-homepage sections. */
.cca-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
  margin-left: -170px;
  margin-top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.16) 0%, rgba(53, 224, 208, 0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: screen;
}
.cca-cursor-glow--visible { opacity: 1; }

/* Course cards — animated glowing border on hover ("light travels
   around the border") layered on top of the existing lift/glow, plus a
   subtle 3D tilt driven by --cca-tiltX/--cca-tiltY (set via JS on
   mousemove; simply stay at 0deg — i.e. flat, no tilt — anywhere JS or
   a fine pointer isn't available, so this always degrades safely). */
.cca-course-card {
  position: relative;
  --cca-tiltX: 0deg;
  --cca-tiltY: 0deg;
  transform: perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY)) translateY(0);
}
.cca-course-card:hover {
  transform: perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY)) translateY(-8px);
}
.cca-course-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent 0%, var(--cca-gold) 15%, transparent 30%, var(--cca-aqua) 55%, transparent 70%, var(--cca-purple-light) 88%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: cca-border-spin 3.6s linear infinite;
  animation-play-state: paused;
  pointer-events: none;
}
.cca-course-card:hover::before {
  opacity: 1;
  animation-play-state: running;
}
@keyframes cca-border-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Course Pathway progression map ---------- */
.cca-homepage.cca-pathway {
  padding: 120px 24px 140px;
  background: linear-gradient(180deg, var(--cca-midnight), var(--cca-deep-blue-2));
  position: relative;
  overflow: hidden;
}
.cca-pathway__inner { max-width: 1320px; margin: 0 auto; text-align: center; }
.cca-pathway__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.cca-pathway__line {
  position: absolute;
  top: 34px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, var(--cca-gold), var(--cca-aqua), var(--cca-purple-light), var(--cca-gold));
  opacity: 0.4;
  z-index: 0;
}
.cca-pathway__node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 14px 26px;
  border-radius: var(--cca-radius-md);
  background: var(--cca-glass-bg);
  border: 1px solid var(--cca-glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  color: inherit;
  --cca-tiltX: 0deg;
  --cca-tiltY: 0deg;
  transform: perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY));
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.cca-pathway__node:hover {
  border-color: rgba(240, 200, 105, 0.55);
  box-shadow: var(--cca-glow-gold);
}
.cca-pathway__node--pending { opacity: 0.55; cursor: default; }
.cca-pathway__number {
  font-family: var(--cca-font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--cca-gold-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 200, 105, 0.1);
  border: 1px solid rgba(240, 200, 105, 0.35);
}
.cca-pathway__title {
  font-family: var(--cca-font-display);
  font-weight: 800 !important;
  font-size: 15.5px;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 0 18px rgba(240, 200, 105, 0.26);
  -webkit-text-fill-color: #ffffff;
}
.cca-pathway__label {
  font-size: 12px;
  color: var(--cca-white-faint) !important;
  letter-spacing: 0.3px;
}

/* ---------- v3.0.0 "living portal card" upgrade — icon/image, action
   buttons, hover lift, and the same light-sweep shine as the course-card
   grid, so pathway nodes read as the same class of object. ---------- */
.cca-pathway__icon {
  font-size: 26px;
  color: var(--cca-gold-light);
  line-height: 1;
}
.cca-pathway__node-image {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(240, 200, 105, 0.35);
  box-shadow: var(--cca-glow-gold);
}
.cca-pathway__node-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}
.cca-btn--small {
  padding: 8px 16px;
  font-size: 12.5px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.cca-pathway__node {
  overflow: hidden;
}
.cca-pathway__node::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(75deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-15deg);
  transition: left 0.9s ease;
  pointer-events: none;
  z-index: 3;
}
.cca-pathway__node:hover::after { left: 130%; }
.cca-pathway__node:hover {
  transform: perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY)) translateY(-6px);
}

@media (max-width: 960px) {
  .cca-pathway__track { grid-template-columns: repeat(2, 1fr); }
  .cca-pathway__line { display: none; }
}
@media (max-width: 600px) {
  .cca-pathway__track { grid-template-columns: 1fr; }
  .cca-homepage.cca-pathway { padding: 80px 18px 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .cca-cursor-glow,
  .cca-hero__canvas { display: none !important; }
}

/* ============================================================
   v1.9.0 ADDITIONS — award-level cinematic pass: gradient
   typography, portal glow rings, Digital David halo, per-card icon
   badges, a pathway that visibly "flows", ambient floating orbs, and
   a subtle film-grain/vignette layer. Nothing above this line was
   restructured; everything here layers on top of the v1.7/v1.8
   foundation and remains reduced-motion / no-JS safe.
   ============================================================ */

/* ---------- Gradient headline + stronger type hierarchy ---------- */
/* v4.10.0 -- the shifting rainbow-gradient text-clip plus the
   film-grain/vignette layer behind it (removed above, see the hero
   selector list) combined to read as a hazy "film" over the main
   headline instead of a crisp, punchy title. Now solid, bright, fully
   opaque white with a strong glow so it pops immediately -- no
   scrolling color, no transparency. */
.cca-hero__headline-gradient {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 40px rgba(240, 200, 105, 0.4), 0 0 80px rgba(124, 77, 255, 0.3);
}
@keyframes cca-headline-shimmer {
  from { background-position: 0% center; }
  to { background-position: -200% center; }
}
.cca-homepage .cca-section-title {
  letter-spacing: -0.02em;
}
.cca-homepage .cca-eyebrow--pill,
.cca-homepage .cca-eyebrow {
  font-weight: 700;
}

/* ---------- Portal glow rings behind the hero headline ---------- */
.cca-hero__portal-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60vmin;
  height: 60vmin;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}
.cca-hero__portal-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 200, 105, 0.18);
  animation: cca-portal-pulse 6s ease-in-out infinite;
}
.cca-hero__portal-rings span:nth-child(2) { inset: 8%; border-color: rgba(53, 224, 208, 0.14); animation-delay: 1.2s; }
.cca-hero__portal-rings span:nth-child(3) { inset: 16%; border-color: rgba(167, 139, 250, 0.16); animation-delay: 2.4s; }
@keyframes cca-portal-pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ---------- Ambient floating orbs (shared across sections) ---------- */
.cca-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.cca-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  animation: cca-orb-drift 22s ease-in-out infinite;
}
.cca-orb--1 { width: 260px; height: 260px; top: 8%; left: 6%; background: radial-gradient(circle, rgba(124,77,255,0.5), transparent 70%); }
.cca-orb--2 { width: 220px; height: 220px; top: 55%; left: 82%; background: radial-gradient(circle, rgba(53,224,208,0.45), transparent 70%); animation-delay: 4s; animation-duration: 26s; }
.cca-orb--3 { width: 180px; height: 180px; top: 78%; left: 18%; background: radial-gradient(circle, rgba(240,200,105,0.4), transparent 70%); animation-delay: 8s; animation-duration: 19s; }
@keyframes cca-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.06); }
  66% { transform: translate(-18px, 16px) scale(0.96); }
}

/* ---------- Digital David halo ring ---------- */
.cca-digital-david__embed-col { position: relative; }
.cca-david__halo {
  position: absolute;
  inset: -14px;
  z-index: 0;
  border-radius: calc(var(--cca-radius-xl) + 14px);
  background: conic-gradient(from 0deg, rgba(240,200,105,0.35), rgba(53,224,208,0.25), rgba(124,77,255,0.35), rgba(240,200,105,0.35));
  filter: blur(28px);
  opacity: 0.6;
  animation: cca-halo-spin 14s linear infinite;
}
.cca-digital-david__embed { position: relative; z-index: 1; }
@keyframes cca-halo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---------- Course card icon badge + stage eyebrow ---------- */
.cca-course-card { position: relative; }
.cca-course-card__icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--cca-gold-light);
  background: rgba(5, 6, 15, 0.55);
  border: 1px solid rgba(240, 200, 105, 0.35);
  z-index: 2;
  backdrop-filter: blur(6px);
}
.cca-course-card__stage {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cca-aqua-light) !important;
  margin-bottom: 8px;
}

/* ---------- Pathway: flowing gradient line + staggered node pulse ---------- */
.cca-pathway__line {
  background-size: 220% 100%;
  animation: cca-flow 7s linear infinite;
}
@keyframes cca-flow {
  from { background-position: 0% 0; }
  to { background-position: -220% 0; }
}
.cca-pathway__number {
  animation: cca-node-pulse 4.5s ease-in-out infinite;
  animation-delay: calc(var(--cca-node-i, 0) * 0.35s);
}
@keyframes cca-node-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(240, 200, 105, 0); }
  50% { box-shadow: 0 0 22px rgba(240, 200, 105, 0.55); }
}

/* ---------- Subtle vignette + film-grain (cheap, CSS-only) ---------- */
.cca-homepage.cca-digital-david::after,
.cca-homepage.cca-course-section::after,
.cca-homepage.cca-pathway::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.35) 100%);
}

/* Keep all real content above the shared decorative layers (orbs,
   vignette, halo, portal rings) — every section that uses them already
   has position:relative from earlier rules; content children just
   need a higher stacking order. */
.cca-hero__inner,
.cca-digital-david__inner,
.cca-course-section__inner,
.cca-pathway__inner {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cca-hero__headline-gradient,
  .cca-hero__portal-rings span,
  .cca-orb,
  .cca-david__halo,
  .cca-pathway__line,
  .cca-pathway__number {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .cca-orb { display: none; }
  .cca-hero__portal-rings { width: 80vmin; height: 80vmin; }
}

/* ============================================================
   v2.0.0 ADDITIONS — deeper cinematic rebuild: bigger/bolder hero
   typography, true parallax depth (mouse-driven, see cca-homepage.js
   initParallax()), a richer "flower of life" sacred-geometry layer
   with its own breathing pulse (independent of the existing rotation,
   see the nested .cca-hero__geo-parallax/.cca-hero__geo-breathe
   wrappers), a genuine light-sweep shine on course-card hover, and a
   visibly traveling light along the Course Pathway line. Additive on
   top of v1.7-v1.9; nothing removed or restructured.
   ============================================================ */

/* ---------- Bigger, bolder hero typography ---------- */
.cca-homepage.cca-hero .cca-hero__headline {
  font-size: clamp(40px, 6.8vw, 88px);
  letter-spacing: -0.02em;
}
.cca-homepage.cca-hero .cca-hero__subheadline {
  font-size: clamp(17px, 2vw, 21px);
}

/* ---------- Parallax layering ---------- */
.cca-hero__geo-parallax {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(85vw, 820px);
  height: min(85vw, 820px);
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cca-hero__geo-breathe {
  width: 100%;
  height: 100%;
  animation: cca-geo-breathe 8s ease-in-out infinite;
}
.cca-hero__geo-parallax .cca-hero__geometry {
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  height: 100%;
  transform: none;
  animation: cca-rotate-slow 90s linear infinite;
}
@keyframes cca-geo-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
.cca-hero__canvas,
.cca-orbs {
  will-change: transform;
}

/* ---------- Course card light-sweep shine on hover ---------- */
.cca-course-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(75deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-15deg);
  transition: left 0.9s ease;
  pointer-events: none;
  z-index: 3;
}
.cca-course-card:hover::after {
  left: 130%;
}

/* ---------- Pathway traveling light ---------- */
.cca-pathway__traveler {
  position: absolute;
  top: 30px;
  left: 6%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cca-gold-light);
  box-shadow: 0 0 16px 4px rgba(240, 200, 105, 0.85);
  z-index: 0;
  animation: cca-dot-travel 6s ease-in-out infinite;
}
@keyframes cca-dot-travel {
  0% { left: 6%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 94%; opacity: 0; }
}
@media (max-width: 960px) {
  .cca-pathway__traveler { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cca-hero__geo-breathe,
  .cca-hero__geo-parallax .cca-hero__geometry,
  .cca-pathway__traveler,
  .cca-course-card::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   v4.0.0 CINEMATIC ADDITIONS — Three.js hero mount, GSAP entrance
   base-state, holographic Digital David chamber, and the pathway's
   constellation-map layout. Nothing above this line was restructured;
   everything here layers on top of the v1.7–v3.0 foundation and
   remains fully functional (CSS-only fallback) if Three.js/GSAP never
   load, and fully static/visible under prefers-reduced-motion.
   ============================================================ */

/* ---------- ACT 1 — Three.js hero mount ---------- */
.cca-hero__three-mount {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.cca-hero__three-canvas { display: block; width: 100%; height: 100%; }
/* Once cca-cinematic.js confirms its WebGL scene constructed OK, it adds
   this class to .cca-hero and the plain 2D canvas starfield (already
   drawn by cca-homepage.js) hides — the two never render on top of each
   other, and if Three.js never loads this class never gets added, so the
   2D canvas simply stays the only starfield. */
.cca-hero--three-active .cca-hero__canvas { display: none; }

/* Cinematic ALL-CAPS treatment for the ACT 1 headline, applied purely
   visually via text-transform so the admin-editable option value
   (Settings -> Homepage Hero -> Hero headline) can stay normal title
   case in the database/admin field. */
.cca-hero__headline {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- GSAP entrance base state ----------
   Progressive enhancement: every .cca-gsap-hero-item is fully visible
   by default (no dependency on JS running at all). If GSAP loads,
   initGsapHeadline() takes over with gsap.set()/gsap.to() and this CSS
   transition simply becomes irrelevant (GSAP sets inline opacity/
   transform directly); if it doesn't, these elements were never hidden
   in the first place, so there is no "flash of invisible content" risk
   either way. */
.cca-gsap-hero-item { opacity: 1; }

/* ---------- ACT 2 — Holographic Digital David chamber ---------- */
.cca-chamber {
  position: relative;
  border-radius: 20px;
  padding: 3px;
  background: linear-gradient(160deg, rgba(224,183,104,0.35), rgba(155,111,214,0.25) 45%, rgba(63,224,197,0.3));
  box-shadow: 0 0 60px rgba(155,111,214,0.22), 0 0 0 1px rgba(255,255,255,0.05) inset;
}
.cca-chamber::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(224,183,104,0.7), rgba(155,111,214,0.5) 45%, rgba(63,224,197,0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: cca-chamber-border-spin 8s linear infinite;
  pointer-events: none;
}
@keyframes cca-chamber-border-spin {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.cca-chamber__corner {
  position: absolute; width: 22px; height: 22px; z-index: 2; pointer-events: none;
  border-color: rgba(224,183,104,0.75);
  border-style: solid; border-width: 0;
}
.cca-chamber__corner--tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; border-radius: 6px 0 0 0; }
.cca-chamber__corner--tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; border-radius: 0 6px 0 0; }
.cca-chamber__corner--bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; border-radius: 0 0 0 6px; }
.cca-chamber__corner--br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; border-radius: 0 0 6px 0; }
.cca-chamber__scanline {
  position: absolute; left: 0; right: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, transparent, rgba(63,224,197,0.14), transparent);
  z-index: 2; pointer-events: none;
  animation: cca-chamber-scan 5s ease-in-out infinite;
}
@keyframes cca-chamber-scan {
  0%   { top: -40%; }
  50%  { top: 100%; }
  100% { top: -40%; }
}
.cca-chamber .cca-digital-david__embed { position: relative; z-index: 1; border-radius: 17px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .cca-chamber::before,
  .cca-chamber__scanline { animation: none; }
}

/* ---------- ACT 3 — Consciousness Pathway constellation map ---------- */
.cca-constellation {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 460px;
  margin-top: 64px;
}
.cca-constellation__svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
  filter: drop-shadow(0 0 6px rgba(224,183,104,0.35));
}
.cca-constellation__path {
  opacity: 0.55;
  stroke-dasharray: 2 1.4;
}
/* Traveling light pulse — a pure-CSS animated dot, moving left/top
   through the exact same six coordinates used for the SVG path and the
   node positions above (see cca_render_pathway_html()), so it always
   visibly "travels through the pathway" without any JS dependency. */
.cca-constellation__pulse {
  position: absolute; z-index: 1;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #e0b768 45%, rgba(224,183,104,0) 75%);
  box-shadow: 0 0 14px 4px rgba(224,183,104,0.65);
  animation: cca-constellation-travel 10s linear infinite;
  pointer-events: none;
}
@keyframes cca-constellation-travel {
  0%    { left: 8%;  top: 78%; }
  20%   { left: 24%; top: 28%; }
  40%   { left: 44%; top: 80%; }
  60%   { left: 62%; top: 24%; }
  80%   { left: 80%; top: 74%; }
  100%  { left: 94%; top: 26%; }
}
.cca-constellation__node {
  position: absolute;
  z-index: 2;
  width: 208px;
  transform: translate(-50%, -50%) perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY));
  box-shadow: var(--cca-glow-gold), 0 0 0 1px rgba(224,183,104,0.15);
  animation: cca-node-border-glow 4.5s ease-in-out infinite;
}
@keyframes cca-node-border-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(224,183,104,0.22), 0 0 0 1px rgba(224,183,104,0.15); }
  50%      { box-shadow: 0 0 30px rgba(155,111,214,0.35), 0 0 0 1px rgba(155,111,214,0.3); }
}
.cca-constellation__node:hover {
  transform: translate(-50%, -50%) perspective(900px) rotateX(var(--cca-tiltX)) rotateY(var(--cca-tiltY)) translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
  .cca-constellation__pulse,
  .cca-constellation__node { animation: none; }
}

/* Mobile / reduced-motion fallback: the constellation collapses to a
   plain static vertical stack, matching the original v3.0.0 pathway
   layout — no absolute positioning, no SVG lines, no traveling pulse. */
@media (max-width: 900px) {
  .cca-constellation {
    aspect-ratio: auto; min-height: 0;
    display: flex; flex-direction: column; gap: 20px;
  }
  .cca-constellation__svg, .cca-constellation__pulse { display: none; }
  .cca-constellation__node {
    position: static;
    width: 100%;
    transform: none !important;
    animation: none;
  }
  .cca-constellation__node:hover { transform: none !important; }
}

/* ============================================================
   v4.1.0 — "Living Light Codes" ambient glyph layer, mounted inside
   the existing .cca-orbs containers in every section (hero, course
   grid, pathway, David chamber). The soft glow orbs stay as a secondary
   depth layer (dimmed slightly below) — the glyphs are now the primary
   "living consciousness" background motion. Skipped entirely under
   prefers-reduced-motion (see initLivingLightCodes() JS gate) and the
   whole layer is hidden outright on very small screens below.
   ============================================================ */
.cca-light-codes-mount .cca-orb { opacity: 0.7; }

.cca-light-code {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  color: #e0c87a;
  opacity: 0;
  transform: rotate(var(--cca-glyph-rot, 0deg)) scale(0.8);
  filter: drop-shadow(0 0 0 rgba(224,200,122,0));
  transition: opacity 1.4s ease, filter 1.8s ease, transform 6.5s ease;
}
.cca-light-code svg { display: block; width: 100%; height: 100%; }
.cca-light-code--active {
  opacity: 0.5;
  transform: rotate(calc(var(--cca-glyph-rot, 0deg) + 14deg)) scale(1);
  filter: drop-shadow(0 0 8px rgba(224,200,122,0.5)) drop-shadow(0 0 20px rgba(155,111,214,0.22));
}
.cca-light-code--dissolve {
  opacity: 0 !important;
  transform: rotate(calc(var(--cca-glyph-rot, 0deg) + 26deg)) scale(1.3);
  filter: drop-shadow(0 0 24px rgba(224,200,122,0.12)) blur(2px);
  transition: opacity 1.3s ease, filter 1.3s ease, transform 1.3s ease;
}

/* Thin fading "energy line" connecting a pair of glyphs that spawned
   together — a lightweight stand-in for glyphs "combining" into a
   larger pattern before both dissolve. */
.cca-light-code-link {
  position: absolute;
  height: 1px;
  transform-origin: 0 0;
  background: linear-gradient(90deg, rgba(224,200,122,0.55), rgba(155,111,214,0.35), transparent);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.cca-light-code-link--active { opacity: 0.55; }
.cca-light-code-link--dissolve { opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .cca-light-code, .cca-light-code-link { display: none; }
}
@media (max-width: 640px) {
  .cca-light-code { width: 20px !important; height: 20px !important; }
}

/* ============================================================
   v4.1.0 — STARGATE PORTAL SYSTEM. Shared circular "living portal"
   treatment for both course-card thumbnails and constellation pathway
   nodes (see cca_render_portal_rings_html() in PHP — same decorative
   ring/particle markup, two contexts). Slow, elegant rotation by
   design ("no spinning fast... very slow... elegant"); hover
   accelerates rings and brightens the core; a soft breathing scale
   keeps it alive at rest. Fully skipped/frozen under
   prefers-reduced-motion.
   ============================================================ */
.cca-portal {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 26px auto 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cca-portal-breathe 6s ease-in-out infinite;
}
.cca-portal--node { width: 92px; height: 92px; margin: 14px auto 2px; }

@keyframes cca-portal-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}

.cca-portal__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
}
.cca-portal__ring--outer {
  border-top-color: rgba(240,200,105,0.55);
  border-right-color: rgba(240,200,105,0.15);
  animation: cca-portal-spin 22s linear infinite;
}
.cca-portal__ring--mid {
  inset: 10px;
  border-bottom-color: rgba(155,111,214,0.5);
  border-left-color: rgba(155,111,214,0.15);
  animation: cca-portal-spin-reverse 16s linear infinite;
}
.cca-portal__ring--inner {
  inset: 20px;
  border-top-color: rgba(63,224,197,0.45);
  border-right-color: rgba(63,224,197,0.12);
  animation: cca-portal-spin 11s linear infinite;
}
@keyframes cca-portal-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes cca-portal-spin-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.cca-portal__glow {
  position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,183,104,0.28) 0%, rgba(155,111,214,0.12) 55%, transparent 78%);
  filter: blur(2px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.cca-portal__core {
  position: absolute; inset: 24px; border-radius: 50%;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.35), 0 0 18px rgba(224,183,104,0.25);
  overflow: hidden;
  transition: box-shadow 0.4s ease;
}
.cca-portal--node .cca-portal__core { inset: 16px; }

/* v4.10.0 -- FIX: .cca-course-card__image's old flat-card sizing
   (width:100%; height:200px) was leaking through onto the SAME element
   as .cca-portal__core (position:absolute; inset:24px), producing an
   oversized box that overflowed the 128x128 portal frame and bled down
   over the course title/description text beneath it. Force the portal
   ring's own inset-driven sizing to win outright. */
.cca-portal__core.cca-course-card__image {
  width: auto !important;
  height: auto !important;
  position: absolute !important;
}

.cca-portal__icon {
  position: absolute; inset: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--cca-gold-light);
  background: rgba(5,6,15,0.55);
  border: 1px solid rgba(240,200,105,0.3);
  backdrop-filter: blur(6px);
  z-index: 1;
}
.cca-portal--node .cca-portal__icon { inset: 16px; font-size: 20px; }
/* Overrides the old top-right badge positioning now that the icon lives
   centered inside the portal core (compound selector wins over the
   original .cca-course-card__icon rule regardless of source order). */
.cca-portal__icon.cca-course-card__icon,
.cca-portal__icon.cca-pathway__icon {
  position: absolute; top: auto; right: auto;
  width: auto; height: auto;
}

/* Tiny energy-stream particles orbiting the ring, one per <i>, offset by
   nth-child so they sit at different angles/radii and pulse out of
   phase — "particle halo." */
.cca-portal__particles { position: absolute; inset: 0; pointer-events: none; }
.cca-portal__particles i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--cca-gold-light);
  box-shadow: 0 0 6px 1px rgba(240,200,105,0.7);
  opacity: 0.7;
  animation: cca-portal-particle-pulse 3.6s ease-in-out infinite;
}
.cca-portal__particles i:nth-child(1) { top: 4%;  left: 50%; animation-delay: 0s; }
.cca-portal__particles i:nth-child(2) { top: 26%; left: 92%; animation-delay: 0.5s; }
.cca-portal__particles i:nth-child(3) { top: 74%; left: 92%; animation-delay: 1s; }
.cca-portal__particles i:nth-child(4) { top: 96%; left: 50%; animation-delay: 1.5s; }
.cca-portal__particles i:nth-child(5) { top: 74%; left: 8%;  animation-delay: 2s; }
.cca-portal__particles i:nth-child(6) { top: 26%; left: 8%;  animation-delay: 2.5s; }
@keyframes cca-portal-particle-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50%      { opacity: 0.9;  transform: scale(1.3); }
}

/* ---------- Portal activation (hover / focus) ----------
   Rings rotate faster, core glows brighter, particles brighten —
   "hover expands field... particles spiral inward... energy lines
   illuminate" — never a fast/jarring spin, just a noticeably livelier
   state change. */
.cca-course-card:hover .cca-portal__ring--outer,
.cca-pathway__node:hover .cca-portal__ring--outer { animation-duration: 7s; }
.cca-course-card:hover .cca-portal__ring--mid,
.cca-pathway__node:hover .cca-portal__ring--mid { animation-duration: 5.5s; }
.cca-course-card:hover .cca-portal__ring--inner,
.cca-pathway__node:hover .cca-portal__ring--inner { animation-duration: 3.5s; }
.cca-course-card:hover .cca-portal__glow,
.cca-pathway__node:hover .cca-portal__glow { filter: blur(0.5px); opacity: 1.15; }
.cca-course-card:hover .cca-portal__core,
.cca-pathway__node:hover .cca-portal__core {
  box-shadow: inset 0 0 26px rgba(0,0,0,0.3), 0 0 34px rgba(224,183,104,0.55);
}
.cca-course-card:hover .cca-portal__particles i,
.cca-pathway__node:hover .cca-portal__particles i { animation-duration: 1.8s; opacity: 1; }
.cca-course-card:active .cca-portal,
.cca-pathway__node:active .cca-portal { animation: cca-portal-activate 0.5s ease-out; }
@keyframes cca-portal-activate {
  0%   { transform: scale(1); filter: brightness(1); }
  40%  { transform: scale(1.12); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .cca-portal,
  .cca-portal__ring--outer, .cca-portal__ring--mid, .cca-portal__ring--inner,
  .cca-portal__particles i { animation: none; }
}
@media (max-width: 640px) {
  .cca-portal { width: 100px; height: 100px; }
  .cca-portal--node { width: 76px; height: 76px; }
}

/* Reconciles the older fixed-size .cca-pathway__node-image/.cca-pathway__icon
   rules (still present above, unchanged, for backward compatibility)
   with the new portal-core inset-based sizing — compound selectors win
   on specificity regardless of source order, so the node's image/icon
   always fills the portal core exactly. */
.cca-portal__core.cca-pathway__node-image {
  position: absolute; inset: 16px;
  width: auto; height: auto;
  border: none; box-shadow: none;
}
.cca-portal__icon.cca-pathway__icon {
  font-size: 20px;
}

/* ============================================================
   v4.11.0 — MOBILE PERFORMANCE / CRASH FIX
   Multiple visitors reported the Academy page loading very slowly on
   phones, and at least one hit a mobile-browser tab crash ("A problem
   repeatedly occurred" in Safari) rather than an actual WordPress
   fatal error. backdrop-filter: blur() is one of the single most
   GPU-expensive CSS properties on mobile browsers, and this page uses
   it on more than a dozen elements at once (course cards, pathway
   nodes, the Digital David panel, floating button, modal, widget
   chrome); combined with the Three.js WebGL hero scene (now skipped
   entirely on mobile — see cca_enqueue_assets()) and several
   continuously-running conic-gradient rotations, it was enough to
   exhaust a phone's compositing/GPU budget. This block removes blur
   and the heaviest continuous decorative animations specifically
   under the same max-width WordPress itself treats as "mobile", while
   leaving every desktop visual completely unchanged.
   ============================================================ */
@media (max-width: 782px) {
  .cca-homepage * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Continuously-rotating conic-gradient rings/borders (portal rings,
     course-card hover border, David halo, course-portal ring) are
     purely decorative and among the most expensive things on the page
     to keep compositing every frame — freeze them on mobile. */
  .cca-portal__ring--outer,
  .cca-portal__ring--mid,
  .cca-portal__ring--inner,
  .cca-course-card::before,
  .cca-david__halo::before,
  .cca-course-portal-ring::before,
  .cca-hero__geometry,
  .cca-hero__portal-rings span {
    animation: none !important;
  }
  /* Ambient blurred orbs (filter: blur(40px), animated) are another
     heavy compositing cost for very little visible benefit on a small
     screen — hide rather than try to cheapen them. */
  .cca-orbs { display: none !important; }
  /* 3D tilt/parallax transforms never activate on touch anyway (see
     initTilt()/initParallax() pointer:fine guards), but neutralize the
     perspective/rotateX/rotateY base transform too so course cards
     never get stuck in a tilted GPU layer on mobile. */
  .cca-course-card,
  .cca-course-card:hover,
  .cca-pathway__node {
    transform: none !important;
  }
}
