/* ============================================================
   CHRIST APPS — Motion, Reveal & Responsive
   ============================================================ */

/* ---------- REVEAL (JS-driven) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.4, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.4, 1);
  will-change: opacity, transform;
}

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

.js .reveal-delay-1 { transition-delay: 0.08s; }
.js .reveal-delay-2 { transition-delay: 0.16s; }
.js .reveal-delay-3 { transition-delay: 0.24s; }
.js .reveal-delay-4 { transition-delay: 0.32s; }
.js .reveal-delay-5 { transition-delay: 0.4s; }
.js .reveal-delay-6 { transition-delay: 0.48s; }

/* Stagger children: parent with .reveal-stagger > child */
.js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.2, 0.8, 0.4, 1),
    transform 0.55s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.js .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.04s; }
.js .reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.js .reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.22s; }
.js .reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.js .reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.34s; }
.js .reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.4s; }
.js .reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.46s; }
.js .reveal-stagger.visible > *:nth-child(9) { transition-delay: 0.52s; }
.js .reveal-stagger.visible > *:nth-child(10) { transition-delay: 0.58s; }
.js .reveal-stagger.visible > *:nth-child(11) { transition-delay: 0.64s; }
.js .reveal-stagger.visible > *:nth-child(12) { transition-delay: 0.7s; }

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

/* ---------- FOCUS ---------- */
:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- PERFORMANCE: skip rendering below the fold ---------- */
:where(section.section):not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

@media (prefers-reduced-motion: reduce) {
  :where(section.section):not(.hero) {
    content-visibility: visible;
  }
}

/* ---------- PREFERS REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .js .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-visual__node,
  .hero-visual__orb::after,
  .vox-bar,
  .eco-orbit,
  .eco-node {
    animation: none !important;
  }
}

/* ---------- RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: clamp(34px, 6.5vw, 60px);
  }
}

/* Mobile */
@media (max-width: 720px) {
  .hero {
    min-height: auto;
    padding: 110px 0 40px;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 48px);
    letter-spacing: -0.04em;
  }

  .hero__sub {
    font-size: 15px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .hero-visual {
    margin-top: 40px;
    max-width: 340px;
  }

  .hero-visual__orb {
    width: 120px;
    height: 120px;
  }

  .hero-visual__orb img {
    width: 48px;
    height: 48px;
  }

  .hero-visual__ring {
    width: 260px;
    height: 260px;
  }

  .hero-visual__node {
    padding: 7px 12px;
    font-size: 10px;
    border-radius: 10px;
  }

  .hero-visual__node svg {
    width: 13px;
    height: 13px;
  }

  /* Product cards full-width on mobile */
  .product-card,
  .product-card.reverse {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }

  .phone {
    max-width: 260px;
  }

  /* Showcase: 2 cols */
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .showcase-item {
    padding: 0;
  }

  .showcase-item__label {
    font-size: 13px;
  }

  /* Workflow vertical */
  .workflow-flow {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
    margin-inline: auto;
  }

  .workflow-step {
    flex-direction: row;
    text-align: left;
    gap: 16px;
    padding: 16px 0;
  }

  .workflow-step__text {
    max-width: none;
    text-align: left;
  }

  /* Hide outer node labels */
  .eco-node__label,
  .eco-node__status {
    display: none;
  }

  .eco-center {
    width: 80px;
    height: 80px;
  }

  .eco-center img {
    width: 28px;
    height: 28px;
  }

  .eco-center span {
    font-size: 8px;
  }

  /* Roadmap */
  .timeline {
    padding-left: 28px;
  }

  .timeline__item__node {
    left: -21px;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Small mobile */
@media (max-width: 420px) {
  .hero h1 {
    font-size: clamp(28px, 9vw, 42px);
  }

  .section {
    padding-block: clamp(60px, 10vw, 100px);
  }
}