/**
 * motion.css — page-hero, scroll-reveal, entrance animations, micro-interactions
 * Respects prefers-reduced-motion throughout.
 */

/* ================================================================
   PAGE HERO — dark banner for sub-page headers
   ================================================================ */
.page-hero {
  background: linear-gradient(135deg, #0a1a12 0%, #017143 55%, #1c1d1f 100%);
  padding: 4rem 0 2rem;
  min-height: clamp(28rem, 45vh, 32rem);
  display: flex;
  align-items: flex-start;
}



.page-hero .section-eyebrow {
  color: var(--color-fresh-green);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
}

.page-hero .breadcrumb,
.page-hero .breadcrumb a,
.page-hero .breadcrumb__sep,
.page-hero .breadcrumb__current {
  color: var(--color-white);
}

.page-hero .breadcrumb {
  margin-bottom: var(--space-4);
}

.page-hero .breadcrumb a:hover {
  opacity: 0.8;
}

/* Size comes from the base heading scale so the editor's chosen level shows through. */
.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero h4,
.page-hero h5,
.page-hero h6 {
  color: var(--color-white);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.page-hero h1 {
  font-size: var(--text-h1);
}

@media (min-width: 900px) {
  .page-hero h1 {
    font-size: var(--text-h1-lg);
  }
}

.page-hero p,
.page-hero .page-hero__lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 44rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.page-hero .page-hero__lead p,
.page-hero .page-hero__lead li,
.page-hero .page-hero__lead blockquote {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  max-width: none;
}

.page-hero .page-hero__lead p + p,
.page-hero p + p {
  margin-top: 0.55em;
}

.page-hero .page-hero__lead ul,
.page-hero .page-hero__lead ol {
  margin: 0.55em 0 0;
  padding-left: 1.25em;
}

.page-hero .btn-group {
  margin-top: var(--space-6);
}

.page-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin-bottom: var(--space-4);
  transition: color var(--transition-fast);
}

.page-hero .back-link:hover {
  color: var(--color-white);
}


/* ================================================================
   SCROLL-REVEAL
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

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

  .reveal--d1 {
    transition-delay: 0.08s;
  }

  .reveal--d2 {
    transition-delay: 0.16s;
  }

  .reveal--d3 {
    transition-delay: 0.24s;
  }

  .reveal--d4 {
    transition-delay: 0.32s;
  }

  .reveal--d5 {
    transition-delay: 0.40s;
  }
}


/* ================================================================
   PAGE-HERO ENTRANCE — hero content fades in on load
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(28px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .page-hero .section-eyebrow {
    animation: fadeInUp 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  .page-hero h1,
  .page-hero h2,
  .page-hero h3,
  .page-hero h4,
  .page-hero h5,
  .page-hero h6 {
    animation: fadeInUp 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
  }

  .page-hero p,
  .page-hero .page-hero__lead {
    animation: fadeInUp 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
  }

  .page-hero .btn-group {
    animation: fadeInUp 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
  }

  .page-hero .back-link {
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  /* Homepage hero slide content */
  .hero__content .hero__eyebrow {
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }

  .hero__content h1,
  .hero__content h2,
  .hero__content .hero__title {
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.12s both;
  }

  .hero__content p,
  .hero__content .hero__lead {
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.22s both;
  }

  .hero__content .hero__actions {
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.34s both;
  }
}


/* ================================================================
   STATS BAR — number pop when revealed
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes statPop {
    from {
      opacity: 0;
      transform: scale(0.72);
    }

    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .stat-item.is-visible .stat-item__num {
    animation: statPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

  .stat-item.is-visible:nth-child(2) .stat-item__num {
    animation-delay: 0.08s;
  }

  .stat-item.is-visible:nth-child(3) .stat-item__num {
    animation-delay: 0.16s;
  }

  .stat-item.is-visible:nth-child(4) .stat-item__num {
    animation-delay: 0.24s;
  }
}


/* ================================================================
   CARD HOVER — lift & shadow micro-motion
   ================================================================ */
.card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* .cert-card hover — defined only in components.css (single source) */


/* ================================================================
   ARROW-LINK — animated hover arrow nudge
   ================================================================ */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.arrow-link::after {
  content: "→";
  display: inline-block;
  transition: transform var(--transition-fast);
}

.arrow-link:hover {
  gap: 0.55rem;
  color: var(--color-primary);
}

.arrow-link:hover::after {
  transform: translateX(3px);
}


/* ================================================================
   PROCESS STEP — numbered QC / ordering steps
   ================================================================ */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.process-steps > .process-step {
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .process-steps > .process-step {
    flex-basis: calc((100% - var(--space-4)) / 2);
    min-width: calc((100% - var(--space-4)) / 2);
  }
}

@media (min-width: 900px) {
  .process-steps > .process-step {
    flex-basis: calc((100% - (5 * var(--space-4))) / 6);
    min-width: calc((100% - (5 * var(--space-4))) / 6);
  }
}

.process-step {
  padding: var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-primary);
}

.process-step__num {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-stat);
  font-weight: var(--font-weight-display);
  color: var(--color-mist);
  line-height: 1;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.process-step__title {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--space-2);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.process-step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--line-height-body);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}


/* ================================================================
   MEDIA SHIMMER — reserved-size frames while images decode
   ================================================================ */
@keyframes media-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}