/* DSG Custom Styles — site-wide visuals & motion */

:root {
  --dsg-navy: #1a365d;
  --dsg-navy-soft: rgba(26, 54, 93, 0.06);
  --dsg-primary-soft: rgba(237, 75, 8, 0.07);
  --dsg-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ----- Global page canvas ----- */
body.dsg-site {
  min-height: 100vh;
  background-color: #f1f5f9;
  background-image:
    radial-gradient(ellipse 120% 80% at 10% -20%, rgba(26, 54, 93, 0.09), transparent 50%),
    radial-gradient(ellipse 90% 60% at 95% 10%, rgba(237, 75, 8, 0.06), transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(241, 245, 249, 1), transparent 55%),
    linear-gradient(165deg, #f8fafc 0%, #f1f5f9 38%, #fafbfc 72%, #f0f9ff 100%);
  background-attachment: fixed;
}

@media (max-width: 1024px) {
  body.dsg-site {
    background-attachment: scroll;
  }
}

body.dsg-site > div:first-of-type {
  background: linear-gradient(90deg, #1a365d 0%, #1e4a7a 48%, #1a365d 100%);
}

main.dsg-main {
  position: relative;
}

/* ----- Header ----- */
#main-header {
  transition: box-shadow 0.4s var(--dsg-ease-out), background-color 0.35s ease;
  border-bottom: 1px solid rgba(26, 54, 93, 0.06);
}

#main-header.shadow-md {
  box-shadow: 0 10px 40px -12px rgba(26, 54, 93, 0.12), 0 4px 14px -6px rgba(0, 0, 0, 0.06);
}

/* Mega menu */
.nav-item .mega-menu {
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.35s var(--dsg-ease-out), visibility 0.25s;
}

.nav-item:hover .mega-menu {
  pointer-events: auto;
  transform: translateY(0);
}

/* ----- Section surfaces (content unchanged; visuals only) ----- */
.dsg-section-light {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 45%, #f8fafc 100%);
}

.dsg-section-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 42% at 100% 0%, var(--dsg-primary-soft), transparent 58%),
    radial-gradient(ellipse 42% 38% at 0% 100%, var(--dsg-navy-soft), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.dsg-section-muted {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 40%, #f8fafc 100%);
}

.dsg-section-muted::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(26, 54, 93, 0.07), transparent 55%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(237, 75, 8, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.dsg-section-blend {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 65% 45% at 50% 100%, var(--dsg-primary-soft), transparent 55%),
    linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%);
}

.dsg-section-blend::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--dsg-navy-soft), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.dsg-section-light > *,
.dsg-section-muted > *,
.dsg-section-blend > * {
  position: relative;
  z-index: 1;
}

.dsg-section-rich {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 75% 55% at 50% 0%, var(--dsg-navy-soft), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.dsg-section-rich::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40% 30% at 100% 100%, var(--dsg-primary-soft), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.dsg-section-rich > * {
  position: relative;
  z-index: 1;
}

/* Navy bands — soft warm accent */
main.dsg-main section.bg-navy {
  position: relative;
  overflow: hidden;
}

main.dsg-main section.bg-navy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 85% 15%, rgba(237, 75, 8, 0.14), transparent 52%),
    radial-gradient(ellipse 50% 45% at 10% 90%, rgba(255, 255, 255, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

main.dsg-main section.bg-navy > * {
  position: relative;
  z-index: 1;
}

/* Contact capabilities ribbon */
#capabilities {
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.07) 0%, rgba(248, 250, 252, 0.98) 42%, rgba(255, 255, 255, 0.95) 100%) !important;
  position: relative;
  isolation: isolate;
}

#capabilities::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 120% at 0% 50%, rgba(237, 75, 8, 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#capabilities > * {
  position: relative;
  z-index: 1;
}

/* Primary CTA bands */
main.dsg-main > section[class*="from-primary"][class*="to-primary-dark"] {
  position: relative;
  overflow: hidden;
}

main.dsg-main > section[class*="from-primary"][class*="to-primary-dark"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 42%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 58%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: dsg-cta-sheen 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

main.dsg-main > section[class*="from-primary"][class*="to-primary-dark"] > * {
  position: relative;
  z-index: 1;
}

@keyframes dsg-cta-sheen {
  0%,
  100% {
    background-position: 180% 0;
  }
  50% {
    background-position: -80% 0;
  }
}

/* ----- Page banner / hero overlay ----- */
.page-banner {
  min-height: 50vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-banner .banner-overlay {
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.88) 0%, rgba(26, 54, 93, 0.62) 55%, rgba(26, 54, 93, 0.75) 100%);
}

