/* SCL elevated touches: hero art, entrance and scroll motion, back-to-top.
   Added 2026-10-19 on Natalie's standard for every build. Reads tokens.css.
   The reduced-motion rule in site.css switches every animation and transition off.
   Second pass 2026-10-19: every section carries a moving graphic or icon (Natalie,
   "we should never have a section where something doesn't move"). */

/* hero art: Rooted Rings, generated in the brand colours.
   A Pearl wash on the left keeps the headline and intro clear of the lines. */
.hero--full { position: relative; isolation: isolate; overflow: hidden; }
.hero--full::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--pearl) 0%, var(--pearl) 52%, color-mix(in srgb, var(--pearl) 70%, transparent) 70%, transparent 88%),
    url("/assets/img/gen/scl-hero-rings-2026-10-19-2.svg") right center / auto 100% no-repeat;
  transform-origin: 100% 50%;
  animation: rings-in 1.6s var(--ease) both, rings-breathe 14s ease-in-out 1.6s infinite alternate;
}
@keyframes rings-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes rings-breathe { from { transform: none; } to { transform: scale(1.025); } }
@media (max-width: 48rem) {
  .hero--full::before { background: url("/assets/img/gen/scl-hero-rings-2026-10-19-2.svg") right bottom / 190% auto no-repeat; opacity: 0.35; animation: rings-in-soft 1.6s var(--ease) both; }
  @keyframes rings-in-soft { from { opacity: 0; } to { opacity: 0.35; } }
}

/* the headline breaks before "Over Time" on wide screens, so it stays inside the wash */
.hero--full h1 { max-width: 11em; }

/* hero copy arrives in order */
.hero--full .wrap > * { animation: rise 0.9s var(--ease) both; }
.hero--full .wrap > :nth-child(2) { animation-delay: 0.12s; }
.hero--full .wrap > :nth-child(3) { animation-delay: 0.24s; }
.hero--full .wrap > :nth-child(4) { animation-delay: 0.36s; }
.hero--full .wrap > :nth-child(5) { animation-delay: 0.5s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* proof strip: our own system's numbers along the foot of the hero.
   motion.js reads /api/stats, counts up once, then checks every minute and
   flashes a number when it grows. The HTML holds the last known figures. */
.proof-strip { margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--c-line); max-width: 36rem; }
.proof-strip dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin: 0; }
.proof-strip dl > div { display: flex; flex-direction: column; gap: var(--s-1); }
.proof-strip dd { margin: 0; order: -1; }
.proof-strip dt { font-size: var(--t-xs); color: var(--c-ink-soft); line-height: 1.35; }
.proof-strip__n { font-family: var(--f-display); font-weight: var(--fw-display); font-size: var(--t-xl); line-height: 1; color: var(--c-accent); font-variant-numeric: tabular-nums; transition: transform 0.4s var(--ease); }
.proof-strip__n.is-bumped { animation: bump 0.9s var(--ease); }
@keyframes bump { 0% { transform: none; } 30% { transform: translateY(-4px) scale(1.06); } 100% { transform: none; } }
.proof-strip__note { margin: var(--s-4) 0 0; font-size: var(--t-xs); color: var(--c-ink-soft); display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.live-dot { position: relative; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c-accent); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c-accent); animation: live-ping 2.4s ease-out infinite; }
@keyframes live-ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(3); opacity: 0; } }
@media (max-width: 48rem) {
  .proof-strip { margin-top: var(--s-8); padding-top: var(--s-4); }
  .proof-strip dl { gap: var(--s-4); }
  .proof-strip__note .text-link { display: none; }
}

/* line icons: each path draws itself when its block scrolls in */
.ico { width: 2.5rem; height: 2.5rem; color: var(--c-accent); margin-bottom: var(--s-4); display: block; }
.ico * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.js .ico [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s var(--ease) 0.25s; }
.js .is-in .ico [pathLength] { stroke-dashoffset: 0; }

/* offers read as a path: numbered like the How It Works steps */
.offer-path { counter-reset: offer; }
.offer-path > .card { counter-increment: offer; border-top: 2px solid var(--c-accent); position: relative; }
.offer-path > .card::before { content: counter(offer, decimal-leading-zero); position: absolute; top: var(--s-6); right: var(--s-6); font-family: var(--f-display); font-size: var(--t-sm); color: var(--c-accent); }

/* the gaps: two figures count up and their bars fill */
.stat-stack { display: grid; gap: var(--s-6); }
.stat { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--s-6); }
.stat__n { font-family: var(--f-display); font-weight: var(--fw-display); font-size: var(--t-2xl); line-height: 1; color: var(--c-accent); font-variant-numeric: tabular-nums; margin-bottom: var(--s-2); }
.stat__text { margin: 0 0 var(--s-4); }
.stat__src { font-size: var(--t-xs); color: var(--c-ink-soft); margin: var(--s-3) 0 0; }
.stat__bar { height: 4px; border-radius: 2px; background: var(--c-line); overflow: hidden; }
.stat__bar span { display: block; height: 100%; width: var(--w); background: var(--c-accent); border-radius: 2px; transform-origin: left; }
.js .stat__bar span { transform: scaleX(0); transition: transform 1.6s var(--ease) 0.3s; }
.js .is-in .stat__bar span { transform: scaleX(1); }

