/* The landing page's styles: the dashboard's Blockaid tokens (agent-fingerprint-dashboard-stage,
   src/app/styles.css), exact values, in light and dark. Dark follows the system
   (prefers-color-scheme). Orange is an accent only: the primary action, one word per heading,
   the focus ring, the live markers. Fira Mono is self-hosted (public/fonts, OFL): no third-party
   request under the CSP. Sizes in rem so the browser's font size is respected.
   Layout, rhythm and the motion system: docs/design-spec.md. Every animation here has a still
   final state: it is what shows without JavaScript and under prefers-reduced-motion. */

@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/fira-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/fonts/fira-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  /* Palette (exact brand values, as the dashboard). */
  --bk-accent: #ff4500;
  --bk-accent-light: #fd9c78;
  --bk-accent-pale: #fbd6c8;
  --bk-accent-wash: #fff7f4;
  --bk-text: #232323;
  --bk-text-light: #4f4f4f;
  --bk-white: #ffffff;
  --bk-gray: #d3d3d3;
  --bk-stroke: #dedede;

  /* Light theme (the dashboard's :root). */
  --surface: var(--bk-white);
  --surface-raised: var(--bk-white);
  --surface-sunken: #f7f7f7;
  --surface-hover: #efefef;
  --text: var(--bk-text);
  --text-muted: var(--bk-text-light);
  --stroke: var(--bk-stroke);
  --stroke-strong: #8c8c8c; /* 3.3:1 on white: control edges */
  --accent: var(--bk-accent);
  --accent-text: #c13b0a; /* links: 5.4:1 on white */
  --focus: var(--bk-accent); /* 3.4:1 on white */

  /* Ours: the dashed frame, the people line, the dark panels (the demo card and the agent test's
     report card are dark in both themes: the dashboard's dark tokens). */
  --rail: var(--bk-stroke);
  --muted-line: #8c8c8c;
  --panel: var(--bk-text);
  --panel-raised: #2c2c2c;
  --panel-stroke: #3d3d3d;
  --panel-text: var(--bk-white);
  --panel-muted: var(--bk-gray);
  --header-shadow: 0 1px 0 var(--stroke), 0 8px 18px -14px rgb(35 35 35 / 0.45);

  --font-sans: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --font-mono: 'Fira Mono', ui-monospace, 'Courier New', monospace;
  --gutter: 1rem;
  --section: 4rem;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

/* Dark (the dashboard's [data-theme='dark'] set): the brand's #232323 page, raised surfaces
   lighter than it, never darker. */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: var(--bk-text);
    --surface-raised: #2c2c2c;
    --surface-sunken: #1b1b1b;
    --surface-hover: #3a3a3a;
    --text: var(--bk-white);
    --text-muted: var(--bk-gray);
    --stroke: #3d3d3d;
    --stroke-strong: #8a8a8a;
    --accent: var(--bk-accent);
    --accent-text: var(--bk-accent-light);
    --focus: var(--bk-accent-light);
    --rail: #3d3d3d;
    --muted-line: #8a8a8a;
    --panel: #1b1b1b;
    --panel-raised: #2c2c2c;
    --header-shadow: 0 1px 0 var(--stroke), 0 8px 18px -12px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Below the 4rem sticky header: whatever focus or a link scrolls to is never under it (WCAG 2.4.11). */
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--surface);
  font-size: 1rem;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.25rem;
  max-width: 20ch;
}
h2 {
  font-size: 1.75rem;
  max-width: 28ch;
}
h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  max-width: 65ch;
}

a {
  color: var(--accent-text);
  font-weight: 500;
  text-underline-offset: 4px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--bk-accent-pale);
  color: var(--bk-text);
}

/* main takes focus from the skip link; the ring belongs on controls, not the whole page. */
main:focus {
  outline: none;
}

.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;
}

/* The h1's one accent word (large text: #FF4500 is 3.4:1 on white, 4.6:1 on #232323); h2s have none. */
.accent {
  color: var(--accent);
}

/* Fira Mono labels (brand: mono for labels): a quiet caption, never a coloured pre-title. */
.label-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Section eyebrows: a mono label with a small line icon. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* The frame: dashed column rails on the content column, dashed section borders, and a small
   cross where they meet. */
