/* ============================================================
   v15/approach.css (2026-09-25): the Approach section as one scroll-driven scene.
   Story ("tunnels through"): three ridges are the business's real complexity and never go
   away; the old road zig-zags round their ends; AI bores a tunnel through each; the person
   is a gate before Done. Five steps, one sticky stage 600vh tall; v15/approach.js draws it.
   Green only where something is live. Without WebGL2 or JS the five steps render as a list.
   ============================================================ */
/* ============================================================
   MOCK: Approach as one scroll-driven terrain (2026-09-25)
   The problem is a landscape drawn in contour lines (the hero's
   language). Five steps, one scene: it rises, gets surveyed,
   a path is cut, smoothed, and work flows through. Green only on
   the path, the flagged peaks and the one request.
   Without WebGL2 or JS the five steps render as a plain list.
   ============================================================ */

.tr-lead { max-width: 52ch; margin: 20px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.55; text-wrap: pretty; }

.tr-num {
  display: block; font-family: var(--font-display); font-size: clamp(56px, 6vw, 84px);
  line-height: 0.9; letter-spacing: -0.03em; font-weight: 600;
  /* a paper fill painted over a doubled stroke hides the overlapping outlines inside Fraunces glyphs (the knotted 4) */
  color: var(--paper); -webkit-text-stroke: 3px var(--green-deep); paint-order: stroke fill; margin: 0 0 14px;
}
.tr-step h3 { font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 10px; text-wrap: balance; }
.tr-step p { color: var(--ink-soft); font-size: 16px; line-height: 1.55; margin: 0; text-wrap: pretty; }

/* ---------- static fallback: the steps as a list ---------- */
.tr-canvas, .tr-labels { display: none; }
.tr-steps {
  list-style: none; max-width: var(--maxw); margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(24px, 3vw, 40px);
}
.tr-step { border-top: 2.5px solid var(--ink); padding-top: 22px; }

/* ---------- live: one sticky stage, the scroll drives the scene ---------- */
.tr-live { padding-bottom: 0; }
.tr-live .tr-scroll { position: relative; height: 600vh; margin-top: clamp(24px, 3vw, 40px); }
.tr-live .tr-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--paper); }
.tr-live .tr-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.tr-live .tr-labels { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tr-live .tr-sticky::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: min(44%, 560px); z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 62%, color-mix(in oklab, var(--paper), transparent 100%));
}
.tr-live .tr-steps {
  position: absolute; z-index: 3; margin: 0; padding: 0; display: block;
  left: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad))); top: calc(50% - 120px);
  width: min(340px, 30vw); height: 0;
}
/* top-aligned, so the numeral and title hold still whether the sentence wraps to two lines or three */
.tr-live .tr-step {
  position: absolute; left: 0; top: 0; width: 100%; border-top: 0; padding: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.tr-live .tr-step.is-on { opacity: 1; transform: none; }

/* labels pinned to the terrain; JS sets the position every frame and switches .is-shown, CSS times the fade */
.tr-label {
  position: absolute; left: 0; top: 0; z-index: 1;
  padding: 6px 10px 7px; background: #fff; color: var(--ink);
  border: 1px solid var(--sx-hair); border-radius: 8px; box-shadow: var(--print-shadow);
  font: 600 13px/1.25 var(--font-body); white-space: nowrap; will-change: transform, opacity;
  opacity: 0; translate: 0 6px;
  transition: opacity 160ms ease-in, translate 160ms ease-in, background-color var(--dur-fast) ease;
}
.tr-label.is-shown { opacity: 1; translate: 0 0; transition-duration: 220ms; transition-timing-function: ease-out; }
.tr-label.is-flat { background: rgba(255, 255, 255, 0.92); }
.tr-label.is-flat::after { display: none; }
.tr-label small { display: none; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--green-deep); }
.tr-label.has-stat small { display: block; }
.tr-label.is-human small { color: var(--ink-soft); }
.tr-label::after { content: ""; position: absolute; left: var(--lx, 50%); top: 100%; height: var(--lead, 16px); border-left: 1px solid var(--sx-wire); }
.tr-label.is-down::after { top: auto; bottom: 100%; }

