/* ==========================================================================
   JD Hub Tech — design system (v3)
   --------------------------------------------------------------------------
   Palette: midnight navy ground, gold energy, cobalt + cyan tech accents,
   brand red for primary action. Warm ivory for light sections.
   Type: Bricolage Grotesque (display) / Plus Jakarta Sans (body) /
   JetBrains Mono (micro-labels).
   Motion: one orchestrated system — scroll reveals, cursor spotlight, card
   spotlight, 3D tilt, magnetic CTAs, ripple, count-up, parallax, marquee.
   Every effect is transform/opacity only and is disabled under
   prefers-reduced-motion (see the end of this file).
   ========================================================================== */

:root {
  /* Ground */
  --jd-mid: #060b18;
  --jd-mid-2: #0b1730;
  --jd-mid-3: #122043;

  /* Accents */
  --jd-gold: #e3a821;
  --jd-gold-2: #ffd166;
  --jd-gold-3: #b07c0f;
  --jd-blue: #1d4fd6;
  --jd-blue-2: #4b7dff;
  --jd-cyan: #2fd6cd;
  --jd-red: #c8102e;
  --jd-red-2: #ef2b4a;

  /* Text / surfaces */
  --jd-ink: #14101f;
  --jd-muted: #6b6350;
  --jd-light: #faf6ec;
  --jd-card: #ffffff;
  --jd-border: rgba(227, 168, 33, .22);
  --jd-border-strong: rgba(227, 168, 33, .42);

  /* Depth */
  --jd-radius: 1.15rem;
  --jd-radius-sm: .8rem;
  --jd-shadow: 0 10px 30px -14px rgba(6, 11, 24, .22);
  --jd-shadow-lg: 0 30px 70px -24px rgba(6, 11, 24, .38);
  --jd-shadow-glow: 0 18px 44px -18px rgba(227, 168, 33, .55);

  /* Motion */
  --jd-ease: cubic-bezier(.16, 1, .3, 1);
  --jd-ease-soft: cubic-bezier(.4, 0, .2, 1);

  --jd-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --jd-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --jd-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

[data-bs-theme="dark"] {
  --jd-ink: #f4efe2;
  --jd-muted: #b3a888;
  --jd-light: #0b1730;
  --jd-card: #101c38;
  --jd-border: rgba(255, 209, 102, .2);
  --jd-border-strong: rgba(255, 209, 102, .4);
  --jd-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6);
  --jd-shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .72);
}

/* ==========================================================================
   1. Base
   ========================================================================== */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--jd-font);
  color: var(--jd-ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-bs-theme="dark"] body { background: var(--jd-mid); }

h1, h2, h3, h4, .display-3, .display-5, .hero-title {
  font-family: var(--jd-display);
  letter-spacing: -.02em;
  font-weight: 700;
}
.fw-extrabold { font-weight: 800; }

/* Micro-labels use the mono face for a technical feel. */
.eyebrow, .stat-label, .footer-heading, .tech-chip, .app-badge-version {
  font-family: var(--jd-mono);
  letter-spacing: .08em;
}

::selection { background: var(--jd-gold); color: #241a03; }

/* Focus ring — visible for keyboard users, calm for pointer users. */
:focus-visible {
  outline: 2px solid var(--jd-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (min-width: 992px) {
  ::-webkit-scrollbar { width: 11px; }
  ::-webkit-scrollbar-track { background: var(--jd-mid); }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--jd-gold-3), var(--jd-gold));
    border-radius: 10px; border: 3px solid var(--jd-mid);
  }
}

/* ==========================================================================
   2. Atmosphere — grain, aurora, cursor spotlight
   ========================================================================== */

/* Film grain. One fixed layer, no repaint cost. */
.jd-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .3;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}
[data-bs-theme="dark"] .jd-noise { opacity: .22; }

/* Cursor spotlight — desktop pointer only. */
.jd-cursor {
  position: fixed; top: 0; left: 0; width: 560px; height: 560px;
  border-radius: 50%; pointer-events: none; z-index: 2;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(227, 168, 33, .10), rgba(29, 79, 214, .06) 42%, transparent 66%);
  opacity: 0; transition: opacity .5s ease;
}
.jd-cursor.is-on { opacity: 1; }
@media (hover: none), (max-width: 991.98px) { .jd-cursor { display: none; } }