.section-art { display: block; width: min(100%, 18rem); height: auto; aspect-ratio: 1; margin: var(--s-6) 0 0; border-radius: var(--radius-lg); }
.js .section-art { opacity: 0; transform: translateY(12px); transition: opacity .9s var(--ease) .2s, transform .9s var(--ease) .2s; }
.js .is-in .section-art { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .section-art { opacity: 1; transform: none; transition: none; } }

/* How It Works: a timeline that grows as the visitor scrolls.
   motion.js sets --p from 0 to 1 and lights each step when the line reaches it.
   ::before is the grey track; ::after is the pink line with a glowing tip. */
.timeline { --p: 1; --node: 2.5rem; --x: calc(var(--node) / 2); list-style: none; counter-reset: step; padding: 0; margin: var(--s-12) 0 0; position: relative; display: grid; gap: var(--s-12); }
.js .timeline { --p: 0; }
.timeline::before { content: ""; position: absolute; top: calc(var(--node) / 2); bottom: calc(var(--node) / 2); left: calc(var(--x) - 1px); width: 2px; background: var(--c-line); }
.timeline::after {
  content: "";
  position: absolute;
  top: calc(var(--node) / 2);
  left: calc(var(--x) - 7px);
  width: 14px;
  height: calc((100% - var(--node)) * var(--p) + 7px);
  background:
    radial-gradient(circle at 50% calc(100% - 7px), var(--c-accent) 0 4px, color-mix(in srgb, var(--c-accent) 35%, transparent) 4.5px 7px, transparent 7.5px),
    linear-gradient(90deg, transparent 6px, var(--c-accent) 6px 8px, transparent 8px) top / 100% calc(100% - 7px) no-repeat;
  pointer-events: none;
}
.timeline li { counter-increment: step; position: relative; padding-left: calc(var(--node) + var(--s-6)); }
.timeline li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: var(--node); height: var(--node); border-radius: 50%; display: grid; place-items: center; background: var(--c-bg); border: 2px solid var(--c-line); font-family: var(--f-display); font-size: var(--t-xs); color: var(--c-ink-soft); transition: border-color 0.4s var(--ease), color 0.4s var(--ease); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 0; width: var(--node); height: var(--node); border-radius: 50%; border: 2px solid var(--c-accent); opacity: 0; pointer-events: none; }
.timeline li.is-lit::before, .timeline:not(.is-live) li::before { border-color: var(--c-accent); color: var(--c-accent); }
.timeline li.is-lit::after { animation: blip 1.3s ease-out 1; }
@keyframes blip { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.4); opacity: 0; } }
.timeline h3 { font-size: var(--t-base); margin-top: var(--s-2); }
.timeline p { font-size: var(--t-sm); margin-bottom: 0; }
.js .timeline.is-live li > * { opacity: 0; transform: translateX(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .timeline.is-live li.is-lit > * { opacity: 1; transform: none; }
.js .timeline.is-live li.is-lit > p { transition-delay: 0.12s; }
/* wide screens: the line runs down the middle and the steps alternate sides */
@media (min-width: 56rem) {
  .timeline { --x: 50%; grid-template-columns: 1fr 1fr; column-gap: calc(var(--node) * 2); row-gap: var(--s-8); }
  .timeline li { padding-left: 0; }
  .timeline li:nth-child(odd) { grid-column: 1; text-align: right; }
  .timeline li:nth-child(even) { grid-column: 2; margin-top: var(--s-24); }
  .timeline li:nth-child(odd)::before, .timeline li:nth-child(odd)::after { left: auto; right: calc(var(--node) * -1.5); }
  .timeline li:nth-child(even)::before, .timeline li:nth-child(even)::after { left: calc(var(--node) * -1.5); }
  .js .timeline.is-live li:nth-child(odd) > * { transform: translateX(-14px); }
  .js .timeline.is-live li.is-lit > * { transform: none; }
}

/* Memory: a small graph of what one customer's record connects */
.mem-graph { width: 100%; max-width: 26rem; height: auto; margin-inline: auto; display: block; }
.mem-graph .edge { fill: none; stroke: var(--c-line); stroke-width: 1.5; }
.mem-graph .edge--hot { stroke: var(--c-accent); }
.js .mem-graph .edge { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease); transition-delay: calc(0.3s + var(--d, 0) * 0.25s); }
.js .mem-graph.is-in .edge { stroke-dashoffset: 0; }
.mem-graph .node rect { fill: var(--c-surface); stroke: var(--c-line); }
.mem-graph .node--core rect { fill: var(--c-accent); stroke: none; }
.mem-graph text { font-family: var(--f-body); font-size: 11px; fill: var(--c-ink); }
.mem-graph .node--core text { fill: var(--c-accent-ink); font-weight: 600; }
.js .mem-graph .node { opacity: 0; transform: scale(0.85); transform-box: fill-box; transform-origin: center; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(0.2s + var(--d, 0) * 0.25s); }
.js .mem-graph.is-in .node { opacity: 1; transform: none; }
.mem-graph .pulse { fill: none; stroke: var(--c-accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: mem-pulse 3.2s ease-out infinite; }
@keyframes mem-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }

/* Approvals: the waiting item is a working demo */
.approval__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.approval__head .approval__label { margin: 0; }
.approval__count { min-width: 1.6rem; height: 1.6rem; padding-inline: var(--s-2); border-radius: 0.8rem; display: grid; place-items: center; background: var(--c-accent); color: var(--c-accent-ink); font-family: var(--f-display); font-size: var(--t-xs); transition: opacity 0.3s var(--ease); }
.approval__count.is-zero { opacity: 0.35; }
.approval__item { transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease); }
.approval__item.is-entering { opacity: 0; transform: translateY(10px); }
.approval__item[data-state="approved"] { border-color: var(--c-accent); }
.approval__item[data-state="working"] .approval__meta::after { content: ""; display: inline-block; width: 0.9em; height: 0.9em; margin-left: var(--s-2); vertical-align: -0.1em; border: 2px solid var(--c-accent); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.approval__actions { margin-top: var(--s-4); }
.approval__actions .btn { cursor: pointer; font: inherit; }
.approval__actions .btn:disabled { opacity: 0.4; cursor: default; }
.approval__log { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); font-size: var(--t-xs); color: var(--c-ink-soft); }
.approval__log li { display: flex; gap: var(--s-3); animation: rise 0.5s var(--ease) both; }
.approval__log time { color: var(--c-accent); font-variant-numeric: tabular-nums; flex: none; }
.approval__hint { margin: var(--s-4) 0 0; font-size: var(--t-xs); color: var(--c-ink-soft); display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.approval__replay { background: none; border: 0; padding: 0; font: inherit; color: var(--c-link); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }

/* Support: a daily check panel with a running heartbeat line */
.status-panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--s-6); margin: 0; }
.status-panel__head { display: flex; align-items: center; gap: var(--s-3); font-family: var(--f-display); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--c-accent); margin: 0 0 var(--s-4); }
.heartbeat { width: 100%; height: 4rem; display: block; margin-bottom: var(--s-4); }
.heartbeat polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.heartbeat .hb-base { stroke: var(--c-line); }
.heartbeat .hb-run { stroke: var(--c-accent); stroke-dasharray: 0.18 0.82; animation: hb-run 3s linear infinite; }
@keyframes hb-run { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.status-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); font-size: var(--t-sm); }
.status-rows li { display: flex; justify-content: space-between; gap: var(--s-4); border-top: 1px solid var(--c-line); padding-top: var(--s-3); }
.status-rows span:last-child { color: var(--c-ink-soft); text-align: right; }

