/*
 * RangeXT landing: shared styles, linked from every page.
 *
 *  1. Fonts            8. Header
 *  2. Tokens           9. Mobile menu
 *  3. Reset           10. Footer (evaluation band, About APS, closing block, links, ©)
 *  4. Base type       11. Back to top
 *  5. Layout          12. Analytics consent banner (js/consent.js)
 *  6. Buttons         13. Scroll effects: reveal on scroll (js/site.js), reading progress, scroll-lit words
 *  7. Skip link       14. Utilities
 *
 * Page stylesheets (home.css, insights.css, legal.css) load after this file.
 * Breakpoints follow the old theme: 1300 / 1000 / 690 (max-width 1300px, 999px, 690px), plus 1200px,
 * where the six header links appear (below it, the menu button opens them).
 */

/* ── 1. Fonts: self-hosted variable fonts, latin subset (SIL OFL, see /fonts/LICENSE-*.txt) ── */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/plus-jakarta-sans-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── 2. Tokens ── */
:root {
  /* Colour */
  --rx-green: #7cb342;
  --rx-green-ink: #4f7f22;      /* green text on light backgrounds (AA) */
  --rx-green-soft: #f1f7ea;
  --rx-green-light: #a8d878;    /* green text and focus rings on dark backgrounds */
  --rx-blue: #0360a2;           /* logo blue; buttons and links */
  --rx-blue-dark: #024f86;
  --rx-navy: #001e33;
  --rx-ink: #000;
  --rx-text: #3b3f44;
  --rx-muted: #6b7178;
  --rx-bg: #f8f8f8;             /* page background */
  --rx-line: rgba(0, 30, 51, 0.1);
  --rx-card-shadow: 0 1px 2px rgba(0, 30, 51, 0.05), 0 14px 34px -20px rgba(0, 30, 51, 0.28);

  /* Type */
  --rx-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rx-font-display: "Space Grotesk", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Space */
  --rx-gutter: max(20px, 7vw);          /* page side gutter: header and sections */
  --rx-gutter-footer: max(20px, 6vw);   /* footer side gutter */
  --rx-max: 1400px;                     /* widest content column */
  --rx-gap: clamp(18px, 2vw, 30px);
  --rx-section-pad: clamp(64px, 7vw, 120px);
  --rx-header-h: 64px;                  /* fixed header height: main is padded by this */

  /* Shape and motion */
  --rx-radius: 15px;
  --rx-radius-lg: 20px;
  --rx-ease-out: cubic-bezier(0.25, 1, 0.5, 1);   /* the old theme's easeOutQuart */
  --rx-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}
@media (min-width: 1000px) {
  :root { --rx-header-h: 80px; } /* the 55px logo with 12.5px above and below */
}

