/* About · The road so far (Arun 2026-10-25: "retain this animation for my work experience - the
   journey, the road works really well for that"). Driven by js/about-journey.js.
   Desktop: the section holds its place (position: sticky in a tall .road) while the scroll rides a
   Three.js night road; each job stands along it as a billboard, lit as the rider reaches it; the role
   rises in the middle of the road; the year rolls on an odometer. Phones, reduced motion or no WebGL:
   the jobs as cards down a vertical road, lighting as they pass the middle.
   Night-mode tokens: --paper is black, --ink white (the About page is always in night mode). */

.journey {
  --j-dim: rgba(255, 255, 255, 0.28);
  --j-mute: rgba(255, 255, 255, 0.6);
  --j-ease: cubic-bezier(0.7, 0, 0.2, 1);
  --j-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(80px, 10vw, 160px) 0 clamp(60px, 8vw, 120px);
}

/* ── the headline (Effect 01 rise, auto-wired by js/about-work-rise.js) ── */
.journey__head { text-align: center; padding: 0 var(--col-margin); }
.journey__title { display: inline-block; color: var(--ink); }
.journey__title[data-fx="rise"] { visibility: hidden; }
.journey__title__line { display: block; overflow: hidden; line-height: 1; padding-bottom: 0.06em; }
.journey__title__line .char { display: inline-block; will-change: transform; }
.journey__sub { margin-top: 22px; color: var(--j-mute); }

.journey .road__label,
.journey .road__of,
.stop__when {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── shared ───────────────────────────────────────────────────────────── */
.journey .road { position: relative; margin-top: clamp(30px, 5vw, 70px); }
.journey .road__pin { position: relative; padding: 0 var(--col-margin); }
.journey .road__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
.journey .road__span { margin: 0; font: 700 16px/1.3 var(--font-body); }
.journey .road__label { display: block; margin-bottom: 10px; color: var(--j-mute); }

/* the year: four drums of digits rolling like the bike's odometer */
.journey .road__count { margin: 0; display: flex; align-items: flex-end; gap: 12px; font-family: var(--font-display); }
.journey .road__digits { display: flex; font-size: clamp(64px, 7vw, 116px); line-height: 1; }
.journey .road__digit { display: block; height: 1em; overflow: hidden; }
.journey .road__digit > span { display: block; transition: transform 0.8s var(--j-out); }
.journey .road__digit i { display: block; height: 1em; font-style: normal; text-align: center; }
.journey .road__of { padding-bottom: 1.6em; color: var(--j-mute); }
.journey .road__count.is-dim .road__digits { color: rgba(255, 255, 255, 0.3); }

.journey .road__stage,
.journey .road__moment,
.journey .road__hint { display: none; }

/* ── default (phones, reduced motion, no WebGL): a vertical road ─────── */
.journey .road__cards {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0 0 0 30px;
  list-style: none;
}
.journey .road__cards::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.5) 1px, transparent 1.6px);
  background-size: 2px 10px;
  background-repeat: repeat-y;
}
.stop { position: relative; }
.stop::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--j-dim);
  background: var(--paper);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.stop.is-lit::before { background: var(--ink); border-color: var(--ink); }
.stop__card {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 18px 18px 20px;
  border: 1px solid var(--j-dim);
  color: rgba(255, 255, 255, 0.45);
  transition: background-color 0.55s var(--j-ease), color 0.55s var(--j-ease), border-color 0.55s var(--j-ease);
}
.stop.is-lit .stop__card { border-color: rgba(255, 255, 255, 0.7); color: var(--ink); }   /* (stays black: Arun 2026-10-25) */
.stop__mark { font: 700 13px/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }
.stop__logo { display: block; height: max(30px, calc(84px * var(--k, 1))); width: auto; max-width: 78%; filter: brightness(0) invert(1); opacity: 0.55; transition: filter 0.55s var(--j-ease), opacity 0.55s ease; }
.stop.is-lit .stop__logo { opacity: 1; }
.stop__num {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 0.8;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px currentColor;
}
.stop__title { margin-top: 14px; font-family: var(--font-display); font-size: 20px; line-height: 0.95; text-transform: uppercase; }
.stop__org { margin-top: 8px; font: 700 15px/1.2 var(--font-body); }
.stop__org { display: none; }   /* (the logo says it; kept for the ride and screen readers) */
.stop__when { margin-top: 8px; opacity: 0.75; letter-spacing: 0.16em; }

/* ── desktop: the 3D road, held by CSS ────────────────────────────────── */
.road--3d .road__pin { position: sticky; top: 0; height: 100vh; padding: 0; overflow: hidden; }
.road--3d .road__bar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  padding: 96px var(--col-margin) 0;
  pointer-events: none;
}
.road--3d .road__stage { display: block; position: absolute; inset: 0; }
.road--3d .road__stage::after {           /* (the ride's edges sink into the page's black) */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 62%, rgba(0, 0, 0, 0.55) 80%, rgba(0, 0, 0, 0.85) 100%),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}
.road__canvas { display: block; width: 100%; height: 100%; }
.road--3d .road__route {                  /* (read out by the moment; kept for screen readers) */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the moment: the job just reached, big, in the middle of the road */
.road--3d .road__moment {
  display: block;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 52%;
  width: min(92vw, 1180px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.moment {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.moment::before {                          /* (a pool of dark behind it, so it reads over the road) */
  content: '';
  position: absolute;
  inset: -18% -8%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 100%);
}
.moment__logo { display: block; height: calc(clamp(120px, 14vw, 230px) * var(--k, 1)); width: auto; max-width: min(46vw, 560px); filter: brightness(0) invert(1); }   /* (Arun 2026-10-25: "the agency's logo big and huge, the role small") */
.moment__mark { font-family: var(--font-display); font-size: clamp(18px, 1.6vw, 26px); line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.moment__name {
  margin: clamp(22px, 2.4vw, 34px) 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 40px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.moment__name .word { display: inline-block; white-space: nowrap; overflow: hidden; padding-bottom: 0.05em; vertical-align: top; }
.moment__name .char { display: inline-block; }
.moment__meta {
  margin: clamp(14px, 1.6vw, 22px) 0 0;
  font: 700 clamp(12px, 1vw, 15px)/1 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.moment__meta b { color: var(--ink); font-weight: 700; }
.road--3d .road__hint {
  display: block;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 56%;
  margin: 0;
  transform: translateX(-50%);
  font: 700 11px/1 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--j-mute);
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.road--3d .road__hint::after {            /* (a little nudge down the road) */
  content: '';
  display: block;
  width: 1px;
  height: 34px;
  margin: 14px auto 0;
  background: linear-gradient(var(--j-mute), transparent);
  animation: road-hint 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes road-hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.road--3d .road__hint.is-gone { opacity: 0; }

@media (max-width: 767px) {
  .journey__sub br { display: none; }
  .journey .road__digits { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .stop__card,
  .journey .road__digit > span { transition: none; }
}
