/* Process schedule ("Focus", process.js): rails on a day axis, the current stage opens into a bar.
   The section is tall; the schedule stays pinned while the playhead runs through 18 days. */
.process { position: relative; height: 320vh; }
.process .g {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; align-content: center; gap: 40px; padding: 0 var(--gutter);
}
.g__head { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 32px; }
.g__title { font-size: clamp(48px, 6.4vw, 104px); font-weight: 400; letter-spacing: -0.035em; line-height: 1; }
.g__total { font-size: 15px; color: var(--grey); }
.g__count { min-width: 7.5em; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }

.g__chart { --names: 280px; position: relative; display: grid; gap: 14px; }
.g__axis { position: relative; height: 18px; margin-left: var(--names); font-size: 12px; color: var(--grey); font-variant-numeric: tabular-nums; }
.g__axis span { position: absolute; top: 0; transform: translateX(-50%); }
.g__axis span:first-child { transform: none; }
.g__axis span:last-child { transform: translateX(-100%); }
.g__lanes { position: relative; display: grid; }
/* one hairline per day behind the rails */
.g__lanes::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--names); right: 0; pointer-events: none;
  background: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 18));
}
.g__row { display: grid; grid-template-columns: var(--names) 1fr; align-items: center; }
.g__name { display: grid; gap: 2px; padding-right: 24px; color: var(--grey); transition: color .4s var(--ease); }
.g__name span { font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.g__name small { font-size: 13px; }
.g__row.is-on .g__name { color: var(--ink); }
.g__lane { position: relative; height: 56px; transition: height .6s var(--ease); }
.g__row.is-on .g__lane { height: 116px; }

/* glass, used across the schedule: a light slab that blurs the day lines behind it, a bright top edge,
   a darker bottom edge and a soft shadow, so it reads on the light page. "Liquid" is the same glass
   with a cool blue tint, for what is done. */
.g__chart {
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(12, 12, 14, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  --glass-drop: 0 12px 32px rgba(12, 12, 14, 0.09), 0 2px 6px rgba(12, 12, 14, 0.06), 0 0 0 1px rgba(12, 12, 14, 0.06);
  --liquid: linear-gradient(180deg, rgba(150, 175, 255, 0.42), rgba(47, 91, 255, 0.22));
  --liquid-edge: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -3px 8px rgba(47, 91, 255, 0.16), inset 0 0 0 1px rgba(47, 91, 255, 0.2);
}

/* playhead: a thin accent line with a glass label */
.g__playhead {
  position: absolute; top: -10px; bottom: -10px; z-index: 3; pointer-events: none;
  left: calc(var(--names) + (100% - var(--names)) * var(--x, 0));
  width: 1px; margin-left: -0.5px; background: linear-gradient(to bottom, var(--accent), rgba(47, 91, 255, 0.25));
}
.g__phlabel {
  /* slides from right of the line (day 0) to left of it (day 18), so it never leaves the chart */
  position: absolute; top: -36px; left: 0; transform: translateX(calc(-100% * var(--x, 0)));
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  background: var(--glass); box-shadow: var(--glass-edge), var(--glass-drop);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  color: var(--ink); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.g__phlabel::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(47, 91, 255, 0.6); }

/* the other stages: thin glass tubes from the shortest to the longest run; done days fill with liquid */
.r-rail {
  position: absolute; top: 50%; left: var(--a); width: var(--w); height: 12px; margin-top: -6px;
  border-radius: 999px; overflow: hidden;
  background: var(--glass); box-shadow: var(--glass-edge), var(--glass-drop);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  transition: opacity .3s var(--ease);
}
/* the glass spans the longest run; the range itself is written on the stage ("4–7 days"), not shaded */
.r-min { display: none; }
.r-done {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--f, 0) * 100%); border-radius: 999px;
  background: var(--liquid); box-shadow: var(--liquid-edge);
}
.r-node { display: none; }
.g__row.is-on .r-rail { opacity: 0; }