/* Aurora blobs behind the hero and CTA band. */
.jd-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.jd-aurora span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
  animation: jd-drift 22s ease-in-out infinite;
}
.jd-aurora span:nth-child(1) { width: 46vw; height: 46vw; top: -14vw; right: -8vw; background: rgba(227, 168, 33, .42); }
.jd-aurora span:nth-child(2) { width: 40vw; height: 40vw; bottom: -16vw; left: -10vw; background: rgba(200, 16, 46, .38); animation-delay: -7s; }
.jd-aurora span:nth-child(3) { width: 34vw; height: 34vw; top: 34%; left: 42%; background: rgba(29, 79, 214, .4); animation-delay: -13s; }
@keyframes jd-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(4%, -6%, 0) scale(1.12); }
  66%      { transform: translate3d(-5%, 4%, 0) scale(.94); }
}

/* ==========================================================================
   3. Scroll progress + back to top
   ========================================================================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000;
  background: linear-gradient(90deg, var(--jd-cyan), var(--jd-gold), var(--jd-red));
  box-shadow: 0 0 14px rgba(227, 168, 33, .7);
  transition: width .08s linear;
}

.jd-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 1500;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  display: grid; place-items: center; cursor: pointer;
  color: #241a03; background: var(--jd-gold);
  box-shadow: var(--jd-shadow-glow);
  opacity: 0; transform: translateY(16px) scale(.85); pointer-events: none;
  transition: opacity .35s var(--jd-ease), transform .35s var(--jd-ease), background .25s;
}
.jd-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.jd-top:hover { background: var(--jd-gold-2); transform: translateY(-3px) scale(1.06); }
.jd-top i { transition: transform .3s var(--jd-ease); }
.jd-top:hover i { transform: translateY(-2px); }

/* ==========================================================================
   4. Motion primitives
   ========================================================================== */

/* Scroll reveal + 3D tilt share ONE transform declaration.
   They are applied to the same elements, so separate `transform` rules would
   fight (and the later one would also clobber the reveal's transition, making
   cards pop in instead of fading). Variables drive both effects instead.
   Variant + delay are set by JS via custom properties. */
.jd-reveal {
  opacity: 0;
  transform:
    perspective(950px)
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
    translate3d(var(--rv-x, 0px), var(--rv-y, 30px), 0)
    scale(var(--rv-s, 1));
  filter: blur(var(--rv-blur, 0));
  transition:
    opacity .7s var(--jd-ease),
    transform .85s var(--jd-ease),
    filter .7s ease;
  transition-delay: var(--rv-delay, 0ms);
  will-change: opacity, transform;
}
.jd-reveal.is-in {
  opacity: 1;
  filter: none;
  --rv-x: 0px; --rv-y: 0px; --rv-s: 1; --rv-blur: 0px;
  /* Clear the stagger so hover/tilt responds immediately once revealed. */
  transition-delay: 0ms;
}

/* Card spotlight — a soft light that tracks the pointer across the surface. */
.jd-spot { position: relative; }
.jd-spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
              rgba(255, 209, 102, .16), transparent 62%);
  opacity: 0; transition: opacity .35s ease; pointer-events: none; z-index: 1;
}
.jd-spot:hover::before { opacity: 1; }

/* Tilt is snappier on hover than the reveal it shares its transition with. */
.jd-tilt:hover { transition-duration: .12s; }

/* Magnetic wrapper — JS nudges it toward the pointer. */
.jd-magnetic { transition: transform .35s var(--jd-ease); }

/* Click ripple. */
.jd-ripple { position: relative; overflow: hidden; }
.jd-ripple > .jd-ripple-wave {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255, 255, 255, .45); pointer-events: none;
  animation: jd-ripple-out .65s var(--jd-ease-soft) forwards;
}
@keyframes jd-ripple-out { to { transform: scale(2.6); opacity: 0; } }