/* ── 3. Reset ── */
*,
*::before,
*::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--rx-header-h); /* in-page links land below the fixed header */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--rx-bg);
  color: var(--rx-ink);
  font-family: var(--rx-font);
  font-size: 17px;
  line-height: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, address { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* Focus: visible ring for keyboard users everywhere; dark surfaces switch it to light green. */
:focus-visible { outline: 2px solid var(--rx-blue); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ── 4. Base typography (sizes and weights as the old theme set them) ── */
h1, h2, h3, h4, h5, h6 { color: var(--rx-ink); font-family: var(--rx-font); letter-spacing: -0.03em; }
h1 { font-size: 62px; line-height: 68px; font-weight: 500; }
h2 { font-size: 46px; line-height: 56px; font-weight: 500; }
h3 { font-size: 22px; line-height: 38px; font-weight: 600; }
h4 { font-size: 22px; line-height: 28px; font-weight: 500; }
h5 { font-size: 18px; line-height: 30px; font-weight: 500; }
h6 { font-size: 18px; line-height: 28px; font-weight: 600; letter-spacing: 0; }
@media (max-width: 1300px) {
  h1 { font-size: 47px; line-height: 51px; }
  h2 { font-size: 40px; line-height: 48px; }
  h3 { font-size: 19px; line-height: 33px; }
}
@media (max-width: 999px) {
  h1 { font-size: 44px; line-height: 48px; }
  h2 { font-size: 33px; line-height: 40px; }
  h3 { font-size: 16px; line-height: 27px; }
  h4 { font-size: 20px; line-height: 26px; }
  h5 { font-size: 17px; line-height: 27px; }
}
@media (max-width: 690px) {
  h1 { font-size: 41px; line-height: 45px; }
  h2 { font-size: 28px; line-height: 34px; }
  h3 { font-size: 15px; line-height: 25px; }
}
b, strong { font-weight: 700; }
a { color: var(--rx-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rx-navy); }

/* Long-form text (articles, legal): paragraphs and lists spaced like the old theme (1.5em). */
.rx-prose > * + * { margin-top: 1.5em; }
.rx-prose :is(ul, ol):not([class]) { padding-left: 1.3em; }
.rx-prose li + li { margin-top: 0.4em; }

/* ── 5. Layout ── */
/* main sits below the fixed header. A page whose first block runs under the header can override. */
.rx-main { display: block; padding-top: var(--rx-header-h); }

/* Centred column with the page gutter. --narrow for text-led pages. */
.rx-container {
  width: 100%;
  max-width: calc(var(--rx-max) + 2 * var(--rx-gutter));
  margin-inline: auto;
  padding-inline: var(--rx-gutter);
}
.rx-container--narrow { max-width: calc(900px + 2 * var(--rx-gutter)); }

/* Section shell: full-width band, 7vw gutters, fluid vertical padding. */
.rx-section { position: relative; padding: var(--rx-section-pad) var(--rx-gutter); }
.rx-section--flush-top { padding-top: 12px; }
.rx-section--tight { padding-top: 0; padding-bottom: 0; }
.rx-section--navy {
  background: radial-gradient(110% 90% at 88% 0%, rgba(124, 179, 66, 0.2), transparent 60%), var(--rx-navy);
  color: #fff;
}
.rx-section--navy :focus-visible { outline-color: var(--rx-green-light); }
.rx-inner { max-width: var(--rx-max); margin: 0 auto; }

/* Section heading group: eyebrow, title, lead, centred. */
.rx-head { max-width: 900px; margin: 0 auto clamp(36px, 4vw, 64px); text-align: center; }
.rx-eyebrow {
  margin: 0 0 14px;
  color: var(--rx-green-ink);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rx-section--navy .rx-eyebrow { color: var(--rx-green-light); }
.rx-title {
  margin: 0;
  color: var(--rx-ink);
  font-size: clamp(30px, 3vw, 52px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.rx-section--navy .rx-title { color: #fff; }
.rx-lead {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--rx-text);
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.65;
}
.rx-section--navy .rx-lead { color: rgba(255, 255, 255, 0.82); }

/* ── 6. Buttons: blue pill. --wave adds the letter-wave hover (js/site.js splits the label). ── */
.rx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1em 2em;
  border: 0;
  border-radius: 999px;
  background: var(--rx-blue);
  color: #fff;
  font-family: var(--rx-font);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.45s var(--rx-ease-out), box-shadow 0.45s var(--rx-ease-out);
}
.rx-btn:hover { background: var(--rx-blue-dark); color: #fff; }
.rx-btn:focus-visible { outline: 2px solid var(--rx-navy); outline-offset: 3px; }

/* Letter wave: each character rises in from below, 15ms apart. */
.rx-wave { display: inline-block; overflow: hidden; vertical-align: top; padding-block: 0.15em; margin-block: -0.15em; }
.rx-wave-word { display: inline-block; white-space: nowrap; } /* lines break between words only */
.rx-char { display: inline-block; white-space: pre; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(.rx-btn, [data-wave]):is(:hover, :focus-visible) .rx-char {
    animation: rx-letter 0.5s cubic-bezier(0.46, 0.4, 0.56, 0.87) calc(var(--rx-i, 0) * 15ms) both;
  }
}
@keyframes rx-letter {
  0% { opacity: 0; transform: translateY(115%); }
  30% { opacity: 1; }
  45% { opacity: 1; transform: translateY(-25%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── 7. Skip link ── */
.rx-skip {
  position: fixed;
  z-index: 1100;
  top: 12px;
  left: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--rx-navy);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
}
.rx-skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; white-space: nowrap; }
.rx-skip:focus { color: #fff; outline: 3px solid var(--rx-green-light); outline-offset: 2px; }

/* ── 8. Header: logo left, menu centred, "Get in touch" right. Fixed; transparent at the top,
   frosted once scrolled; slides away while scrolling down and back when scrolling up. ── */
.rx-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  transition: transform 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
}
.rx-header.is-scrolled {
  background: rgba(248, 248, 248, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rx-header.is-scrolled { background: rgba(248, 248, 248, 0.96); }
}
.rx-header.is-hidden { transform: translateY(-100%); }
.rx-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--rx-header-h);
  padding-inline: 28px;
}
.rx-logo { display: block; flex: 0 0 auto; margin-right: auto; }
.rx-logo img { width: auto; height: 24px; }
.rx-logo:focus-visible { outline-offset: 6px; }

/* Desktop menu */
.rx-nav { display: none; }
.rx-nav-list { display: flex; align-items: center; }
/* The six links scale with the window: 15px at 1200px (where they appear) up to 20px from 1600px,
   which keeps them about 30px or more clear of the logo and of "Get in touch". */
.rx-nav-list a {
  position: relative;
  display: block;
  margin: 0 clamp(9px, 0.9vw, 15px);
  color: var(--rx-ink);
  font-family: var(--rx-font-display);
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 17px;
  font-weight: 600;
  letter-spacing: -0.34px;
  text-decoration: none;
  white-space: nowrap;
}
.rx-nav-list a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--rx-ease-out);
}
.rx-nav-list a:hover::after,
.rx-nav-list a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.rx-nav-list a:hover { color: var(--rx-ink); }
.rx-nav-list a:focus-visible { outline-offset: 8px; }

/* "Get in touch" */
.rx-btn--header {
  flex: 0 0 auto;
  height: 37px;
  padding: 0 16px;
  font-family: var(--rx-font-display);
  font-size: 13px;
  line-height: 13px;
  font-weight: 600;
  letter-spacing: -0.34px;
}

/* Menu button (below 1200px): three lines, the bottom one shorter, as before. */
.rx-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -11px; /* the 22px icon lines up with the gutter */
  padding: 0;
  border: 0;
  background: none;
  color: var(--rx-ink);
}
.rx-burger,
.rx-burger::before,
.rx-burger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
}
.rx-burger { position: relative; }
.rx-burger::before,
.rx-burger::after { content: ""; position: absolute; left: 0; }
.rx-burger::before { top: -7px; }
.rx-burger::after { top: 7px; width: 16.5px; }

@media (min-width: 1000px) {
  .rx-header-inner { padding-inline: var(--rx-gutter); }
  .rx-logo img { height: 55px; }
  .rx-btn--header {
    height: 44px;
    padding: 0 24px;
    font-size: 20px;
    line-height: 20px;
  }
  .rx-btn--header:hover {
    background: var(--rx-blue);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.3);
    transform: scale(1.06);
  }
}
/* 1000–1279px: a smaller "Get in touch". */
@media (min-width: 1000px) and (max-width: 1279px) {
  .rx-btn--header { height: 40px; padding: 0 24px; font-size: 15px; }
}
/* From 1200px the menu links sit centred in the space between the logo and "Get in touch"; below
   that the six links don't fit beside them, and the menu button opens them instead. */
