/* Case study look directions: the shared base.
   Built 29 Sep 2026 by chat TEMPLATE on tokens.css and components.css copied
   (cp -L) from origin/main d14b722b. Every colour, space, radius, duration and
   type size below is a token; the three direction pages add their own layout. */

*, *::before, *::after { box-sizing: border-box; }
/* Anton ships one weight: never let the browser fake a bold (the site does the same). */
/* scroll-padding-top: see "Landing" below. */
html { -webkit-text-size-adjust: 100%; font-synthesis: none; scroll-padding-top: var(--cs-top, 0px); }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-body);
}
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; font-weight: var(--weight-regular); }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: var(--border-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Lucide glyph size inside text links. */
.cs-link i[data-lucide], .cs-link svg.lucide { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; stroke-width: 2; }

.review-note {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-400) var(--space-500);
  font: var(--weight-regular) var(--text-meta)/1.5 var(--font-mono);
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------------------
   The stat, a sibling of the site's .feat-spec (sections.css): mono numerals,
   the "turn" reveal for before and after figures, and a status tag that says
   delivered or planned in words. Rest state is the finished state; the start
   state only applies while the scope is armed, and only when motion is
   allowed, so a failed script or Reduce motion always shows the real numbers.
   --------------------------------------------------------------------------- */
.cs-stat { position: relative; display: flex; flex-direction: column; gap: var(--space-100); }
.cs-stat-num {
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  white-space: nowrap;
}
.cs-before { display: inline-block; font-size: 0.6em; color: var(--cs-before-ink, var(--color-text-tertiary)); transform-origin: left bottom; }
.cs-arrow { display: inline-block; font-size: 0.6em; margin-inline: 0.2em; color: var(--cs-before-ink, var(--color-text-tertiary)); clip-path: inset(0); }
.cs-after { display: inline-block; }
.cs-stat-label { font-size: var(--text-meta); line-height: var(--line-snug); }
.cs-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: var(--space-100);
  font: var(--weight-semibold) var(--text-label)/1 var(--font-mono);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  padding: var(--space-100) var(--space-200);
  border-radius: var(--chip-radius);
  border: 1px solid currentColor;
}
.cs-tag[data-kind="planned"] { border-style: dashed; }

@media (prefers-reduced-motion: no-preference) {
  .cs-stat { --t0: calc(var(--i, 0) * var(--duration-stagger)); }
  .cs-before { transition: transform var(--duration-base) var(--ease-emphasized) calc(var(--t0) + var(--duration-slow)), color var(--duration-base) var(--ease-default) calc(var(--t0) + var(--duration-slow)); }
  .cs-arrow { transition: clip-path var(--duration-base) var(--ease-entrance) calc(var(--t0) + var(--duration-slow)); }
  .cs-after, .cs-stat-label, .cs-tag { transition: opacity var(--duration-base) var(--ease-entrance) calc(var(--t0) + var(--duration-slow) + var(--duration-base)), transform var(--duration-base) var(--ease-emphasized) calc(var(--t0) + var(--duration-slow) + var(--duration-base)); }
  [data-reveal="armed"] .cs-before { transform: scale(1.6); color: currentColor; }
  [data-reveal="armed"] .cs-arrow { clip-path: inset(0 100% 0 0); }
  [data-reveal="armed"] .cs-after,
  [data-reveal="armed"] .cs-stat-label,
  [data-reveal="armed"] .cs-tag { opacity: 0; transform: translateY(var(--space-200)); }
}

/* Landing (20 Oct 2026, chat FRAME TYPE): a #section link or a review mark
   lands with the section's heading below the sticky header (assets/landing.js). */
/* Held on the page, not per section (12 Nov 2026, audit): scroll-padding also
   keeps a keyboard-focused link or button clear of the fixed header (WCAG
   2.4.11), which the old per-section scroll-margin did not. Margin and padding
   add up, so the section rules are gone and the review marks drop the header
   from their own offset. The padding itself sits on the html rule near the top. */
html [data-lt-rv] { scroll-margin-top: var(--space-400); }
