/* process.css — "How I work": compact title, then a winding road (S-shape, 3 rows, each step's text under its icon) with 10 stops and a yellow pin that drives along it. ≤900px: one vertical winding line on the left */

/* Section colors. Dark: yellow accents. Light: this band is solid yellow, so yellow text would vanish → ink / deep amber accents */
.process {
  --process-accent: var(--yellow);          /* "think", flag */
  --process-icon-hover: var(--yellow);
  --road: var(--surface-2);                 /* the thick road */
  --road-line: var(--yellow);               /* the dashed center line */
  --stop-bg: var(--surface);
  --stop-border: var(--white-a15);
  --stop-icon: var(--heading);
  --stop-active-bg: var(--surface);
  --stop-active-icon: var(--yellow);
  --stop-active-ring: inset 0 0 0 2px var(--yellow), 0 0 0 6px var(--yellow-a20), 0 0 24px var(--yellow-a50);
  --stop-active-title: var(--yellow);
  --tag-bg: var(--surface);
  --tag-text: var(--yellow);
  --tag-border: var(--yellow-a50);
  --chip-border: var(--white-a15);
  --ai-text: var(--yellow);
  --ai-bg: var(--yellow-a12);
  --ai-border: var(--yellow-a30);

  padding: 40px 0 48px;
  --band: var(--yellow);                    /* light theme: About ends yellow → this stays yellow → Projects starts yellow */
}

[data-theme="light"] .process {
  --process-accent: var(--ink);
  --process-icon-hover: var(--syntax-amber-dark);
  --road: var(--grey-road);
  --stop-bg: var(--white);
  --stop-border: var(--ink-a12);
  --stop-icon: var(--ink);
  --stop-active-bg: var(--yellow);          /* yellow on the yellow band would vanish → the circle fills yellow with an ink ring */
  --stop-active-icon: var(--ink);
  --stop-active-ring: inset 0 0 0 2px var(--ink), 0 0 0 6px var(--white-a60), 0 0 24px var(--white-a80);
  --stop-active-title: var(--syntax-amber-dark);   /* a deep golden yellow that stays readable on the yellow band */
  --tag-bg: var(--ink);
  --tag-text: var(--yellow);
  --tag-border: var(--ink);
  --chip-border: var(--ink-a12);
  --ai-text: var(--ink);
  --ai-bg: var(--yellow-a50);
  --ai-border: var(--white-a80);
  --text: var(--grey-800);
  --muted: var(--grey-800);
}

.process .glow--5 { top: 10%; right: -220px; bottom: auto; left: auto; }

/* Light theme: the eyebrow sits on yellow too → dark ink version (same as Projects) */
[data-theme="light"] .process .eyebrow__num { color: var(--ink); background: var(--white-a60); border-color: var(--ink-a12); }
[data-theme="light"] .process .eyebrow__text { color: var(--grey-800); }
[data-theme="light"] .process .eyebrow__line { background: linear-gradient(90deg, var(--ink), transparent); }

/* Reveal in this section: shorter and faster than the global one (never slows reading) */
.process .reveal { transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; }
.process .reveal.is-visible { transform: none; }

/* ---------- Title ---------- */
.process__title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -1px; color: var(--heading); }
.process__title span { color: var(--process-accent); }

.process__subtitle { margin-top: 10px; font-size: 15px; color: var(--muted); }
.process__subtitle strong { font-weight: 600; color: var(--heading); }

/* ---------- The road (SVG). process.js sets the path, the size and the height ---------- */
.road { position: relative; margin-top: 40px; }

.road__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.road__path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.road__base { stroke: var(--road); stroke-width: 14; }
.road__dash { stroke: var(--road-line); stroke-width: 2; stroke-dasharray: 10 10; }
.road__mask { stroke: var(--white); stroke-width: 24; }   /* white = "show the road here" */
.road__scratch { fill: none; stroke: none; }

/* ---------- Stops. Desktop: each <li> is a 0×0 point ON the road (left/top from process.js) ---------- */
.road__stops { list-style: none; }

.stop { position: absolute; width: 0; height: 0; z-index: 1; cursor: pointer; }