@media (min-width: 1200px) {
  .rx-header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0;
  }
  .rx-logo { margin-right: 0; }
  .rx-nav { display: block; justify-self: center; }
  .rx-menu-toggle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-header,
  .rx-nav-list a::after,
  .rx-btn { transition: none; }
  .rx-btn--header:hover { transform: none; }
}

/* Without JavaScript (no menu button), narrower screens show the menu links under the logo.
   (1199.98px, not 1199px, so zoomed windows between 1199 and 1200 CSS px still get one menu.) */
@media (max-width: 1199.98px) {
  html:not(.js) .rx-header { position: relative; background: var(--rx-bg); }
  html:not(.js) .rx-main { padding-top: 0; }
  html:not(.js) .rx-header-inner { flex-wrap: wrap; height: auto; min-height: var(--rx-header-h); padding-block: 12px; }
  html:not(.js) .rx-nav { display: block; order: 3; width: 100%; }
  html:not(.js) .rx-nav-list { flex-wrap: wrap; gap: 14px 0; }
  html:not(.js) .rx-nav-list a { margin: 0 24px 0 0; font-size: 17px; }
}

/* ── 9. Mobile menu: panel slides in from the right over a dark backdrop. ── */
.rx-menu { position: fixed; z-index: 1000; inset: 0; }
.rx-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.rx-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 85vw);
  padding: 84px 32px; /* tablets: 60px at the sides; phones 32px (20px below 342px), so only "Skills & Blueprints" wraps */
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #000;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.15, 0.2, 0.1, 1);
}
/* The links sit centred in the panel; on a screen too short for them, the auto margins drop to 0,
   so the list starts at the top and scrolls instead of losing its first link above the top edge. */
