/* Foundris landing page. Plain CSS, no build. It uses the Foundris design system: the tokens below are copied from frontend/src/styles/tokens.css with the SAME
   names and values (the dark theme for the page, the light theme for the demonstration sheet, as the app does with data-theme), and the type roles are the
   app's. WwwSiteTests fails if a copied value differs from tokens.css. Landing-only layout values are prefixed --www- and declared after the copied blocks.
   Contrast, WCAG 2.x relative luminance:
     dark theme: ink #eceef1 on surface #111316 16.0:1; ink-muted #a7adb6 8.2:1 (on surface-raised #1a1d21 7.5:1)
                 brand #7fa8f5 (accent text, links) 7.8:1 (on surface-raised 7.1:1); button text on-brand #0a1424 on brand #7fa8f5 7.7:1, on the hover step #a9c6fa 10.7:1
                 line-strong #737a85 (control edge) 4.3:1 (3:1 is needed)
     light theme (the sheet): ink #17191c on surface #f3f2ef 15.7:1; ink-muted #57585a on surface 6.4:1, on white 7.1:1
                 approved #1b6436 on #dcefe2 6.0:1; pending #7d4e00 on #fcefd3 6.2:1; brand #1d4fb8 on surface 6.6:1 */

/* TOKENS-BEGIN: copied from frontend/src/styles/tokens.css */
:root, [data-theme="light"] {
  --surface: #f3f2ef;
  --surface-raised: #ffffff;
  --surface-sunken: #e8e6e1;
  --line: #d6d3cc;
  --line-strong: #86827a;
  --ink: #17191c;
  --ink-muted: #57585a;
  --brand: #1d4fb8;
  --brand-strong: #173d91;
  --brand-soft: #e2eaf6;
  --on-brand: #ffffff;
  --state-draft: #545a64;
  --state-draft-soft: #eceae6;
  --state-pending: #7d4e00;
  --state-pending-soft: #fcefd3;
  --state-pending-mark: #b47404;
  --state-approved: #1b6436;
  --state-approved-soft: #dcefe2;
  --state-rejected: #b0261c;
  --chart-1: #16274a;
  --chart-5: #c5cedb;
  --focus: var(--brand);
  --shadow-1: 0 1px 2px rgba(23, 25, 28, 0.08);
  --shadow-2: 0 6px 20px rgba(23, 25, 28, 0.14);
}
[data-theme="dark"] {
  --surface: #111316;
  --surface-raised: #1a1d21;
  --surface-sunken: #0b0c0e;
  --line: #2c3036;
  --line-strong: #737a85;
  --ink: #eceef1;
  --ink-muted: #a7adb6;
  --brand: #7fa8f5;
  --brand-strong: #a9c6fa;
  --brand-soft: #152740;
  --on-brand: #0a1424;
  --state-approved: #72d095;
  --state-rejected: #ff8f84;
  --focus: var(--brand);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.6);
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --control-h: 36px;
  --row-h-compact: 32px;
  --target-min: 44px;
  --font-display: "Archivo", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.display-xl { font-family: var(--font-display); font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.01em; }
.display-l { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 600; }
.heading { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 600; }
.title { font-family: var(--font-sans); font-size: 17px; line-height: 24px; font-weight: 600; }
.body { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 400; }
.body-strong { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 600; }
.label { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.01em; }
.caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 400; }
.data { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.data-strong { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; }
.kpi { font-family: var(--font-sans); font-size: 32px; line-height: 36px; font-weight: 600; }
/* TOKENS-END */

/* Landing-only values. */
html {
  --www-header-h: 64px;
  --www-max: 1280px;
  --www-hero-size: clamp(2.75rem, 6vw, 5rem);
  --www-tx: 0;   /* set by motion.js from the pointer, -1 to 1; 0 at rest */
  --www-ty: 0;
}

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-hyperlegible-next-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--www-header-h) + var(--space-4)); background: var(--surface); }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-variation-settings: "wdth" 112; font-weight: 600; color: var(--ink); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
/* The author display rules below (.demo-controls and others) would otherwise beat the browser's own [hidden]. */
[hidden] { display: none !important; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
a:focus-visible, input:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: calc(var(--www-max) + 2 * var(--space-5)); margin: 0 auto; padding: 0 var(--space-5); }

