/*
 * Base styles and motion primitives for the redesigned pages. Needs
 * tokens.css first. Copy is always in the HTML: every effect here starts
 * from visible text, and reduced motion turns all of it off.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--tone-light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  overflow-x: clip;
}
/* No scrollbar anywhere: not the page's, not a rail's, not a menu's. Only
   the bar goes; every box still scrolls by wheel, trackpad, touch and keys,
   and the rails also drag. Safari before 18.2 only reads the
   ::-webkit-scrollbar rule. */
html,
* {
  scrollbar-width: none;
}
::-webkit-scrollbar {
  display: none;
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
/* width/height attributes reserve space; CSS decides the rendered size. */
img {
  height: auto;
}
a {
  color: inherit;
}
/* --accent-text, not --accent: the fill colors fall under the 3:1 a focus ring
   needs (green on white 2.7, orange on cream 2.4, red on near-black 2.9). */
:where(a, button):focus-visible {
  outline: 2px solid var(--accent-text, var(--accent));
  outline-offset: 3px;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px))
    max(var(--gutter), env(safe-area-inset-right, 0px));
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Type */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
  margin: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  margin: 0;
}
/* A section's lead line above its heading, and Commerce's fact labels (Marcus,
   Nov 25): a short sentence-case question (Technologies' Mr. RIVERO keeps a
   statement) in the display face, 600, in the page's accent color, at normal
   tracking — read as a question, not an eyebrow: no slash, no capitals, no
   mono. One look on every page. */
.section-kicker {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(18px, 0.875rem + 0.625vw, 22px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  color: var(--accent-text);
}
/* 12px to the heading on every page, whatever the head's own layout: the
   heading drops its top margin, and grid heads hand back their row gap. */
.section-kicker + :is(h1, h2, h3) {
  margin-top: 0;
}
:is(.section-head, .ca-head, .cs-head) > .section-kicker {
  margin-bottom: calc(12px - var(--space-4));
}
/* Wraps a headline's own final period: `out<span class="accent-dot">.</span>`. */
.accent-dot {
  color: var(--accent);
}

/* Buttons: pills on every page (--btn-radius). */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 22px;
  border: var(--hairline) solid transparent;
  border-radius: var(--btn-radius);
  font: 600 15px/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-base) var(--ease-out),
    background-color var(--dur-base),
    border-color var(--dur-base),
    color var(--dur-base);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-ghost {
  border-color: currentColor;
}
.btn-sm {
  padding: 11px 18px;
  font-size: 14px;
}

/*
 * Brand colors by key: data-color="blue|green|red|orange" sets --c (fills,
 * rules, symbols) plus the text-safe variants --c-light (on white/#F2F2F2)
 * and --c-dark (on near-black). See the contrast notes in tokens.css.
 * --c-on is whichever of the two the current theme calls for; keep using
 * --c-dark directly for text that always sits on a photo.
 */
[data-color] {
  --c-on: var(--c-light);
}
[data-theme='dark'] [data-color] {
  --c-on: var(--c-dark);
}
[data-color='blue'] {
  --c: var(--rv-blue);
  --c-light: var(--rv-blue);
  --c-dark: #7d9cff;
}
[data-color='green'] {
  --c: var(--rv-green);
  --c-light: var(--rv-green-text);
  --c-dark: var(--rv-green);
}
[data-color='red'] {
  --c: var(--rv-red);
  --c-light: var(--rv-red);
  --c-dark: var(--rv-red-text-dark);
}
[data-color='orange'] {
  --c: var(--rv-orange);
  --c-light: var(--rv-orange-text);
  --c-dark: var(--rv-orange);
}
/* The RIVERO symbol in --c (assets/mark.svg is generated by the build). */
.tint {
  display: inline-block;
  flex: none;
  width: 1.28em;
  aspect-ratio: 400 / 313;
  background: var(--c, currentColor);
  -webkit-mask: url('/assets/mark.svg') center / contain no-repeat;
  mask: url('/assets/mark.svg') center / contain no-repeat;
}

/*
 * The RIVERO lockup in both themes: the logo in its own colors on light,
 * the white one on dark. Both are in the HTML so the swap needs no JS.
 */
.rv-lockup-dark {
  display: none;
}
[data-theme='dark'] .rv-lockup-light {
  display: none;
}
[data-theme='dark'] .rv-lockup-dark {
  display: block;
}

