/* Homepage evidence, resilience, and accessibility baseline.
   Scoped to the current EN/RU homepage only. */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5000;
  padding: 12px 16px;
  border: 1px solid rgba(93, 226, 255, 0.68);
  border-radius: 6px;
  background: #050506;
  color: #fff;
  font: 700 14px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #5de2ff;
  outline-offset: 3px;
}

#main-content:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-nav.is-open a:focus-visible,
.mobile-menu-toggle:focus-visible,
.hero-cta-group a:focus-visible,
.split-btn:focus-visible,
.fs-cta-group a:focus-visible,
.materials-editorial a:focus-visible,
.portfolio-entry-section a:focus-visible,
footer a:focus-visible {
  outline: 2px solid #5de2ff !important;
  outline-offset: 4px !important;
}

/* Meaningful content remains readable when JavaScript is unavailable or fails. */
html:not(.homepage-js) .manifest-card,
html:not(.homepage-js) #tech-section-en,
html:not(.homepage-js) .reveal,
html:not(.homepage-js) .device-monitor,
html:not(.homepage-js) .device-phone,
html:not(.homepage-js) .insight-card,
html:not(.homepage-js) .materials-editorial-card,
html:not(.homepage-js) .process-left p {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

html:not(.homepage-js) .reveal-text {
  transform: none !important;
}

html:not(.homepage-js) .process-wrapper {
  height: auto !important;
  padding: 120px 0 !important;
}

html:not(.homepage-js) .process-sticky {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  overflow: visible !important;
}

html:not(.homepage-js) .process-container {
  align-items: flex-start !important;
}

html:not(.homepage-js) .process-right {
  width: min(600px, 100%) !important;
  height: auto !important;
  display: grid !important;
  gap: 18px !important;
  perspective: none !important;
}

html:not(.homepage-js) .step-card,
html:not(.homepage-js) .step-card.active,
html:not(.homepage-js) .step-card.exit {
  position: relative !important;
  inset: auto !important;
  opacity: 1 !important;
  transform: none !important;
  margin: 0 !important;
}

html:not(.homepage-js) .lunar-glow {
  display: none !important;
}

/* The RU hero keeps its designed line structure but may wrap rather than clip on narrow screens. */
@media (max-width: 480px) {
  body.lang-ru .hero-left h1 {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.lang-ru .hero-left h1 span[style*="white-space:nowrap"] {
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: auto;
  }
}

/* A complete reduced-motion presentation: same content and art direction, without nonessential movement. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .logo-cube,
  .core-hub,
  .divider-core,
  .t-track,
  .f-cta h2,
  .btn-live::after,
  .orbit-group,
  .orbit-dot-track {
    animation: none !important;
  }

  .orbit-motion {
    display: none !important;
  }

  body.scrolled .hero-left,
  body.scrolled .scene,
  .scene,
  .side-bg-text,
  .manifest-card,
  #tech-section-en,
  .reveal,
  .device-monitor,
  .device-phone,
  .insight-card,
  .materials-editorial-card,
  .reveal-text,
  .process-left p {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .process-wrapper {
    height: auto !important;
    padding: 120px 0 !important;
  }

  .process-sticky {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  .process-container {
    align-items: flex-start !important;
  }

  .process-right {
    width: min(600px, 100%) !important;
    height: auto !important;
    display: grid !important;
    gap: 18px !important;
    perspective: none !important;
  }

  .step-card,
  .step-card.active,
  .step-card.exit {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 0 !important;
  }

  .lunar-glow,
  .t-track .t-group[aria-hidden="true"] {
    display: none !important;
  }

  .t-track {
    transform: none !important;
  }

  .split-divider {
    left: 50% !important;
  }
}

@media (max-width: 980px) {
  html:not(.homepage-js) .process-wrapper {
    padding-top: 90px !important;
    padding-bottom: 54px !important;
  }
}

@media (max-width: 980px) and (prefers-reduced-motion: reduce) {
  .process-wrapper {
    padding-top: 90px !important;
    padding-bottom: 54px !important;
  }
}
