/* HSB Motion & Interactivity Engine: Living, Dynamic, Tactile & Guided */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 1. HERO SLIDES & AMBIENCE (CLEAN CRISP PHOTOGRAPHY) */
.hero-video-bg {
  display: none !important;
}
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide {
  opacity: 0;
  transition: opacity 1.1s ease, translate .8s var(--ease-out);
  translate: var(--hero-x, 0px) var(--hero-y, 0px);
  scale: 1.025;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide.is-active .hero-background {
  opacity: 1;
  filter: saturate(1.08) contrast(1.05);
}
.hero-slide .hero-background { scale: 1.035; }
.js .hero-slide.is-active .hero-background { animation: hsb-hero-zoom 12s ease-out both; animation-play-state: paused; }
.js .home-hero.is-playing .hero-slide.is-active .hero-background { animation-play-state: running; }
.hero-slide.real-team .hero-background { object-position: 50% 50%; }
.hero-slide.real-control .hero-background { object-position: 50% 50%; }
.hero-shade {
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, #071824f2 0%, #0b1c2be0 34%, #0b1c2b7d 60%, #0b1c2b18 84%), linear-gradient(0deg, #071824c0, transparent 40%);
}
.hero-content { z-index: 4; pointer-events: none; }
.hero-content a, .hero-content button { pointer-events: auto; }
.image-credit, .scroll-cue { z-index: 4; }

/* 1.1 HSB IMAGE OPTIMIZATIONS */
.photo.hsb-crop>img, .photo.illustration>img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
  margin-top: 0 !important;
  transition: transform .6s var(--ease-out) !important;
}
.service-card:hover .photo.hsb-crop>img,
.service-card:hover .photo.illustration>img,
.project-card:hover .photo.hsb-crop>img {
  transform: scale(1.06) !important;
}
.about-photo.hsb-crop>img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 30% !important;
  transform: none !important;
  margin-top: 0 !important;
}

/* 2. LIVE BEACON & PULSE STATUS */
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 28, 43, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(198, 166, 108, 0.45);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  animation: hsb-beacon-float 3s ease-in-out infinite;
}
.live-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: live-dot-radar 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
.pulse-dot-mini {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px #22c55e;
  animation: live-dot-radar 2s infinite;
}
@keyframes live-dot-radar {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.8); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes hsb-beacon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 3. HERO CONTROLS & SCROLL CUE */
.hero-controls {
  position: absolute;
  z-index: 5;
  bottom: 23px;
  left: max(48px, calc((100% - 1240px)/2));
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.hero-control {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff50;
  background: #0c1c2b60;
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}
.hero-control .icon { width: 16px; height: 16px; pointer-events: none; }
.hero-control.prev .icon { rotate: 180deg; }
.hero-control:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); transform: translateY(-2px) scale(1.05); }
.carousel-dots { display: flex; align-items: center; gap: 2px; margin: 0 4px; }
.carousel-dot { width: 28px; height: 36px; background: none; border: 0; padding: 0; position: relative; color: inherit; }
.carousel-dot::before { content: ''; position: absolute; left: 5px; right: 5px; top: 16px; height: 3px; background: #ffffff55; transition: background .25s, scale .25s; }
.carousel-dot.is-active::before { background: var(--gold); scale: 1 1.4; }
.carousel-dot:hover::before { background: white; }
.carousel-count { font-size: 8px; letter-spacing: .16em; color: #d1dae0; margin: 0 4px 0 0; font-variant-numeric: tabular-nums; }

.scroll-cue {
  position: absolute;
  right: 48px;
  bottom: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  letter-spacing: .16em;
  color: #d1d6da;
  cursor: pointer;
  text-decoration: none;
  animation: cue-bounce 2.2s infinite ease-in-out;
}
.scroll-cue>span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(198, 166, 108, 0.6);
  background: rgba(12, 28, 43, 0.6);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 16px;
  transition: all 0.3s var(--ease-out);
}
.scroll-cue:hover { color: var(--gold); }
.scroll-cue:hover>span {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(4px);
  box-shadow: 0 0 15px rgba(198, 166, 108, 0.6);
}
@keyframes cue-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/* 4. BUTTONS & HOVER SHEEN */
.button, .header-cta, .filters button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.2s;
}
.button.primary::before, .header-cta::before {
  content: '';
  position: absolute;
  inset: -70% auto -70% -70%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left .65s var(--ease-out);
  z-index: -1;
}
.button.primary:hover::before, .header-cta:hover::before { left: 140%; }
.button:active, .header-cta:active, .hero-control:active { transform: scale(0.96) translateY(1px); }
.button .icon, .inline-link .icon, .card-link .icon, .project-card-body .icon { transition: transform .3s var(--ease-out); }
.button:hover .icon, .inline-link:hover .icon { transform: translateX(5px); }