/*
 * Light/dark switch. It only appears once the boot script has run
 * (html.rv-theme), so a visitor without JS never meets a dead control. These
 * are its fallback place and shape, the page's bottom corner; in the global
 * header it joins the language switch in the row (globalHeaderStyle).
 */
.theme-toggle {
  position: fixed;
  z-index: 60;
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: max(var(--gutter), env(safe-area-inset-bottom, 0px));
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--tone-light);
  color: var(--ink);
  border: var(--hairline) solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgb(7 7 7 / 12%);
  cursor: pointer;
  transition:
    background-color var(--dur-base),
    border-color var(--dur-base),
    transform var(--dur-base) var(--ease-out);
}
.rv-theme .theme-toggle {
  display: inline-flex;
}
.theme-toggle:hover {
  border-color: var(--ink-muted);
  transform: translateY(-2px);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .icon-dark,
.theme-toggle[aria-pressed='true'] .icon-light {
  display: none;
}
.theme-toggle[aria-pressed='true'] .icon-dark {
  display: block;
}
/*
 * Switching theme crossfades the whole page (theme.js). With View
 * Transitions the old page is a snapshot that fades out over the new one;
 * without them, html.rv-theme-fade eases every color over for one beat.
 * The !important is the point: for that beat it outranks each element's
 * own transition list, which would otherwise leave its colors snapping.
 */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 460ms;
  animation-timing-function: var(--ease-in-out);
}
@media (prefers-reduced-motion: no-preference) {
  html.rv-theme-fade,
  html.rv-theme-fade *,
  html.rv-theme-fade *::before,
  html.rv-theme-fade *::after {
    transition:
      background-color 460ms var(--ease-in-out),
      color 460ms var(--ease-in-out),
      border-color 460ms var(--ease-in-out),
      fill 460ms var(--ease-in-out),
      stroke 460ms var(--ease-in-out),
      box-shadow 460ms var(--ease-in-out) !important;
  }
}

/*
 * Section tones. Every edge between sections is a hard one: when the tone
 * changes the build marks the section `data-rise` and it opens like a
 * curtain (see the reveals below), never a gradient.
 */
[data-tone] {
  position: relative;
  isolation: isolate;
}
[data-tone='light'] {
  --tone-bg: var(--tone-light);
  background: var(--tone-light);
  color: var(--ink);
}
[data-tone='alt'] {
  --tone-bg: var(--tone-alt);
  background: var(--tone-alt);
  color: var(--ink);
}
[data-tone='dark'] {
  --tone-bg: var(--tone-dark);
  background: var(--tone-dark);
  color: var(--ink-inverse);
  --ink-muted: var(--ink-inverse-muted);
  --rule: var(--rule-inverse);
}
[data-tone='accent'] {
  --tone-bg: var(--tone-accent);
  background: var(--tone-accent);
  color: var(--accent-ink);
}
/*
 * Motion primitives. Only transform, opacity and clip-path move, so a
 * reveal never repaints the text under it.
 * [data-rise]      section curtain: a hard clip edge opens from its own top
 * .rv-wipe         revealed from one edge (data-wipe); .rv-wipe-img inside
 *                  is the photo, which settles from --media-from (1.08) to 1
 *                  as it is uncovered
 * [data-lines]     (and every .section-title) rises line by line out of its
 *                  own clip as it enters the viewport (site.js splits it)
 * .rv-fade         fades in; with --i it waits its turn (text after a photo)
 * .reveal          rises into place as it enters the viewport
 * .stagger         its children reveal one after another (--i set by site.js)
 * .fill-word       outlined giant word that fills with --c as it scrolls in
 * .draw-x          line that draws left to right as it scrolls in
 * .marquee         endless band: .marquee-track inside, .marquee-toggle pauses
 * .tilt            card leans toward the pointer (fine pointers only)
 * [data-count-up]  number counts up to its own final text (site.js)
 * Scroll-driven CSS where supported; otherwise site.js adds .rv-io to <html>
 * and .is-in to each element via IntersectionObserver. No JS: all static.
 */
