/* Relay site: shared design system.
   Near-black, monochrome ground. Color comes only from screenshots, brand logos and a
   small periwinkle-to-mint accent taken from the app icon. Every page loads this file;
   page-specific styles live in home.css / pages.css. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Ground and surfaces */
  --ground: #050506;
  --panel: #0c0d10;
  --panel-2: #121318;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --rim: rgba(255, 255, 255, 0.12);

  /* Ink (contrast on --ground: ink 17:1, muted 8.3:1, faint 5.1:1) */
  --ink: #edeef2;
  --muted: #a3a6b0;
  --faint: #7c808b;

  /* Accent: small moments only */
  --accent-a: #86a0fb;
  --accent-b: #5ed6a2;
  --accent: linear-gradient(100deg, var(--accent-a), var(--accent-b));

  /* Quota colors, for tiny meters only */
  --full: #5ed6a2;
  --half: #e6c25f;
  --low: #ef904e;
  --empty: #f36d6d;

  /* Type */
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.35rem + 5.6vw, 6.25rem);
  --fs-h2: clamp(2.125rem, 1.45rem + 2.9vw, 4rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  --fs-lede: clamp(1.125rem, 1.04rem + 0.38vw, 1.375rem);
  --fs-body: clamp(1rem, 0.97rem + 0.14vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  /* Space and shape */
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;
  --section: clamp(96px, 12vw, 184px);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --nav-h: 64px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --dur: 800ms;
  --stagger: 70ms;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  background: var(--ground);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,
svg,
video,
picture {
  display: block;
  max-width: 100%;
}
img,
video {
  height: auto;
}
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
a:hover {
  text-decoration-color: currentColor;
}
::selection {
  background: rgba(134, 160, 251, 0.35);
  color: #fff;
}

/* Focus: always visible, never removed */
:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
.display,
.h2,
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
  font-feature-settings: "kern" 1, "liga" 1;
}
h1,
.display {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.032em;
}
h2,
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.026em;
}
h3,
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
h4 {
  font: 600 1rem/1.4 var(--sans);
  letter-spacing: -0.005em;
}
p {
  text-wrap: pretty;
}
/* Second tone inside a headline: "Every limit. <span class="dim">In one place.</span>" */
.dim {
  color: var(--faint);
}
.grad-text {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--muted);
  max-width: 38em;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.small {
  font-size: var(--fs-small);
}
.prose {
  max-width: 42em;
  color: var(--muted);
}
.prose > * + * {
  margin-top: 1em;
}
.prose strong,
.prose b {
  color: var(--ink);
  font-weight: 600;
}
.prose a {
  color: var(--ink);
}

/* Mono label above headings: <p class="eyebrow">Live limits</p> */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 var(--fs-eyebrow) / 1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(134, 160, 251, 0.6);
  flex: none;
}
.eyebrow.plain::before {
  display: none;
}

code,
kbd,
pre,
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
}
code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
pre {
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow-x: auto;
  line-height: 1.6;
}
pre code {
  padding: 0;
  background: none;
  border: 0;
}
kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: var(--panel-2);
  text-align: center;
  font-size: 0.8em;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow {
  --maxw: 760px;
}
.section {
  position: relative;
  padding-block: var(--section);
}
.section + .section {
  padding-top: 0;
}
.section.ruled {
  border-top: 1px solid var(--line);
  padding-top: var(--section);
}
/* Heading block: eyebrow, h2, lede, stacked with calm rhythm */
.section-head {
  display: grid;
  gap: 20px;
  max-width: 820px;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.section-head .lede {
  margin-top: 4px;
}
.stack {
  display: grid;
  gap: var(--gap, 24px);
}
/* Responsive card grid: columns of at least --min wide */
.grid {
  display: grid;
  gap: var(--gap, 16px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr));
}
/* Raised panel */
.panel {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 60%), var(--panel);
  border: 1px solid var(--line);
}
.panel > h3 {
  font-size: 1.375rem;
}
.panel > * + * {
  margin-top: 10px;
}
.panel p {
  color: var(--muted);
}
.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

/* Accessibility helpers */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus {
  transform: none;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
}
/* Blur lives on a pseudo-element: backdrop-filter on the header itself would stop the
   mobile sheet (a child) from painting an opaque background. */
