/* =========================================================
   TIMELINE — option C
   Five circles on one lit spine. Each circle holds its own content, so the
   stage is the shape rather than a card hanging under a dot. The scroll moves
   the focus along the row: the focused circle grows, opens its blurb and
   lights; the rest hold their place, smaller and dimmed. Below 900px the
   circles unwind into a column on a vertical spine.
   ========================================================= */

.tlc{--n:5;--p:0;--focus:0;--dia:clamp(122px,13vw,178px);position:relative}

.tlc__pin{position:sticky;inset-block-start:0;min-height:100svh;
  display:grid;align-content:center;gap:clamp(26px,4vh,52px);
  padding-block:clamp(64px,8vh,104px) clamp(44px,6vh,78px);overflow:hidden}

.tlc__head{display:grid;justify-items:center;gap:11px;text-align:center}
.tlc__head .head__title{margin:0}

/* ---------- the row ---------- */
.tlc__row{position:relative;display:flex;align-items:center;justify-content:center;
  gap:clamp(10px,1.6vw,26px);min-height:calc(var(--dia) * 1.62)}

/* the spine runs through every circle's centre */
.tlc__line{position:absolute;inset-block-start:50%;inset-inline:4%;height:1px;
  background:var(--line-soft);pointer-events:none}
.tlc__line i{position:absolute;inset-block:0;inset-inline-start:0;background:var(--rose);
  width:calc(var(--p) * 100%);transition:width .45s var(--ease);
  box-shadow:0 0 18px rgba(198,139,94,.5)}

/* ---------- the circle is the stage ---------- */
.tlc__stage{--w:0;position:relative;z-index:1;flex:none;
  width:calc(var(--dia) * (1 + .56 * var(--w)));aspect-ratio:1;border-radius:50%;
  display:grid;place-content:center;gap:6px;justify-items:center;text-align:center;
  padding:clamp(14px,1.7vw,26px);cursor:pointer;
  border:1px solid var(--line-soft);
  background-color:var(--bg);
  background-image:radial-gradient(120% 120% at 50% 12%,rgba(198,139,94,calc(.10 * var(--w))),rgba(255,255,255,.012) 62%);
  opacity:calc(.34 + .66 * var(--w));
  transition:width .7s var(--ease),opacity .6s var(--ease),
    border-color .6s var(--ease),box-shadow .6s var(--ease)}
.tlc__stage.is-passed{border-color:rgba(198,139,94,.22)}
.tlc__stage.is-focus{border-color:rgba(198,139,94,.45);
  box-shadow:0 0 0 1px rgba(198,139,94,.14),0 0 60px rgba(198,139,94,.14)}

/* the dot on the spine only belongs to the narrow column */
.tlc__node{display:none}

.tlc__card{display:contents}

.tlc__no{display:inline-flex;align-items:center;justify-content:center;min-width:32px;
  padding:3px 9px;border-radius:999px;border:1px solid var(--line-soft);
  font-size:10.5px;font-weight:500;letter-spacing:.14em;color:var(--text-3);
  transition:.5s var(--ease);transition-property:color,border-color,background,box-shadow}
.tlc__stage.is-focus .tlc__no{color:var(--rose);border-color:rgba(198,139,94,.5);
  background:rgba(198,139,94,.09);box-shadow:0 0 18px rgba(198,139,94,.16)}

.tlc__date{font-size:12.5px;font-weight:400;line-height:1.45;color:var(--champagne)}
.tlc__t{font-size:14px;font-weight:700;line-height:1.5;max-width:12ch;
  background:var(--metal-text);-webkit-background-clip:text;background-clip:text;color:transparent}
.tlc__stage.is-focus .tlc__date{font-size:14px}
.tlc__stage.is-focus .tlc__t{font-size:17px;max-width:14ch}

/* the blurb only opens inside the focused circle — that is what keeps the row calm */
.tlc__x{max-width:17ch;font-size:12px;font-weight:300;line-height:1.7;color:var(--text-2);
  max-height:0;opacity:0;overflow:hidden;
  transition:max-height .7s var(--ease),opacity .5s var(--ease)}
.tlc__stage.is-focus .tlc__x{max-height:9em;opacity:1}

