/* DevStack — futuristic UI layer (animations, imagery, glass, glow) */

@keyframes ds-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-14px) scale(1.02);
  }
}

@keyframes ds-float-slow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -18px) scale(1.05);
  }
  66% {
    transform: translate(-8px, 10px) scale(0.98);
  }
}

@keyframes ds-border-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ds-pulse-glow {
  0%,
  100% {
    opacity: 0.45;
    filter: blur(40px);
  }
  50% {
    opacity: 0.75;
    filter: blur(52px);
  }
}

@keyframes ds-gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes ds-scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* Floating orbs (injected into .ambient-bg) */
.ds-float-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ds-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  animation: ds-float-slow 18s ease-in-out infinite;
  opacity: 0.55;
}
.ds-orb-1 {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 18%;
  background: rgba(56, 189, 248, 0.35);
  animation-duration: 22s;
}
.ds-orb-2 {
  width: 220px;
  height: 220px;
  right: 12%;
  top: 28%;
  background: rgba(129, 140, 248, 0.32);
  animation-delay: -4s;
}
.ds-orb-3 {
  width: 320px;
  height: 320px;
  right: 25%;
  bottom: 10%;
  background: rgba(6, 182, 212, 0.28);
  animation-duration: 26s;
  animation-delay: -8s;
}
.ds-orb-4 {
  width: 180px;
  height: 180px;
  left: 35%;
  bottom: 22%;
  background: rgba(10, 165, 255, 0.25);
  animation-delay: -2s;
}
.ds-orb-5 {
  width: 140px;
  height: 140px;
  left: 55%;
  top: 8%;
  background: rgba(167, 139, 250, 0.22);
  animation-duration: 20s;
}
.ds-orb-6 {
  width: 200px;
  height: 200px;
  right: 5%;
  bottom: 35%;
  background: rgba(34, 211, 238, 0.2);
  animation-duration: 24s;
  animation-delay: -6s;
}

html[data-theme="dark"] body.site-themed::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 165, 255, 0.03) 45%,
    transparent 100%
  );
  animation: ds-scan 14s linear infinite;
  opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent, black 20%, black 80%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .ds-orb,
  html[data-theme="dark"] body.site-themed::after {
    animation: none !important;
  }
}

/* Gradient headings */
html[data-theme="dark"] body.site-themed .header-headings h1,
html[data-theme="dark"] body.site-themed .header-headings .h1,
html[data-theme="dark"] body.site-themed .about-banner h1,
html[data-theme="dark"] body.site-themed main.pt100 > .container > .section-header h1,
html[data-theme="dark"] .cs-detail-hero .h1 {
  background: linear-gradient(120deg, #fff 0%, #bae6fd 35%, #c4b5fd 70%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: ds-gradient-shift 8s ease infinite;
}

html[data-theme="dark"] .section-eyebrow,
html[data-theme="dark"] .label {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.72rem;
}

/* Hero visual frame */
.hero-visual-frame,
.page-hero__visual img,
.hero-side-visual {
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(10, 165, 255, 0.2);
  animation: ds-float 7s ease-in-out infinite;
  object-fit: cover;
  width: 100%;
  max-height: 380px;
}

.hero-visual-wrap {
  position: relative;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), rgba(129, 140, 248, 0.4), rgba(34, 211, 238, 0.5));
  background-size: 200% 200%;
  animation: ds-gradient-shift 6s ease infinite;
}

.hero-visual-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent, rgba(56, 189, 248, 0.8), transparent 30%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.65;
  animation: ds-border-spin 12s linear infinite;
  pointer-events: none;
}

/* Inner page aurora header */
main.pt100.page-hero-layout,
main.pt100.futur-main {
  position: relative;
  padding-top: 7rem !important;
}