/* the open stage: a glass slab; liquid glass fills it as the days pass, the text stays dark on top */
.m-bar {
  position: absolute; top: 0; bottom: 0; left: var(--a); width: var(--w); overflow: hidden; border-radius: 18px;
  background: var(--glass);
  box-shadow: var(--glass-edge), var(--glass-drop);
  -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  opacity: 0; transform: scaleY(0.3); transition: opacity .35s var(--ease), transform .6s var(--ease);
}
/* light catching the top-left of the slab */
.m-bar::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(90% 120% at 12% -30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%);
}
.m-bar.is-on { opacity: 1; transform: none; }
.m-fill {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; border-radius: 13px;
  width: max(0px, calc((100% - 12px) * var(--f, 0)));
  background: var(--liquid); box-shadow: var(--liquid-edge);
}
.m-layer { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 18px 18px; color: var(--ink); }
.m-text { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.m-name { font-size: clamp(20px, 2vw, 30px); letter-spacing: -0.02em; line-height: 1.05; }
.m-days { font-size: 13px; color: var(--grey); white-space: nowrap; }
.m-rail { position: relative; height: 1px; background: rgba(12, 12, 14, 0.14); }
/* results: small glass beads that fill with liquid once the stage reaches them */
.m-tick {
  position: absolute; top: -5px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, 0.55) 60%);
  box-shadow: inset 0 0 0 1px rgba(12, 12, 14, 0.14), 0 1px 3px rgba(12, 12, 14, 0.12);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.m-tick.is-hit {
  background: radial-gradient(circle at 35% 30%, #dfe6ff, #6f8dff 75%);
  box-shadow: inset 0 0 0 1px rgba(47, 91, 255, 0.45), 0 0 0 4px rgba(47, 91, 255, 0.12), 0 1px 3px rgba(12, 12, 14, 0.12);
}
.m-tick em {
  position: absolute; bottom: 15px; left: 50%; transform: translate(-50%, 4px);
  font-style: normal; font-size: 12px; white-space: nowrap; color: var(--ink);
  opacity: 0; transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.m-tick.is-last em { opacity: 1; transform: translate(-50%, 0); }
/* the rider: a glass bead on the edge of the liquid */
.m-rider {
  position: absolute; z-index: 1; bottom: 12px; left: calc(6px + (100% - 12px) * var(--f, 0)); width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, rgba(255, 255, 255, 0.85) 35%, rgba(200, 212, 255, 0.9) 100%);
  box-shadow: inset 0 0 0 1px rgba(47, 91, 255, 0.35), 0 4px 10px rgba(47, 91, 255, 0.25), 0 1px 2px rgba(12, 12, 14, 0.15);
  opacity: 0; transform: scale(0.4); transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.m-bar.is-on .m-rider { opacity: 1; transform: none; }

/* detail: the stage the line is in */
.g__detail { min-height: 150px; }
.g__dbody { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 40px; align-items: start; animation: g-in .5s var(--ease); }
@keyframes g-in { from { opacity: 0; transform: translateY(8px); } }
.g__dname { display: grid; gap: 6px; }
.g__dtitle { font-size: 32px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; }
.g__detail .num { font-size: 15px; color: var(--grey); font-variant-numeric: tabular-nums; }
.g__detail .desc { font-size: 17px; line-height: 1.5; color: var(--grey); max-width: 38ch; }
.g__detail .out { list-style: none; display: grid; gap: 8px; font-size: 15px; }
.g__detail .out li { display: flex; align-items: center; gap: 10px; }
.g__detail .out li::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); flex: none; }

/* phones: names sit above their rails, the open bar keeps only its fill, rider and results */
@media (max-width: 860px) {
  .process { height: 300vh; }
  .process .g { gap: 24px; }
  .g__head { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .g__title { grid-column: 1 / -1; font-size: clamp(40px, 11vw, 56px); }
  .g__chart { --names: 0px; gap: 8px; }
  .g__axis span:nth-child(even) { display: none; }
  .g__row { grid-template-columns: 1fr; gap: 2px; }
  .g__name { display: flex; align-items: baseline; gap: 8px; padding: 0; }
  .g__name span { font-size: 16px; }
  .g__name small { font-size: 12px; }
  .g__lane { height: 22px; }
  .g__row.is-on .g__lane { height: 56px; }
  .m-text, .m-tick em { display: none; }
  .m-layer { padding: 0 10px 14px; justify-content: flex-end; }
  .m-bar { border-radius: 10px; }
  .g__detail { min-height: 0; }
  .g__dbody { grid-template-columns: 1fr; gap: 12px; }
  .g__dtitle { font-size: 24px; }
  .g__detail .desc { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .g__lane, .m-bar, .r-rail, .m-rider, .m-tick em { transition: none; }
  .g__dbody { animation: none; }
}