/* 5. TACTILE CLICK RIPPLE (GOLDEN / ELECTRIC BURST) */
.click-ripple {
  position: absolute;
  display: block;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(198, 166, 108, 0.85);
  background: radial-gradient(circle, rgba(198, 166, 108, 0.45) 0%, rgba(170, 36, 51, 0.2) 50%, transparent 75%);
  animation: hsb-gold-ripple 0.65s var(--ease-out) forwards;
  z-index: 99;
}
@keyframes hsb-gold-ripple {
  0% { transform: scale(0); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* 6. INTERACTIVE CURSOR SPOTLIGHT ON CARDS */
.service-card, .project-card, .article-card, .gallery-card, .training-showcase-card, .module-grid article, .feature-grid article, .values-grid article {
  position: relative;
  isolation: isolate;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.4s, color 0.2s;
}
.service-card::after, .project-card::after, .article-card::after, .training-showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(450px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(198, 166, 108, 0.14), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 3;
}
.service-card:hover::after, .project-card:hover::after, .article-card:hover::after, .training-showcase-card:hover::after {
  opacity: 1;
}

/* 7. CARD HOVER DYNAMICS */
@media(hover: hover) and (pointer: fine) {
  .service-card:hover, .training-showcase-card:hover {
    transform: translateY(-7px) scale(1.008);
    box-shadow: 0 18px 40px rgba(12, 28, 43, 0.12);
    border-color: rgba(198, 166, 108, 0.55);
  }
  .project-card:hover {
    transform: translateY(-7px) scale(1.008);
    box-shadow: 0 18px 40px rgba(12, 28, 43, 0.12);
  }
  .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(12, 28, 43, 0.1);
  }
  .gallery-card:hover {
    transform: translateY(-5px);
  }
  .service-card:hover .photo img, .project-card:hover .photo img, .article-card:hover .photo img, .gallery-card:hover .photo img, .training-showcase-card:hover .photo img {
    transform: scale(1.07);
  }
  .service-card:hover .card-link .icon, .project-card:hover .project-card-body .icon {
    transform: translate(4px, -4px);
    color: var(--gold);
  }
  .article-card:hover h3, .gallery-card:hover>span { color: var(--red); }
  .feature-grid article:hover, .module-grid article:hover, .values-grid article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(12, 28, 43, 0.08);
    border-color: var(--gold);
  }
  .feature-grid article:hover>.icon {
    transform: translateY(-4px) scale(1.08);
    transition: transform .3s var(--ease-out);
    color: var(--gold);
  }
  .trust-grid>div:hover, .trust-grid>a:hover {
    background: #fbfbf9;
    transition: background 0.3s;
  }
  .trust-grid>div:hover .icon, .trust-grid>a:hover .icon {
    transform: scale(1.12) rotate(3deg);
    transition: transform 0.3s var(--ease-out);
  }
}

