/* ============================================================
   motion.css, SiC Labs website: initial states and scene states
   ============================================================
   Every hidden initial state sits under html.js, which site.js sets
   first. Without JavaScript nothing here applies and the page is the
   final frame. The reduced-motion / print block at the end forces the
   final frame for those two contexts.
   Specificity note: the hidden rule for .rv stops matching once site.js
   adds .is-in, so a settled element falls back to the page's own CSS
   (A's .phase.is-dim opacity and hover transitions win again).
   ============================================================ */

/* ---------- Reveal primitive ---------- */
html.js .rv:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
  transition: none;
  will-change: transform, opacity;
}

/* ---------- Title bar and product wipe ---------- */
html.js h2.t { --bar: 0; }
html.js .shot { --wipe: 100%; }

/* ---------- Count-ups: stable digit widths while counting ---------- */
.count { font-variant-numeric: tabular-nums; }

/* ---------- Brand marks: hero (flies in, strut draws) and contact (draws, pops) ---------- */
html.js .hero-mark,
html.js .contact-mark { overflow: visible; }
html.js .hero-mark .lk-strut,
html.js .contact-mark .sic-mark-strut {
  stroke-dasharray: 1 1.2;
  stroke-dashoffset: 1.1;
}
html.js .hero-mark .lk-node,
html.js .contact-mark .sic-mark-node { opacity: 0; }
/* Triple click on the hero mark is the easter egg; no text selection from it. */
.hero-mark { -webkit-user-select: none; user-select: none; }

/* ---------- Hero title words: wrapped by site.js for the reveal ---------- */
.hw { display: inline-block; }

/* The hero field svg sizing lives in site.css (.hero-field svg); the parallax
   transform and the screenshot pan are motion, never shown for print. */

/* ---------- Scene slots and shared scene type ---------- */
.scene {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.scene text {
  font-family: var(--sic-font-heading, 'Archivo', 'Helvetica Neue', Arial, sans-serif);
  font-variation-settings: "wdth" 112;
}
/* At 1600 units wide the track labels fall under 10px on tablets and phones;
   the phase cards below carry the same names and follow the same steps. */
@media (max-width: 899px) {
  .scene--track text { display: none; }
}

/* ---------- Scene initial states ---------- */
html.js .scene .sic-draw {
  stroke-dasharray: 1 1.2;
  stroke-dashoffset: 1.1;
}
html.js .scene .sic-pop,
html.js .scene .sic-seg,
html.js .scene .sic-week,
html.js .scene .sic-cap { opacity: 0; }
/* Tokens and rings show only while a loop runs, so never without the engine. */
.scene .sic-loop { opacity: 0; }

/* ---------- Scene states toggled by the step cycle ---------- */
.scene .sic-seg { transition: fill-opacity 0.4s ease; }
.scene .sic-seg.sic-lit { fill-opacity: 1; }
.scene .sic-gate path { transition: fill 0.4s ease, stroke 0.4s ease; }
.scene .sic-gate.sic-lit path { fill: var(--sic-blue, #1E4FD8); stroke: var(--sic-blue, #1E4FD8); }

/* ---------- Reduced motion and print: the final frame ---------- */
@media (prefers-reduced-motion: reduce), print {
  html.js .rv:not(.is-in) {
    opacity: 1 !important;
    transform: none !important;
  }
  html.js h2.t { --bar: 1 !important; }
  html.js .shot { --wipe: 0% !important; }
  html.js .hero-mark .lk-strut,
  html.js .contact-mark .sic-mark-strut,
  html.js .scene .sic-draw { stroke-dashoffset: 0 !important; }
  html.js .hero-mark .lk-node,
  html.js .contact-mark .sic-mark-node,
  html.js .scene .sic-pop,
  html.js .scene .sic-seg,
  html.js .scene .sic-week,
  html.js .scene .sic-cap { opacity: 1 !important; }
  .scene .sic-loop { opacity: 0 !important; }
  .hero-field svg { transform: none !important; }
  .shot img { transform: none !important; }
  .chip-dot { opacity: 1 !important; }
}