/* Shine sweep across buttons and cards on hover. */
.jd-shine { position: relative; overflow: hidden; }
.jd-shine::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 42%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .34), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.jd-shine:hover::after { animation: jd-sheen .85s ease; }
@keyframes jd-sheen { to { left: 130%; } }

/* Gradient hairline border that lights up on hover. */
.jd-edge { position: relative; }
.jd-edge::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 209, 102, .85), rgba(200, 16, 46, .55), rgba(47, 214, 205, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease;
}
.jd-edge:hover::after { opacity: 1; }

/* ==========================================================================
   5. Navbar
   ========================================================================== */
.navbar-jd {
  background: linear-gradient(180deg, rgba(6, 11, 24, .82), rgba(11, 23, 48, .74));
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  padding: .85rem 0;
  border-bottom: 1px solid rgba(255, 209, 102, .12);
  transition: padding .35s var(--jd-ease), background .35s ease, box-shadow .35s ease;
}
.navbar-jd.navbar-scrolled {
  background: linear-gradient(180deg, rgba(6, 11, 24, .97), rgba(11, 23, 48, .94));
  box-shadow: 0 14px 40px -22px rgba(0, 0, 0, .85);
  border-bottom-color: rgba(255, 209, 102, .22);
}

.navbar-jd .nav-link {
  color: rgba(255, 255, 255, .78); font-weight: 500;
  position: relative; padding: .5rem .75rem !important;
  transition: color .25s ease;
}
.navbar-jd .nav-link:hover,
.navbar-jd .nav-link.active { color: var(--jd-gold-2); }
/* Underline grows from the centre. */
.navbar-jd .nav-link::after {
  content: ''; position: absolute; left: .75rem; right: .75rem; bottom: .28rem;
  height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--jd-gold), var(--jd-red));
  transform: scaleX(0); transform-origin: center;
  transition: transform .35s var(--jd-ease);
}
.navbar-jd .nav-link:hover::after,
.navbar-jd .nav-link.active::after { transform: scaleX(1); }

