/* Utvecklingens spets. A black field, then an axis from 2000
   to 2027. The line holds only a dot and a short occasion.
   Above it, each super-intelligence is a tight vertical stack
   on the right. Newer teams appear to its left. Musk sits with Grok. */
html.talk .mode-timeline {
  --team-google: #5b9fd4;
  --team-meta: #d489c8;
  --team-openai: #6fbfa8;
  --team-anthropic: #e0a15a;
  --team-xai: #8aa4ff;
  --team-ssi: #c9a27a;
  --team-microsoft: #5ec8e5;
  --team-neutral: #9aa3b2;
  --axis-h: min(168px, 24vh);
  --icon: 80px;
  --icon-gap: 0.28rem;
  --stack-step: calc(var(--icon) * 0.72);
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: 6.4rem 0 2.2rem;
  background: #000;
  text-align: center;
}

html.talk .mode-timeline.is-void {
  background: #000;
}

html.talk .plot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 16rem;
  margin: 0 max(2.4rem, 6.5vw) 0.35rem max(2.6rem, 7vw);
}

html.talk .axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--axis-h);
  pointer-events: none;
}

html.talk .axis-y,
html.talk .axis-x {
  position: absolute;
  background: rgba(232, 234, 239, 0.94);
  box-shadow: 0 0 12px rgba(232, 234, 239, 0.32);
}

html.talk .axis-y {
  left: 0;
  bottom: 0;
  width: 5px;
  height: 100%;
  transform-origin: bottom center;
}

html.talk .axis-x {
  left: 0;
  bottom: 0;
  height: 5px;
  width: 100%;
  transform-origin: left center;
}

/* Five-year lines drop from the horizontal axis. They stop
   at the dots so the occasion words above stay clear. */
html.talk .guide {
  position: absolute;
  left: calc(var(--t) * 100% + 2.5px);
  top: 50%;
  bottom: 6%;
  width: 1px;
  background: rgba(232, 234, 239, 0.4);
  transform: translateX(-50%);
}

html.talk .guide-label {
  position: absolute;
  top: 0.72rem;
  left: 0;
  color: rgba(232, 234, 239, 0.72);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  background: #000;
  padding: 0 0.28rem;
}

html.talk .axis.is-grow .guide {
  opacity: 0;
}

/* Resting state is hidden so the draw starts when the face
   becomes current. Later slides keep the finished axis. */
html.talk .axis.is-stub .axis-x {
  width: 7.5rem;
  transform: scaleX(0);
}

html.talk .axis.is-stub .axis-y {
  transform: scaleY(0);
}

html.talk .axis.is-stub .tick-start,
html.talk .axis.is-grow .tick-end {
  opacity: 0;
}

html.talk .axis.is-grow .axis-x {
  clip-path: inset(0 calc(100% - 7.5rem) 0 0);
}

