/* TLF brand tokens.

   One place for the palette and the two typefaces. Loaded first on every page, desktop and phone
   alike, so both sides of the site draw from the same set. The layout stylesheets keep their own
   spacing, sizing and layout variables; only colour and type live here.

   Typography rule: Instrument Sans carries headings, body, navigation and calls to action.
   JetBrains Mono is reserved for figures, dates and technical property specifications - never for
   running text. */

:root {
  /* --- Grounds --- */
  --tlf-ink: #0D0E09;              /* near-black, the main ground */
  --tlf-ground: #191B17;           /* track record, latest deals, availability */
  --tlf-frame: #1F211D;            /* photo frames and cards */
  --tlf-frame-hi: #282A25;
  --tlf-light: #F1F4EF;            /* the two pale chapters */
  --tlf-light-ink: #18271F;        /* body text on the pale ground */

  /* --- Ink --- */
  --tlf-paper: #ECE9E1;            /* body text on dark grounds */
  --tlf-muted: #8B8979;            /* small muted text on dark - never darker than this */
  --tlf-muted-soft: #9A9888;       /* the phone runs its muted text a shade lighter */
  --tlf-muted-2: #6C6A5C;
  --tlf-light-muted: #56665C;      /* small muted text on the pale ground */
  --tlf-line: rgba(236, 233, 225, .14);
  --tlf-line-soft: rgba(236, 233, 225, .12);
  --tlf-light-line: rgba(24, 39, 31, .14);

  /* --- Accent ---
     The brand green reads well on the dark grounds. On #F1F4EF it is too thin at small sizes, so
     small green text on the pale chapters uses its deeper twin. */
  --tlf-accent: #16CDA1;
  --tlf-accent-deep: #0DA07C;      /* hover and pressed states */
  --tlf-accent-on-light: #187657;

  /* --- Type --- */
  --tlf-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tlf-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* --- Motion ---
     One curve and three durations for the whole site, desktop and phone. Movement settles quickly
     and never asks the visitor to wait for it. */
  --tlf-ease: cubic-bezier(.22, 1, .36, 1);
  --tlf-fast: 180ms;               /* hover and press */
  --tlf-medium: 280ms;             /* menu bar, small state changes */
  --tlf-slow: 500ms;               /* a section coming into view */
}

/* --- Type, shared by every page ---
   Headings balance their lines, running text avoids a lone last word, figures line up in columns,
   and the browser never fakes a bold or italic the font files do not carry. */
html { font-synthesis: none; font-optical-sizing: auto; text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
[data-count], .stat-value, .num { font-variant-numeric: tabular-nums; }

/* The decimal point in the figures, drawn as the brand's square - the same mark that closes the
   headings. The "." glyph stays in place for its spacing, for screen readers and for copying; it is
   simply not painted. The box sits on the baseline because an inline-block that clips its content
   takes its bottom edge as its baseline. */
.dec {
  display: inline-block;
  overflow: hidden;
  width: .26em;
  height: .14em;
  vertical-align: baseline;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(currentColor, currentColor) 50% 100% / .14em .14em no-repeat;
}

/* ---------------------------------------------------------------------------------------------
   Moving between pages. No performance: the old page goes, the new one is there. A short cross
   fade only takes the hard cut off the switch; anything longer puts the visitor in a waiting room.
   --------------------------------------------------------------------------------------------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

::view-transition-group(root) { animation-duration: 180ms; }
::view-transition-old(root) { animation: tlf-vt-out 120ms linear both; }
::view-transition-new(root) { animation: tlf-vt-in 180ms linear both; }
@keyframes tlf-vt-out { to { opacity: 0; } }
@keyframes tlf-vt-in { from { opacity: 0; } }

/* ---------------------------------------------------------------------------------------------
   Client logos drifting behind What we do. Every mark is a white silhouette, dimmed to one grey,
   faint, fading out at both edges, moving slowly to the left on the compositor so it costs nothing
   and never disturbs scrolling. The track holds the row twice and travels exactly one row, so the
   loop has no seam. Stands still for visitors who ask for reduced motion.
   The marks are plain images, not CSS masks: Chrome refuses to load a mask file from a local
   folder, which left the band blank whenever the page was opened straight off the disk.
   --------------------------------------------------------------------------------------------- */
.clients {
  position: absolute; left: 0; right: 0; bottom: clamp(26px, 6vh, 70px); z-index: 0;
  font-size: 30px; overflow: hidden; pointer-events: none; opacity: .16;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.clients-track { display: flex; align-items: center; width: max-content; animation: tlf-clients 125s linear infinite; }
.client {
  flex: none; display: block; margin-right: 2.4em; object-fit: contain; filter: brightness(.77);
}
@keyframes tlf-clients { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .clients-track { animation: none; } }
.motion-off .clients-track { animation: none; }
/* everything else in the chapter sits above the band */
.discipline-pin > :not(.clients) { position: relative; z-index: 1; }
