/* =============================================
   CPD New Site — Shared Styles
   Loaded by every page. Tailwind config lives
   inline per page (CDN constraint).
   ============================================= */

/* --- Focus rings --- */
:focus-visible { outline: 2px solid #1E6FFF; outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* --- Buttons --- */
.btn-gradient {
  background: linear-gradient(135deg, #1E6FFF 0%, #1558D6 100%);
  box-shadow: 0 2px 12px rgba(30,111,255,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: #fff;
}
.btn-gradient:hover {
  box-shadow: 0 4px 20px rgba(30,111,255,0.45);
  transform: translateY(-1px);
}
.btn-gradient:active { transform: translateY(0); }

.btn-coral {
  background: linear-gradient(135deg, #FF5A2C 0%, #E04515 100%);
  box-shadow: 0 2px 12px rgba(255,90,44,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: #fff;
}
.btn-coral:hover {
  box-shadow: 0 4px 20px rgba(255,90,44,0.4);
  transform: translateY(-1px);
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-ghost-dark {
  background: transparent;
  color: #1E6FFF;
  border: 2px solid #1E6FFF;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-ghost-dark:hover {
  background: #1E6FFF;
  color: #fff;
}

/* --- Card hover lift --- */
.card-lift {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(8,13,26,0.07), 0 1px 2px rgba(8,13,26,0.05);
}
.card-lift:hover {
  box-shadow: 0 12px 32px rgba(8,13,26,0.12), 0 2px 8px rgba(8,13,26,0.06);
  transform: translateY(-3px);
}

/* --- Hero glow orbs --- */
.glow-blue { background: radial-gradient(ellipse, rgba(30,111,255,0.18) 0%, transparent 70%); }
.glow-coral { background: radial-gradient(ellipse, rgba(255,90,44,0.12) 0%, transparent 70%); }

/* --- Hero track viz — floating content chips on landing-page heroes --- */
.hero-viz {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin-left: auto;
  isolation: isolate;
}
.hero-viz .viz-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 28px;
  padding: 22px 28px;
  text-align: center;
  z-index: 2;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  min-width: 180px;
}
.hero-viz .viz-center .viz-big {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 6px;
}
.hero-viz.blue .viz-center .viz-big   { color: #6FA9FF; }
.hero-viz.coral .viz-center .viz-big  { color: #FF8A5F; }
.hero-viz .viz-center .viz-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.hero-viz .viz-glow {
  position: absolute;
  inset: 10% 10% 10% 10%;
  border-radius: 999px;
  z-index: 0;
  pointer-events: none;
}
.hero-viz.blue .viz-glow {
  background: radial-gradient(circle, rgba(30,111,255,0.30) 0%, transparent 65%);
}
.hero-viz.coral .viz-glow {
  background: radial-gradient(circle, rgba(255,90,44,0.28) 0%, transparent 65%);
}
.hero-viz .chip {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  z-index: 1;
  animation: viz-drift 9s ease-in-out infinite;
  will-change: transform;
}
.hero-viz.blue .chip.accent {
  background: rgba(30, 111, 255, 0.25);
  border-color: rgba(110, 169, 255, 0.55);
  color: #ffffff;
}
.hero-viz.coral .chip.accent {
  background: rgba(255, 90, 44, 0.25);
  border-color: rgba(255, 138, 95, 0.55);
  color: #ffffff;
}
.hero-viz .chip:nth-child(2) { animation-duration: 10s;  animation-delay: -1s; }
.hero-viz .chip:nth-child(3) { animation-duration: 11s;  animation-delay: -2s; }
.hero-viz .chip:nth-child(4) { animation-duration: 8s;   animation-delay: -3s;  animation-direction: reverse; }
.hero-viz .chip:nth-child(5) { animation-duration: 12s;  animation-delay: -1.5s; }
.hero-viz .chip:nth-child(6) { animation-duration: 9.5s; animation-delay: -2.5s; animation-direction: reverse; }
.hero-viz .chip:nth-child(7) { animation-duration: 10.5s; animation-delay: -0.5s; }
.hero-viz .chip:nth-child(8) { animation-duration: 11.5s; animation-delay: -4s;   animation-direction: reverse; }
@keyframes viz-drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(0, -10px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-viz .chip { animation: none; }
}
@media (max-width: 1023px) {
  .hero-viz {
    max-width: 360px;
    margin: 32px auto 0;
    aspect-ratio: 1 / 0.85;
  }
  .hero-viz .viz-center { padding: 18px 22px; min-width: 160px; }
  .hero-viz .viz-center .viz-big { font-size: 32px; }
  .hero-viz .chip { font-size: 11px; padding: 6px 10px; }
}

/* --- Hero video --- */
#hero-video {
  opacity: 0;
  transition: opacity 1.5s ease;
}
#hero-video.is-playing { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  #hero-video { display: none !important; }
}

/* --- Logo chip (each logo sits in a white card) --- */
.logo-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E0E6EF;
  border-radius: 18px;
  padding: 18px 28px;
  min-width: 160px;
  height: 96px;
  box-shadow: 0 4px 14px rgba(8, 13, 26, 0.05);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.logo-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(8, 13, 26, 0.08);
  border-color: rgba(30, 111, 255, 0.25);
}
@media (max-width: 1023px) {
  .logo-chip {
    min-width: 140px;
    height: 84px;
    padding: 14px 22px;
    border-radius: 16px;
  }
}

/* --- Logo marquee — runs at all sizes, both edges masked ---
   Uses inline-flex on the track (shrinks to content naturally),
   block wrapper with overflow:hidden + side-fade pseudo-elements. */
.logo-marquee-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.logo-marquee-wrapper::before,
.logo-marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.logo-marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, rgba(255,255,255,0));
}
.logo-marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, rgba(255,255,255,0));
}
.logo-marquee {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 32px;
  padding: 0 16px;
  animation: logo-marquee-scroll 50s linear infinite;
}
@media (min-width: 1024px) {
  .logo-marquee { gap: 48px; }
}
.logo-marquee:hover { animation-play-state: paused; }
@keyframes logo-marquee-scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@media (max-width: 1023px) {
  .logo-marquee { animation-duration: 32s; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { animation: none; }
}

/* --- Scroll entrance --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.is-visible .stagger-child:nth-child(1) { transition-delay: 0ms; }
.animate-on-scroll.is-visible .stagger-child:nth-child(2) { transition-delay: 100ms; }
.animate-on-scroll.is-visible .stagger-child:nth-child(3) { transition-delay: 200ms; }
.animate-on-scroll.is-visible .stagger-child:nth-child(4) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .logo-marquee { animation: none !important; }
  .animate-on-scroll {
    opacity: 1; transform: none; transition: none;
  }
  .btn-gradient, .btn-coral, .card-lift {
    transition: none; transform: none;
  }
}

/* --- Nav scrolled shadow --- */
#nav.scrolled {
  box-shadow: 0 1px 3px rgba(8,13,26,0.08);
}