/* step 02 key: what the two kinds of ring mean */
/* first-frame cue: a pill with the request's green dot sliding down a short track; gone after the first scroll */
.tr-hint { display: none; }
.tr-live .tr-hint {
  position: absolute; z-index: 3; left: 50%; bottom: 32px; translate: -50% 0;
  display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; pointer-events: none;
  background: #fff; border: 1px solid var(--sx-hair); border-radius: 999px; box-shadow: var(--print-shadow);
  font: 600 13px/1.2 var(--font-body); color: var(--ink); white-space: nowrap;
  transition: opacity var(--dur-base) var(--ease-standard), translate var(--dur-base) var(--ease-standard);
}
.tr-hint.is-gone { opacity: 0; translate: -50% 8px; }
.tr-hint i { position: relative; width: 14px; height: 22px; border: 1.5px solid var(--ink); border-radius: 8px; }
.tr-hint i::after {
  content: ""; position: absolute; left: 50%; top: 4px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--green); animation: tr-hint 1.6s var(--ease-standard) infinite;
}
@keyframes tr-hint { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(8px); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.tr-legend {
  position: absolute; z-index: 3; right: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad))); bottom: 32px;
  display: flex; gap: 18px; align-items: center; padding: 9px 14px; opacity: 0; pointer-events: none;
  background: #fff; border: 1px solid var(--sx-hair); border-radius: 999px; box-shadow: var(--print-shadow);
  font: 600 12px/1.2 var(--font-body); color: var(--ink);
}
.tr-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tr-legend i { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--green); }
.tr-legend i.is-hu { border: 2px dashed var(--ink); opacity: 0.8; }
.tr-label.is-dot { background: var(--green-deep); color: #fff; border-color: transparent; }
.tr-label.is-dot small { display: block; color: #CDEBDD; }
.tr-label.is-dot::after { border-left-color: var(--green-deep); }
.tr-label.is-side::after, .tr-label.is-left::after { left: auto; right: 100%; top: var(--ly, 50%); width: var(--lead, 20px); height: 0; border-left: 0; border-top: 1px solid var(--sx-wire); }
.tr-label.is-left::after { right: auto; left: 100%; }
.tr-label.is-dot.is-side::after, .tr-label.is-dot.is-left::after { border-top-color: var(--green-deep); }

@media (prefers-reduced-motion: reduce) {
  .tr-live .tr-step, .tr-label, .tr-hint { transition: none; }
  .tr-hint i::after { animation: none; opacity: 1; transform: translateY(4px); }
}

/* ---------- phones: the scene on top, the step card at the bottom ---------- */
@media (max-width: 720px) {
  .tr-lead { font-size: 16px; }
  /* phones: the whole story in 1.75 screens of swipe (275vh = 1.75 of travel + the pinned screen) */
  .tr-live .tr-scroll { height: 275vh; }
  .tr-live .tr-sticky::before { display: none; }
  .tr-live .tr-steps { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; height: 0; }
  .tr-live .tr-step {
    top: auto; bottom: 0; transform: translateY(10px);
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center;
    padding: 16px 16px 18px; border-radius: 14px; box-shadow: var(--print-shadow);
    background: color-mix(in oklab, var(--paper), transparent 4%); border: 1px solid var(--line);
  }
  .tr-live .tr-step.is-on { transform: none; }
  .tr-num { grid-row: 1; margin: 0; font-size: 40px; }
  .tr-live .tr-step h3 { grid-column: 2; grid-row: 1; margin: 0; }
  .tr-live .tr-step p { grid-column: 1 / -1; margin-top: 8px; font-size: 15px; }
  .tr-label { padding: 4px 8px; font-size: 12px; }
  .tr-label small { font-size: 11.5px; }
  /* the ground runs under the step card instead of stopping mid-screen */
  .tr-live .tr-sticky::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 260px; z-index: 2; pointer-events: none;
    background: linear-gradient(to top, var(--paper) 58%, color-mix(in oklab, var(--paper), transparent 100%));
  }
  .tr-legend { left: 16px; right: 16px; bottom: 200px; justify-content: center; }
  .tr-live .tr-hint { bottom: 196px; }
}
@media (max-width: 480px) {
  .tr-label.is-ai { white-space: normal; max-width: 150px; }
  .tr-label.is-ai small { font-size: 11px; }
}

/* the legend's two symbols and the Done card */
.tr-legend i.is-line { width: 22px; height: 0; border: 0; border-top: 3px dashed var(--green); border-radius: 0; }
.tr-legend i.is-gate { width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 1px; transform: rotate(45deg); margin: 0 3px; }
.tr-label.is-done { border-color: var(--ink); }
.tr-label.is-human small { color: var(--ink-soft); }