/* ---------------------------------------------------------------- header */

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { max-width: calc(var(--www-max) + 2 * var(--space-5)); margin: 0 auto; padding: 0 var(--space-5); height: var(--www-header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.brand { display: block; line-height: 0; }
.skip { position: absolute; left: var(--space-4); top: -100px; z-index: 30; padding: var(--space-2) var(--space-4); color: var(--on-brand); background: var(--brand); border-radius: var(--radius-md); text-decoration: none; }
.skip:focus { top: var(--space-2); outline-color: var(--ink); }
.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav-link { color: var(--ink-muted); text-decoration: none; white-space: nowrap; padding: var(--space-2) 0; }
.nav-link:hover { color: var(--ink); }
.nav-join { color: var(--brand); }
.nav-join:hover { color: var(--brand-strong); }
.pill { display: inline-flex; align-items: center; height: var(--control-h); padding: 0 var(--space-4); white-space: nowrap; color: var(--ink); text-decoration: none; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); }
.pill:hover { color: var(--ink); background: var(--surface-sunken); }

/* ---------------------------------------------------------------- hero */

.hero { position: relative; min-height: calc(100vh - var(--www-header-h)); min-height: calc(100svh - var(--www-header-h)); display: flex; flex-direction: column; justify-content: center; padding: var(--space-7) var(--space-5) var(--space-8); overflow: hidden; isolation: isolate; }
.atmos { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform, translate; }   /* translate follows the pointer (motion.js); transform is the slow drift */
.glow-a { width: 720px; height: 720px; left: -180px; top: -260px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 38%, transparent), transparent 68%); translate: calc(var(--www-tx) * 30px) calc(var(--www-ty) * 20px); }
.glow-b { width: 620px; height: 620px; right: -160px; bottom: -220px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 26%, transparent), transparent 68%); translate: calc(var(--www-tx) * -40px) calc(var(--www-ty) * -26px); }
.blueprint {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--brand) 9%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--brand) 9%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
}

.hero-grid { position: relative; width: 100%; max-width: var(--www-max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8) var(--space-7); align-items: center; }
@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); margin-bottom: var(--space-5); }
/* The hero is display-xl (same face, weight and width) at a landing scale. */
h1.display-xl { font-size: var(--www-hero-size); line-height: 1.02; letter-spacing: -0.02em; margin-bottom: var(--space-5); }
h1 .line { display: block; }
h1 .accent { color: var(--brand); }
.lede { max-width: 34rem; margin-bottom: var(--space-3); }
.lede-sub { max-width: 34rem; color: var(--ink-muted); margin-bottom: var(--space-6); }
.prompt { max-width: 34rem; margin-bottom: var(--space-3); }

/* ---------------------------------------------------------------- waitlist form (one form; waitlist.js drives it) */

.join { max-width: 34rem; }
.join label { display: block; color: var(--ink-muted); margin-bottom: var(--space-2); }
.row { display: flex; gap: var(--space-2); padding: var(--space-1); background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--focus), var(--shadow-2); }
input[type="email"] { flex: 1 1 auto; min-width: 0; height: var(--target-min); padding: 0 var(--space-3); font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 0; border-radius: var(--radius-md); }
input[type="email"]:focus-visible { outline: none; }
input[aria-invalid="true"] { color: var(--state-rejected); }
.row:has(input[aria-invalid="true"]) { border-color: var(--state-rejected); }
button[type="submit"], .btn { display: inline-flex; align-items: center; justify-content: center; height: var(--target-min); padding: 0 var(--space-5); font: inherit; font-weight: 600; font-size: 15px; white-space: nowrap; text-decoration: none; cursor: pointer; color: var(--on-brand); background: var(--brand); border: 1px solid var(--brand); border-radius: var(--radius-md); }
button[type="submit"]:hover, .btn:hover { color: var(--on-brand); background: var(--brand-strong); border-color: var(--brand-strong); }
button[type="submit"]:disabled { color: var(--ink-muted); background: var(--surface-sunken); border-color: var(--line); cursor: not-allowed; }
.btn:focus-visible { outline-color: var(--ink); }
.consent { margin-top: var(--space-3); color: var(--ink-muted); }
.note { margin-top: var(--space-2); min-height: 22px; font-size: 15px; line-height: 22px; }
.note.ok { color: var(--state-approved); }
.note.err { color: var(--state-rejected); }

/* ---------------------------------------------------------------- scroll cue */

.cue { position: absolute; left: 50%; bottom: var(--space-4); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: var(--space-1); color: var(--ink-muted); text-decoration: none; padding: var(--space-2); }
.cue:hover { color: var(--ink); }
.cue-arrow { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }

/* ---------------------------------------------------------------- demonstration */