.page-banner .banner-overlay::after {
  content: "";
  position: absolute;
  inset: -15%;
  background: radial-gradient(ellipse 50% 60% at 25% 25%, rgba(237, 75, 8, 0.18), transparent 55%),
    radial-gradient(ellipse 40% 50% at 85% 80%, rgba(255, 255, 255, 0.06), transparent 50%);
  pointer-events: none;
  animation: dsg-hero-mesh 14s ease-in-out infinite alternate;
}

@keyframes dsg-hero-mesh {
  from {
    opacity: 0.75;
    transform: scale(1) translate(0, 0);
  }
  to {
    opacity: 1;
    transform: scale(1.04) translate(1%, -1%);
  }
}

.page-banner .banner-overlay-light {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.9) 100%);
}

/* ----- Footer ----- */
body.dsg-site footer.bg-navy {
  position: relative;
  box-shadow: 0 -12px 48px -16px rgba(26, 54, 93, 0.35);
}

body.dsg-site footer.bg-navy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 75, 8, 0.45), rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
}

/* ----- Scroll-triggered animations ----- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition: opacity 0.75s var(--dsg-ease-out), transform 0.75s var(--dsg-ease-out), filter 0.55s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--dsg-ease-out), transform 0.55s var(--dsg-ease-out);
}

.stagger-children.visible > *:nth-child(1) {
  transition-delay: 0.08s;
}
.stagger-children.visible > *:nth-child(2) {
  transition-delay: 0.16s;
}
.stagger-children.visible > *:nth-child(3) {
  transition-delay: 0.24s;
}
.stagger-children.visible > *:nth-child(4) {
  transition-delay: 0.32s;
}
.stagger-children.visible > *:nth-child(5) {
  transition-delay: 0.4s;
}
.stagger-children.visible > *:nth-child(6) {
  transition-delay: 0.48s;
}
.stagger-children.visible > *:nth-child(7) {
  transition-delay: 0.56s;
}
.stagger-children.visible > *:nth-child(8) {
  transition-delay: 0.64s;
}
.stagger-children.visible > *:nth-child(9) {
  transition-delay: 0.72s;
}
.stagger-children.visible > *:nth-child(10) {
  transition-delay: 0.8s;
}
.stagger-children.visible > *:nth-child(11) {
  transition-delay: 0.88s;
}
.stagger-children.visible > *:nth-child(12) {
  transition-delay: 0.96s;
}

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .stagger-children > * {
    filter: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .animate-on-scroll.visible,
  .stagger-children.visible > * {
    opacity: 1;
    transform: none;
  }

  .page-banner .banner-overlay::after,
  main.dsg-main > section[class*="from-primary"][class*="to-primary-dark"]::before {
    animation: none !important;
  }
}

/* Form focus */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #ed4b08;
  outline-offset: 2px;
}

.btn-lift:hover {
  transform: translateY(-2px);
}

.gradient-text {
  background: linear-gradient(135deg, #ed4b08, #ff6b2b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pattern-dots {
  background-image: radial-gradient(rgba(237, 75, 8, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ----- Motion library ----- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}
.animate-fade-in-up {
  animation: fadeInUp 0.7s ease-out forwards;
}
.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}
.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out forwards;
}
.delay-100 {
  animation-delay: 0.1s;
}
.delay-200 {
  animation-delay: 0.2s;
}
.delay-300 {
  animation-delay: 0.3s;
}
.delay-400 {
  animation-delay: 0.4s;
}
.delay-500 {
  animation-delay: 0.5s;
}

.card-hover-glow:hover {
  box-shadow: 0 20px 40px -12px rgba(237, 75, 8, 0.15), 0 0 0 1px rgba(237, 75, 8, 0.08);
}

@keyframes statPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}
.stat-item:hover {
  animation: statPulse 1.5s ease-in-out;
}

/* Primary buttons — subtle lift + glow */
main.dsg-main a.bg-primary,
footer a.bg-primary {
  transition: transform 0.3s var(--dsg-ease-out), box-shadow 0.3s ease, background-color 0.2s ease;
}

main.dsg-main a.bg-primary:hover,
footer a.bg-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(237, 75, 8, 0.45);
}

/* Linked cards — gentle lift (content unchanged) */
main.dsg-main a.card-hover-glow {
  transition: transform 0.4s var(--dsg-ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
}

main.dsg-main a.card-hover-glow:hover {
  transform: translateY(-4px);
}