.navbar-jd .navbar-brand { color: #fff; }
.navbar-brand img.brand-logo {
  height: 46px; width: auto; display: block;
  transition: transform .4s var(--jd-ease), filter .4s ease;
}
.navbar-brand:hover img.brand-logo { transform: scale(1.05); filter: drop-shadow(0 0 14px rgba(227, 168, 33, .55)); }

#themeToggle { transition: transform .4s var(--jd-ease), background .25s, border-color .25s; }
#themeToggle:hover { transform: rotate(-22deg) scale(1.08); }

/* ==========================================================================
   6. Buttons
   ========================================================================== */
.btn {
  --bs-btn-padding-y: .6rem;
  transition: transform .28s var(--jd-ease), background .28s ease, color .28s ease,
              box-shadow .28s ease, border-color .28s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }

.btn-accent {
  background: linear-gradient(135deg, var(--jd-gold-2), var(--jd-gold));
  color: #241a03; font-weight: 700; border: none;
  box-shadow: 0 10px 26px -10px rgba(227, 168, 33, .6);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #ffe08a, var(--jd-gold-2));
  color: #241a03; box-shadow: 0 16px 34px -12px rgba(227, 168, 33, .8);
}

.btn-primary-jd {
  background: linear-gradient(135deg, var(--jd-red-2), var(--jd-red));
  color: #fff; font-weight: 600; border: none;
  box-shadow: 0 10px 26px -12px rgba(200, 16, 46, .65);
}
.btn-primary-jd:hover {
  color: #fff; box-shadow: 0 16px 34px -12px rgba(200, 16, 46, .85);
  background: linear-gradient(135deg, #ff3b58, var(--jd-red-2));
}

.btn-outline-primary-jd { color: var(--jd-blue); border-color: var(--jd-blue); font-weight: 600; }
.btn-outline-primary-jd:hover { background: var(--jd-blue); color: #fff; }

.btn-outline-gold {
  color: var(--jd-gold-2); border: 1.5px solid var(--jd-border-strong);
  font-weight: 600; background: transparent;
}
.btn-outline-gold:hover {
  background: var(--jd-gold); border-color: var(--jd-gold); color: #241a03;
  box-shadow: var(--jd-shadow-glow);
}

.btn-disabled-soft { background: rgba(29, 79, 214, .1); color: var(--jd-muted); font-weight: 600; }

/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero-jd { position: relative; overflow: hidden; background: var(--jd-mid); color: #fff; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 82% -12%, rgba(255, 209, 102, .26), transparent 62%),
    radial-gradient(760px 440px at -4% 34%, rgba(200, 16, 46, .34), transparent 62%),
    radial-gradient(640px 520px at 50% 112%, rgba(29, 79, 214, .32), transparent 62%),
    linear-gradient(180deg, var(--jd-mid), var(--jd-mid-2));
}
/* Fine grid lines give the hero a technical blueprint feel. */
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(900px 620px at 50% 40%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(900px 620px at 50% 40%, #000, transparent 78%);
}
.hero-jd .container { z-index: 2; }

/* Hero load choreography: children rise in sequence once .is-ready lands. */
.hero-jd .hero-title,
.hero-jd .lead,
.hero-jd .badge,
.hero-jd .hero-actions,
.hero-jd .hero-stats,
.hero-jd .hero-card-stack {
  opacity: 0; transform: translateY(26px);
  transition: opacity .85s var(--jd-ease), transform .95s var(--jd-ease);
}
.hero-jd.is-ready .badge        { opacity: 1; transform: none; transition-delay: .10s; }
.hero-jd.is-ready .hero-title   { opacity: 1; transform: none; transition-delay: .22s; }
.hero-jd.is-ready .lead         { opacity: 1; transform: none; transition-delay: .36s; }
.hero-jd.is-ready .hero-actions { opacity: 1; transform: none; transition-delay: .50s; }
.hero-jd.is-ready .hero-stats   { opacity: 1; transform: none; transition-delay: .64s; }
.hero-jd.is-ready .hero-card-stack { opacity: 1; transform: none; transition-delay: .5s; }

.text-gradient {
  background: linear-gradient(100deg, var(--jd-gold-2) 8%, #fff 46%, var(--jd-cyan) 96%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: jd-gradient-slide 9s ease-in-out infinite;
}
@keyframes jd-gradient-slide { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-sub { max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-stats { gap: 2.5rem !important; }
.hero-stats .stat-num {
  display: block; font-family: var(--jd-display); font-weight: 800; font-size: 2.1rem;
  color: var(--jd-gold-2); line-height: 1; font-variant-numeric: tabular-nums;
}
.hero-stats .stat-label { font-size: .72rem; color: rgba(255, 255, 255, .58); text-transform: uppercase; }
.hero-stats > div { position: relative; padding-left: 1rem; }
.hero-stats > div::before {
  content: ''; position: absolute; left: 0; top: .2rem; bottom: .2rem; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--jd-gold), transparent);
}

/* Hero card stack */
.hero-card-stack { position: relative; height: 320px; }
.hero-card {
  position: absolute; left: 0; right: 0; padding: 1.1rem 1.3rem; border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 209, 102, .22);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, .8);
  transition: transform .45s var(--jd-ease), border-color .45s ease, background .45s ease;
}
.hero-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(255, 209, 102, .5);
  background: rgba(255, 255, 255, .11);
}
.hero-card:nth-child(1) { top: 0; }
.hero-card:nth-child(2) { top: 100px; }
.hero-card:nth-child(3) { top: 200px; }
.hero-card-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: transform .45s var(--jd-ease);
}
.hero-card:hover .hero-card-icon { transform: scale(1.12) rotate(-6deg); }

.float-card { animation: floaty 5.5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }

.hero-scroll {
  position: absolute; bottom: 20px; left: 50%;
  color: rgba(255, 255, 255, .55); font-size: 1.2rem;
  animation: bob 1.7s ease-in-out infinite; transition: color .3s;
}
.hero-scroll:hover { color: var(--jd-gold-2); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 9px); } }

/* ==========================================================================
   8. Sections
   ========================================================================== */
.section-jd { padding: 6rem 0; position: relative; }
.section-alt { background: var(--jd-light); }
[data-bs-theme="dark"] .section-alt { background: var(--jd-mid-2); }