.stage { transform-origin: 50% 50%; }
.demo-head { margin-bottom: var(--space-4); }
.demo-tag { display: inline-block; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px var(--space-3); margin-bottom: var(--space-3); }
.demo-title { max-width: 36rem; }
.demo-cue { margin-top: var(--space-2); color: var(--ink-muted); }
.demo-controls { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-3); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.seg-btn { height: 32px; padding: 0 var(--space-3); font: 600 13px/18px var(--font-sans); color: var(--ink); background: var(--surface-raised); border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.seg-btn:first-child { border-radius: calc(var(--radius-md) - 1px) 0 0 calc(var(--radius-md) - 1px); }
.seg-btn:last-child { border-right: 0; border-radius: 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0; }
.seg-btn:hover { background: var(--surface-sunken); }
.seg-btn[aria-selected="true"], .seg-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface-raised); }
.seg-btn:focus-visible { position: relative; z-index: 1; outline-offset: 2px; }   /* outside the button: the selected one is light, so an inner ring would not show */

/* The sheet is the light theme, as the pack page is in the app, floating on the dark page. */
.sheet { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-2), 0 0 0 1px var(--line), 0 0 70px -10px color-mix(in srgb, var(--brand) 55%, transparent); overflow: hidden; }
.sheet-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.sheet-org { color: var(--ink); font-family: var(--font-display); font-variation-settings: "wdth" 112; }
.sheet-live { color: var(--ink-muted); }
.sheet-body { display: grid; gap: var(--space-4); padding: var(--space-5); align-content: start; }
.sheet-body > * { margin: 0; min-width: 0; }
.sheet.is-snapshot { background: var(--surface); }
.sheet-period { color: var(--ink); }
.sheet-h { color: var(--ink); }
.sheet-note { color: var(--ink-muted); }
.stamp { padding: var(--space-2) var(--space-3); border: 2px dashed var(--ink); }

