/* WayOfLearning public experience
   Lightweight CSS-only atmosphere, scroll reveals and microinteractions.
   It never changes document flow and is excluded from app, auth and legal routes. */

:root {
  --wol-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wol-soft-shadow: 0 20px 55px rgba(15, 23, 42, 0.10);
}

/* Hero atmosphere: the original light gradients remain visible underneath. */
body.route-public .wol-aurora-hero {
  --wol-pointer-x: 50%;
  --wol-pointer-y: 32%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body.route-public .wol-aurora-hero::before,
body.route-public .wol-aurora-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.route-public .wol-aurora-hero::before {
  inset: -18%;
  background:
    radial-gradient(circle at var(--wol-pointer-x) var(--wol-pointer-y), rgba(125, 211, 252, 0.18), transparent 24%),
    radial-gradient(ellipse at 15% 28%, rgba(56, 189, 248, 0.15), transparent 30%),
    radial-gradient(ellipse at 82% 22%, rgba(129, 140, 248, 0.13), transparent 31%),
    radial-gradient(ellipse at 67% 82%, rgba(52, 211, 153, 0.11), transparent 29%);
  filter: blur(26px);
  opacity: 0.88;
  transform: translate3d(0, 0, 0) scale(1.02);
  animation: wolAuroraBreathe 20s ease-in-out infinite alternate;
  transition: background-position 180ms ease-out;
}

body.route-public .wol-aurora-hero::after {
  background-image:
    radial-gradient(circle, rgba(14, 116, 144, 0.26) 0 0.65px, transparent 1.2px),
    radial-gradient(circle, rgba(79, 70, 229, 0.18) 0 0.72px, transparent 1.25px),
    radial-gradient(circle, rgba(5, 150, 105, 0.15) 0 0.6px, transparent 1.12px);
  background-size: 121px 137px, 211px 227px, 307px 331px;
  background-position: 17px 23px, 79px 61px, 153px 103px;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.78) 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.78) 60%, transparent 100%);
  animation: wolAmbientDrift 90s linear infinite;
}

body.route-public .wol-aurora-hero > :not(.absolute) {
  position: relative;
  z-index: 1;
}

/* Reveal sections and cards only after the motion controller has initialised. */
body.route-public.wol-motion-ready .wol-reveal,
body.route-public.wol-motion-ready .wol-reveal-item {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 520ms var(--wol-ease),
    transform 620ms var(--wol-ease);
}

body.route-public.wol-motion-ready .wol-reveal-item {
  transition-delay: var(--wol-reveal-delay, 0ms);
}

body.route-public.wol-motion-ready .wol-reveal.wol-visible,
body.route-public.wol-motion-ready .wol-reveal-item.wol-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* The primary product visual moves slightly; content and text never do. */
body.route-public .wol-float {
  animation: wolGentleFloat 8.5s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}

/* Card feedback: subtle lift, clearer border and icon response. */
body.route-public article {
  transition:
    transform 260ms var(--wol-ease),
    border-color 260ms ease,
    background-color 260ms ease,
    box-shadow 280ms var(--wol-ease);
}

body.route-public article svg {
  transition: transform 260ms var(--wol-ease), opacity 260ms ease;
}

/* Home workflow: connect the four steps without changing their layout. */
body.route-home #como-funciona [class*="lg:grid-cols-4"] {
  position: relative;
  isolation: isolate;
}

body.route-home #como-funciona article {
  position: relative;
  z-index: 1;
}

body.route-home #como-funciona article > div:first-child {
  transition:
    transform 260ms var(--wol-ease),
    box-shadow 260ms ease,
    background-color 260ms ease;
}

/* Small directional feedback on important calls to action. */
body.route-public a[href="/registro"] svg,
body.route-public a[href="#como-funciona"] svg,
body.route-public header a svg {
  transition: transform 220ms var(--wol-ease);
}

@media (hover: hover) and (pointer: fine) {
  body.route-public article:hover {
    transform: translateY(-4px);
    border-color: rgba(148, 163, 184, 0.62);
    box-shadow: var(--wol-soft-shadow);
  }

  body.route-public article:hover svg {
    transform: translateY(-2px) scale(1.035);
  }

  body.route-home #como-funciona article:hover > div:first-child {
    transform: scale(1.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.20);
  }

  body.route-public a[href="/registro"]:hover svg,
  body.route-public a[href="#como-funciona"]:hover svg,
  body.route-public header a:hover svg {
    transform: translateX(3px);
  }
}

@media (min-width: 1024px) {
  body.route-home #como-funciona [class*="lg:grid-cols-4"]::before {
    content: "";
    position: absolute;
    top: 2.55rem;
    left: 7%;
    right: 7%;
    height: 1px;
    z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.28) 18%, rgba(16, 185, 129, 0.28) 82%, transparent);
  }
}

@keyframes wolAuroraBreathe {
  0% {
    opacity: 0.66;
    transform: translate3d(-1.5%, 0.5%, 0) scale(1.01);
  }
  50% {
    opacity: 0.92;
    transform: translate3d(1.2%, -1%, 0) scale(1.055);
  }
  100% {
    opacity: 0.74;
    transform: translate3d(-0.5%, 1.2%, 0) scale(1.025);
  }
}

@keyframes wolAmbientDrift {
  from {
    background-position: 17px 23px, 79px 61px, 153px 103px;
  }
  to {
    background-position: 138px 160px, 290px 288px, 460px 434px;
  }
}

@keyframes wolGentleFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@media (max-width: 767px) {
  body.route-public .wol-aurora-hero::before {
    filter: blur(34px);
    opacity: 0.66;
  }

  body.route-public .wol-aurora-hero::after {
    background-image:
      radial-gradient(circle, rgba(14, 116, 144, 0.20) 0 0.6px, transparent 1.15px),
      radial-gradient(circle, rgba(79, 70, 229, 0.13) 0 0.68px, transparent 1.2px);
    background-size: 151px 167px, 251px 271px;
    opacity: 0.16;
  }

  body.route-public.wol-motion-ready .wol-reveal,
  body.route-public.wol-motion-ready .wol-reveal-item {
    transform: translate3d(0, 12px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.route-public .wol-aurora-hero::before,
  body.route-public .wol-aurora-hero::after,
  body.route-public .wol-float {
    animation: none !important;
    transform: none !important;
  }

  body.route-public.wol-motion-ready .wol-reveal,
  body.route-public.wol-motion-ready .wol-reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.route-public article,
  body.route-public article svg,
  body.route-public a svg {
    transition: none !important;
  }
}
