/* FUNCTION AT SCALE, v7 layer. Loads after v6.css. Motion and a tighter, eye-led layout. */

/* Tighter vertical rhythm so each section pulls into the next */
.section { padding-block: clamp(72px, 8vw, 128px); }
.sec-head { margin-bottom: clamp(24px, 3vw, 40px); }

/* Hero: headline, then a split row. Copy and CTA left, the living system right. */
.hero-split { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: center; margin-top: clamp(20px, 3vw, 44px); }
.hero-left { grid-column: 1 / span 5; }
.hero-left .lede { color: var(--ink); max-width: 30ch; }
.hero-left .cta-row { justify-content: flex-start; margin-top: clamp(22px, 2.6vw, 34px); }
.flow { grid-column: 6 / span 7; margin: 0; }
.flow svg { width: 100%; height: auto; overflow: visible; display: block; }
@media (max-width: 899px) { .hero-left, .flow { grid-column: 1 / -1; } .flow { margin-top: 28px; } }

/* Flow diagram: vision, strategy, operations */
.flow .rail { stroke: var(--ink); stroke-width: 1; }
.flow .div { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.flow .lab { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; fill: var(--ink-70); }
.flow .cell { fill: transparent; stroke: var(--rule-strong); stroke-width: 1; animation: cell 9s ease-in-out infinite; }
.flow .red { fill: var(--red); } .flow .blue { fill: var(--blue); } .flow .yellow { fill: var(--yellow); } .flow .ink { fill: var(--ink); }
.flow .hollow { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.flow .tok { transform-box: view-box; animation: travel 9s cubic-bezier(.55, .05, .25, 1) infinite both; }
.flow .idea { fill: var(--ink); opacity: .35; animation: float 4.5s ease-in-out infinite alternate; transform-box: fill-box; }
.flow .runner { animation: run 6s linear infinite; }
@keyframes travel {
  0%   { transform: translate(var(--sx), var(--sy)) rotate(var(--r0)); opacity: 0; }
  8%   { opacity: 1; }
  42%  { transform: translate(var(--mx), 158px) rotate(calc(var(--r0) / 4)); }
  66%  { transform: translate(var(--ex), var(--ey)) rotate(0deg); opacity: 1; }
  90%  { transform: translate(var(--ex), var(--ey)) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--ex), var(--ey)) rotate(0deg); opacity: 0; }
}
@keyframes cell { 0%, 60% { fill: transparent; } 72%, 92% { fill: rgba(17, 17, 17, .06); } 100% { fill: transparent; } }
@keyframes float { from { transform: translateY(-7px); } to { transform: translateY(7px); } }
@keyframes run { from { transform: translateX(-20px); } to { transform: translateX(730px); } }

/* Service icons keep moving, quietly */
.svc-ico .hollow { transform-box: fill-box; transform-origin: center; animation: turn 7s cubic-bezier(.7, 0, .3, 1) infinite; }
.svc-ico .red:first-of-type { transform-box: fill-box; animation: lift 3.2s ease-in-out infinite alternate; }
.svc-ico .blue { transform-box: fill-box; transform-origin: center; animation: roll 5s ease-in-out infinite alternate; }
.svc-ico .yellow { transform-box: fill-box; transform-origin: right bottom; animation: breathe 4s ease-in-out infinite alternate; }
@keyframes turn { 0%, 35% { transform: rotate(0); } 50%, 100% { transform: rotate(90deg); } }
@keyframes lift { from { transform: translate(0, 0); } to { transform: translate(4px, -6px); } }
@keyframes roll { from { transform: translateX(-10px) rotate(0); } to { transform: translateX(6px) rotate(180deg); } }
@keyframes breathe { from { transform: scale(.82); } to { transform: scale(1); } }
.svc-card { transition: background-color var(--t-mid) var(--ease); }
.svc-card:hover { background: rgba(17, 17, 17, .025); }

/* Timeline: a marker runs the line, the dots pulse as it passes */
.timeline::after { content: ""; position: absolute; top: 4px; left: 0; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); opacity: 0; }
.timeline.in-view::after { animation: track 7s cubic-bezier(.6, 0, .4, 1) 1.2s infinite; }
@keyframes track { 0% { left: 0; opacity: 0; } 6% { opacity: 1; } 88% { left: calc(100% - 8px); opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.timeline.in-view .tl-dot { animation: dot 7s ease-in-out 1.2s infinite; }
.timeline.in-view .tl-step:nth-child(2) .tl-dot { animation-delay: 2.9s; }
.timeline.in-view .tl-step:nth-child(3) .tl-dot { animation-delay: 4.6s; }
.timeline.in-view .tl-step:nth-child(4) .tl-dot { animation-delay: 6.2s; }
@keyframes dot { 0%, 12%, 100% { transform: scale(1); } 5% { transform: scale(1.6); } }

/* Spark bars grow in */
.js .shot .spark i { transform: scaleY(.1); transform-origin: bottom; transition: transform .9s var(--ease-settle); }
.shot.in-view .spark i { transform: none; transition-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .flow .tok, .flow .idea, .flow .runner, .flow .cell, .svc-ico *, .timeline::after, .tl-dot { animation: none !important; }
  .flow .tok { transform: translate(var(--ex), var(--ey)); opacity: 1; }
}