/* Proof: the departments our own agents cover, lit in turn */
.lanes { list-style: none; padding: 0; margin: var(--s-8) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.lanes li { border: 1px solid var(--c-line); border-radius: 999px; padding: var(--s-2) var(--s-4); font-size: var(--t-sm); display: flex; align-items: center; gap: var(--s-2); animation: lane-glow 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 1s); }
.lanes li::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--c-accent); }
@keyframes lane-glow { 0%, 20%, 100% { border-color: var(--c-line); box-shadow: none; } 8% { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent); } }

/* Coming next: product cards with a status badge */
.badge { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-xs); color: var(--c-ink-soft); border: 1px solid var(--c-line); border-radius: 999px; padding: var(--s-1) var(--s-3); }
.badge--soon { color: var(--c-accent); border-color: var(--c-accent); }

/* closing call to action: the hero rings return, faint and slow */
.cta { position: relative; isolation: isolate; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/assets/img/gen/scl-hero-rings-2026-10-19-2.svg") right -10% center / auto 140% no-repeat; opacity: 0.14; animation: rings-breathe 16s ease-in-out infinite alternate; transform-origin: 100% 50%; }

/* scroll reveal: motion.js marks the blocks and adds .is-in as each one enters */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* cards and steps answer the pointer */
.card { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-line)); }
.offer-path > .card:hover { border-top-color: var(--c-accent); }
.steps li { transition: border-color 0.3s var(--ease); }
.text-link::after { display: inline-block; transition: transform 0.25s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }

/* footer: legal links sit with the page links */
.site-footer ul { flex-wrap: wrap; }

/* back to top */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 60;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: var(--cochineal);
  color: var(--pearl);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); }
.to-top:focus-visible { outline: 2px solid var(--cochineal); outline-offset: 3px; }
.to-top svg { width: 1.25rem; height: 1.25rem; }