.container {
  position: relative;
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Off-screen until focused, then a solid chip above everything (the dashboard's). */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 70;
  transform: translateY(-200%);
  border: 1px solid var(--stroke);
  border-radius: 0.5rem;
  background: var(--surface-raised);
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.skip-link:focus {
  transform: none;
}

/* Buttons (the dashboard's buttonClass). The primary is the one orange action: large bold
   white text keeps white-on-#FF4500 (3.4:1) within WCAG AA for large text. */
/* Every button is a press target: at least 44px tall, whatever its padding and type size come to
   (several came to 43px or 40px). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  gap: 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  text-align: center;
  transition:
    background-color 0.15s,
    filter 0.15s,
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}
.button--primary {
  background: var(--accent);
  color: var(--bk-white);
  font-size: 1.1875rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
}
.button--primary:hover {
  filter: brightness(0.95);
}
/* Small text on the accent (under 18.66px bold, so AA asks 4.5:1, not the large CTA's 3:1): the
   foreground is computed from the accent the button actually wears, never chosen per agent or per
   theme. In XYZ-D65 the y channel is WCAG's relative luminance; at or above 0.1791 black out-contrasts
   white, below it white does, so the text is whichever of the two reads better (black on #ff4500,
   6.1:1; white was 3.44:1). Back in sRGB, rounded to whole channels so white is exactly white. */
.button--primary.button--sm {
  color: #000000;
  color: rgb(
    from
      color(
        from var(--accent) xyz-d65 calc(0.9505 * clamp(0, (0.1791 - y) * 1e6, 1)) clamp(0, (0.1791 - y) * 1e6, 1)
          calc(1.089 * clamp(0, (0.1791 - y) * 1e6, 1))
      )
      round(r) round(g) round(b)
  );
}
.button--secondary {
  border: 1px solid var(--stroke-strong);
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 1rem;
}
.button--secondary:hover {
  background: var(--surface-hover);
}
.actions .button--secondary {
  font-size: 1.0625rem;
  padding: 0.75rem 1.5rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Header: sticky; gains a hairline shadow once the page has scrolled (landing.js watches a
   sentinel at the top; without JavaScript the border alone). */
.top-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--stroke);
  transition: box-shadow 0.2s;
}
.site-header .button {
  white-space: nowrap;
}
.site-header.is-scrolled {
  box-shadow: var(--header-shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}
.wordmark {
  display: block;
  height: 1.125rem;
  width: auto;
  flex: none;
  color: var(--text);
}
.wordmark--small {
  height: 1rem;
}
/* The Blockaid wordmark links to Blockaid's website: a 44px press target around it. */
.blockaid-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration: none;
}
/* In the footer the target reaches past the wordmark without moving the lines around it. */
.site-footer .blockaid-link {
  margin-block: -0.875rem;
}
.brand__divider {
  width: 1px;
  height: 1.5rem;
  background: var(--stroke);
}
.brand__product {
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

/* The headline, its line and the prompt on the left; the live fingerprint card on the right (below
   on a phone). Behind them a faint grid fading out from one corner and one soft orange light: the
   page's only wash, kept under a tenth of the accent's strength. */
.hero {
  --grid-line: rgb(35 35 35 / 0.06);
  --glow: rgb(255 69 0 / 0.14);
  position: relative;
  isolation: isolate;
  overflow: clip;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 3rem 3rem;
  mask-image: radial-gradient(ellipse 70% 80% at 80% 30%, #000, transparent 75%);
}
.hero::after {
  background: radial-gradient(40rem 28rem at 82% 35%, var(--glow), transparent 70%);
}
.hero > .container {
  padding-block: 4.5rem 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero__lead {
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}
/* The prompt: a quiet sunken panel, the text in the body face, the copy button beside it (.prompt,
   test.css, is the agent test's dashed box: this one wins over it). */
.prompt.hero__prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: end;
  max-width: 56rem;
  margin-top: 3.5rem;
  border: 1px solid var(--stroke);
  border-radius: 1.25rem;
  background: var(--surface-sunken);
  padding: 1.5rem;
}
.hero__hint {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
.hero__prompt .prompt__text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.hero__prompt .button {
  justify-self: start;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

/* The waitlist: one line of copy and the page's one orange button, on a band of its own. */
.join__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
}
.join .lead {
  margin-top: 0.75rem;
}

/* The landing page drops the dashed column rails the agent test's pages keep. */
.landing .container {
  border-inline: 0;
}

/* The agents the detector names, in their own colours on a white tile (in both themes: a black mark
   would vanish on the dark page), sliding past in a loop: the list, then the same list again, each
   moved left by its own width, so the second takes the first's place without a seam. Hover or the
   pause button stops it; under reduced motion it is a still, wrapped grid. */
.agents,
.join {
  border-top: 1px solid var(--stroke);
}
.agents > .container,
.join > .container {
  padding-block: var(--section);
}
.agents > .container {
  padding-bottom: 3rem;
}
.agents {
  padding-bottom: var(--section);
  overflow-x: clip;
}
.marquee {
  --gap: 1.5rem;
  display: flex;
  gap: var(--gap);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  flex: none;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 80s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(calc(-100% - var(--gap)));
  }
}
.button--dark {
  background: var(--text);
  color: var(--surface);
  font-weight: 500;
}
.button--dark:hover {
  filter: brightness(1.25);
}

/* The live demo card: dark in both themes. Its size is its content's, every part of fixed
   height (values on one line, two on a phone, a note clamped to two lines, the toggle's row), so nothing moves
   when the verdict arrives. */
.demo {
  --text: var(--panel-text);
  --text-muted: var(--panel-muted);
  --accent-text: var(--bk-accent-light);
  --focus: var(--bk-accent-light);
  display: grid;
  grid-template-rows: auto auto auto auto;
  min-width: 0;
  border: 1px solid var(--panel-stroke);
  border-radius: 0.875rem;
  background: var(--panel);
  color: var(--panel-text);
  padding: 1.25rem;
  box-shadow: 0 24px 48px -28px rgb(0 0 0 / 0.55);
}
.demo__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
}
.demo__title {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--panel-muted);
}
.demo__pulse {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: var(--panel-muted);
}
.demo[data-state='live'] .demo__pulse,
.demo[data-state='checking'] .demo__pulse {
  background: var(--bk-accent);
  animation: pulse 1.6s ease-in-out infinite;
}
/* The pause button and the badge, side by side at the card's top right. */
.demo__tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
}
/* Pause animations: a toggle (aria-pressed). Hidden without JavaScript and under reduced motion
   (nothing moves there), keeping its place so nothing moves when it shows. */
