/* Two-clocks scroll story: "School Years vs. Release Cycles". */

/* No-JS / WebGL-failed fallback: a quiet text card. Hidden once the story is live. */
.ts-fallback {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: #000;
  color: #d8dce3;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
html.ts-active .ts-fallback {
  display: none;
}
/* The live hero replaces the template's still image. The still stays as the
   no-JS hero, and as the thumbnail on the research page. */
html.ts-active .featured-image-container {
  display: none;
}

.ts-spacer {
  width: 100%;
  pointer-events: none;
}

.ts-dock {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}
.ts-dock-inner {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
}

/* The stage is fixed and full screen while the story plays, then docks into the hero slot. */
.ts-stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 100000; /* above the fixed site nav (z-index 99999) */
  background: #000;
  color: #fff;
  overflow: hidden;
  touch-action: pan-y;
}
.ts-stage.is-docked {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  z-index: 1;
}
.ts-stage.is-docked .ts-chrome {
  display: none;
}

/* The scene box is always viewport-sized and scaled as a whole, so labels stay glued to the clocks. */
.ts-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%);
}
.ts-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ts-label,
.ts-note {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  font-family: 'IBM Plex Sans', sans-serif;
  will-change: transform, opacity;
}
.ts-label {
  font-size: clamp(13px, 1.35vw, 21px);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #f4f5f7;
}
.ts-note {
  font-size: clamp(12px, 1.1vw, 17px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #9aa1ad;
}

.ts-title {
  position: absolute;
  left: 50%;
  bottom: 7%;
  width: min(86%, 980px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  translate: -50% 0; /* centering via `translate` so JS can animate `transform` freely */
}
.ts-kicker {
  margin: 0 0 0.9em;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(10px, 0.9vw, 13px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #7fb4ff;
}
.ts-headline {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 4.4vw, 66px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #fff;
}
.ts-sub {
  margin: 0.9em 0 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(14px, 1.45vw, 21px);
  font-weight: 300;
  color: #b9c0cc;
}

.ts-hint {
  position: absolute;
  left: 50%;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  translate: -50% 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8b93a1;
}
.ts-hint i {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, #8b93a1, transparent);
  animation: ts-drip 1.8s ease-in-out infinite;
  transform-origin: top;
}
@keyframes ts-drip {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Chrome that exists only while the stage covers the screen. */
.ts-skip {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 2;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  color: #e6e9ef;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ts-skip:hover,
.ts-skip:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

/* Portrait phones: clocks are stacked, so the title takes the middle and the notes step aside. */
.ts-stage.is-stacked .ts-note {
  display: none;
}
.ts-stage.is-stacked .ts-title {
  bottom: auto;
  top: 50%;
  translate: -50% -50%;
}
.ts-stage.is-stacked .ts-label {
  letter-spacing: 0.22em;
}

@media (max-width: 700px) {
  .ts-dock {
    padding: 0 1rem;
  }
  .ts-skip { right: 16px; top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ts-hint i { animation: none; opacity: 1; transform: none; }
}
