/* Ambient motion layer. It stays decorative and never receives pointer events. */

body {
  position: relative;
  background-color: var(--bg);
  background-attachment: fixed;
}

body[data-theme="dark"] {
  background-color: #070b18;
  background-image:
    radial-gradient(circle at 18px 24px, rgba(255, 255, 255, 0.24) 0 0.8px, transparent 1.2px),
    radial-gradient(circle at 71px 56px, rgba(132, 184, 255, 0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 116px 19px, rgba(255, 255, 255, 0.12) 0 0.7px, transparent 1.1px),
    radial-gradient(ellipse at 50% 0%, rgba(49, 99, 188, 0.10), transparent 58%);
  background-size:
    137px 137px,
    211px 211px,
    283px 283px,
    100% 1100px;
  background-repeat: repeat, repeat, repeat, no-repeat;
  background-attachment: fixed;
}

body[data-theme="light"] {
  background-color: #f5f8ff;
  background-image:
    radial-gradient(circle at 21px 27px, rgba(42, 101, 185, 0.13) 0 0.75px, transparent 1.15px),
    radial-gradient(circle at 83px 62px, rgba(78, 135, 220, 0.10) 0 0.9px, transparent 1.35px),
    radial-gradient(circle at 132px 31px, rgba(69, 119, 197, 0.08) 0 0.65px, transparent 1px),
    radial-gradient(ellipse at 50% 0%, rgba(99, 151, 234, 0.10), transparent 60%);
  background-size:
    151px 151px,
    227px 227px,
    307px 307px,
    100% 1100px;
  background-repeat: repeat, repeat, repeat, no-repeat;
  background-attachment: fixed;
}

/* Keep the page canvas continuous; cards provide all necessary separation. */
.hero,
.section--surface,
.footer,
body[data-theme="dark"] .hero,
body[data-theme="dark"] .section--surface,
body[data-theme="dark"] .footer,
body[data-theme="light"] .hero,
body[data-theme="light"] .section--surface,
body[data-theme="light"] .footer {
  background: transparent;
}

.site-journey {
  position: absolute;
  top: 0;
  right: 0;
  width: min(31vw, 390px);
  height: var(--journey-height, 100%);
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 500ms ease;
}

.site-journey.is-ready {
  opacity: 1;
}

.site-journey__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.site-journey__route path {
  fill: none;
  stroke: rgba(177, 216, 255, 0.16);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  vector-effect: non-scaling-stroke;
}

.site-journey__planet,
.site-journey__star {
  position: absolute;
  will-change: transform, opacity;
}

.site-journey__planet {
  top: var(--journey-planet-y, 0);
  right: var(--journey-planet-right, 44px);
  width: 112px;
  aspect-ratio: 1;
  transform: translateY(-50%) rotate(var(--journey-planet-turn, 0deg));
  opacity: var(--journey-planet-opacity, 0);
  filter: drop-shadow(0 0 18px rgba(97, 174, 255, 0.18));
}

.site-journey__planet svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-journey__planet .journey-planet__rim,
.site-journey__planet .journey-planet__grid,
.site-journey__planet .journey-planet__land {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.site-journey__planet .journey-planet__rim {
  stroke: rgba(196, 228, 255, 0.74);
  stroke-width: 1.15;
}

.site-journey__planet .journey-planet__grid {
  stroke: rgba(166, 209, 255, 0.28);
  stroke-width: 0.7;
}

.site-journey__planet .journey-planet__land {
  stroke: rgba(235, 247, 255, 0.64);
  stroke-width: 1;
  stroke-linejoin: round;
}

.site-journey__star {
  top: var(--journey-star-y, 0);
  right: var(--journey-star-right, 54px);
  width: 18px;
  height: 18px;
  transform: translate(50%, -50%) rotate(var(--journey-star-turn, 0deg));
  opacity: var(--journey-star-opacity, 0);
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.90));
}

.site-journey__star::before,
.site-journey__star::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.site-journey__star::before {
  width: 18px;
  height: 3px;
}

.site-journey__star::after {
  width: 3px;
  height: 18px;
}

body[data-theme="light"] .site-journey__route path {
  stroke: rgba(42, 109, 190, 0.14);
}

body[data-theme="light"] .site-journey__planet {
  filter: drop-shadow(0 0 16px rgba(47, 116, 210, 0.15));
}

body[data-theme="light"] .site-journey__planet .journey-planet__rim {
  stroke: rgba(36, 103, 184, 0.50);
}

body[data-theme="light"] .site-journey__planet .journey-planet__grid {
  stroke: rgba(45, 111, 194, 0.20);
}

body[data-theme="light"] .site-journey__planet .journey-planet__land {
  stroke: rgba(31, 91, 168, 0.42);
}

body[data-theme="light"] .site-journey__star {
  filter: drop-shadow(0 0 6px rgba(49, 113, 205, 0.62));
}

body[data-theme="light"] .site-journey__star::before,
body[data-theme="light"] .site-journey__star::after {
  background: #ffffff;
}

/* Cards become clearer on hover without changing their layout. */
:where(
  .benefit,
  .step,
  .tariff,
  .trial-note,
  .device,
  .faq-item,
  .restore-card,
  .final-cta,
  .tg-banner,
  .contact
) {
  position: relative;
  transition:
    transform 240ms cubic-bezier(.2, .8, .2, 1),
    border-color 240ms ease,
    box-shadow 240ms ease,
    background-color 240ms ease,
    filter 240ms ease;
}

@media (hover: hover) and (pointer: fine) {
  :where(
    .benefit,
    .step,
    .tariff,
    .trial-note,
    .device,
    .faq-item,
    .restore-card,
    .final-cta,
    .tg-banner,
    .contact
  ):hover {
    z-index: 3;
    transform: translateY(-5px);
    border-color: rgba(112, 167, 255, 0.58);
    background-color: color-mix(in srgb, var(--surface-2) 88%, transparent);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(112, 167, 255, 0.13);
    filter: brightness(1.08);
  }

  body[data-theme="light"] :where(
    .benefit,
    .step,
    .tariff,
    .trial-note,
    .device,
    .faq-item,
    .restore-card,
    .final-cta,
    .tg-banner,
    .contact
  ):hover {
    border-color: rgba(55, 119, 224, 0.48);
    background-color: rgba(255, 255, 255, 0.94);
    box-shadow:
      0 22px 52px rgba(42, 83, 145, 0.16),
      0 0 0 1px rgba(67, 126, 226, 0.10);
    filter: brightness(1.015);
  }
}

/* Scroll reveals are added only after JavaScript initializes. */
.motion-reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.992);
  transition:
    opacity 620ms cubic-bezier(.2, .7, .2, 1),
    transform 620ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--motion-delay, 0ms);
}

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

.hero__copy.motion-reveal {
  transform: translateY(14px);
}

.hero__visual.motion-reveal {
  transform: translateY(8px) scale(0.985);
}

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

@media (max-width: 900px) {
  .site-journey {
    width: 126px;
    opacity: 0.62;
  }

  .site-journey__planet {
    width: 72px;
  }

  .site-journey__star {
    width: 13px;
    height: 13px;
  }

  .site-journey__star::before {
    width: 13px;
    height: 2px;
  }

  .site-journey__star::after {
    width: 2px;
    height: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-journey {
    display: none;
  }

  .motion-reveal,
  .motion-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  :where(
    .benefit,
    .step,
    .tariff,
    .trial-note,
    .device,
    .faq-item,
    .restore-card,
    .final-cta,
    .tg-banner,
    .contact
  ) {
    transition: none;
  }
}