main.pt100.page-hero-layout::before,
main.pt100.futur-main::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(520px, 55vh);
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(129, 140, 248, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(12, 18, 34, 0.95) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

main.pt100.page-hero-layout > *,
main.pt100.futur-main > * {
  position: relative;
  z-index: 1;
}

.page-hero__visual {
  position: absolute;
  right: max(4%, calc((100vw - 1140px) / 2));
  top: 6.5rem;
  width: min(38vw, 420px);
  z-index: 2;
  display: none;
}

@media (min-width: 992px) {
  .page-hero__visual {
    display: block;
  }
  main.pt100.page-hero-layout .section-header,
  main.pt100.page-hero-layout > .container > .row.section-header {
    max-width: 58%;
  }
}

.page-hero__visual .hero-visual-wrap img {
  max-height: 300px;
}

/* Home banners without video */
html[data-theme="dark"] body.site-themed .home-banner:not(:has(.video-bg)) {
  min-height: min(78vh, 720px);
  position: relative;
  overflow: hidden;
}

html[data-theme="dark"] body.site-themed .home-banner:not(:has(.video-bg))::before {
  content: "";
  position: absolute;
  width: 55%;
  height: 70%;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  background: url("https://images.unsplash.com/photo-1550751827-4bd374c1f58b?w=1200&auto=format&fit=crop") center/cover no-repeat;
  border-radius: 24px;
  opacity: 0.22;
  filter: saturate(1.2) hue-rotate(-8deg);
  mask-image: linear-gradient(to left, black 40%, transparent);
  animation: ds-float 9s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 991px) {
  html[data-theme="dark"] body.site-themed .home-banner:not(:has(.video-bg))::before {
    width: 90%;
    height: 40%;
    right: 5%;
    top: auto;
    bottom: 5%;
    transform: none;
    opacity: 0.15;
  }
}

/* Image treatments */
html[data-theme="dark"] .team-group-photo,
html[data-theme="dark"] .scale-mask,
html[data-theme="dark"] .playbook-media,
html[data-theme="dark"] .cs-gallery,
html[data-theme="dark"] .ds-img-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

html[data-theme="dark"] .team-group-photo::after,
html[data-theme="dark"] .scale-mask::after,
html[data-theme="dark"] .playbook-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(6, 8, 15, 0.75) 100%);
  pointer-events: none;
  border-radius: inherit;
}

html[data-theme="dark"] .team-group-photo img,
html[data-theme="dark"] .scale-mask img,
html[data-theme="dark"] .playbook-media img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

html[data-theme="dark"] .team-group-photo:hover img,
html[data-theme="dark"] .scale-mask:hover img,
html[data-theme="dark"] .playbook-card:hover .playbook-media img {
  transform: scale(1.06);
  filter: brightness(1.08) contrast(1.05);
}

html[data-theme="dark"] .team-group-photo {
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(10, 165, 255, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* Glass cards + hover beam */
html[data-theme="dark"] .ind-card,
html[data-theme="dark"] .solution-card,
html[data-theme="dark"] .svc-card,
html[data-theme="dark"] .plan,
html[data-theme="dark"] .playbook-card,
html[data-theme="dark"] .case-study-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .testimonial-card,
html[data-theme="dark"] body.site-themed .card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

html[data-theme="dark"] .ind-card::before,
html[data-theme="dark"] .solution-card::before,
html[data-theme="dark"] .svc-card::before,
html[data-theme="dark"] .plan::before,
html[data-theme="dark"] .playbook-card::before,
html[data-theme="dark"] .case-study-card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(56, 189, 248, 0.35) 60deg, transparent 120deg);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: ds-border-spin 8s linear infinite;
  pointer-events: none;
}

html[data-theme="dark"] .ind-card:hover,
html[data-theme="dark"] .solution-card:hover,
html[data-theme="dark"] .svc-card:hover,
html[data-theme="dark"] .plan:hover,
html[data-theme="dark"] .playbook-card:hover,
html[data-theme="dark"] .case-study-card:hover,
html[data-theme="dark"] .feature-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(10, 165, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.45) !important;
}

html[data-theme="dark"] .ind-card:hover::before,
html[data-theme="dark"] .solution-card:hover::before,
html[data-theme="dark"] .svc-card:hover::before,
html[data-theme="dark"] .plan:hover::before,
html[data-theme="dark"] .playbook-card:hover::before,
html[data-theme="dark"] .case-study-card:hover::before {
  opacity: 1;
}

