/* ============================================================
   LIVING LAYER — ambient, additive motion for the editorial canvas
   Light-theme edition inspired by o10-strength.
   Nothing here hides content permanently: every state resolves visible.
   ============================================================ */

/* pause gates: off-screen sections & hidden tab only (keep animations live while scrolling) */
.lv-off .lv-a, .lv-off .lv-a *, .lv-off .lv-a::before, .lv-off .lv-a::after,
.lv-off .lv-a *::before, .lv-off .lv-a *::after,
.lv-band.lv-off .lv-band__t,
.lv-hidden .lv-a, .lv-hidden .lv-a *, .lv-hidden .lv-a::before, .lv-hidden .lv-a::after,
.lv-hidden .lv-a *::before, .lv-hidden .lv-a *::after,
.lv-off .card-scan, .lv-off .card-media img, .lv-off .ticker-track, .lv-off .foot-mark-big span,
.lv-off .hud-bars i, .lv-off .avail i, .lv-off .hero-br b, .lv-off .metric::after,
.lv-off .progress span::after, .lv-off .tier-feature::after, .lv-off .tier-tag::before,
.lv-off .btn-accent::after, .lv-off .lv-left::before, .lv-off .tr.is-live-row::before,
.lv-off .kicker span:first-child::before, .lv-off .drag-hint span,
.lv-hidden .card-scan, .lv-hidden .card-media img, .lv-hidden .ticker-track, .lv-hidden .foot-mark-big span,
.lv-hidden .hud-bars i, .lv-hidden .lv-band__t { animation-play-state: paused !important; }

.lv-a { pointer-events: none; }

/* canvas layers must never take layout space */
.lv-dust {
  position: absolute; left: 0; top: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- reveal: fade-up + word masks ---------- */
.lv-on .lv-r {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}
.lv-on .lv-r.lv-in {
  opacity: 1;
  transform: none;
  transition:
    opacity .85s var(--ease) var(--lv-d, 0ms),
    transform .95s var(--ease) var(--lv-d, 0ms);
}

.lv-w { display: inline-block; clip-path: inset(-0.18em -0.1em -0.26em -0.1em); }
.lv-wi { display: inline-block; transform: translate3d(0, 122%, 0); }
.lv-h.lv-in .lv-wi { transform: none; transition: transform 1.05s var(--ease) var(--d, 0ms); }

/* section edge rule that draws itself in + travelling accent spark */
.lv-sec { position: relative; }
.lv-line {
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--border-subtle);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.4s var(--ease);
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
.lv-line.lv-in { transform: scaleX(1); }
.lv-line i {
  position: absolute; left: 0; top: 0;
  width: 110px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-signal), transparent);
  animation: lv-run 7.5s linear infinite;
}
@keyframes lv-run {
  from { transform: translate3d(-120px, 0, 0); }
  to { transform: translate3d(100vw, 0, 0); }
}

/* ---------- kinetic marquee bands (light-mode o10 bands) ---------- */
.lv-band {
  position: relative; overflow: hidden;
  height: clamp(58px, 7.6vw, 102px);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}
.lv-band--rev {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 0;
}
.lv-band__t {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; white-space: nowrap;
  height: 100%;
  animation: mq 48s linear infinite;
}
.lv-band--rev .lv-band__t {
  animation-direction: reverse;
  animation-duration: 58s;
}
.lv-band__t span {
  font-size: clamp(36px, 5.2vw, 76px);
  font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(22, 22, 20, .24);
  padding-right: .55em;
}
.lv-band__t span.on {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent-signal);
  -webkit-text-stroke: 0;
}

/* ---------- 01 hero extras ---------- */
.kicker span:first-child::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-signal);
  margin-right: 9px; vertical-align: 1px;
  animation: blink 1.6s ease-in-out infinite;
}
.hero-br b {
  animation: lv-breathe 4.2s ease-in-out infinite;
}
@keyframes lv-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.74); }
}