@keyframes rv-reveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
}
@keyframes rv-curtain {
  from {
    clip-path: inset(0 0 100% 0);
  }
}
@keyframes rv-wipe {
  from {
    clip-path: var(--wipe-from, inset(0 100% 0 0));
  }
}
@keyframes rv-wipe-zoom {
  from {
    transform: scale(var(--media-from));
  }
}
@keyframes rv-fade {
  from {
    opacity: 0;
  }
}
/* Which edge a photo opens from: the sliver that shows first. */
.rv-wipe {
  overflow: clip;
}
[data-wipe='left'] {
  --wipe-from: inset(0 100% 0 0);
}
[data-wipe='right'] {
  --wipe-from: inset(0 0 0 100%);
}
[data-wipe='up'] {
  --wipe-from: inset(100% 0 0 0);
}
[data-wipe='down'] {
  --wipe-from: inset(0 0 100% 0);
}
@keyframes rv-fill {
  from {
    color: transparent;
  }
}
@keyframes rv-draw-x {
  from {
    transform: scaleX(0);
  }
}
.draw-x {
  transform-origin: left center;
}
.fill-word {
  --c: currentColor;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--display-xl);
  line-height: 0.88;
  letter-spacing: var(--tracking-giant);
  color: var(--c);
  -webkit-text-stroke: 1.5px var(--c);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal,
    .stagger > * {
      animation: rv-reveal linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i, 0) * 6%) entry
        calc(60% + var(--i, 0) * 6%);
    }
    /* The curtain is over before the section is a third of the way up. */
    [data-rise] {
      animation: rv-curtain linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .rv-wipe {
      animation: rv-wipe linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i, 0) * 7%) entry
        calc(50% + var(--i, 0) * 7%);
    }
    .rv-wipe-img {
      animation: rv-wipe-zoom linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--i, 0) * 7%) entry
        calc(70% + var(--i, 0) * 7%);
    }
    .rv-fade {
      animation: rv-fade linear both;
      animation-timeline: view();
      animation-range: entry calc(10% + var(--i, 0) * 9%) entry
        calc(65% + var(--i, 0) * 9%);
    }
    .fill-word {
      animation: rv-fill linear both;
      animation-timeline: view();
      animation-range: entry 30% cover 45%;
    }
    .draw-x {
      animation: rv-draw-x linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 40%;
    }
  }
  .rv-io [data-rise] {
    transition: clip-path 1s var(--ease-out);
  }
  .rv-io [data-rise]:not(.is-in) {
    clip-path: inset(0 0 100% 0);
  }
  .rv-io .rv-wipe {
    transition: clip-path var(--dur-reveal) var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--stagger-step));
  }
  .rv-io .rv-wipe:not(.is-in) {
    clip-path: var(--wipe-from, inset(0 100% 0 0));
  }
  .rv-io .rv-wipe-img {
    transition: transform 1.4s var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--stagger-step));
  }
  .rv-io .rv-wipe:not(.is-in) .rv-wipe-img {
    transform: scale(var(--media-from));
  }
  .rv-io .rv-fade {
    transition: opacity var(--dur-reveal) var(--ease-out);
    transition-delay: calc(240ms + var(--i, 0) * var(--stagger-step));
  }
  .rv-io .rv-fade:not(.is-in) {
    opacity: 0;
  }
  .rv-io .draw-x {
    transition: transform 1.2s var(--ease-out);
  }
  .rv-io .draw-x:not(.is-in) {
    transform: scaleX(0);
  }
  .rv-io :is(.reveal, .stagger > *) {
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
    transition-delay: calc(var(--i, 0) * var(--stagger-step));
  }
  .rv-io :is(.reveal, .stagger > *):not(.is-in) {
    opacity: 0;
    transform: translateY(32px);
  }
  .rv-io .fill-word {
    transition: color var(--dur-reveal) var(--ease-out);
  }
  .rv-io .fill-word:not(.is-in) {
    color: transparent;
  }
}

/*
 * Team photos (`.rv-ph` on the card: Home's leadership, Solutions' team,
 * Commerce's reps). The same wipe and --media-from → 1 settle as the other
 * reveals, but on a clock, not on the scroll, and only once the photo has
 * decoded (site.js adds .is-in to the card when it is on screen and its
 * image is ready), so a portrait never pops into a frame that was already
 * open. --i staggers the row; the copy follows its photo. Hidden only
 * behind html.rv-phg, which site.js sets when motion is allowed and it can
 * observe, so reduced motion and no JS get the finished cards.
 *   .rv-ph-fig  the frame the wipe opens   .rv-ph-img  the photo inside it
 *   .rv-ph-text a line that fades in after the photo
 */