/* Section headers */
html[data-theme="dark"] .section-header .header-headings h2,
html[data-theme="dark"] .section-header .header-headings .h1 {
  position: relative;
  display: inline-block;
}

html[data-theme="dark"] .section-header .header-headings h2::after,
html[data-theme="dark"] .section-header .header-headings .h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ds-accent), var(--ds-accent-3));
  box-shadow: 0 0 16px var(--ds-glow);
}

/* FAQ details (services etc.) */
html[data-theme="dark"] body.site-themed details {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme="dark"] body.site-themed details[open] {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 24px rgba(10, 165, 255, 0.1);
}

html[data-theme="dark"] body.site-themed details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ds-heading);
  list-style: none;
}

html[data-theme="dark"] body.site-themed details summary::-webkit-details-marker {
  display: none;
}

html[data-theme="dark"] body.site-themed details p {
  margin: 0.75rem 0 0;
  color: var(--ds-muted);
}

/* Case study detail */
html[data-theme="dark"] .cs-detail-hero {
  position: relative;
}

html[data-theme="dark"] .cs-detail-hero::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: min(45%, 480px);
  height: 280px;
  background: url("https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=900&auto=format&fit=crop") center/cover;
  border-radius: 20px;
  opacity: 0.2;
  filter: blur(0);
  mask-image: linear-gradient(to left, black, transparent);
  pointer-events: none;
  animation: ds-float 8s ease-in-out infinite;
}

@media (max-width: 768px) {
  html[data-theme="dark"] .cs-detail-hero::before {
    display: none;
  }
}

html[data-theme="dark"] .cs-section {
  padding-left: 1rem;
  border-left: 2px solid rgba(56, 189, 248, 0.25);
  transition: border-color 0.3s ease;
}

html[data-theme="dark"] .cs-section:hover {
  border-left-color: rgba(56, 189, 248, 0.65);
}

/* Contact split glow */
html[data-theme="dark"] .contact-us {
  position: relative;
}

html[data-theme="dark"] .contact-us::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10%;
  width: 40%;
  height: 60%;
  transform: translateX(-20%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
  animation: ds-pulse-glow 6s ease-in-out infinite;
}

/* CTA links pulse */
html[data-theme="dark"] .cta-link.--primary-cta,
html[data-theme="dark"] .nav-cta .nav-link {
  animation: ds-gradient-shift 5s ease infinite;
  background-size: 200% auto !important;
}

/* Reveal enhancements */
.reveal {
  transform: translateY(28px) scale(0.98);
}

.reveal.is-visible {
  transform: translateY(0) scale(1);
}

.reveal-scale {
  transform: scale(0.92);
}

.reveal-scale.is-visible {
  transform: scale(1);
}

/* Work items stagger */
html[data-theme="dark"] .work-item {
  transition: transform 0.4s ease;
}

html[data-theme="dark"] .work-item:hover {
  transform: translateY(-4px);
}

body.site-themed #our-work .work-item:hover {
  transform: translateY(-4px);
}

html[data-theme="dark"] .scale-mask {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 32px rgba(10, 165, 255, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Next page section */
html[data-theme="dark"] .next-page-section {
  border-top: 1px solid var(--ds-border);
  padding: 2.5rem 0;
  background: linear-gradient(90deg, transparent, rgba(10, 165, 255, 0.06), transparent);
}

/* Navbar brand subtle glow */
html[data-theme="dark"] .navbar-brand img {
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.35));
  transition: filter 0.3s ease;
}

html[data-theme="dark"] .navbar-brand:hover img {
  filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.55));
}

/* HR dividers */
html[data-theme="dark"] body.site-themed hr {
  border-color: rgba(148, 163, 184, 0.15);
  box-shadow: 0 0 20px rgba(10, 165, 255, 0.08);
}

html[data-theme="dark"] body.site-themed .contact-us-details .section-eyebrow {
  text-align: left;
}

html[data-theme="dark"] .contact-us .hero-visual-wrap {
  max-height: 220px;
}

html[data-theme="dark"] .privacy-main,
html[data-theme="dark"] main.pt100.pb60 {
  animation: none;
}