.section-head { max-width: 46rem; margin-bottom: 1.25rem; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; color: var(--jd-gold); margin-bottom: .6rem;
  padding: .3rem .7rem; border-radius: 30px;
  background: rgba(227, 168, 33, .12);
  border: 1px solid rgba(227, 168, 33, .22);
}
.section-title { font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.section-sub { color: var(--jd-muted); font-size: 1.05rem; }

/* ==========================================================================
   9. Cards — shared behaviour
   ========================================================================== */
.system-card, .app-card, .course-card, .service-card, .how-step {
  border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius);
  background: var(--jd-card);
  box-shadow: var(--jd-shadow);
  overflow: hidden;
  transition: transform .45s var(--jd-ease), box-shadow .45s ease, border-color .45s ease;
}
/* Compose the hover lift with any active tilt, so hovering a card keeps the
   3D rotation instead of snapping it flat. */
.system-card:hover, .app-card:hover, .course-card:hover, .service-card:hover, .how-step:hover {
  transform:
    perspective(950px)
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg))
    translate3d(0, -8px, 0);
  box-shadow: var(--jd-shadow-lg);
  border-color: var(--jd-border-strong);
}

.system-icon {
  width: 54px; height: 54px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  background: linear-gradient(135deg, var(--jd-red), var(--jd-mid-3));
  transition: transform .5s var(--jd-ease), box-shadow .5s ease;
}
.system-card:hover .system-icon {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 12px 28px -12px rgba(200, 16, 46, .8);
}

.system-features { list-style: none; padding: 0; }
.system-features li { padding: .2rem 0; color: var(--jd-muted); }
.system-features i { color: var(--jd-gold); margin-right: .4rem; }