.motion {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid #8a8a8a;
  border-radius: 999px;
  background: transparent;
  color: var(--panel-text);
  cursor: pointer;
}
.motion[hidden] {
  display: inline-grid;
  visibility: hidden;
}
.motion__icon {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
}
.motion[aria-pressed='true'] .motion__icon--pause,
.motion[aria-pressed='false'] .motion__icon--play {
  display: none;
}
.demo__badge {
  flex: none;
  width: 6.5rem;
  text-align: center;
  border: 1px solid var(--panel-stroke);
  border-radius: 999px;
  padding: 0.125rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--panel-muted);
}
.demo[data-state='live'] .demo__badge {
  border-color: var(--bk-accent);
  color: var(--panel-text);
}
.demo__rows {
  margin-top: 1rem;
  border-top: 1px dashed var(--panel-stroke);
}
.demo__row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  /* Fixed in practice (values never exceed it), a minimum so user text spacing (WCAG 1.4.12)
     grows a row instead of overlapping the next. */
  min-height: 2.75rem;
  border-bottom: 1px dashed var(--panel-stroke);
}
.demo__row dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--panel-muted);
}
.demo__row dd {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s;
}
.demo[data-state='checking'] .demo__row dd {
  opacity: 0.55;
}
/* Location: the flag (flag-icons, 4:3, /flags/) before the place; its box is fixed, so a missing
   flag (visibility: hidden) moves nothing. */