.rx-menu-panel > nav { margin-block: auto; }
.rx-menu.is-open .rx-menu-backdrop { opacity: 1; }
.rx-menu.is-open .rx-menu-panel { transform: none; }
@media (min-width: 600px) {
  .rx-menu-panel { padding-inline: 60px; }
}
@media (max-width: 341px) {
  .rx-menu-panel { padding-inline: 20px; }
}
.rx-menu-list li + li { margin-top: 12px; }
/* Each link is 50px tall (40px line + 5px above and below); a link that wraps ("Skills & Blueprints")
   keeps its two lines 40px apart, closer than the 62px between links, so it reads as one. */
.rx-menu-list a {
  position: relative;
  display: inline-block;
  padding-block: 5px;
  color: #fff;
  font-family: var(--rx-font-display);
  font-size: 36px;
  line-height: 40px;
  font-weight: 300;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.rx-menu-list a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.25, 0, 0.4, 1);
}
.rx-menu-list a:hover::after,
.rx-menu-list a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.rx-menu-list a:hover { color: #fff; }
.rx-menu :focus-visible { outline-color: var(--rx-green-light); }
.rx-menu-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
}
.rx-menu-close::before,
.rx-menu-close::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 21px;
  width: 2px;
  height: 20px;
  border-radius: 5px;
  background: currentColor;
  transform: rotate(45deg);
}
.rx-menu-close::after { transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .rx-menu-backdrop,
  .rx-menu-panel,
  .rx-menu-list a::after { transition: none; }
}
@media (min-width: 1200px) {
  .rx-menu { display: none !important; }
}