/* --- Mobile bottom bar spacing --- */
@media (max-width: 1023px) {
  footer { padding-bottom: 5rem; }
}

/* --- Accordion (FAQ) --- */
details.faq {
  border-bottom: 1px solid #E0E6EF;
  padding: 1rem 0;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: #080D1A;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-size: 1.5rem;
  color: #1E6FFF;
  font-weight: 300;
  transition: transform 0.2s ease;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq[open] summary { color: #1E6FFF; }
details.faq .faq-body {
  margin-top: 0.75rem;
  color: #3A4660;
  line-height: 1.65;
  font-size: 16px;
}

/* --- Form mockup styles --- */
.form-mockup-input,
.form-mockup-select,
.form-mockup-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E0E6EF;
  border-radius: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #080D1A;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-mockup-input:focus,
.form-mockup-select:focus,
.form-mockup-textarea:focus {
  outline: none;
  border-color: #1E6FFF;
  box-shadow: 0 0 0 3px rgba(30,111,255,0.12);
}
.form-mockup-label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  color: #080D1A;
  font-size: 14px;
  margin-bottom: 0.4rem;
}
.form-mockup-helper {
  font-size: 13px;
  color: #626F8C;
  margin-top: 0.35rem;
}
.form-mockup-banner {
  background: #EEF4FF;
  border: 1px dashed #1E6FFF;
  color: #1E6FFF;
  font-size: 14px;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

/* --- Hero portrait rotator --- */
.hero-portrait-blob {
  background: radial-gradient(ellipse at 50% 45%, #DCE8FF 0%, #DCE8FF 55%, transparent 70%);
  filter: blur(2px);
}
.hero-portrait-shadow {
  filter: drop-shadow(0 24px 48px rgba(8, 13, 26, 0.18));
}
.hero-dots {
  background-image: radial-gradient(circle, #DCE8FF 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}
.hero-feature-strip {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}
.hero-stat-card {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}
.progress-ring {
  transform: rotate(-90deg);
}
.portrait-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.12);
  transform-origin: center bottom;
  opacity: 0;
  transition: opacity 700ms ease-in-out;
}
.portrait-slide.is-active { opacity: 1; }
.portrait-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  transition: width 200ms ease, background 200ms ease;
  cursor: pointer;
  border: 0;
  padding: 0;
  position: relative;
}
.portrait-dot.is-active { width: 22px; background: #FFFFFF; }
.portrait-dot:hover { background: #FFFFFF; }
/* Enlarge the tap target to ~44px without changing the visual dot (WCAG 2.5.5) */
.portrait-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 44px;
}

/* Stat card slides (rotate alongside portraits) */
.hero-stat-card { position: absolute; }
.stat-slide {
  position: absolute;
  inset: 20px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 500ms ease-in-out, transform 500ms ease-in-out;
  pointer-events: none;
}
.stat-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .portrait-slide, .stat-slide { transition: none !important; }
}

/* --- Sold-out cohort card ---
   Applied by build_cohorts.mjs (status "full") and toggled live by
   js/eventbrite-status.js when Eventbrite reports SOLD_OUT. Tints the card red
   and mutes the "View on Eventbrite" button so it no longer reads as a primary
   "book now" CTA. Targets the Eventbrite link generically so it also works on
   any older hand-built cohort card. */
.cohort-soldout { background-color: #fef2f2 !important; border-color: #fecaca !important; }
/* Keep the "Fully booked" badge a clear lozenge against the red-tinted card
   (its default bg-red-50 matches the card bg and disappears). Deepen it to
   red-200 fill / red-800 text — same pill format as "Recruiting now". */
.cohort-soldout span.rounded-full {
  background-color: #fecaca !important;
  color: #991b1b !important;
}
.cohort-soldout a[href*="eventbrite."] {
  background: #f1f3f5 !important;
  color: #98a2b3 !important;
  box-shadow: none !important;
}

/* --- Mega menu --- */
.mega-panel { z-index: 49; }
.mega-panel .mega-inner { will-change: transform, opacity; }
.nav-trigger[aria-expanded="true"] { color: #1E6FFF; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .mega-panel .mega-inner,
  .nav-chevron,
  .mobile-accordion-chevron {
    transition: none !important;
  }
}

/* --- Lazy YouTube facade --- */
.video-embed {
  position: relative;
  cursor: pointer;
  background: #080D1A;
  overflow: hidden;
}
.video-embed::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}
.video-embed > img,
.video-embed > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-embed > img {
  transition: transform 0.35s ease, filter 0.2s ease;
}
.video-embed:hover > img { transform: scale(1.03); filter: brightness(0.85); }
.video-embed .video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.video-embed .video-play-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(8, 13, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(2px);
}
.video-embed:hover .video-play-icon {
  background: #FF5A2C;
  transform: scale(1.06);
}
.video-embed .video-play-icon svg { width: 36px; height: 36px; color: #fff; margin-left: 4px; }
.video-embed .video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(8, 13, 26, 0.85));
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  z-index: 1;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .video-embed > img,
  .video-embed .video-play-icon { transition: none !important; transform: none !important; }
}

/* --- Print --- */
@media print {
  #nav, #mobile-bottom-bar, .mega-panel { display: none !important; }
  body { color: #000; background: #fff; }
  section { break-inside: avoid; }
}