.demo__place {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.demo__place span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flag {
  flex: none;
  width: 1rem;
  height: 0.75rem;
  border-radius: 2px;
  object-fit: cover;
  outline: 1px solid rgb(255 255 255 / 0.15);
  outline-offset: -1px;
}
.flag.is-none {
  visibility: hidden;
}
/* The world (public/world.svg) cropped to a strip, the pin on the visitor's country: the overlay
   slices the same viewBox as the image covers it, so the two line up. Fixed height: no shift. */
.demo__map {
  position: relative;
  height: 6rem;
  margin-top: 0.875rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #141414;
}
.demo__map img,
.demo__map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.demo__map img {
  object-fit: cover;
  object-position: 50% 50%;
}
.demo__pin {
  fill: var(--bk-accent);
  stroke: var(--panel);
  stroke-width: 2;
}
.demo__ping {
  fill: var(--bk-accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  /* Three rings, then the pin alone (its resting state). */
  animation: ping 2s ease-out 3;
}
@keyframes ping {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}
.demo__foot {
  display: grid;
  grid-template-rows: 3em 2.25rem;
  row-gap: 0.625rem;
  margin-top: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.demo__note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--panel-muted);
}
.demo__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid var(--panel-stroke);
  border-radius: 999px;
  background: var(--panel-raised);
  justify-self: start;
  padding: 0.25rem 0.875rem 0.25rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
/* Hidden (without JavaScript, before a verdict) but keeping its row: nothing moves when it shows. */
.demo__toggle[hidden] {
  display: inline-flex;
  visibility: hidden;
}
.demo__toggle:disabled {
  cursor: default;
  opacity: 0.75;
}
.demo__switch {
  position: relative;
  width: 2rem;
  height: 1.125rem;
  border-radius: 999px;
  /* 3.25:1 on the button (WCAG 1.4.11), and the white knob 4.3:1 on it. */
  background: #7a7a7a;
  transition: background-color 0.2s;
}
.demo__switch::after {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bk-white);
  transition: transform 0.2s var(--ease-out);
}
.demo__toggle[aria-pressed='true'] .demo__switch {
  background: var(--bk-accent);
}
.demo__toggle[aria-pressed='true'] .demo__switch::after {
  transform: translateX(0.875rem);
}

/* ---------- Shared with the agent test's pages ---------- */

.card {
  border: 1px solid var(--stroke);
  border-radius: 0.75rem;
  background: var(--surface-raised);
  padding: 1.5rem;
  min-width: 0;
}
.card p {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--stroke);
}
.site-footer__inner {
  padding-block: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text-muted);
}

@media (prefers-color-scheme: dark) {
  .hero {
    --grid-line: rgb(255 255 255 / 0.05);
    --glow: rgb(255 69 0 / 0.18);
  }
  .landing .button:hover {
    box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.8);
  }
}

/* ---------- Motion ---------- */

/* Entrance (CSS only, once): the headline, its line and the prompt rise in turn, the backdrop's
   light comes up, then the fingerprint card lands and reads its rows one by one under a scan line,
   as if taking the print. Everything starts at opacity 0.01, not 0, so it is painted, and counted
   for LCP, at once. */
.hero h1 {
  animation: fade-up 0.7s var(--ease-out) both;
}
.hero__lead {
  animation: fade-up 0.7s var(--ease-out) 0.12s both;
}
.hero__prompt {
  animation: fade-up 0.7s var(--ease-out) 0.24s both;
}
.hero::after {
  animation: glow-in 1.6s var(--ease-out) both;
}
.hero .demo {
  animation: card-in 0.8s var(--ease-out) 0.35s both;
}
.hero .demo__row {
  animation: fade-up 0.45s var(--ease-out) both;
}
.hero .demo__row:nth-child(1) {
  animation-delay: 0.75s;
}
.hero .demo__row:nth-child(2) {
  animation-delay: 0.9s;
}
.hero .demo__row:nth-child(3) {
  animation-delay: 1.05s;
}
.hero .demo__row:nth-child(4) {
  animation-delay: 1.2s;
}
.hero .demo__row:nth-child(5) {
  animation-delay: 1.35s;
}
.hero .demo__map {
  animation: fade-up 0.6s var(--ease-out) 1.5s both;
}
/* The scan line: one orange hairline with a soft trail, down the rows twice, then gone. */
.hero .demo__rows {
  position: relative;
}
.hero .demo__rows::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, rgb(255 69 0 / 0.1) 85%, var(--bk-accent) 100%);
  opacity: 0;
  pointer-events: none;
  animation: scan 1.3s ease-in-out 0.75s 2;
}

/* On the landing page, a small lift under the pointer, on the things you can press and on the
   strip's tiles. */