.tech-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tech-chip {
  font-size: .66rem; padding: .22rem .58rem; border-radius: 20px;
  background: rgba(29, 79, 214, .1); color: var(--jd-blue);
  transition: transform .3s var(--jd-ease), background .3s ease, color .3s ease;
}
.tech-chip:hover { transform: translateY(-2px); background: var(--jd-blue); color: #fff; }

/* Apps catalogue */
.apps-band { background: linear-gradient(180deg, #fff, var(--jd-light)); }
[data-bs-theme="dark"] .apps-band { background: linear-gradient(180deg, var(--jd-mid), var(--jd-mid-2)); }

.app-icon {
  width: 52px; height: 52px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; color: #fff;
  transition: transform .5s var(--jd-ease), box-shadow .5s ease;
}
.app-card:hover .app-icon { transform: rotate(8deg) scale(1.1); }
.app-icon-android { background: linear-gradient(135deg, var(--jd-gold), var(--jd-gold-3)); }
.app-icon-windows { background: linear-gradient(135deg, var(--jd-blue-2), #12358f); }
.app-icon-web     { background: linear-gradient(135deg, var(--jd-red-2), #8a0a20); }

.app-badge-android { background: rgba(227, 168, 33, .18); color: #8a6a12; }
.app-badge-windows { background: rgba(29, 79, 214, .12); color: var(--jd-blue); }
.app-badge-web     { background: rgba(200, 16, 46, .12); color: var(--jd-red); }
.app-badge-version { background: rgba(227, 168, 33, .14); color: #8a6a12; }

/* Blog cards: keep the image band the same height whether or not a post has a
   cover, so a row of cards stays aligned. */
.post-cover-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--jd-gold-2);
  background: linear-gradient(135deg, rgba(227, 168, 33, .18), rgba(29, 79, 214, .12));
}

/* Real app icons sit where the FontAwesome tile used to. */
.app-logo {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 2px 10px rgba(10, 17, 36, .18);
}

/* ==========================================================================
   16. Explore cards (home page link-out grid)
   ========================================================================== */
.explore-card {
  display: flex; flex-direction: column; padding: 1.6rem 1.4rem;
  background: var(--jd-card); border: 1px solid var(--jd-border);
  border-radius: var(--jd-radius); box-shadow: var(--jd-shadow);
  transition: transform .45s var(--jd-ease), box-shadow .45s ease, border-color .3s ease;
}
.explore-card:hover {
  transform: translateY(-6px); box-shadow: var(--jd-shadow-lg);
  border-color: rgba(227, 168, 33, .55);
}
.explore-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 16px; font-size: 1.25rem;
}
.explore-icon.bg-soft-software { background: rgba(29, 79, 214, .12); color: var(--jd-blue); }
.explore-icon.bg-soft-stem { background: rgba(16, 150, 120, .14); color: #0f7d64; }
.explore-icon.bg-soft-ai { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.explore-icon.bg-soft-financials { background: rgba(227, 168, 33, .18); color: var(--jd-gold-3); }
.explore-link {
  margin-top: auto; font-size: .85rem; font-weight: 600; color: var(--jd-red);
}
.explore-card:hover .explore-link i { transform: translateX(4px); }
.explore-link i { transition: transform .3s var(--jd-ease); }

/* ==========================================================================
   17. Capability page: pillar badges, steps, tables
   ========================================================================== */
.pillar-badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
}
.pillar-field { background: rgba(29, 79, 214, .12); color: var(--jd-blue); }
.pillar-apps { background: rgba(16, 150, 120, .14); color: #0f7d64; }
.pillar-ai { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.pillar-media { background: rgba(200, 16, 46, .12); color: var(--jd-red); }
.pillar-academy { background: rgba(227, 168, 33, .20); color: var(--jd-gold-3); }

.step-card { padding: 1.4rem; background: var(--jd-card); border: 1px solid var(--jd-border); border-radius: var(--jd-radius); box-shadow: var(--jd-shadow); }
.step-num { font-size: 1.6rem; font-weight: 800; color: rgba(227, 168, 33, .55); letter-spacing: .02em; }

.capability-table { font-size: .9rem; }
.capability-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--jd-muted); font-weight: 700; }
.capability-table tbody td { vertical-align: top; }

.mini-stat { padding: .9rem 1rem; background: rgba(10, 17, 36, .04); border-radius: 12px; }

/* Cover art on a post page: cap the height but never crop a poster — these are
   often text-heavy, so contain beats cover here. */
.post-cover {
  display: block; width: 100%; max-height: 480px; object-fit: contain;
  border-radius: 14px; margin-bottom: 2rem; background: rgba(0, 0, 0, .03);
}
[data-bs-theme="dark"] .app-badge-version,
[data-bs-theme="dark"] .app-badge-android { color: var(--jd-gold-2); }

.app-card .text-accent { transition: text-shadow .4s ease; }
.app-card:hover .text-accent { text-shadow: 0 0 18px rgba(227, 168, 33, .6); }

/* ==========================================================================
   10. Academy — steps, filters, courses
   ========================================================================== */
.how-step { padding: 1.75rem 1.25rem; }
.how-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--jd-gold-2), var(--jd-gold));
  color: #241a03; font-weight: 800; margin-bottom: .85rem;
  font-family: var(--jd-display);
  transition: transform .45s var(--jd-ease), box-shadow .45s ease;
}
.how-step:hover .how-num {
  transform: scale(1.14) rotate(-8deg);
  box-shadow: 0 12px 26px -10px rgba(227, 168, 33, .85);
}

.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.filter-btn {
  border: 1px solid var(--jd-border); background: var(--jd-card); color: var(--jd-muted);
  padding: .5rem 1.15rem; border-radius: 30px; font-weight: 600; font-size: .9rem;
  transition: transform .3s var(--jd-ease), color .3s ease, border-color .3s ease,
              background .3s ease, box-shadow .3s ease;
}
.filter-btn:hover {
  color: var(--jd-blue); border-color: var(--jd-blue); transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(29, 79, 214, .7);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--jd-blue-2), var(--jd-blue));
  color: #fff; border-color: transparent;
  box-shadow: 0 12px 26px -12px rgba(29, 79, 214, .9);
}

.course-icon {
  width: 50px; height: 50px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem;
  transition: transform .45s var(--jd-ease);
}
.course-card:hover .course-icon { transform: rotate(-8deg) scale(1.1); }

.course-details summary {
  cursor: pointer; color: var(--jd-blue); list-style: none;
  transition: color .25s ease, transform .25s var(--jd-ease);
}
.course-details summary::-webkit-details-marker { display: none; }
.course-details summary::after { content: ' +'; font-weight: 700; }
.course-details[open] summary::after { content: ' \2013'; }
.course-details summary:hover { color: var(--jd-blue-2); transform: translateX(3px); }

.lesson-pdfs summary { cursor: pointer; transition: color .25s ease; }
.lesson-pdfs summary:hover { color: var(--jd-blue); }
.lesson-pdfs .badge { transition: transform .3s var(--jd-ease), filter .3s ease; }
.lesson-pdfs .badge:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.08); }

