/* The timeline of the fund with the odometer year: one white card on a soft grey page. From the top: the brand and
   "Our journey", the film window (its shadow is a layer of its own under the clipped window, so it can breathe), the
   red year with the two lines of milestone, and the row of seven years with the puck that slides under them. */
:root {
  --page: #f2f2f2;          /* the page */
  --card: #ffffff;          /* the card */
  --ink: #2b2b2b;           /* the words */
  --muted: #8f8f8f;         /* the small words */
  --line: #e5e5e5;          /* the thin lines */
  --track: #f2f2f2;         /* the track of the years */
  --accent: #e41613;        /* the red of the digits and the mark */
  --expo-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(120% 80% at 50% 0%, #fafafa 0%, rgba(250, 250, 250, 0) 60%),
    var(--page);
  color: var(--ink);
  font-family: 'Inter Tight Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vmin, 36px);
  overflow: hidden;
}

/* ---------------------------------------------------------------- the card */
.journey {
  position: relative;
  width: min(940px, 100%);
  display: grid;
  gap: clamp(8px, 2vmin, 20px);
  padding: clamp(12px, 2.8vmin, 28px);
  background: var(--card);
  border-radius: clamp(16px, 2.6vmin, 26px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.055),
    0 1px 1px rgba(0, 0, 0, 0.03),
    0 4px 10px -2px rgba(0, 0, 0, 0.04),
    0 22px 48px -18px rgba(30, 20, 20, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  opacity: 0;
}

.journey__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(10px, 1.55vmin, 13px);
  letter-spacing: -0.01em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 600;
}

.brand__mark {
  width: 1.85em;
  height: auto;
  overflow: visible;
}

.brand__peak,
.brand__base {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__peak {
  stroke: var(--accent);
}

.brand__base {
  stroke: var(--ink);
  opacity: 0.35;
}

.journey__label {
  color: var(--muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------- the film window */
.film {
  position: relative;
  width: 100%;
  aspect-ratio: 2.15 / 1;
  max-height: 42vh;
}

.film__shadow {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 22%;
  bottom: -3%;
  border-radius: 40%;
  background: var(--glow, rgba(40, 46, 70, 0.4));
  filter: blur(clamp(12px, 3vmin, 28px));
  opacity: 0;
}

/* the element GSAP clips: everything inside is cut by the same inset */
.film__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: clamp(10px, 1.6vmin, 16px);
  background: #1b2238;
  clip-path: inset(50% round 14px);
  transform: translateZ(0);
}

.film__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* a slow diagonal glint that crosses the glass when the year changes */
.film__sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.film__sheen-band {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 46%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.16) 46%, rgba(255, 255, 255, 0.05) 54%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-120%);
}

/* the glass edge: a hairline that takes the light at the top and a soft fall at the bottom */
.film__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -30px 40px -30px rgba(0, 0, 0, 0.35);
}

.film__chip {
  position: absolute;
  left: clamp(8px, 1.6vmin, 16px);
  bottom: clamp(8px, 1.6vmin, 16px);
  display: inline-flex;
  align-items: baseline;
  gap: 0.7em;
  padding: 0.5em 0.85em 0.52em;
  font-size: clamp(9px, 1.35vmin, 12px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 16px -8px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
}

.film__city {
  opacity: 0.72;
}

.film__hour {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* the film's own timeline: a hairline with seven ticks and the red playhead */
.film__ruler {
  position: absolute;
  right: clamp(10px, 2vmin, 20px);
  bottom: clamp(14px, 2.6vmin, 26px);
  width: min(30%, 220px);
  height: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.34)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px calc((100% - 1px) / 6));
}

.film__head {
  position: absolute;
  left: 0;
  top: -3px;
  width: 1.5px;
  height: 13px;
  margin-left: -0.75px;
  border-radius: 1px;
  background: #ff3a33;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.4), 0 0 8px rgba(255, 60, 50, 0.6);
}

/* ---------------------------------------------------------------- the year and the milestone */
.journey__row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: clamp(12px, 3.4vmin, 44px);
  padding: 0 clamp(2px, 0.6vmin, 6px);
}

.year {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 0;
  font-weight: 330;
  font-size: clamp(40px, min(11vw, 12.5vh), 118px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.year__inner {
  display: flex;
}

/* one digit: a window one figure tall; GSAP moves the column inside by -100% per figure, as on the site */
.digit {
  position: relative;
  display: block;
  width: 0.6em;
  height: 1em;
  overflow: hidden;
  clip-path: inset(-0.02em -0.1em);
  opacity: 0;
}

.digit + .digit {
  margin-left: -0.035em;
}

.digit__col {
  position: absolute;
  inset: 0;
}

.digit__n {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  text-align: center;
  transform: scaleY(calc(1 + var(--mb, 0) * 0.012));
  text-shadow:
    0 calc(var(--mb, 0) * 0.9px) 0 rgba(228, 22, 19, calc(var(--mb, 0) * 0.035)),
    0 calc(var(--mb, 0) * -0.9px) 0 rgba(228, 22, 19, calc(var(--mb, 0) * 0.035)),
    0 calc(var(--mb, 0) * 1.9px) 0 rgba(228, 22, 19, calc(var(--mb, 0) * 0.02)),
    0 calc(var(--mb, 0) * -1.9px) 0 rgba(228, 22, 19, calc(var(--mb, 0) * 0.02));
}

.mile {
  min-width: 0;
  padding-bottom: 0.32em;
  font-size: clamp(11px, 1.9vmin, 17px);
  line-height: 1.32;
  letter-spacing: -0.012em;
}

.mile p {
  margin: 0;
}

.mile__title {
  font-weight: 600;
  font-size: 1.12em;
}

.mile__line {
  margin-top: 0.25em !important;
  color: var(--muted);
  max-width: 34em;
}

/* a word: the outer box clips, the inner one moves */
.w {
  display: inline-block;
  vertical-align: top;
  clip-path: inset(-0.1em -0.1em -0.18em -0.1em);
}

.w > span {
  display: inline-block;
}

/* ---------------------------------------------------------------- the years */
.pills {
  position: relative;
  display: flex;
  padding: 3px;
  background: var(--track);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.pills__puck {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(#ffffff, #fbfbfb);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 4px 10px -3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 #ffffff;
  transform-origin: 50% 50%;
}

.pill {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(6px, 1.25vmin, 11px) 0;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: clamp(10.5px, 1.6vmin, 14px);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.35s var(--expo-out), transform 0.5s var(--expo-out);
  -webkit-tap-highlight-color: transparent;
}

.pill.is-on {
  color: var(--ink);
  font-weight: 600;
}

.pill:active {
  transform: scale(0.94);
  transition-duration: 0.1s;
}

.pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (hover: hover) {
  .pill:not(.is-on):hover {
    color: var(--ink);
  }
}