.rv-ph-fig {
  overflow: clip;
}
@media (prefers-reduced-motion: no-preference) {
  .rv-phg .rv-ph:not(.is-in) .rv-ph-fig {
    clip-path: var(--wipe-from, inset(100% 0 0 0));
  }
  .rv-phg .rv-ph:not(.is-in) .rv-ph-img {
    transform: scale(var(--media-from));
  }
  .rv-phg .rv-ph:not(.is-in) .rv-ph-text {
    opacity: 0;
  }
  .rv-phg .rv-ph.is-in .rv-ph-fig {
    animation: rv-wipe var(--dur-reveal) var(--ease-out)
      calc(var(--i, 0) * var(--stagger-step)) both;
  }
  .rv-phg .rv-ph.is-in .rv-ph-img {
    animation: rv-wipe-zoom 1.4s var(--ease-out)
      calc(var(--i, 0) * var(--stagger-step)) both;
  }
  .rv-phg .rv-ph.is-in .rv-ph-text {
    animation: rv-fade var(--dur-reveal) var(--ease-out)
      calc(240ms + var(--i, 0) * var(--stagger-step)) both;
  }
}

/*
 * Lines (`[data-lines]`, and every `.section-title`): site.js wraps each
 * word where it stands in a clip (.rv-ln > .rv-ln-i, markup inside the word
 * kept) and gives it the index of the line it landed on (--ln), so a line's
 * words rise together, each line a beat after the one above. The clip has
 * room for Jost's descenders, handed back by the negative margin. Hidden
 * only behind html.rv-lines, which site.js sets when motion is allowed, so
 * reduced motion and no JS get the plain heading.
 */
.rv-ln {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  padding: 0 0.05em 0.18em;
  margin: 0 -0.05em -0.18em;
}
.rv-ln-i {
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .rv-lines .is-split:not(.is-in) .rv-ln-i {
    transform: translate3d(0, 112%, 0);
  }
  .rv-lines .is-split.is-in .rv-ln-i {
    transition: transform var(--dur-reveal) var(--ease)
      calc(var(--ln, 0) * var(--line-step));
  }
}

/*
 * Page to page. Where the browser has cross-document View Transitions the
 * old page lifts away and the new one rises in (typed `rv-page`, so the
 * theme switch keeps its own crossfade above). Elsewhere site.js fades the
 * page out before following a same-origin link (html.rv-pt-out) and the
 * next page's head script fades it in (html.rv-pt-in, pageTransitionBoot).
 * Only `main` moves, never the body, so nothing fixed is carried along.
 * None of it under reduced motion.
 */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
    types: rv-page;
  }
  html:active-view-transition-type(rv-page)::view-transition-old(root) {
    animation: rv-page-out var(--dur-page) var(--ease) both;
  }
  html:active-view-transition-type(rv-page)::view-transition-new(root) {
    animation: rv-page-in calc(var(--dur-page) * 1.5) var(--ease) both;
  }
  html.rv-pt-out body {
    opacity: 0;
    transition: opacity var(--dur-page) var(--ease);
  }
  html.rv-pt-out main {
    transform: translate3d(0, -2vh, 0);
    transition: transform var(--dur-page) var(--ease);
  }
  html.rv-pt-in body {
    animation: rv-fade calc(var(--dur-page) * 1.5) var(--ease) both;
  }
  /* Technologies' live build measures the page as it lands, so its main
     only fades with the body. */
  html.rv-pt-in body:not([data-page='technologies']) main {
    animation: rv-page-rise calc(var(--dur-page) * 1.5) var(--ease) both;
  }
}
@keyframes rv-page-out {
  to {
    opacity: 0;
    transform: translate3d(0, -2vh, 0);
  }
}
@keyframes rv-page-in {
  from {
    opacity: 0;
    transform: translate3d(0, 3vh, 0);
  }
}
@keyframes rv-page-rise {
  from {
    transform: translate3d(0, 3vh, 0);
  }
}

