/* Site-specific overrides on top of the Orbia template — services mega-menu + active nav state.
   Loaded after style.css, so these rules only need to override what's necessary. */

/* Services mega-menu: 2-column panel instead of the template's flat single-column sub-menu */
.header-navigation .main-menu ul > li .sub-menu.sub-menu--services {
  width: 480px;
  padding: 20px 24px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
.header-navigation .main-menu ul > li .sub-menu.sub-menu--services li.sub-menu-group {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 50%;
  flex: 0 0 50%;
  max-width: 50%;
  padding: 10px 0;
  box-sizing: border-box;
}
.header-navigation .main-menu ul > li .sub-menu.sub-menu--services .sub-menu-group-title {
  display: block;
  padding: 0 16px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
}
.header-navigation .main-menu ul > li .sub-menu.sub-menu--services .sub-menu-group ul {
  position: static;
  opacity: 1;
  visibility: visible;
  width: auto;
  box-shadow: none;
  padding: 0;
}
.header-navigation .main-menu ul > li .sub-menu.sub-menu--services .sub-menu-group ul li a {
  padding: 0 16px;
  line-height: 2.2;
  font-size: 14px;
}

/* Active nav item */
.header-navigation .main-menu ul > li.menu-item.current > a {
  color: var(--secondary-color);
}

/* Mobile off-canvas: mega-menu collapses back to a simple stacked list */
@media (max-width: 1199px) {
  .header-navigation .main-menu ul > li .sub-menu.sub-menu--services {
    width: 100%;
    display: block;
  }
  .header-navigation .main-menu ul > li .sub-menu.sub-menu--services li.sub-menu-group {
    max-width: 100%;
    flex: 0 0 100%;
  }
}

/* Media fallback: shown in place of an <img> whenever an admin-managed
   image field (project/team/testimonial/blog) is left blank, so the site
   never shows a broken image icon. Six gradient variants built from the
   theme's own brand colors, keyed to each record's "theme" field. */
.media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: 16px;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
}
.media-fallback-label {
  font-family: var(--title-font, inherit);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0.5px;
}
.media-fallback i {
  font-size: 26px;
  opacity: 0.9;
}
.media-fallback-t1 { background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); }
.media-fallback-t2 { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.media-fallback-t3 { background: linear-gradient(135deg, var(--secondary-color), #1b1b28); }
.media-fallback-t4 { background: linear-gradient(135deg, var(--primary-color), #1b1b28); }
.media-fallback-t5 { background: linear-gradient(150deg, var(--secondary-color), var(--primary-color), #1b1b28); }
.media-fallback-t6 { background: linear-gradient(150deg, #1b1b28, var(--primary-color), var(--secondary-color)); }

/* Circular avatar variant for team/testimonial fallbacks */
.media-fallback.is-circle { border-radius: 50%; }

/* Logo sizing: the theme only constrains .site-branding/.footer-logo by
   WIDTH (img { max-width: 100% }), with height left to scale naturally.
   That works for a wide/landscape mark but our logo is a stacked
   icon-over-wordmark (roughly square), so left unconstrained it renders
   far taller than the header/footer expect. Cap by height instead -- tall
   enough that the wordmark stays legible, well under the 220px container. */
.header-navigation .site-branding {
  margin-right: 20px;
}
.header-navigation .brand-logo img {
  max-height: 84px;
  width: auto;
}
@media (max-width: 767.98px) {
  .header-navigation .brand-logo img {
    max-height: 60px;
  }
}
.footer-logo img {
  max-height: 84px;
  width: auto;
}

/* Service icon: renders the admin-selected Heroicon (Service::$icon) in
   place of the template's static rotating icon images. */
.service-icon-box svg {
  width: 44px;
  height: 44px;
  color: var(--secondary-color);
}
.service-icon-box.icon-light svg {
  color: #fff;
}

/* ==========================================================================
   Brand motion system
   Replaces the template's static stock-photo backgrounds/shapes/illustrations
   with CSS-only animated elements built from the brand's own gradient
   (violet -> magenta), fitting a software company rather than a photo-led
   creative agency. Everything here is decorative chrome, not content.
   ========================================================================== */

.brand-bg-dark {
  position: relative;
  background: radial-gradient(120% 140% at 15% 10%, #2c1157 0%, #170a30 45%, #0a0614 100%);
  overflow: hidden;
  isolation: isolate;
}
.brand-bg-dark > .container,
.brand-bg-dark > .container-fluid {
  position: relative;
  z-index: 1;
}

/* Floating blurred gradient orbs -- the core "moving object" motif */
.brand-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.brand-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation-name: brand-orb-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform;
}
.brand-orb-1 {
  width: 26vw; height: 26vw; max-width: 420px; max-height: 420px;
  left: -6vw; top: -8vw;
  background: radial-gradient(circle at 30% 30%, var(--secondary-color), transparent 70%);
  animation-duration: 16s;
}
.brand-orb-2 {
  width: 22vw; height: 22vw; max-width: 360px; max-height: 360px;
  right: -5vw; top: 18%;
  background: radial-gradient(circle at 30% 30%, var(--primary-color), transparent 70%);
  animation-duration: 20s; animation-delay: -4s;
}
.brand-orb-3 {
  width: 18vw; height: 18vw; max-width: 300px; max-height: 300px;
  left: 32%; bottom: -8vw;
  background: radial-gradient(circle at 30% 30%, #ff6fb0, transparent 70%);
  animation-duration: 18s; animation-delay: -9s;
}
@keyframes brand-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -22px) scale(1.08); }
  66% { transform: translate(-18px, 18px) scale(0.95); }
}

/* Subtle dot-grid texture -- a common software/product backdrop */
.brand-grid {
  position: absolute;
  inset: -5%;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 40%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 75% 75% at 50% 40%, #000 35%, transparent 100%);
  animation: brand-grid-drift 40s linear infinite;
}
@keyframes brand-grid-drift {
  from { background-position: 0 0; }
  to { background-position: 56px 56px; }
}

/* Rotating angular accent -- echoes the logo's faceted mark, replaces the
   template's decorative "shape" PNG overlays. */
.brand-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 130px;
  height: 130px;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  opacity: 0.16;
  animation: brand-shape-spin 24s linear infinite;
}
.brand-shape.style-light { opacity: 0.1; }
@keyframes brand-shape-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Brand icon afloat inside a soft animated glow -- replaces stock hero/
   illustration imagery with the studio's own mark in motion. */
.brand-icon-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  animation: brand-icon-float 6s ease-in-out infinite;
}
.brand-icon-frame::before {
  content: '';
  position: absolute;
  width: 60%;
  padding-top: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--secondary-color), var(--primary-color) 70%, transparent 100%);
  filter: blur(55px);
  opacity: 0.55;
  z-index: 0;
  animation: brand-orb-float 10s ease-in-out infinite;
}
.brand-icon-frame img {
  position: relative;
  z-index: 1;
  width: 42%;
  max-width: 280px;
  filter: drop-shadow(0 25px 45px rgba(109, 48, 251, 0.35));
}
@keyframes brand-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* Abstract gradient panel -- replaces stock "studio/office" photography
   with an honest, on-brand shape instead of a fake photo. */
.brand-panel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 260px;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color) 65%, #ff6fb0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-panel img {
  width: 34%;
  max-width: 160px;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.25));
  animation: brand-icon-float 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .brand-orb,
  .brand-grid,
  .brand-shape,
  .brand-icon-frame,
  .brand-icon-frame::before,
  .brand-panel img {
    animation: none !important;
  }
}

/* ==========================================================================
   Custom brand cursor
   Fine-pointer devices only (desktop) -- untouched on touch/coarse pointers.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor select,
  body.has-custom-cursor [role='button'] {
    cursor: none;
  }
  .brand-cursor-dot,
  .brand-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100000;
    transform: translate(-50%, -50%);
    opacity: 0;
  }
  .brand-cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .brand-cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--secondary-color);
    transition: opacity 0.2s ease, transform 0.18s ease-out, background-color 0.2s ease;
  }
  .brand-cursor-dot.is-visible,
  .brand-cursor-ring.is-visible {
    opacity: 1;
  }
  .brand-cursor-ring.is-hover {
    transform: translate(-50%, -50%) scale(1.7);
    background-color: rgba(109, 48, 251, 0.14);
  }
  .brand-cursor-dot.is-hover {
    transform: translate(-50%, -50%) scale(0.4);
  }
}