/* 8. INFINITE CLIENT MARQUEE TICKER */
.marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee-glide 26s linear infinite;
  will-change: transform;
}
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track b {
  font-size: 16px;
  letter-spacing: -0.04em;
  color: #697784;
  opacity: 0.85;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.25s, opacity 0.25s, transform 0.25s, background 0.25s;
}
.marquee-track b:hover {
  color: var(--red);
  background: #f0f4f7;
  opacity: 1;
  transform: scale(1.08);
}
@keyframes marquee-glide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 9. FLOATING CONTACT BEACON WITH RADAR PULSE */
.floating-contact {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #fff;
  color: var(--navy);
  border: 1px solid #dbe1e4;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  z-index: 30;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 35px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s var(--ease-out);
}
.floating-contact::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 40px;
  border: 2px solid rgba(83, 123, 104, 0.55);
  animation: floating-radar 2.4s infinite;
  pointer-events: none;
}
@keyframes floating-radar {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.3); opacity: 0; }
}
.floating-contact:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 38px rgba(12, 28, 43, 0.3);
}

/* 10. SYSTEM & SCROLL REVEALS */
.scroll-progress {
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(198, 166, 108, 0.6);
}
.photo img { transition: scale .8s var(--ease-out), transform .8s var(--ease-out); }
.nav-disclosure .icon { transition: rotate .25s; }
.nav-disclosure[aria-expanded=true] .icon { rotate: 180deg; }
.mega-menu:not([hidden]) { animation: hsb-menu-in .25s var(--ease-out); }
.navigation.is-open { animation: hsb-menu-in .25s var(--ease-out); }
.navigation>a { position: relative; }
.navigation>a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; background: var(--red); scale: 0 1; transform-origin: left; transition: scale .3s var(--ease-out); }
.navigation>a:hover::after, .navigation>a[aria-current=page]::after { scale: 1 1; }
.faq-list details[open]>p { animation: hsb-content-in .3s var(--ease-out); }
.faq-list summary>span { transition: transform .25s; }
#gallery-dialog[open] { animation: hsb-dialog-in .3s var(--ease-out); }
#gallery-dialog[open]::backdrop { animation: hsb-backdrop-in .25s ease; }
#gallery-dialog[open] figure { animation: hsb-content-in .4s var(--ease-out); }
.js .motion-item:not(.motion-in) { opacity: 0; translate: 0 24px; }
.js .motion-item.motion-in { animation: hsb-card-in .65s var(--ease-out) var(--entrance-delay, 0ms) backwards; }

@keyframes hsb-hero-zoom { from { scale: 1.035; } to { scale: 1.085; } }
@keyframes hsb-menu-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
@keyframes hsb-content-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes hsb-card-in { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes hsb-dialog-in { from { opacity: 0; translate: 0 12px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes hsb-backdrop-in { from { background: #06111c00; } to { background: #06111ce6; } }

@media(max-width: 1250px) { .hero-controls { left: 32px; } }
@media(max-width: 760px) {
  .hero-controls { left: 20px; bottom: 32px; gap: 7px; }
  .hero-control { width: 38px; height: 38px; }
  .carousel-dot { width: 23px; height: 38px; }
  .carousel-count { font-size: 7px; letter-spacing: .08em; }
  .hero-controls .carousel-dots { margin: 0; }
  .home-hero .image-credit { bottom: 10px; font-size: 6px; }
  .home-hero .hero-location { margin-top: 25px; }
  .scroll-cue { display: none; }
  .navigation>a::after { bottom: 0; }
  .marquee-track { gap: 25px; }
}
@media(prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide .hero-background, .hero-video-bg { transition: none!important; translate: none!important; scale: 1!important; }
  .js .motion-item, .js .motion-item:not(.motion-in) { opacity: 1; translate: none; animation: none!important; }
  .click-ripple { display: none; }
  .marquee-track { animation: none!important; }
  .live-dot, .pulse-dot-mini, .floating-contact::before { animation: none!important; }
  .button:active, .header-cta:active, .hero-control:active { scale: 1; }
  .photo img { scale: 1!important; }
}