.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 5, 6, 0.72);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  transition: background-color 300ms ease;
}
[data-scrolled] .site-nav,
html:not(.js) .site-nav {
  border-bottom-color: var(--line);
}
[data-scrolled] .site-nav::before,
html:not(.js) .site-nav::before {
  background: rgba(5, 5, 6, 0.82);
}
.nav-in {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: -4px;
  padding: 4px;
  font: 650 1.125rem/1 var(--sans);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
/* The drawn Relay wordmark from the app: monoline strokes, with the R's leg in the accent color. */
.brand .wordmark {
  width: auto;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand .wordmark .leg {
  stroke: var(--accent-a);
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.nav-links {
  margin-left: auto;
}
.nav-links ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.05);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile menu: a <details> so it opens without JS; motion.js only adds Escape / outside-click close. */
.nav-menu {
  display: none;
}
.nav-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nav-menu > summary::-webkit-details-marker {
  display: none;
}
.nav-menu > summary:hover {
  background: rgba(255, 255, 255, 0.05);
}
.nav-burger {
  position: relative;
  width: 14px;
  height: 8px;
  border-block: 1.5px solid currentColor;
  transition: transform 300ms var(--ease), border-color 200ms ease;
}
.nav-burger::before,
.nav-burger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  opacity: 0;
  transition: transform 300ms var(--ease), opacity 200ms ease;
}
.nav-menu[open] .nav-burger {
  border-color: transparent;
}
.nav-menu[open] .nav-burger::before {
  opacity: 1;
  transform: rotate(45deg);
}
.nav-menu[open] .nav-burger::after {
  opacity: 1;
  transform: rotate(-45deg);
}
.nav-sheet {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 24px;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  max-height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.nav-menu[open] .nav-sheet {
  animation: sheet-in 360ms var(--ease);
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
.nav-sheet ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-sheet li + li {
  border-top: 1px solid var(--line);
}
.nav-sheet a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  font: 500 1.375rem/1.2 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.nav-sheet a::after {
  content: "\2192";
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--faint);
}
@media (max-width: 959px) {
  .nav-links {
    display: none;
  }
  .nav-actions {
    margin-left: auto;
  }
  .nav-menu {
    display: block;
  }
}
@media (max-width: 380px) {
  .nav-menu > summary .nav-menu-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .nav-menu > summary {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
}

/* ---------- Footer ---------- */
.site-foot {
  position: relative;
  overflow: hidden;
  padding-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.foot-top {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
}
.foot-brand p {
  margin-top: 16px;
  max-width: 22em;
}
.foot-brand .foot-meta {
  max-width: none;
}
.foot-meta {
  margin-top: 12px;
  font: 400 0.8125rem/1.5 var(--mono);
  color: var(--faint);
}
.foot-col h2 {
  margin-bottom: 14px;
  font: 500 var(--fs-eyebrow) / 1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.foot-col ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-col a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
}
.foot-col a:hover {
  color: var(--ink);
}
.foot-legal {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  /* The rule spans the full width like the columns above; only the text keeps a measure. */
  padding-right: max(0px, calc(100% - 52rem));
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--faint);
}
/* Oversized wordmark fading into the bottom edge (decorative) */
.foot-mark {
  margin: clamp(24px, 4vw, 48px) 0 0;
  font: 500 clamp(6rem, 26vw, 22rem) / 0.78 var(--serif);
  letter-spacing: -0.06em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  transform: translateY(12%);
}
@media (max-width: 719px) {
  .foot-top {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.9375rem/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 220ms var(--ease), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn:active {
  transform: translateY(1px) scale(0.985);
}
.btn-primary {
  background: #fff;
  color: #050506;
  box-shadow: 0 10px 34px -14px rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  background: #e3e5ea;
  box-shadow: 0 12px 40px -12px rgba(255, 255, 255, 0.55);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.26);
}
.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}
.btn-lg {
  height: 54px;
  padding: 0 28px;
  font-size: 1rem;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
/* Version / platform line under a download button (filled in by download.js) */
.dl-note {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--faint);
}
.dl-note a {
  color: var(--muted);
}
/* Inline text link with an arrow: <a class="link-arrow" href="...">How to install</a> */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.link-arrow::after {
  content: "\2192";
  transition: transform 220ms var(--ease);
}
.link-arrow:hover::after {
  transform: translateX(3px);
}

/* ---------- Window frame (app screenshots and video loops) ----------
   <figure class="window"><img ...></figure>. Rim, deep shadow, faint accent glow behind. */
.window {
  position: relative;
  isolation: isolate;
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.5),
    0 40px 90px -30px rgba(0, 0, 0, 0.9);
}
.window::before {
  content: "";
  position: absolute;
  inset: -6% -4%;
  z-index: -1;
  border-radius: 40%;
  background:
    radial-gradient(55% 60% at 28% 35%, rgba(134, 160, 251, 0.2), transparent 70%),
    radial-gradient(50% 55% at 78% 72%, rgba(94, 214, 162, 0.12), transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}
.window::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px var(--rim),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.window > img,
.window > video,
.window > picture,
.window > picture > img {
  width: 100%;
  border-radius: inherit;
}
.window.no-glow::before {
  display: none;
}
.window-lg {
  border-radius: var(--r-lg);
}
.caption,
figure > figcaption {
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--faint);
  text-align: center;
}
/* Scroll-linked settle: put on an element with data-scroll="enter".
   --p goes 0 -> 1 as it enters; without JS or with reduced motion --p stays 1 (flat). */
.tilt {
  transform-origin: 50% 0;
  transform:
    perspective(1800px)
    translateY(calc((1 - var(--p, 1)) * 48px))
    rotateX(calc((1 - var(--p, 1)) * 16deg))
    scale(calc(0.94 + var(--p, 1) * 0.06));
  will-change: transform;
}

/* ---------- Logo chips: real brand logo + name ---------- */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.logo-row.center {
  justify-content: center;
}
.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.logo-chip img {
  width: 20px;
  height: 20px;
  flex: none;
}
.logo-chip small {
  font-size: 0.8125rem;
  color: var(--faint);
}

/* ---------- Pinned sequence (data-sequence, driven by motion.js) ----------
   Without JS or with reduced motion the steps simply stack. With motion the section
   grows to (--steps + 1) screens, the stage sticks, and steps crossfade on .is-active. */
.sequence-grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.sequence-steps {
  display: grid;
  gap: 48px;
}
.sequence-copy .sequence-steps {
  gap: 32px;
}
.sequence-copy h3 {
  margin-bottom: 12px;
}
.sequence-copy p {
  color: var(--muted);
  max-width: 30em;
}
.sequence-dots {
  display: none;
  gap: 6px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.sequence-dots > * {
  position: relative;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
  overflow: hidden;
}
.sequence-dots > *::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 600ms var(--ease);
}
.sequence-dots > .is-active::after {
  transform: none;
}
@media (max-width: 859px) {
  .sequence-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Motion (only when JS runs and the visitor allows motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Reveal: <div data-reveal> or a parent with data-reveal-stagger (children animate in turn) */
  .js [data-reveal],
  .js [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
    transition:
      opacity var(--dur) var(--ease),
      transform var(--dur) var(--ease),
      filter var(--dur) var(--ease);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal-stagger] > * {
    transition-delay: calc(var(--d, 0ms) + var(--i, 0) * var(--stagger));
  }
  .js [data-reveal="fade"] {
    transform: none;
  }
  .js [data-reveal].is-in,
  .js [data-reveal-stagger].is-in > * {
    opacity: 1;
    transform: none;
    filter: none;
  }

  /* Sequence */
  .js .sequence[data-sequence] {
    height: calc((var(--steps, 3) + 1) * 100vh);
    height: calc((var(--steps, 3) + 1) * 100svh);
  }
  .js .sequence-stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    height: 100svh;
    padding-top: var(--nav-h);
    overflow: hidden;
  }
  .js .sequence-stage > .wrap {
    width: 100%;
  }
  .js .sequence-steps {
    gap: 0;
  }
  .js .sequence-steps > [data-seq-step] {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
    pointer-events: none;
    transition:
      opacity 700ms var(--ease),
      transform 700ms var(--ease),
      filter 700ms var(--ease);
  }
  .js .sequence-media > [data-seq-step] {
    transform: translateY(20px) scale(0.975);
  }
  .js .sequence-steps > .is-active {
    opacity: 1;
    transform: none;
    filter: none;
    pointer-events: auto;
    transition-delay: 120ms;
  }
  .js .sequence-dots {
    display: flex;
  }
}

/* Reduced motion: nothing moves, everything is visible. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .tilt {
    transform: none;
  }
}