.landing .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgb(35 35 35 / 0.5);
}
.landing .button--primary:hover {
  box-shadow: 0 12px 28px -12px rgb(255 69 0 / 0.6);
}
/* Sections below the hero rise once as they come into view (landing.js adds .js-reveal to <html>,
   then .is-visible per section; without JavaScript, everything is simply shown). */
.js-reveal [data-reveal]:not(.is-visible) > * {
  opacity: 0;
  transform: translateY(1.5rem);
}
.js-reveal [data-reveal] > * {
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

@keyframes card-in {
  from {
    opacity: 0.01;
    transform: translateY(1.5rem) scale(0.97);
  }
}
@keyframes glow-in {
  from {
    opacity: 0;
  }
}
@keyframes scan {
  0% {
    opacity: 0;
    transform: translateY(-3rem);
  }
  15%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(calc(var(--rows-h, 14rem)));
  }
}

@keyframes fade-up {
  from {
    opacity: 0.01;
    transform: translateY(0.75rem);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------- Layout by width ---------- */

@media (min-width: 40rem) {
  :root {
    --gutter: 1.5rem;
  }
  .container {
    border-inline: 1px dashed var(--rail);
  }
  .actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (min-width: 48rem) {
  :root {
    --section: 6rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  .hero > .container {
    padding-block: 6.5rem 6rem;
  }
  .prompt.hero__prompt {
    padding: 1.75rem 2rem;
  }
  .join__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 64rem) {
  :root {
    --gutter: 3rem;
  }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
    gap: 4rem;
  }
}

/* On a phone (up to 480px, the largest included) a demo value takes up to two lines in the same
   2.75rem row, a size smaller so they fit, rather than an ellipsis: a place, an IPv6 address or
   "Probably an agent · …" is cut otherwise. Same row height, so the card's size and every
   state's stay as they are. */
@media (max-width: 30rem) {
  .prompt.hero__prompt {
    padding: 1.25rem;
  }
  .marquee {
    --gap: 1rem;
  }
  .demo__row dd:not(.demo__place),
  .demo__place span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.9375rem;
    line-height: 1.25;
  }
  /* A value's box is always two lines tall, its text centred in it, so a value that takes one
     line where the example took two (or the reverse) moves no box: no layout shift. */
  .demo__row dd:not(.demo__place) {
    -webkit-box-pack: center;
    min-height: 2.5em;
  }
}

/* At 390px the header keeps the wordmark, product name and Sign in on one line. */
@media (max-width: 26rem) {
  .brand {
    gap: 0.625rem;
  }
  /* Room for the card's title beside the pause button; still wide enough for "Example". */
  .demo__badge {
    width: 5.25rem;
  }
  .demo__tools {
    gap: 0.375rem;
  }
  .wordmark {
    height: 1rem;
  }
  .brand__product {
    font-size: 0.875rem;
  }
  .demo__row {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
}
/* The narrowest phones (320px): the wordmark, the product name and "Sign in" on one line. */
@media (max-width: 22.5rem) {
  .site-header__inner {
    gap: 0.75rem;
  }
  .brand {
    gap: 0.5rem;
  }
  .wordmark {
    height: 0.875rem;
  }
  .brand__product {
    font-size: 0.8125rem;
  }
  .site-header .button--secondary {
    padding-inline: 0.75rem;
  }
  /* The demo's label above its value, so a value has the card's whole width for its two lines.
     A fixed height again (the same in every state): the card is taller here, but never moves. */
  .demo__row {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 0.125rem;
    min-height: 3.75rem;
  }
}

/* Paused (the demo card's pause button, remembered): the live dot and the pin at rest, as they
   end on their own. */
:root[data-motion='paused'] .demo .demo__pulse,
:root[data-motion='paused'] .demo__ping,
:root[data-motion='paused'] .marquee__track {
  animation: none;
}

/* Reduced motion: everything still, in its final state: no entrance, no pulsing. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* The strip, still: one copy of the list, wrapped, every agent in view. */
  .marquee {
    mask-image: none;
    padding-inline: var(--gutter);
    max-width: 74rem;
    margin-inline: auto;
  }
  .marquee__track {
    flex: auto;
    flex-wrap: wrap;
    justify-content: center;
  }
  .marquee__track[aria-hidden='true'] {
    display: none;
  }
}