/* ---------- 02 metrics sweep bars ---------- */
.metric::after {
  content: ""; position: absolute;
  left: 0; right: 20px; bottom: -16px; height: 2px;
  background: var(--accent-signal);
  transform: scaleX(0); transform-origin: left center;
  animation: lv-sweep 6s ease-in-out infinite;
}
.metric:nth-child(2)::after { animation-delay: 1.2s; }
.metric:nth-child(3)::after { animation-delay: 2.4s; }
.metric:nth-child(4)::after { animation-delay: 3.6s; }
@keyframes lv-sweep {
  0% { transform: scaleX(0); opacity: 1; }
  30% { transform: scaleX(1); opacity: 1; }
  62%, 100% { transform: scaleX(1); opacity: 0; }
}
@media (max-width: 900px) {
  .metric::after { bottom: -12px; right: 12px; }
}

/* ---------- 03 approach: drifting dot grid + brackets ---------- */
.approach { position: relative; overflow: hidden; }
.approach .wrap { position: relative; z-index: 1; }
.lv-dots {
  position: absolute; right: 0; top: 0;
  width: 48%; height: 100%; overflow: hidden; opacity: .75;
}
.lv-dots i {
  position: absolute; left: -36px; top: -36px; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(22, 22, 20, .20) 1px, transparent 1.3px);
  background-size: 36px 36px;
  animation: lv-dots 16s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 42%);
  mask-image: linear-gradient(90deg, transparent, #000 42%);
}
@keyframes lv-dots {
  to { transform: translate3d(36px, 36px, 0); }
}
.lv-br { position: absolute; inset: 10px; z-index: 2; }
.lv-br b {
  position: absolute; width: 12px; height: 12px;
  border: 0 solid var(--accent-signal);
  animation: lv-breathe 4.4s ease-in-out infinite;
}
.lv-br b:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.lv-br b:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.lv-br b:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.lv-br b:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.lv-br .tag {
  position: absolute; right: 10px; top: 8px;
  font-size: 11px; color: var(--text-on-dark);
  background: rgba(22, 22, 20, .88);
  padding: 4px 9px; border-radius: var(--r-xs);
}
.lv-br .tag::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: #E2583C; margin-right: 6px; vertical-align: 1px;
  animation: blink 1.2s steps(2, jump-none) infinite;
}

/* ---------- 04 works: scan lines, subtle ken burns, tag lift ---------- */
.card:hover .card-n .tag,
.card.is-active .card-n .tag { letter-spacing: .09em; transition: letter-spacing .5s var(--ease); }
.card-n::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-signal); margin-right: 7px; vertical-align: 1px;
  animation: blink 2.2s ease-in-out infinite;
}
.card:nth-child(2n) .card-n::before { animation-delay: -1.1s; }
.card:nth-child(2) .card-scan { animation-delay: -1.2s; }
.card:nth-child(3) .card-scan { animation-delay: -2.4s; }
.card:nth-child(4) .card-scan { animation-delay: -3.6s; }
.card:nth-child(5) .card-scan { animation-delay: -4.8s; }
.card:nth-child(6) .card-scan { animation-delay: -6.0s; }
.card-media img:not(.fit-device) {
  animation: kb 22s ease-in-out infinite alternate;
}
.card:nth-child(2n) .card-media img:not(.fit-device) { animation-delay: -8s; animation-duration: 26s; }
.card:hover .card-media img { animation-play-state: paused; }
.track-rail span { box-shadow: 0 0 0 0 rgba(200, 75, 49, .4); }

/* ---------- 05 process: rotating calibration dial + live timer + shimmer ---------- */
@media (min-width: 901px) {
  .process-media { overflow: visible; }
}
.lv-ring {
  position: absolute; left: 50%; top: 50%;
  width: 112%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 0;
  color: var(--text-primary);
  opacity: .55;
}
.lv-ring svg { width: 100%; height: 100%; overflow: visible; }
.lv-ring .r1 { transform-origin: 50% 50%; animation: rot 64s linear infinite; }
.lv-ring .r2 { transform-origin: 50% 50%; animation: rot 34s linear infinite reverse; }
.process-media figure { z-index: 1; }
.process-media img { animation: kb 24s ease-in-out infinite alternate; }
.process-media figure:nth-child(2n) img { animation-duration: 30s; animation-delay: -9s; }
@keyframes kb {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1%, 1%, 0); }
}

