/* Live motion for Meta Pacific
   Thesis: the flight path is the living signature.
   Supporting: hero load sequence, work formation stagger.
   No generic fade-up on every section. */

:root {
  --ease-arrive: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hero load — one authored entrance */
.js .hero-brand-mark,
.js .hero h1,
.js .hero-verticals,
.js .hero-sub,
.js .hero-cta-row {
  opacity: 0;
  transform: translateY(16px);
}
.js .hero.is-live .hero-brand-mark,
.js .hero.is-live h1,
.js .hero.is-live .hero-verticals,
.js .hero.is-live .hero-sub,
.js .hero.is-live .hero-cta-row {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-arrive), transform 0.7s var(--ease-arrive);
}
.js .hero.is-live .hero-brand-mark { transition-delay: 0.05s; }
.js .hero.is-live h1 { transition-delay: 0.12s; }
.js .hero.is-live .hero-verticals { transition-delay: 0.2s; }
.js .hero.is-live .hero-sub { transition-delay: 0.28s; }
.js .hero.is-live .hero-cta-row { transition-delay: 0.36s; }

.js .capture-panel {
  opacity: 0;
  transform: translateY(24px);
}
.js .hero.is-live .capture-panel {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-arrive) 0.35s, transform 0.9s var(--ease-arrive) 0.35s;
}

.capture-panel .flight-line {
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
}
.js .hero.is-live .capture-panel .flight-line {
  animation: draw-path 2.4s var(--ease-arrive) 0.55s forwards;
}
@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}

.capture-stage {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 0.45s var(--ease-arrive);
}

/* Work formation — stagger only when the list appears */
.js .work-item {
  opacity: 0;
  transform: translateY(22px);
}
.js .work-grid.is-live .work-item {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease-arrive), transform 0.55s var(--ease-arrive);
}
.js .work-grid.is-live .work-item:nth-child(1) { transition-delay: 0.04s; }
.js .work-grid.is-live .work-item:nth-child(2) { transition-delay: 0.1s; }
.js .work-grid.is-live .work-item:nth-child(3) { transition-delay: 0.16s; }

.work-thumb {
  position: relative;
}
.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #00000055, transparent 42%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-arrive);
  pointer-events: none;
}
.work-item:hover .work-thumb::after,
.work-item:focus-visible .work-thumb::after {
  opacity: 1;
}
.work-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ede9de;
  color: #000;
  display: grid;
  place-items: center;
  opacity: 0.92;
  transform: scale(0.92);
  transition: transform 0.3s var(--ease-arrive), opacity 0.3s ease;
  pointer-events: none;
}
.work-play svg { width: 11px; height: 11px; margin-left: 2px; }
.work-item:hover .work-play,
.work-item:focus-visible .work-play {
  transform: scale(1);
}

/* Process steps: soft cascade when the sequence enters */
.js .process-step {
  opacity: 0;
  transform: translateY(18px);
}
.js .process-row.is-live .process-step {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease-arrive), transform 0.5s var(--ease-arrive);
}
.js .process-row.is-live .process-step:nth-child(1) { transition-delay: 0.02s; }
.js .process-row.is-live .process-step:nth-child(2) { transition-delay: 0.08s; }
.js .process-row.is-live .process-step:nth-child(3) { transition-delay: 0.14s; }
.js .process-row.is-live .process-step:nth-child(4) { transition-delay: 0.2s; }
.js .process-row.is-live .process-step:nth-child(5) { transition-delay: 0.26s; }

/* Field note — replaces the repeated statement block */
.field-note {
  font-family: var(--font-subhead);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, var(--size-subheading));
  line-height: 1.35;
  letter-spacing: -0.02em;
  max-width: 760px;
  color: var(--ink-strong);
}
.field-note em {
  font-style: normal;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.05em;
}

/* Pillars without fake sequence numbers */
.pillar .idx { display: none; }
.pillar { min-height: 190px; gap: 12px; }

/* Button focus that feels alive */
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.work-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .js .hero-brand-mark,
  .js .hero h1,
  .js .hero-verticals,
  .js .hero-sub,
  .js .hero-cta-row,
  .js .capture-panel,
  .js .work-item,
  .js .process-step {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .js .hero.is-live .capture-panel .flight-line {
    animation: none;
    stroke-dashoffset: 0;
  }
  .capture-stage { transition: none !important; }
}