.tlc__state{font-size:10.5px;color:var(--text-3);opacity:0;transition:opacity .5s}
.tlc__stage.is-focus .tlc__state{opacity:1}
.tlc__stage.is-live .tlc__state{color:var(--rose)}

/* ---------- footer readout ---------- */
.tlc__foot{display:flex;align-items:center;justify-content:center;gap:14px;
  font-size:12px;color:var(--text-3)}
.tlc__foot b{font-weight:500;color:var(--champagne)}

/* ---------- narrow: the same circles, stacked ----------
   The phone keeps the desktop behaviour and only turns the row on its side: one vertical
   spine, the circles down it, the focus travelling with the scroll. A 70px circle has no
   room for words, so the ones off focus carry their number alone. */
@media (max-width:900px){
  .tlc{--dia:clamp(54px,15vw,74px)}

  .tlc__pin{padding-block:clamp(44px,8vh,72px) clamp(26px,5vh,44px);gap:clamp(14px,3vh,26px)}
  .tlc__head{gap:8px}

  .tlc__row{flex-direction:column;gap:clamp(7px,1.5vh,14px);min-height:0}

  .tlc__line{inset-block:4% 4%;inset-inline-start:50%;translate:-50% 0;width:1px;height:auto}
  .tlc__line i{inset-inline:0;inset-block-start:0;width:auto;height:calc(var(--p) * 100%);
    transition:height .45s var(--ease)}

  .tlc__stage{width:calc(var(--dia) * (1 + 1.9 * var(--w)));padding:clamp(9px,3vw,16px)}

  .tlc__no{min-width:26px;padding:2px 7px;font-size:9.5px}

  .tlc__date,.tlc__t,.tlc__x,.tlc__state{max-height:0;opacity:0;overflow:hidden;
    transition:max-height .6s var(--ease),opacity .45s var(--ease)}
  .tlc__stage.is-focus .tlc__date{max-height:2em;opacity:1;font-size:11.5px}
  .tlc__stage.is-focus .tlc__t{max-height:3em;opacity:1;font-size:13.5px;max-width:13ch}
  .tlc__stage.is-focus .tlc__x{max-height:7em;opacity:1;font-size:10.5px;line-height:1.6;max-width:15ch}
  .tlc__stage.is-focus .tlc__state{max-height:2em;opacity:1;font-size:9.5px}

  .tlc__foot{display:none}
}

/* ---------- motion turned down: a plain column, nothing pinned ---------- */
@media (prefers-reduced-motion:reduce){
  .tlc__stage,.tlc__x,.tlc__no,.tlc__date,.tlc__t,.tlc__state{transition:none}
  .tlc__pin{position:static;min-height:0;padding-block:clamp(42px,7vh,64px) 0}
  .tlc__row{display:grid;grid-template-columns:1fr;gap:0;min-height:0;padding-inline-start:26px}
  .tlc__line{inset-block:10px 10px;inset-inline-start:0;inset-inline-end:auto;translate:none;
    width:1px;height:auto}
  .tlc__line i{inset-inline:0;inset-block-start:0;width:auto;height:100%}

  .tlc__stage{width:auto;aspect-ratio:auto;border-radius:0;border:0;padding:0;opacity:1;
    background-color:transparent;background-image:none;box-shadow:none;
    display:grid;grid-template-columns:auto minmax(0,1fr);place-content:stretch;
    justify-items:start;text-align:start;column-gap:18px;padding-block:clamp(16px,3.4vw,24px)}

  .tlc__node{display:block;grid-column:1;width:13px;height:13px;border-radius:50%;
    margin:6px 0 0;border:1px solid var(--rose);background:var(--rose);
    margin-inline-start:calc(-26px - 13px / 2 + .5px)}

  .tlc__card{display:grid;grid-column:2;gap:7px;justify-items:start;text-align:start}
  .tlc__date,.tlc__stage.is-focus .tlc__date{max-height:none;opacity:1;font-size:14px}
  .tlc__t,.tlc__stage.is-focus .tlc__t{max-height:none;opacity:1;font-size:17px;max-width:none}
  .tlc__x,.tlc__stage.is-focus .tlc__x{max-height:none;opacity:1;max-width:none;font-size:14px;line-height:1.85}
  .tlc__state,.tlc__stage.is-focus .tlc__state{max-height:none;opacity:1}
  .tlc__foot{display:none}
}