.lv-timer {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  display: inline-flex; gap: 8px; align-items: center;
  background: rgba(22, 22, 20, .88);
  color: var(--text-on-dark);
  padding: 5px 10px; border-radius: var(--r-xs);
  font-size: 11px;
}
.lv-timer b { color: #E97A5E; font-weight: 500; font-variant-numeric: tabular-nums; }
.lv-timer::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: #E97A5E; animation: blink 1.1s steps(2, jump-none) infinite;
}

.step.is-on .step-n::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-signal); margin-right: 7px; vertical-align: 1px;
  animation: blink 1.5s ease-in-out infinite;
}
.progress span { position: relative; }
.progress span::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 48px; left: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: lv-run 2.8s linear infinite;
}
@media (max-width: 900px) {
  .lv-ring { width: 92%; opacity: .38; }
  .lv-timer { right: 12px; top: 12px; bottom: auto; font-size: 11px; }
}

/* ---------- 06 log: scan line, live row pulse, live clock ---------- */
.tr:not(.th) { position: relative; }
.tr:not(.th)::after {
  content: ""; position: absolute; left: 0; top: -1px;
  width: 100%; height: 1px; background: var(--accent-signal);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .7s var(--ease);
}
.tr:not(.th):hover::after { transform: scaleX(1); }
.tr.is-live-row { position: relative; }
.tr.is-live-row::before {
  content: ""; position: absolute; left: -12px; top: 18px; bottom: 18px;
  width: 2px; background: var(--accent-signal);
  animation: blink 2.2s ease-in-out infinite;
}
.lv-clock { display: block; margin-top: 6px; color: var(--text-muted); }
.lv-clock b { font-weight: 500; color: var(--accent-signal); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .tr.is-live-row::before { left: -10px; }
}

/* ---------- 07 services: feature sheen + status dot ---------- */
.tier-tag::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-signal); margin-right: 8px; vertical-align: 1px;
  animation: blink 1.8s ease-in-out infinite;
}
.tier-feature .tier-tag::before { background: #E97A5E; }
.tier-feature::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: 38%;
  background: linear-gradient(100deg, transparent, rgba(239, 237, 230, .18), transparent);
  transform: translate3d(-140%, 0, 0) skewX(-16deg);
  animation: sheen 6.8s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes sheen {
  0% { transform: translate3d(-140%, 0, 0) skewX(-16deg); }
  40%, 100% { transform: translate3d(360%, 0, 0) skewX(-16deg); }
}

/* accent button sheen */
.btn-accent { position: relative; overflow: hidden; }
.btn-accent::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: translate3d(-140%, 0, 0) skewX(-18deg);
  animation: sheen 5.8s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- 08 contact: beam, status pill, focus underline ---------- */
.contact .lv-dust { z-index: 0; }
.lv-hbeam {
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 75, 49, .85), transparent);
  z-index: 1;
  animation: lv-hb 11s ease-in-out infinite alternate;
}
@keyframes lv-hb {
  from { transform: translate3d(0, 8vh, 0); }
  to { transform: translate3d(0, 72vh, 0); }
}
.lv-left {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 20px 0 0; padding: 7px 13px;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-pill);
  font-size: 11px; color: var(--text-on-dark-2);
  background: rgba(239, 237, 230, .05);
}
.lv-left::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-signal);
  animation: blink 1.5s ease-in-out infinite;
}
.lv-left b { color: #E97A5E; font-weight: 500; }

.field { position: relative; }
.field::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 0; height: 1px; background: var(--accent-signal);
  transition: width .45s var(--ease);
}
.field:focus-within::after { width: 100%; }

/* ---------- footer ticker duplicate guard ---------- */
.ticker-track span:last-child { padding-right: 0; }

@media (prefers-reduced-motion: reduce) {
  .lv-a, .grain { display: none !important; }
  .lv-on .lv-r, .lv-wi { opacity: 1 !important; transform: none !important; }
  .lv-w { clip-path: none; }
  .process-media img, .card-media img { animation: none; }
}