/*
 * The closing band's wash (`.wash`): Home's contact, Solutions' way out and
 * Commerce's way out. No band and no edges: the section keeps the page
 * colour and the light is painted inside it — two low clouds spreading
 * into the page, and over them a plateau of five soft tints of the page's
 * own unit color (--wash-hue: blue, green, peach) held in its corners under
 * two blurred highlights. It fades in across the section's own top padding
 * and out across its bottom padding, which are the parts with no text.
 *
 * Its ground stays the page colour to the bottom edge: no band above the
 * footer, which the section uncovers as it scrolls away (the curtain in
 * footer-site.mjs).
 *
 * Light: dark ink on tints that are the hue mixed into white (5% to 40%);
 * #070707 is better than 10:1 on the deepest corner and the body copy at
 * .78 better than 7:1. The full stop takes a deep shade of the hue (blue
 * #1A47C2, green #025F02, orange #9A4A00: 4.2:1 or better on the deepest
 * corner, and it sits on the lighter ones). Dark: the hue mixed into the
 * page's near-black (capped at 70% for blue, 54% for green and orange,
 * which are lighter hues) with white copy, 4.6:1 or better on the lightest
 * corner at .86. The strong color is left to each band's primary button.
 */
[data-page='home'],
[data-page='solutions'],
[data-page='commerce'] {
  --wl1: 5%;
  --wl2: 10%;
  --wl3: 16%;
  --wl4: 28%;
  --wl5: 40%;
  --wlc: 34%;
}
[data-page='home'] {
  --wash-hue: var(--rv-blue);
  --wash-deep: var(--rv-blue-deep);
  --wash-night: #070b1c;
  --wd1: 16%;
  --wd2: 26%;
  --wd3: 38%;
  --wd4: 54%;
  --wd5: 70%;
  --wdc: 62%;
}
[data-page='solutions'] {
  --wash-hue: var(--rv-green);
  --wash-deep: #025f02;
  --wash-night: #07100a;
}
[data-page='commerce'] {
  --wash-hue: var(--rv-orange);
  --wash-deep: #9a4a00;
  --wash-night: #140c06;
}
[data-page='solutions'],
[data-page='commerce'] {
  --wd1: 12%;
  --wd2: 20%;
  --wd3: 30%;
  --wd4: 42%;
  --wd5: 54%;
  --wdc: 48%;
}
.wash {
  overflow: hidden;
  /* Short of the padding, so the fade is over before any text starts. */
  --wash-fade: calc(var(--section-pad) * 0.92);
  --wash-1: color-mix(in srgb, var(--wash-hue) var(--wl1), #fff);
  --wash-2: color-mix(in srgb, var(--wash-hue) var(--wl2), #fff);
  --wash-3: color-mix(in srgb, var(--wash-hue) var(--wl3), #fff);
  --wash-4: color-mix(in srgb, var(--wash-hue) var(--wl4), #fff);
  --wash-5: color-mix(in srgb, var(--wash-hue) var(--wl5), #fff);
  --wash-glow: rgba(255, 255, 255, 0.78);
  --wash-cloud: color-mix(in srgb, var(--wash-hue) var(--wlc), #fff);
  --wash-ink: #070707;
  --wash-ink-soft: rgba(7, 7, 7, 0.78);
  --wash-dot: var(--wash-deep);
  color: var(--wash-ink);
  --ink: var(--wash-ink);
  --ink-muted: var(--wash-ink-soft);
  --rule: rgba(7, 7, 7, 0.16);
}
[data-theme='dark'] .wash {
  --wash-1: color-mix(in srgb, var(--wash-hue) var(--wd1), var(--wash-night));
  --wash-2: color-mix(in srgb, var(--wash-hue) var(--wd2), var(--wash-night));
  --wash-3: color-mix(in srgb, var(--wash-hue) var(--wd3), var(--wash-night));
  --wash-4: color-mix(in srgb, var(--wash-hue) var(--wd4), var(--wash-night));
  --wash-5: color-mix(in srgb, var(--wash-hue) var(--wd5), var(--wash-night));
  --wash-glow: color-mix(
    in srgb,
    color-mix(in srgb, var(--wash-hue) 45%, #fff) 18%,
    transparent
  );
  --wash-cloud: color-mix(
    in srgb,
    var(--wash-hue) var(--wdc),
    var(--wash-night)
  );
  --wash-ink: #ffffff;
  --wash-ink-soft: rgba(255, 255, 255, 0.86);
  --wash-dot: color-mix(in srgb, var(--wash-hue) 55%, #fff);
  --rule: rgba(255, 255, 255, 0.22);
}
/* The ground: the page colour, flat to the bottom edge, where the footer
   curtain begins (see footer-site.mjs). */
.wash[data-tone] {
  background-color: var(--tone-light);
}
.wash::before,
.wash::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wash::before {
  z-index: -2;
  background:
    radial-gradient(
      58% 46% at 14% 4%,
      color-mix(in srgb, var(--wash-cloud) 40%, transparent),
      transparent 70%
    ),
    radial-gradient(
      54% 44% at 86% 98%,
      color-mix(in srgb, var(--wash-cloud) 34%, transparent),
      transparent 72%
    ),
    radial-gradient(
      90% 70% at 50% 50%,
      color-mix(in srgb, var(--wash-cloud) 26%, transparent),
      transparent 76%
    );
  /* The clouds have to be gone by the section's own edges too, or the one
     low on the right leaves a tinted line against the footer. */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14%,
    #000 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14%,
    #000 86%,
    transparent 100%
  );
}
.wash::after {
  z-index: -1;
  /* Highlights first (on top), then one tint per corner over the middle
     one; every layer is a radial that dies out long before its far edge. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48.5' height='84' viewBox='0 0 48.5 84'%3E%3Cpath d='M0 14L24.25 0L48.5 14V42L24.25 56L0 42ZM24.25 56V84' fill='none' stroke='%23fff' stroke-opacity='.07'/%3E%3C/svg%3E")
      0 0 / 48.5px 84px,
    radial-gradient(34% 52% at 22% 64%, var(--wash-glow), transparent 72%),
    radial-gradient(22% 70% at 46% 18%, var(--wash-glow), transparent 74%),
    radial-gradient(75% 95% at 100% 0%, var(--wash-5), transparent 72%),
    radial-gradient(70% 90% at 100% 100%, var(--wash-4), transparent 72%),
    radial-gradient(70% 90% at 0% 0%, var(--wash-2), transparent 72%),
    radial-gradient(70% 90% at 0% 100%, var(--wash-1), transparent 72%),
    var(--wash-3);
  /* Eased in and out: a straight ramp still reads as an edge. */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.16) calc(var(--wash-fade) * 0.34),
    rgba(0, 0, 0, 0.6) calc(var(--wash-fade) * 0.68),
    #000 var(--wash-fade),
    #000 calc(100% - var(--wash-fade)),
    rgba(0, 0, 0, 0.6) calc(100% - var(--wash-fade) * 0.68),
    rgba(0, 0, 0, 0.16) calc(100% - var(--wash-fade) * 0.34),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    rgba(0, 0, 0, 0.16) calc(var(--wash-fade) * 0.34),
    rgba(0, 0, 0, 0.6) calc(var(--wash-fade) * 0.68),
    #000 var(--wash-fade),
    #000 calc(100% - var(--wash-fade)),
    rgba(0, 0, 0, 0.6) calc(100% - var(--wash-fade) * 0.68),
    rgba(0, 0, 0, 0.16) calc(100% - var(--wash-fade) * 0.34),
    transparent 100%
  );
}
.wash :focus-visible {
  outline-color: var(--wash-ink);
}
.marquee {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  flex: none;
  width: max-content;
}
/* Pinned over the track's right end so the moving band can't push it out. */
.marquee-toggle {
  position: absolute;
  inset-inline-end: var(--gutter);
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-3);
  background: var(--tone-bg, transparent);
  box-shadow: -32px 0 24px var(--tone-bg, transparent);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--btn-radius);
  color: inherit;
  font: 500 var(--text-xs) / 1 var(--font-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  cursor: pointer;
}
@keyframes rv-marquee {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .marquee.is-running .marquee-track {
    animation: rv-marquee var(--marquee-duration, 70s) linear infinite;
  }
  .marquee.is-paused .marquee-track,
  .marquee.is-offscreen .marquee-track {
    animation-play-state: paused;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow: visible;
  }
  .marquee-track {
    flex-wrap: wrap;
    width: auto;
    flex: 1;
  }
  .marquee-toggle,
  .marquee-track [data-marquee-clone] {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .tilt {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg))
      rotateY(var(--tilt-y, 0deg));
    transition: transform var(--dur-slow) var(--ease-out);
    will-change: transform;
  }
}

/* inline-block so site.js can hold its final width while it counts. */
[data-count-up] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
/* With script (html.rv-theme is set in <head>), a figure is not seen until
   its count starts from zero, so the final number never flashes first.
   opacity, not visibility: a screen reader still reads the final figure.
   If site.js never arrives (no html.rv-counts), it shows after 3 s. */
@keyframes rv-count-late {
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .rv-theme [data-count-up]:not([data-counted]) {
    opacity: 0;
  }
  .rv-theme:not(.rv-counts) [data-count-up]:not([data-counted]) {
    animation: rv-count-late 0s 3s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