.course-item { transition: opacity .35s ease, transform .35s var(--jd-ease); }

/* ==========================================================================
   11. Services
   ========================================================================== */
.service-card { padding: 1.9rem; }
.service-icon {
  width: 56px; height: 56px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  background: linear-gradient(135deg, var(--jd-mid-3), var(--jd-blue));
  transition: transform .5s var(--jd-ease), box-shadow .5s ease;
}
.service-card:hover .service-icon {
  transform: rotate(8deg) scale(1.1);
  box-shadow: 0 14px 30px -12px rgba(29, 79, 214, .85);
}
.service-list { list-style: none; padding: 0; margin-top: .85rem; }
.service-list li {
  padding: .28rem 0 .28rem 1.5rem; position: relative; color: var(--jd-muted);
  transition: transform .3s var(--jd-ease), color .3s ease;
}
.service-list li::before {
  content: '\2192'; position: absolute; left: 0; color: var(--jd-gold); font-weight: 700;
  transition: transform .3s var(--jd-ease);
}
.service-list li:hover { transform: translateX(4px); color: var(--jd-ink); }
.service-list li:hover::before { transform: translateX(3px); }

/* ==========================================================================
   12. Gallery
   ========================================================================== */
.gallery-item {
  position: relative; border-radius: var(--jd-radius); overflow: hidden; margin: 0;
  box-shadow: var(--jd-shadow); background: var(--jd-card);
  transition: transform .5s var(--jd-ease), box-shadow .5s ease;
}
.gallery-item:hover {
  transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, -6px, 0);
  box-shadow: var(--jd-shadow-lg);
}
.gallery-media {
  width: 100%; height: 240px; object-fit: cover; display: block;
  background: var(--jd-light); border: 0;
  transition: transform .8s var(--jd-ease);
}
.gallery-item:hover .gallery-media { transform: scale(1.08); }
.gallery-placeholder { color: var(--jd-muted); }
/* Portfolio page shows posters whole rather than cropping them to a strip. */
.gallery-media--contain { object-fit: contain; height: 300px; background: var(--jd-light); }
.gallery-item:hover .gallery-media--contain { transform: none; }
.gallery-caption { padding: .85rem 1rem; position: relative; }
.gallery-caption strong { color: var(--jd-ink); }

/* ==========================================================================
   13. Marquee
   ========================================================================== */