.tablewrap { background: var(--surface-raised); border: 1px solid var(--line-strong); overflow-x: auto; }
.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th { background: var(--surface-sunken); color: var(--ink-muted); font: 600 13px/18px var(--font-sans); letter-spacing: 0.01em; text-align: left; padding: 0 var(--space-3); height: var(--control-h); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.grid-table td, .grid-table tbody th { height: var(--row-h-compact); padding: 0 var(--space-3); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: 400 14px/20px var(--font-sans); letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.grid-table tbody th { font-weight: 600; }
.grid-table tr:last-child > td, .grid-table tr:last-child > th { border-bottom: 0; }
.grid-table .num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.is-snapshot .grid-table td, .is-snapshot .grid-table tbody th { color: var(--ink-muted); }
.line-btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--row-h-compact); padding: 0; font: inherit; color: var(--brand); background: none; border: 0; cursor: pointer; text-align: left; }
.line-btn:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
.caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); flex: none; }
.line-btn[aria-expanded="true"] .caret { transform: rotate(45deg); }
.detail-row > td { background: var(--surface); white-space: normal; height: auto; padding: var(--space-3); }
.detail { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.detail-text { flex: 1 1 10rem; color: var(--ink-muted); }
.detail-text strong { display: block; color: var(--ink); font-weight: 600; }

.fd-status { display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 var(--space-2) 0 6px; border-radius: var(--radius-sm); font: 600 12px/16px var(--font-sans); letter-spacing: 0.01em; white-space: nowrap; border: 1px solid transparent; }
.fd-status svg { width: 14px; height: 14px; flex: none; }
.fd-status--pending { color: var(--state-pending); background: var(--state-pending-soft); }
.fd-status--approved { color: var(--state-approved); background: var(--state-approved-soft); }

.fd-banner { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border: 1px solid var(--state-pending-mark); border-radius: var(--radius-md); background: var(--state-pending-soft); color: var(--ink); font: 400 14px/20px var(--font-sans); }
.fd-banner svg { width: 20px; height: 20px; color: var(--state-pending); }

.strip { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tile-ico circle { fill: var(--surface-raised); }
.bars { display: block; width: 100%; height: auto; max-width: 28rem; }
.bar-fill { fill: var(--chart-1); }
.bar-fill-open { fill: var(--chart-5); stroke: var(--chart-1); stroke-width: 1.5; stroke-dasharray: 3 2; }
.bar-label { font-family: var(--font-sans); font-size: 12px; fill: var(--ink-muted); }
.bar-value { font-family: var(--font-sans); font-size: 12px; font-weight: 600; fill: var(--ink); }

/* ---------------------------------------------------------------- sections */

.band { padding: var(--space-8) 0; border-top: 1px solid var(--line); }
.band h2 { margin-bottom: var(--space-6); }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.tile { grid-column: span 2; padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.tile:nth-child(n+4) { grid-column: span 3; }
.tile:hover { border-color: var(--line-strong); }
.tile-ico { color: var(--brand); margin-bottom: var(--space-4); }
.tile h3 { margin-bottom: var(--space-2); }
.tile p { color: var(--ink-muted); }

.band-quiet { background: var(--surface-sunken); }
.band-quiet h2 { color: var(--ink-muted); }
.later { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.later li { padding: var(--space-3) var(--space-5); color: var(--ink-muted); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); }

.closing { padding: var(--space-8) var(--space-5); border-top: 1px solid var(--line); background: radial-gradient(ellipse 70% 120% at 50% 100%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); }
.closing-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); text-align: center; }
.closing h2 { max-width: 36rem; }

.site-footer { padding: var(--space-7) 0; border-top: 1px solid var(--line); color: var(--ink-muted); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-6); }
.foot-line { flex: 1 1 18rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 1099px) {
  .hero { min-height: 0; padding-bottom: var(--space-8); }
  .cue { display: none; }
}
@media (max-width: 899px) {
  .tile, .tile:nth-child(n+4) { grid-column: span 3; }
  .tile:last-child { grid-column: span 6; }
}
@media (max-width: 639px) {
  .nav-wide { display: none; }
  .nav { gap: var(--space-4); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile:nth-child(n+4), .tile:last-child { grid-column: auto; }
  .hero { padding: var(--space-6) var(--space-4) var(--space-7); }
  .row { flex-direction: column; }
  button[type="submit"] { width: 100%; }
    .sheet-body { padding: var(--space-4); }
  .sheet-top { padding: var(--space-3) var(--space-4); }
  .wrap, .bar { padding: 0 var(--space-4); }
  .display-l.sheet-org { font-size: 22px; line-height: 28px; }
}
@media (max-width: 479px) {
  .nav-join { display: none; }
}

/* ---------------------------------------------------------------- motion (transform and opacity only; all of it off for reduced motion) */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes rise-stage { from { opacity: 0; transform: translateY(28px) scale(0.98); } }
  @keyframes drift-a { 50% { transform: translate3d(60px, 40px, 0); } }
  @keyframes drift-b { 50% { transform: translate3d(-50px, -30px, 0); } }
  @keyframes bob { 50% { transform: translateY(5px) rotate(45deg); } }
  @keyframes swap { from { opacity: 0; transform: translateY(6px); } }
  @keyframes grow-y { from { transform: scaleY(0); } }
  @keyframes grow-x { from { transform: scaleX(0); } }
  @keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }

  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.22s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.3s; }
  .hero-copy > :nth-child(6) { animation-delay: 0.36s; }
  .demo { animation: rise-stage 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards; }
  .glow-a { animation: drift-a 26s ease-in-out infinite; }
  .glow-b { animation: drift-b 32s ease-in-out infinite; }
  .cue-arrow { animation: bob 2.2s ease-in-out infinite; }
  .sheet-body { animation: swap 0.35s ease backwards; }
  .bar-fill, .bar-fill-open { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-y 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
  .detail-row:not([hidden]) .detail { animation: unfold 0.25s ease backwards; }

  /* Tilted at rest, flat while the visitor uses it. motion.js sets --www-tx and --www-ty from the pointer. */
  @media (min-width: 1100px) {
    .stage { transform: perspective(1600px) rotateY(calc(-5deg + var(--www-tx) * 3deg)) rotateX(calc(2deg + var(--www-ty) * -3deg)); transition: transform 0.5s ease; }
    .stage:hover, .stage:focus-within { transform: perspective(1600px) rotateY(0deg) rotateX(0deg); }
  }

  /* Scroll reveal: motion.js adds .motion to <html> only when it will also reveal; without it everything stays visible. */
  .motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .motion .reveal.is-in { opacity: 1; transform: none; }
  .motion .tiles .reveal:nth-child(2), .motion .later .reveal:nth-child(2) { transition-delay: 0.07s; }
  .motion .tiles .reveal:nth-child(3), .motion .later .reveal:nth-child(3) { transition-delay: 0.14s; }
  .motion .tiles .reveal:nth-child(4) { transition-delay: 0.21s; }
  .motion .tiles .reveal:nth-child(5) { transition-delay: 0.28s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