/* ── 10. Footer: evaluation band (green into black), About APS, closing block, links, © ── */
.rx-footer { color: #fff; }
.rx-footer :focus-visible { outline-color: var(--rx-green-light); }

/* Evaluation band */
.rx-eval {
  padding: 17.6vw var(--rx-gutter-footer) calc(8.8vw + 31px);
  background: linear-gradient(180deg, var(--rx-green) 35%, #000 100%);
  text-align: center;
}
.rx-eval :focus-visible { outline-color: #fff; }
.rx-eval-eyebrow {
  margin: 0 0 12px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rx-eval-title { color: #fff; }
.rx-eval-copy { max-width: 760px; margin: 24px auto 0; color: #fff; font-size: 16px; line-height: 1.8; }
.rx-eval-action { margin-top: 24px; }
.rx-btn--eval { width: 100%; font-size: 16px; line-height: 1.1; }

/* Black part */
.rx-footer-main { padding: 0 var(--rx-gutter-footer); background: #000; }
.rx-footer-about { display: grid; gap: 30px; padding: 17.6vw 0 13.2vw; } /* 13.2vw: the old row's 8.8vw + inner row's 4.4vw */
.rx-footer-built { align-self: start; max-width: 75%; margin-bottom: 7px; color: var(--rx-green); }
.rx-footer-about-title {
  margin-bottom: 10px;
  color: #fff;
  font-size: 33px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.rx-footer-about-body > p { color: #fff; font-size: 19px; line-height: 31px; }
.rx-footer-about-body > p + p { margin-top: 10px; }

/* Closing block: product line */
.rx-closing { margin-top: 17.6vw; padding: 40px 0 clamp(40px, 4vw, 64px); border-top: 1px solid rgba(255, 255, 255, 0.16); }
.rx-closing-title {
  margin: 0 0 10px;
  color: var(--rx-green);
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.rx-closing-copy { max-width: 900px; color: rgba(255, 255, 255, 0.82); font-size: 19px; line-height: 1.6; }
.rx-closing-copy strong { color: #fff; }

/* APS logo, contact, links */
.rx-footer-bottom { display: grid; padding-bottom: 13.2vw; } /* the same 8.8vw + 4.4vw */
.rx-footer-brand img { width: 22.5%; } /* 30% of a column that keeps 25% free on the right, as before */
/* The e-mail and the address share one size: the footer links' size. */
.rx-footer-contact { display: flex; flex-direction: column; align-items: flex-start; margin-top: 30px; color: #fff; font-size: 16px; line-height: 1.6; }
.rx-footer-contact .rx-footer-link { font-size: inherit; }
.rx-footer-contact p { margin-top: 10px; }
.rx-footer-nav { margin-top: 20px; }
.rx-footer-links li { display: flex; }
.rx-footer-links li + li { margin-top: 24px; }

/* Underlined text links: always underlined, except the e-mail (on hover only). */
.rx-footer-link {
  position: relative;
  display: inline-block;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.rx-footer-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0.8;
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.23, 0.46, 0.4, 1), opacity 0.3s ease, border-color 0.3s ease;
}
.rx-footer-link:hover { color: #fff; }
.rx-footer-link:hover::after { border-color: #fff; opacity: 1; }
.rx-footer-link--hover-line::after { transform: scaleX(0); transform-origin: right; }
.rx-footer-link--hover-line:is(:hover, :focus-visible)::after { transform: scaleX(1); transform-origin: left; }

/* © line */
.rx-copyright { padding: 0 0 65.5px; text-align: center; }

/* Tablet and up (as before, the footer only stacks at phone width): a centred button, "Built by"
   beside About APS, and the APS logo beside the contact block. */
@media (min-width: 691px) {
  .rx-eval { padding-bottom: 8.8vw; }
  .rx-btn--eval { width: auto; }
  .rx-footer-about { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  .rx-footer-bottom { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .rx-footer-contact,
  .rx-footer-nav { margin-top: 0; }
  /* The e-mail never breaks inside the address; the empty space beside it takes any overflow. */
  .rx-footer-contact .rx-footer-link { white-space: nowrap; overflow-wrap: normal; }
}
/* Tablet: the links go under the logo. */
@media (min-width: 691px) and (max-width: 999px) {
  .rx-footer-nav { grid-row: 2; grid-column: 1; }
}
/* Up to 1299px About APS keeps to two thirds of its half, as before. */
@media (min-width: 691px) and (max-width: 1299px) {
  .rx-footer-about-body { max-width: calc(200% / 3); }
}
@media (min-width: 1000px) {
  .rx-eval { padding-block: 10vw; }
  .rx-eval-title { font-size: 4vw; line-height: 4.8vw; } /* the old split heading's line boxes */
  .rx-btn--eval { font-size: clamp(15px, 1.1vw, 18px); }
  .rx-footer-about { padding: 0 0 4.4vw; }
  .rx-closing { margin-top: 0; }
  .rx-footer-built { max-width: 75%; font-size: 4vw; line-height: 4.8vw; }
  .rx-footer-bottom { padding-bottom: 4.4vw; }
  /* Logo | contact | links at 2:1:1. Below about 1180px a quarter is narrower than the e-mail at its
     13px floor (236px) plus 24px, so the links step right to keep that gap (100% = their column). */
  .rx-footer-nav { margin-left: max(0px, calc(260px - 100%)); }
  .rx-footer-link,
  .rx-footer-contact { font-size: clamp(13px, 0.9vw, 16px); line-height: 1.5; }
  .rx-footer-contact p { margin-top: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-footer-link::after { transition: none; }
}
/* Phones (below 600px): the evaluation button breaks its label as evenly as the home page's
   ("Start Your 21-Day" / "Enterprise Evaluation"); headings and copy avoid one-word last lines; the
   APS logo stays legible; the footer links get 38px-tall tap areas without moving. */
@media (max-width: 599px) {
  .rx-btn--eval { padding-inline: 1.25em; text-wrap: balance; }
  .rx-eval-title,
  .rx-eval-copy,
  .rx-footer-built,
  .rx-closing-title,
  .rx-copyright { text-wrap: balance; }
  .rx-footer-built { max-width: none; }
  .rx-footer-brand img { width: max(110px, 22.5%); }
  .rx-footer-link::before { content: ""; position: absolute; inset: -10px 0; }
}

/* ── 11. Back to top (desktop only, appears after 350px of scrolling) ── */
.rx-to-top {
  position: fixed;
  z-index: 800;
  right: 17px;
  bottom: 14px;
  display: none;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  opacity: 0;
  transform: translateY(150%);
  /* Hidden (and out of the Tab order) while off screen; it hides only once it has slid away. */
  visibility: hidden;
  transition: transform 0.35s var(--rx-ease-in-out), opacity 0.35s ease, background-color 0.25s ease, visibility 0s linear 0.35s;
}
.rx-to-top svg { width: 14px; height: 14px; margin: 0 auto; transition: transform 0.2s ease; }
.rx-to-top.is-visible { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.rx-to-top:hover { background: var(--rx-blue); }
.rx-to-top:hover svg { transform: translateY(-2px); }
@media (min-width: 1000px) {
  .js .rx-to-top { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-to-top,
  .rx-to-top svg { transition: none; }
}

/* ── 12. Analytics consent banner (js/consent.js). Accept and Reject look the same on purpose:
   neither choice may be easier or more prominent than the other. ── */
.rx-consent {
  position: fixed;
  z-index: 900; /* above the page, below the mobile menu */
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: var(--rx-navy);
  box-shadow: 0 18px 48px -12px rgba(0, 0, 0, 0.45);
  color: #fff;
}
.rx-consent[hidden] { display: none; }
.rx-consent-inner { display: flex; align-items: center; gap: 24px; padding: 20px 24px; }
.rx-consent-text { flex: 1; margin: 0; color: rgba(255, 255, 255, 0.88); font-size: 15px; line-height: 1.55; }
.rx-consent-text a { color: var(--rx-green-light); text-decoration: underline; text-underline-offset: 2px; }
.rx-consent-text a:hover { color: #fff; }
.rx-consent-actions { display: flex; flex: 0 0 auto; gap: 12px; }
.rx-consent-btn {
  min-width: 110px;
  margin: 0;
  padding: 11px 22px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--rx-navy);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.rx-consent-btn:hover { border-color: var(--rx-green-light); background: var(--rx-green-light); }
.rx-consent-btn:focus-visible,
.rx-consent-text a:focus-visible { outline: 3px solid var(--rx-green-light); outline-offset: 3px; }
@media (max-width: 699px) {
  .rx-consent { right: 12px; bottom: 12px; left: 12px; }
  .rx-consent-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
  .rx-consent-actions > .rx-consent-btn { flex: 1; }
}
@media (forced-colors: active) {
  .rx-consent { border: 1px solid CanvasText; }
  .rx-consent-btn { border-color: ButtonText; }
}

/* ── 13. Scroll effects. Reveal on scroll: js/site.js adds .is-revealed as an element comes into view;
   "fade-up" blocks that come into view together (a row of cards) follow one another 120ms apart.
   Hidden states apply only when JavaScript runs (html.js) and motion is allowed, so content is
   always visible without JS, with reduced motion, and in print. If site.js never starts,
   a fallback animation shows everything after 3s.
     data-reveal="fade-up"  block fades in and rises 75px
     data-reveal="fade"     block fades in
     data-reveal="words"    heading words rise in, line by line (like the old "line reveal")
     data-reveal="mask"     block is uncovered from the left (the old hero image)
     data-reveal="draw"     SVG strokes draw in (paths need pathLength="1")
     data-reveal="layers"   no motion of its own: marks the moment for the page's CSS (home hero picture)
   data-reveal-delay="150" adds a delay in ms. ── */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-revealed) { opacity: 0; }
  .js [data-reveal="fade-up"]:not(.is-revealed) { transform: translateY(75px); }
  .js [data-reveal="mask"]:not(.is-revealed) { clip-path: inset(0 100% 0 0); opacity: 1; }
  .js [data-reveal="draw"]:not(.is-revealed) { opacity: 1; }
  .js [data-reveal="draw"]:not(.is-revealed) path { stroke-dashoffset: 1; }
  .js [data-reveal="words"].is-split { opacity: 1; }
  .js [data-reveal="words"].is-split:not(.is-revealed) .rx-word-inner { transform: translateY(110%); }

  .js [data-reveal="fade-up"],
  .js [data-reveal="fade"] {
    transition: opacity 1s ease var(--rx-delay, 0ms), transform 1.4s var(--rx-ease-out) var(--rx-delay, 0ms);
  }
  .js [data-reveal="mask"] { transition: clip-path 1.4s var(--rx-ease-in-out) var(--rx-delay, 0ms); }
  .js [data-reveal="draw"] path {
    stroke-dasharray: 1;
    transition: stroke-dashoffset 1.8s var(--rx-ease-in-out) var(--rx-delay, 0ms);
  }
  .js [data-reveal="words"] .rx-word-inner {
    transition: transform 1.1s var(--rx-ease-out) calc(var(--rx-delay, 0ms) + var(--rx-i, 0) * var(--rx-stagger, 30ms));
  }

  /* Fallback if site.js does not run: site.js adds .rx-ready as soon as it starts. */
  .js:not(.rx-ready) [data-reveal] { animation: rx-reveal-fallback 0s linear 3s forwards; }
  .js:not(.rx-ready) [data-reveal="draw"] path { animation: rx-reveal-fallback-draw 0s linear 3s forwards; }
}
@keyframes rx-reveal-fallback { to { opacity: 1; transform: none; clip-path: none; } }
@keyframes rx-reveal-fallback-draw { to { stroke-dashoffset: 0; } }

/* Words split by site.js: each word clips its own rise; padding keeps descenders visible. */
.rx-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.rx-word-inner { display: inline-block; }

/* Reading progress: a green line along the top of the window fills as the page scrolls.
   Scroll-driven, so it exists only where the browser runs scroll-driven animations. */
@supports (animation-timeline: scroll()) {
  body::before {
    content: "";
    position: fixed;
    z-index: 950; /* over the header, under the mobile menu */
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rx-green), var(--rx-green-light));
    transform-origin: 0 50%;
    pointer-events: none;
    animation: rx-progress linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes rx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Scroll-lit words: site.js splits [data-scroll-words] text into .rx-sw words (where the browser
   runs scroll-driven animations and motion is allowed). Each word brightens in turn as the text
   rises from the bottom of the window to its middle; --rx-sw-step is the share of that run per word. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-scroll-words] { view-timeline: --rx-words block; }
    .rx-sw {
      animation: rx-sw linear both;
      animation-timeline: --rx-words;
      animation-range: cover calc(10% + var(--rx-i) * var(--rx-sw-step)) cover calc(18% + var(--rx-i) * var(--rx-sw-step));
    }
  }
}
@keyframes rx-sw { from { opacity: 0.18; } to { opacity: 1; } }

@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  [data-reveal="draw"] path { stroke-dashoffset: 0 !important; transition: none !important; }
  .rx-word-inner { transform: none !important; }
  body::before,
  .rx-header,
  .rx-menu,
  .rx-to-top,
  .rx-consent { display: none !important; }
  .rx-main { padding-top: 0; }
}

/* ── 14. Utilities ── */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