.jd-marquee {
  overflow: hidden; position: relative;
  border-top: 1px solid var(--jd-border);
  border-bottom: 1px solid var(--jd-border);
  background: var(--jd-mid-2);
  padding: 1.1rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.jd-marquee__track {
  display: flex; width: max-content; gap: 3rem;
  animation: jd-marquee 30s linear infinite;
}
.jd-marquee:hover .jd-marquee__track { animation-play-state: paused; }
.jd-marquee__item {
  display: inline-flex; align-items: center; gap: .6rem;
  color: rgba(255, 255, 255, .62); font-weight: 600; font-size: .95rem; white-space: nowrap;
  font-family: var(--jd-display);
}
.jd-marquee__item i { color: var(--jd-gold); }
@keyframes jd-marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   14. CTA band
   ========================================================================== */
.cta-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(620px 280px at 86% 18%, rgba(255, 209, 102, .34), transparent 62%),
    linear-gradient(120deg, var(--jd-red), #7a0e1f);
}
.cta-band .container { position: relative; z-index: 2; }

/* ==========================================================================
   15. Page hero (contact / enrol / buy)
   ========================================================================== */
/* The navbar is fixed-top, so the hero needs its own clearance or the first
   line (eyebrow / date) renders underneath it. */
.page-hero-jd { position: relative; background: var(--jd-mid); color: #fff; overflow: hidden; padding-top: 5rem; }
.page-hero-jd::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(620px 320px at 90% 0%, rgba(255, 209, 102, .3), transparent 62%),
    radial-gradient(520px 260px at 0% 100%, rgba(200, 16, 46, .35), transparent 62%);
}
.page-hero-jd .container { position: relative; z-index: 2; }
.page-hero-jd h1 { font-size: clamp(1.9rem, 4vw, 3rem); }

/* ==========================================================================
   16. Footer
   ========================================================================== */
.footer-jd {
  background: var(--jd-mid); color: #fff;
  border-top: 1px solid rgba(255, 209, 102, .16);
  position: relative;
}
.footer-brand { font-family: var(--jd-display); font-weight: 700; }
.footer-heading { color: var(--jd-gold-2); font-size: .74rem; text-transform: uppercase; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .55rem; color: rgba(255, 255, 255, .58); font-size: .9rem; }
.footer-links a {
  color: rgba(255, 255, 255, .58); text-decoration: none;
  transition: color .25s ease, transform .25s var(--jd-ease);
  display: inline-block;
}
.footer-links a:hover { color: var(--jd-gold-2); transform: translateX(4px); }

.social-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none;
  transition: transform .35s var(--jd-ease), background .25s, color .25s, box-shadow .35s;
}
.social-btn:hover {
  background: var(--jd-gold); color: #241a03;
  transform: translateY(-4px) rotate(-6deg);
  box-shadow: 0 12px 26px -12px rgba(227, 168, 33, .9);
}

/* ==========================================================================
   17. Forms
   ========================================================================== */
.form-control, .form-select {
  border-radius: var(--jd-radius-sm);
  padding: .7rem .95rem;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s var(--jd-ease);
}
.form-control:focus, .form-select:focus {
  border-color: var(--jd-blue);
  box-shadow: 0 0 0 .22rem rgba(29, 79, 214, .16);
  transform: translateY(-1px);
}
.form-label { font-weight: 600; font-size: .9rem; }

/* ==========================================================================
   18. Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .navbar-jd { background: var(--jd-mid); }
  .navbar-jd .nav-link::after { display: none; }
  .hero-stats { gap: 1.5rem !important; }
  .hero-card-stack { height: auto; }
  .hero-card { position: static; margin-bottom: .75rem; }
}
@media (max-width: 575.98px) {
  .display-3 { font-size: 2.25rem; }
  .section-jd { padding: 3.75rem 0; }
  .jd-top { right: 14px; bottom: 14px; }
}

/* ==========================================================================
   19. Reduced motion — honour the OS setting, keep everything usable.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .float-card, .hero-scroll, .jd-aurora span, .jd-marquee__track, .text-gradient { animation: none !important; }
  .jd-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero-jd .hero-title, .hero-jd .lead, .hero-jd .badge,
  .hero-jd .hero-actions, .hero-jd .hero-stats, .hero-jd .hero-card-stack {
    opacity: 1 !important; transform: none !important;
  }
  .jd-cursor { display: none; }
}

/* 18. System category badges — .bg-soft-* sets the tint, .text-* the label.
   Without these the badge inherited Bootstrap's white label on a transparent
   background, so the category was invisible on every system card. */
.badge.bg-soft-education { background: rgba(29, 79, 214, .12); color: #1d4fd6; }
.badge.bg-soft-finance   { background: rgba(227, 168, 33, .18); color: #8a6209; }
.badge.bg-soft-business  { background: rgba(16, 150, 120, .14); color: #0f7d64; }
.badge.bg-soft-health    { background: rgba(200, 16, 46, .12);  color: #b00d29; }
.badge.bg-soft-database  { background: rgba(124, 58, 237, .12); color: #6d28d9; }
.badge.bg-soft-custom    { background: rgba(91, 107, 123, .14); color: #4a5866; }
