@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 95% 75% at 18% 12%, rgba(11, 57, 72, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 85% 70% at 82% 78%, rgba(106, 144, 148, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 75% 60% at 50% 50%, rgba(65, 97, 101, 0.09) 0%, transparent 62%);
  animation: ambient-drift 8s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(circle at 28% 38%, rgba(217, 219, 241, 0.07) 0%, transparent 48%),
    radial-gradient(circle at 72% 62%, rgba(11, 57, 72, 0.1) 0%, transparent 46%);
  animation: ambient-pulse 6s ease-in-out infinite;
}

@keyframes ambient-drift {
  0% { transform: translate(-6%, -5%) scale(1); opacity: 0.9; }
  25% { transform: translate(8%, 6%) scale(1.1); opacity: 1; }
  50% { transform: translate(5%, -8%) scale(1.06); opacity: 0.95; }
  75% { transform: translate(-7%, 7%) scale(1.12); opacity: 1; }
  100% { transform: translate(-6%, -5%) scale(1); opacity: 0.9; }
}

@keyframes ambient-pulse {
  0%, 100% { transform: translate(-12vw, -8vh) scale(1); opacity: 0.4; }
  50% { transform: translate(14vw, 10vh) scale(1.18); opacity: 0.65; }
}

/* Nav */
nav {
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

nav.nav-scrolled {
  background: rgba(17, 18, 20, 0.96) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.nav-links a,
.foot-links a {
  position: relative;
}

.nav-links a::after,
.foot-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--secondary-light, #6A9094);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.foot-links a:hover::after {
  transform: scaleX(1);
}

/* Hero glows — fixed full-screen layer */
.hero-glows {
  position: fixed;
  inset: -20%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

section,
.stats,
footer,
hr {
  position: relative;
  z-index: 1;
}

.glow1,
.glow2,
.glow3,
.glow4 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.glow1 {
  top: -8%;
  left: 50%;
  width: min(920px, 90vw);
  height: min(920px, 90vw);
  margin-left: calc(min(920px, 90vw) / -2);
  background: radial-gradient(circle, rgba(11, 57, 72, 0.5) 0%, transparent 68%);
  animation: hero-drift-1 7s ease-in-out infinite;
}

.glow2 {
  bottom: 5%;
  left: -5%;
  width: min(560px, 65vw);
  height: min(560px, 65vw);
  background: radial-gradient(circle, rgba(65, 97, 101, 0.32) 0%, transparent 70%);
  animation: hero-drift-2 9s ease-in-out infinite;
}

.glow3 {
  top: 35%;
  right: -8%;
  width: min(480px, 55vw);
  height: min(480px, 55vw);
  background: radial-gradient(circle, rgba(106, 144, 148, 0.28) 0%, transparent 72%);
  animation: hero-drift-3 8s ease-in-out infinite;
}

.glow4 {
  top: 55%;
  left: 40%;
  width: min(520px, 60vw);
  height: min(520px, 60vw);
  background: radial-gradient(circle, rgba(11, 57, 72, 0.22) 0%, transparent 70%);
  animation: hero-drift-4 10s ease-in-out infinite;
}

@keyframes hero-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(22vw, 14vh) scale(1.18); }
  50% { transform: translate(-14vw, 22vh) scale(0.9); }
  75% { transform: translate(-24vw, -10vh) scale(1.12); }
}

@keyframes hero-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(28vw, -18vh) scale(1.2); }
  66% { transform: translate(12vw, 20vh) scale(0.88); }
}

@keyframes hero-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  25% { transform: translate(-20vw, 16vh) scale(1.15); opacity: 1; }
  50% { transform: translate(-8vw, -20vh) scale(0.92); opacity: 0.7; }
  75% { transform: translate(18vw, 8vh) scale(1.08); opacity: 0.95; }
}

@keyframes hero-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.75; }
  50% { transform: translate(-18vw, -22vh) scale(1.22); opacity: 1; }
}

.gradient-text {
  background: linear-gradient(
    120deg,
    var(--secondary-light, #6A9094) 0%,
    var(--periwinkle, #D9DBF1) 35%,
    var(--secondary-light, #6A9094) 70%,
    #8fb5b9 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-text 4s linear infinite;
}

@keyframes shimmer-text {
  to { background-position: 220% center; }
}

.hero-inner > * {
  animation: hero-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-inner > *:nth-child(1) { animation-delay: 0.08s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.18s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.28s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.38s; }

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  animation: badge-glow 4s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(106, 144, 148, 0); }
  50% { box-shadow: 0 0 24px rgba(106, 144, 148, 0.15); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

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

/* Interactive cards */
.dl-card,
.feat-card,
.step,
.faq-item,
.info-panel {
  transition:
    border-color 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease;
}

.dl-card:hover,
.feat-card:hover,
.step:hover,
.info-panel:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.feat-card:hover {
  transform: translateY(-5px);
}

.faq-item:hover {
  border-color: var(--border-strong, rgba(65, 97, 101, 0.55));
  transform: translateX(4px);
}

.dl-card::before {
  animation: border-shimmer 3s ease-in-out infinite;
}

.dl-card:hover::before {
  opacity: 1 !important;
}

@keyframes border-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.dl-card::before {
  background: linear-gradient(
    90deg,
    var(--primary, #0B3948),
    var(--primary-light, #416165),
    var(--secondary-light, #6A9094),
    transparent
  ) !important;
  background-size: 200% 100% !important;
}

.btn-p,
.btn-o,
.btn-dl {
  transition:
    background 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease !important;
}

.btn-p:hover,
.btn-dl:hover {
  box-shadow: 0 8px 28px rgba(11, 57, 72, 0.45);
}

.stat-n {
  transition: transform 0.3s ease, color 0.3s ease;
}

.stat:hover .stat-n {
  transform: scale(1.08);
}

.stat-n.counted {
  animation: stat-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes stat-pop {
  0% { transform: scale(0.85); opacity: 0.5; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.feat-icon,
.dl-icon,
.step-n {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.feat-card:hover .feat-icon,
.dl-card:hover .dl-icon,
.step:hover .step-n {
  transform: scale(1.08) rotate(-3deg);
}

/* Legal pages */
.panel,
.page-list a {
  transition:
    border-color 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  border-color: rgba(65, 97, 101, 0.45);
}

.page-list a:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  border-color: rgba(65, 97, 101, 0.45);
}

main > h1 {
  animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

main > .lead {
  animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