html.talk .face.is-current .axis.is-stub .axis-y {
  animation: axis-draw-y 1.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.talk .face.is-current .axis.is-stub .axis-x {
  animation: axis-draw-x 1.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.talk .face.is-current .axis.is-stub .tick-start {
  animation: axis-fade 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

html.talk .face.is-current .axis.is-grow .axis-x {
  animation: axis-grow 1.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.talk .face.is-current .axis.is-grow .tick-end {
  animation: axis-fade 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.88s both;
}

html.talk .face.is-current .axis.is-grow .guide {
  animation: axis-fade 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

/* The year lines finish at 1.25s. Waypoints fade in one second
   after that, over two seconds. */
html.talk .face.is-current .occasion.is-waypoint.is-new {
  animation: dot-in 2s cubic-bezier(0.22, 1, 0.36, 1) 2.25s both;
}

@keyframes axis-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes axis-draw-y {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes axis-draw-x {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes axis-grow {
  from { clip-path: inset(0 calc(100% - 7.5rem) 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

html.talk .tick {
  position: absolute;
  top: calc(50% + 0.72rem);
  color: rgba(232, 234, 239, 0.92);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1;
  background: #000;
  padding: 0 0.2rem;
}

html.talk .tick-start {
  left: 1.05rem;
}

html.talk .tick-end {
  right: 0;
}

html.talk .cast {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 1.35rem 1.05rem;
  width: 100%;
  margin: 0;
}

html.talk .team {
  --glow: var(--team-neutral);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.16rem;
}

html.talk .team[data-team="google"] { --glow: var(--team-google); min-width: 11.4rem; }
html.talk .team[data-team="meta"] { --glow: var(--team-meta); min-width: 11.8rem; }
html.talk .team[data-team="openai"] { --glow: var(--team-openai); min-width: 10rem; }
html.talk .team[data-team="anthropic"] { --glow: var(--team-anthropic); min-width: 10.5rem; }
html.talk .team[data-team="xai"] { --glow: var(--team-xai); min-width: 9.4rem; }
html.talk .team[data-team="ssi"] { --glow: var(--team-ssi); }
html.talk .team[data-team="microsoft"] { --glow: var(--team-microsoft); min-width: 10.6rem; }

html.talk .model {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.32rem;
  margin: 0;
}

html.talk .model-name {
  color: #fff;
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 0 10px var(--glow),
    0 0 22px color-mix(in srgb, var(--glow) 80%, transparent);
}

html.talk .model .node-logo img {
  width: 68%;
  height: 68%;
}

/* People share one band, company marks the next. The band is
   tall enough for the fullest team, so a single icon stays
   centered on the same line and a pair nests inside it. */
html.talk .member-row {
  position: relative;
  width: 100%;
  height: var(--icon);
}

html.talk .member-people {
  height: calc(var(--icon) + (var(--person-slots, 1) - 1) * var(--stack-step));
}

html.talk .member-logos {
  height: calc(var(--icon) + (var(--logo-slots, 1) - 1) * var(--stack-step));
}

html.talk .member-row .member {
  position: absolute;
  right: 0;
  top: calc((100% - var(--icon)) / 2);
}

html.talk .member-row.is-shared .member:nth-child(1) {
  top: 0;
  z-index: 1;
}

html.talk .member-row.is-shared .member:nth-child(2) {
  top: var(--stack-step);
  z-index: 2;
}

html.talk .member {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.32rem;
  width: max-content;
  margin: 0;
}

html.talk .member .who {
  margin: 0;
  color: #e8eaef;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

html.talk .team.is-new,
html.talk .member.is-new,
html.talk .occasion.is-new {
  opacity: 0;
}

html.talk .face.is-current .team.is-new,
html.talk .face.is-current .member.is-new {
  animation: cast-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html.talk .face.is-current .occasion.is-new {
  animation: dot-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes dot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

html.talk .node-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--icon);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #000;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--glow) 78%, transparent),
    0 0 22px color-mix(in srgb, var(--glow) 48%, transparent);
  overflow: hidden;
}

html.talk .team.is-new .node-mark,
html.talk .member.is-new .node-mark {
  box-shadow:
    0 0 0 2px var(--glow),
    0 0 32px color-mix(in srgb, var(--glow) 78%, transparent);
}

html.talk .node-logo img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}

html.talk .node-person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html.talk .node-word {
  color: #e8eaef;
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

html.talk .occasions {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

html.talk .occasion {
  --glow: var(--team-neutral);
  position: absolute;
  left: calc(var(--t) * 100% + var(--nudge, 0px));
  bottom: calc(var(--axis-h) / 2);
  width: 0;
  height: 0;
}

html.talk .occasion[data-team="google"] { --glow: var(--team-google); }
html.talk .occasion[data-team="meta"] { --glow: var(--team-meta); }
html.talk .occasion[data-team="openai"] { --glow: var(--team-openai); }
html.talk .occasion[data-team="anthropic"] { --glow: var(--team-anthropic); }
html.talk .occasion[data-team="xai"] { --glow: var(--team-xai); }
html.talk .occasion[data-team="ssi"] { --glow: var(--team-ssi); }
html.talk .occasion[data-team="microsoft"] { --glow: var(--team-microsoft); }

html.talk .occasion.is-waypoint {
  --glow: rgba(232, 234, 239, 0.82);
}

html.talk .pip {
  position: absolute;
  left: 2.5px;
  bottom: calc(-6px + var(--dot, var(--lift, 0)) * 2rem);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow);
  transform: translate(-50%, 0);
}

html.talk .occasion-label {
  position: absolute;
  left: 0;
  bottom: calc(0.8rem + var(--lift, 0) * 2rem);
  color: var(--glow);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

html.talk .occasion.is-first .occasion-label {
  left: 0.95rem;
  bottom: 1.85rem;
  transform: none;
}

html.talk .occasion.is-after .occasion-label {
  left: 0.75rem;
  transform: none;
}

html.talk .timeline-caption {
  width: min(44rem, 100%);
  min-height: 6.1rem;
  margin: 0 auto;
}

html.talk .mode-timeline h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.7vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
  text-wrap: balance;
}

html.talk .mode-timeline h1.as-typed {
  text-transform: none;
  letter-spacing: 0.06em;
}

html.talk .mode-timeline .lede {
  margin: 0.4rem auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

html.talk.js .face.mode-timeline.enter-right,
html.talk.js .face.mode-timeline.enter-left,
html.talk.js .face.mode-timeline.enter-down,
html.talk.js .face.mode-timeline.enter-up,
html.talk.js .face.mode-timeline.enter-jump {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html.talk .axis.is-stub .axis-y,
  html.talk .axis.is-stub .axis-x {
    transform: none;
  }

  html.talk .axis.is-stub .tick-start,
  html.talk .axis.is-grow .tick-end,
  html.talk .axis.is-grow .guide {
    opacity: 1;
  }

  html.talk .axis.is-grow .axis-x {
    clip-path: none;
  }

  html.talk .team.is-new,
  html.talk .member.is-new,
  html.talk .occasion.is-new {
    opacity: 1;
  }

  html.talk .face.is-current .axis.is-stub .axis-y,
  html.talk .face.is-current .axis.is-stub .axis-x,
  html.talk .face.is-current .axis.is-stub .tick-start,
  html.talk .face.is-current .axis.is-grow .axis-x,
  html.talk .face.is-current .axis.is-grow .tick-end,
  html.talk .face.is-current .axis.is-grow .guide,
  html.talk .face.is-current .team.is-new,
  html.talk .face.is-current .member.is-new,
  html.talk .face.is-current .occasion.is-new,
  html.talk .face.is-current .occasion.is-waypoint.is-new {
    animation: none;
  }
}

@media (max-width: 768px) {
  html.talk .mode-timeline {
    padding: 5.4rem 0 1.35rem;
  }

  html.talk .plot {
    min-height: 14rem;
    margin-right: 0.85rem;
    margin-left: 1.6rem;
  }

  html.talk .mode-timeline {
    --axis-h: 148px;
    --icon: 46px;
  }

  html.talk .axis {
    height: var(--axis-h);
  }

  html.talk .tick {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  html.talk .cast {
    flex-wrap: nowrap;
    gap: 0.35rem 0.4rem;
  }

  html.talk .team[data-team="google"],
  html.talk .team[data-team="meta"],
  html.talk .team[data-team="openai"],
  html.talk .team[data-team="anthropic"],
  html.talk .team[data-team="xai"],
  html.talk .team[data-team="microsoft"] {
    min-width: 0;
  }

  html.talk .model-name,
  html.talk .member .who {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.talk .model-name {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
  }

  html.talk .pip {
    bottom: calc(-6px + var(--dot, var(--lift, 0)) * 1.65rem);
  }

  html.talk .guide-label {
    font-size: 0.52rem;
    letter-spacing: 0.08em;
  }

  html.talk .member {
    gap: 0.32rem;
  }

  html.talk .member .who {
    font-size: 0.62rem;
  }

  html.talk .node-word {
    font-size: 0.72rem;
  }

  html.talk .occasion-label {
    font-size: 0.58rem;
    bottom: calc(0.72rem + var(--lift, 0) * 1.65rem);
  }

  html.talk .timeline-caption {
    min-height: 4.8rem;
  }

  html.talk .mode-timeline h1 {
    font-size: min(1.28rem, 6vw);
    letter-spacing: 0.07em;
  }
}

