/* Site chrome shared by / and /work: the fixed video backdrop and the top bar.
   Self-contained (own tokens, own container) so either page can drop it in;
   the page provides the Absans @font-face, a `[data-sheet]` element that
   slides up over the backdrop, and loads /chrome.js for the state toggles.
   Type in the bar is Absans on both pages regardless of the page's body font. */

:root {
  --top-h: 80px; /* bar 56 + 12 above and below; the page uses it for hero/anchor maths */
  --top-ink: #0a0f1f;
  --top-ink-soft: #424a5e;
  --top-line: #e7e8ec;
  --top-accent: #2b4cf0;
  --top-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Backdrop — the fixed video the page scrolls over. Sits behind everything;
   the page's sheet covers it. Poster paints first; chrome.js attaches the src
   only when motion and data allow, so no-JS / reduced-motion / Save-Data
   readers get the still. Third-party placeholder clip re-encoded and
   self-hosted (/hero.mp4, ~1 MB); swap for a licensed one before launch. */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #000; pointer-events: none; }
/* a page can hold a <video data-bg-video> or a plain <img> still */
.bg__video, .bg__img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
/* top scrim: the clip's sky is bright, the bar type is white */
.bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 22%);
}

/* Top bar — identity + availability left, Work + primary CTA right. Seamless
   over the video (white type, no bar); once the sheet slides under it the nav
   becomes a floating glass bar: translucent white, backdrop blur, ink type.
   The bar's box never changes shape — only its surface — so nothing reflows.
   It bleeds 16px past the content column so the brand and the page's h1
   share a left edge. The one blur on the page; it earns it by keeping the
   bar legible over whatever scrolls under it. */
.top {
  position: sticky; top: 0; z-index: 50; padding-block: 12px;
  font-family: 'Absans', 'Helvetica Neue', Arial, sans-serif; font-weight: 400;
  font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.top__wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding-inline: 24px; }
.top__nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; margin-inline: -16px; padding: 0 8px 0 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 1px rgba(10, 15, 31, 0), 0 8px 24px -14px rgba(10, 15, 31, 0);
  transition: background .3s var(--top-ease), box-shadow .3s var(--top-ease), color .3s var(--top-ease);
}
.top.is-glass .top__nav {
  color: var(--top-ink);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(10, 15, 31, 0.06), 0 8px 24px -14px rgba(10, 15, 31, 0.28);
}
/* zero-specificity reset so .top__work / .top__cta colours win regardless of order */
:where(.top) a { color: inherit; text-decoration: none; }
.top :focus-visible { outline: 2px solid var(--top-accent); outline-offset: 3px; }

.top__lead { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 24px; height: 24px; border-radius: 6px; display: block; }
.brand__name { display: inline-block; }
.top__status-short { display: none; }

/* Availability, beside the wordmark: hairline divider, static green dot.
   Under 640px the label folds into the dot (accessible name kept). */
.top__status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 14px; color: rgba(255, 255, 255, 0.82); white-space: nowrap;
  transition: color .3s var(--top-ease), border-color .3s var(--top-ease);
}
.top.is-glass .top__status { color: var(--top-ink-soft); border-color: var(--top-line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; }

.top__links { display: flex; align-items: center; gap: 22px; }
.top__work { font-size: 15px; color: rgba(255, 255, 255, 0.82); transition: color .2s ease; }
.top__work:hover, .top__work[aria-current="page"] { color: #fff; }
.top.is-glass .top__work { color: var(--top-ink-soft); }
.top.is-glass .top__work:hover, .top.is-glass .top__work[aria-current="page"] { color: var(--top-ink); }
.top__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; line-height: 1; white-space: nowrap;
  background: #fff; color: var(--top-ink);
  transition: background .3s var(--top-ease), color .3s var(--top-ease), transform .2s var(--top-ease);
}
.top__cta:hover { background: #eef0f4; transform: translateY(-1px); }
.top.is-glass .top__cta { background: var(--top-ink); color: #fff; }
.top.is-glass .top__cta:hover { background: #000; }

@media (max-width: 860px) {
  :root { --top-h: 72px; }
  .top { padding-block: 10px; }
  .top__nav { height: 52px; }
}
@media (max-width: 640px) {
  /* default (no JS / reduced motion): brand + dot, label for screen readers only */
  .top__status { padding-left: 14px; }
  .top__lead { gap: 14px; }
  .top__status span:not(.dot) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  /* rotating (chrome.js adds .can-rotate on small screens): the wordmark and
     the short availability line share one slot after the mark and crossfade
     every 8 s (.is-alt). The mark stays put as the anchor. */
  .top.can-rotate .top__lead { position: relative; }
  .top.can-rotate .brand__name {
    transition: opacity .5s var(--top-ease), transform .5s var(--top-ease);
  }
  .top.can-rotate .top__status {
    position: absolute; left: 34px; top: 50%; padding: 0; border: 0;
    opacity: 0; transform: translateY(calc(-50% + 6px));
    transition: opacity .5s var(--top-ease), transform .5s var(--top-ease);
  }
  .top.can-rotate .top__status-long { display: none; }
  .top.can-rotate .top__status-short {
    display: inline; position: static; width: auto; height: auto; margin: 0;
    overflow: visible; clip: auto; border: 0;
  }
  .top.can-rotate.is-alt .brand__name { opacity: 0; transform: translateY(-6px); }
  .top.can-rotate.is-alt .top__status { opacity: 1; transform: translateY(-50%); }
}
@media (max-width: 560px) {
  .top__work { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .top__nav, .top__status, .top__work, .top__cta { transition: none; }
}

/* Split-text intro — chrome.js wraps the text of any [data-split] into
   per-word / per-character spans; each character slides in from the left,
   staggered. Only the JS-made spans start hidden, so no-JS and reduced-motion
   (chrome.js skips the split) show the text as authored. */
[data-split] .word { display: inline-block; white-space: nowrap; }
[data-split] .ch {
  display: inline-block; opacity: 0; transform: translateX(-18px);
  transition: opacity .5s ease, transform .5s ease;
}
[data-split].go .ch { opacity: 1; transform: none; }
[data-split] .split-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