/* The round icon circle, centered on the road */
.stop__icon {
  position: absolute;
  left: -20px;
  top: -20px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--stop-icon);
  background: var(--stop-bg);
  box-shadow: inset 0 0 0 1.5px var(--stop-border);
  cursor: pointer;
  transition: box-shadow 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.stop__icon svg { width: 18px; height: 18px; }
.stop:hover .stop__icon { color: var(--process-icon-hover); }

/* The text: always directly UNDER its own icon, centered (34px = half the icon + 14px). process.js keeps the next road line below it */
.stop__body {
  position: absolute;
  left: 0;
  top: 34px;
  width: var(--w, 220px);
  transform: translateX(-50%);
  text-align: center;
}

.stop__title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--heading); transition: color 0.3s ease; }
.stop__num { margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.stop__text { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Tool chips; AI tools get a ✦ and a soft yellow tint */
.stop__chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.stop__chips li {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--chip-border);
}
.stop__chips .stop__chip--ai { color: var(--ai-text); background: var(--ai-bg); box-shadow: inset 0 0 0 1px var(--ai-border); }
.stop__chip--ai::before { content: '✦ '; }

/* The stop where the pin is: glow ring + highlighted title. The other stops stay exactly as they are (never dimmed) */
.stop.is-active .stop__icon { color: var(--stop-active-icon); background: var(--stop-active-bg); box-shadow: var(--stop-active-ring); }
.stop.is-active .stop__title { color: var(--stop-active-title); }

/* Phase tags (UX / UI / Handoff): small pills ON the road, just before their first step (--tag-dx from process.js) */
.stop__phase {
  position: absolute;
  top: 0;
  left: var(--tag-dx, -72px);
  transform: translate(-50%, -50%);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tag-text);
  background: var(--tag-bg);
  box-shadow: inset 0 0 0 1px var(--tag-border);
  pointer-events: none;
}

/* ---------- Flag at the end of the road ---------- */
.road__flag { position: absolute; top: 0; left: 0; z-index: 1; color: var(--process-accent); pointer-events: none; }
.road__flag svg { display: block; width: 20px; height: 20px; }

/* ---------- The pin: process.js moves it along the road with transform ---------- */
.road__pin { position: absolute; top: 0; left: 0; z-index: 3; pointer-events: none; transition: opacity 0.4s ease; will-change: transform; }
.road__pin.is-hidden { opacity: 0; }
.road__pin svg {
  position: absolute;
  left: -14px;
  top: -46px;                                /* the tip sits just on top of the stop's circle */
  display: block;
  width: 28px;
  height: 28px;
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 1.6;
  filter: drop-shadow(0 4px 6px var(--black-a40));
}
.road__pin svg circle { fill: var(--ink); }

/* A small hop when the pin arrives on a step (process.js adds .is-bouncing) */
.road__pin.is-bouncing svg { animation: pin-bounce 0.45s ease-out; }
@keyframes pin-bounce {
  0%, 100% { translate: 0 0; }
  40%      { translate: 0 -7px; }
  70%      { translate: 0 1px; }
}

/* ---------- Closing line ---------- */
.process__note { max-width: 620px; margin: 48px auto 0; text-align: center; font-size: 17px; line-height: 1.6; color: var(--muted); }
.process__note strong { font-weight: 600; color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* ONE vertical winding line on the left (drawn by process.js), steps listed on the right */
  .road { margin-top: 28px; }
  .road__stops { padding: 8px 0 56px; }
  .stop { position: relative; width: auto; height: auto; padding: 0 0 32px 64px; }
  .stop__icon { left: 8px; top: 0; }
  .stop--phase .stop__icon { top: 30px; }    /* level with the title, under the phase tag */
  .stop__body { position: static; width: auto; transform: none; text-align: left; padding-top: 9px; }
  .stop__chips { justify-content: flex-start; }
  .stop__phase { position: static; display: inline-block; transform: none; margin-bottom: 8px; }
}

@media (max-width: 560px) {
  .process__note { font-size: 16px; }
}

/* Reduced motion: road already drawn (process.js), no moving pin, all steps visible */
@media (prefers-reduced-motion: reduce) {
  .process .reveal { transform: none; transition: none; }
  .road__pin { display: none; }
  .stop__icon, .stop__title { transition: none; }
}
