/* Kileo AI landing page. One stylesheet, one token set.
   Motion lives in a single prefers-reduced-motion: no-preference block at the end. */

:root {
  color-scheme: dark;

  /* color */
  --bg: #0d0e10;
  --bg-raised: #14161a;
  --solid-surface: #1a1d22;
  --surface: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f3f1ee;
  --text-muted: #b4afa8;
  --accent: #ff6a2b;
  --accent-hover: #ff8250;
  --accent-ink: #1a0b04;
  --accent-soft: rgba(255, 106, 43, 0.16);
  --accent-text: #ffc3a3;
  --glass: rgba(24, 26, 30, 0.58);
  --glass-border: rgba(255, 255, 255, 0.14);
  --header-bg: rgba(13, 14, 16, 0.66);

  /* type */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-h2: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  --fs-display: clamp(2.5rem, 1rem + 4vw, 4rem);
  --track-display: -0.025em;
  --track-heading: -0.02em;
  --track-body: 0;
  --track-label: 0.08em;
  --lh-display: 1.05;
  --lh-heading: 1.1;
  --lh-body: 1.55;
  --lh-ui: 1.4;

  /* spacing rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(4rem, 8vw, 7rem);
  --max: 72rem;
  --header-h: 4.5rem;

  /* shape */
  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 160ms;
  --dur-fast: 200ms;
  --dur-base: 300ms;
  --dur-reveal: 600ms;
  --stagger: 60ms;
}

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

html {
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
main:focus { outline: none; }

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  top: -5rem;
  inset-inline-start: var(--space-4);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-3); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  font-size: var(--fs-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand img { width: 1.75rem; height: 1.75rem; border-radius: 0.4rem; }

.site-nav { display: none; }
.site-nav ul { display: flex; gap: var(--space-1); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: var(--lh-ui);
}
@media (min-width: 52rem) {
  .site-nav { display: block; margin-inline: auto var(--space-4); }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding-inline: var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.btn--sm {
  min-height: 2.75rem;
  padding-inline: var(--space-4);
  font-size: var(--fs-sm);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--accent-hover); }
  .btn--ghost:hover { background: var(--surface); border-color: var(--text-muted); }
  .site-nav a:hover, .footer-links a:hover { color: var(--text); }
}

/* ---------- type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: currentColor;
}

.display {
  font-size: var(--fs-display);
  font-weight: 650;
  line-height: var(--lh-display);
  letter-spacing: var(--track-display);
  font-optical-sizing: auto;
  text-wrap: balance;
}
.display span { display: block; }
.accent { color: var(--accent); }

.lead {
  max-width: 34rem;
  font-size: var(--fs-lg);
  color: var(--text-muted);
  text-wrap: pretty;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(1.5rem, 5vh, 4rem) clamp(3rem, 8vw, 6rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(48rem 32rem at 82% 8%, rgba(255, 106, 43, 0.16), transparent 65%),
    radial-gradient(40rem 30rem at 6% 90%, rgba(90, 130, 200, 0.12), transparent 65%);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 55%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 55%, transparent);
}

.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-8); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.reach {
  margin-top: calc(var(--space-3) * -1);
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: var(--text-muted);
}
.reach .address { font-size: inherit; color: var(--text); }

/* ---------- pipeline visual ---------- */

.pipeline {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}
.pipeline::before {
  content: "";
  position: absolute;
  inset: -5rem;
  z-index: -1;
  background:
    radial-gradient(ellipse 15rem 12rem at 72% 52%, rgba(255, 106, 43, 0.34), transparent 70%),
    radial-gradient(ellipse 12rem 9rem at 24% 18%, rgba(90, 130, 200, 0.28), transparent 70%);
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stage {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
}
.stage--brief { width: min(100%, 26rem); }
.stage--rules { width: min(100%, 28rem); margin-inline-start: auto; }
.stage--outputs {
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  backdrop-filter: blur(32px) saturate(150%);
  box-shadow: 0 36px 64px -28px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  text-transform: uppercase;
  color: var(--text-muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 14, 16, 0.55);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  text-transform: uppercase;
  color: var(--accent-text);
}
.status::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.stage-text {
  margin-top: var(--space-3);
  line-height: var(--lh-ui);
  text-wrap: pretty;
}

.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stage-text + .tags { margin-top: var(--space-3); }
.tags span {
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 14, 16, 0.55);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  text-transform: uppercase;
  color: var(--text-muted);
}

.rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
}
.swatches { display: flex; }
.swatches i {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid #24272d;
  background: var(--c);
}
.swatches i + i { margin-inline-start: -0.4rem; }
.swatches i:nth-child(1) { --c: #0d0e10; border-color: var(--line-strong); }
.swatches i:nth-child(2) { --c: #ff6a2b; }
.swatches i:nth-child(3) { --c: #f3f1ee; }
.swatches i:nth-child(4) { --c: #d9b99b; }
.type-sample {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: rgba(13, 14, 16, 0.55);
  border: 1px solid var(--line);
  font-size: var(--fs-xl);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
}

.link {
  position: relative;
  width: 2px;
  height: 1.75rem;
  margin-inline-start: 2.5rem;
  background: linear-gradient(var(--line-strong), var(--line));
}
.link--end { margin-inline: auto 2.5rem; }
.link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: -0.25rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0.75rem var(--accent);
  opacity: 0;
}

.outputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}
@media (min-width: 30rem) {
  .outputs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .outputs .tile { aspect-ratio: 3 / 4; }
}

/* ---------- tiles (CSS art; a real <img> child replaces the art) ---------- */

.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: var(--solid-surface);
}
.tile > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile::before, .tile::after { content: ""; position: absolute; }
.tile-tag {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 14, 16, 0.78);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  text-transform: uppercase;
  color: #fff;
}

.tile--image {
  background:
    radial-gradient(circle at 68% 34%, #ffe3c7 0 8%, rgba(255, 200, 150, 0.5) 9% 16%, transparent 17%),
    linear-gradient(170deg, #ff8a4d 0%, #c2431b 48%, #2a1410 100%);
}
.tile--image::after {
  inset: auto -10% -2% -10%;
  height: 46%;
  background: #14100e;
  clip-path: polygon(0 62%, 24% 28%, 44% 56%, 70% 18%, 100% 52%, 100% 100%, 0 100%);
}

.tile--product { background: radial-gradient(ellipse at 50% 40%, #3b4049 0%, #16181d 72%); }
.tile--product::before {
  left: 50%;
  top: 32%;
  width: 36%;
  height: 48%;
  translate: -50% 0;
  border-radius: 0.5rem 0.5rem 0.75rem 0.75rem;
  background: linear-gradient(90deg, #d4521e, #ffa070 42%, #b53c14);
  box-shadow: 0 1rem 1rem -0.5rem rgba(0, 0, 0, 0.6);
}
.tile--product::after {
  left: 50%;
  top: 23%;
  width: 15%;
  height: 11%;
  translate: -50% 0;
  border-radius: 0.2rem;
  background: #f3f1ee;
}

.tile--video {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.2) 0 1.1rem, transparent 1.15rem),
    linear-gradient(160deg, #3b5a7a 0%, #1a2433 60%, #0f141c 100%);
}
.tile--video::before {
  left: 50%;
  top: 46%;
  width: 0.9rem;
  height: 1rem;
  translate: -35% -50%;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.tile--video::after {
  inset: auto 10% 12% 10%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) 0 38%, rgba(255, 255, 255, 0.3) 38%);
}

.tile--copy { background: #f3f1ee; }
.tile--copy::before {
  inset: 24% 12% auto;
  height: 58%;
  background:
    linear-gradient(#1a1d22 0 0) 0 0 / 82% 14% no-repeat,
    linear-gradient(#1a1d22 0 0) 0 23% / 56% 14% no-repeat,
    linear-gradient(#8f8a83 0 0) 0 53% / 100% 6% no-repeat,
    linear-gradient(#8f8a83 0 0) 0 66% / 92% 6% no-repeat,
    linear-gradient(#8f8a83 0 0) 0 79% / 100% 6% no-repeat,
    linear-gradient(#8f8a83 0 0) 0 92% / 64% 6% no-repeat;
}
.tile--copy .tile-tag { background: rgba(13, 14, 16, 0.85); }

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

.section { padding-block: var(--section-y); }
.section--last { padding-bottom: clamp(3rem, 6vw, 5rem); }

.section-head { max-width: 40rem; margin-bottom: var(--space-7); padding-bottom: 0.25em; }
.section-head h2, .cta h2 {
  margin-top: var(--space-3);
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: var(--lh-heading);
  letter-spacing: var(--track-heading);
  text-wrap: balance;
}
.section-head p:not(.eyebrow) {
  margin-top: var(--space-4);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  text-wrap: pretty;
}

h3 {
  font-size: var(--fs-xl);
  font-weight: 620;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* what we automate */

.cards { display: grid; gap: var(--space-4); }
@media (min-width: 36rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  padding: var(--space-3) var(--space-3) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.card .tile { aspect-ratio: 16 / 10; margin-bottom: var(--space-5); }
.card h3, .card p { padding-inline: var(--space-3); }
.card p { margin-top: var(--space-2); color: var(--text-muted); text-wrap: pretty; }

/* how a setup works */

.steps { display: grid; gap: var(--space-6) var(--space-5); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.step {
  position: relative;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-strong);
}
.step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.step-num {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  line-height: var(--lh-ui);
  color: var(--accent);
}
.step p { margin-top: var(--space-2); color: var(--text-muted); text-wrap: pretty; }

/* why custom */

.why-grid { display: grid; gap: var(--space-2) var(--space-8); align-items: start; }
@media (min-width: 56rem) { .why-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.why-grid .section-head { margin-bottom: var(--space-5); }

.why-list li {
  display: flex;
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}
.why-list li:last-child { border-bottom: 1px solid var(--line); }
.why-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}
.why-icon .icon { width: 1.5rem; height: 1.5rem; }
.why-list p { margin-top: var(--space-2); color: var(--text-muted); text-wrap: pretty; }

/* faq */

.faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 3.5rem;
  padding-block: var(--space-3);
  font-size: var(--fs-lg);
  font-weight: 560;
  line-height: var(--lh-ui);
  list-style: none;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
  background:
    linear-gradient(currentColor 0 0) center / 100% 2px no-repeat,
    linear-gradient(currentColor 0 0) center / 2px 100% no-repeat;
}
details[open] summary::after { rotate: 45deg; }
details p {
  max-width: 40rem;
  padding-bottom: var(--space-5);
  color: var(--text-muted);
  text-wrap: pretty;
}

/* closing call to action */

.cta {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius-lg) * 1.4);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(255, 106, 43, 0.26), transparent 60%),
    var(--bg-raised);
}
.cta h2 { max-width: 22ch; }
.cta-text {
  max-width: 34rem;
  margin-top: var(--space-4);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  text-wrap: pretty;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
  margin-top: var(--space-6);
}
.address {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: var(--lh-ui);
  overflow-wrap: anywhere;
  user-select: all;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  overflow: clip;
  padding-top: var(--space-6);
}
.footer-grid {
  display: grid;
  gap: var(--space-3) var(--space-5);
}
@media (min-width: 62rem) {
  .footer-grid { grid-template-columns: auto 1fr auto; align-items: center; }
  .footer-links { justify-content: center; }
}
.footer-links { display: flex; flex-wrap: wrap; column-gap: var(--space-1); }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
}
.fine { color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-ui); }

.wordmark {
  margin-top: var(--space-6);
  margin-bottom: -0.12em;
  font-size: clamp(5rem, 26vw, 24rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

/* ---------- 404 ---------- */

.notfound { min-height: calc(100svh - var(--header-h)); display: grid; align-items: center; }
.notfound .hero-copy { max-width: 40rem; }

/* ---------- preference overrides ---------- */

@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--solid-surface); --header-bg: var(--bg); }
  .glass, .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #d6d2cc;
    --line: rgba(255, 255, 255, 0.45);
    --line-strong: rgba(255, 255, 255, 0.75);
    --glass: var(--solid-surface);
    --glass-border: rgba(255, 255, 255, 0.75);
    --header-bg: var(--bg);
  }
  .glass, .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

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

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; interpolate-size: allow-keywords; }

  /* press and hover feedback */
  .btn {
    transition:
      transform var(--dur-press) var(--ease-out),
      background-color 150ms ease,
      border-color 150ms ease;
  }
  .btn:active { transform: scale(0.97); }
  .site-nav a, .footer-links a { transition: color 150ms ease; }
  .arrow { transition: transform var(--dur-fast) var(--ease-out); }
  @media (hover: hover) and (pointer: fine) {
    .btn:hover .arrow { transform: translateX(3px); }
  }

  /* faq: icon turn and panel height */
  summary::after { transition: rotate var(--dur-fast) var(--ease-out); }
  details::details-content {
    block-size: 0;
    opacity: 0;
    overflow: clip;
    transition:
      block-size var(--dur-fast) var(--ease-out),
      opacity var(--dur-fast) var(--ease-out),
      content-visibility var(--dur-fast) allow-discrete;
  }
  details[open]::details-content { block-size: auto; opacity: 1; }

  /* pipeline flow: a dot travels down each connector while the hero is on screen */
  @keyframes flow {
    0%   { transform: translateY(-0.25rem); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(1.75rem); opacity: 0; }
  }
  .link::after { animation: flow 2.4s linear 1.2s infinite paused; }
  .link--end::after { animation-delay: 2.4s; }
  .pipeline.is-flowing .link::after { animation-play-state: running; }

  /* entrances: hidden only under .js, which main.js sets */
  .js .reveal {
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--dur-reveal) var(--ease-in-out);
  }
  .js .reveal.is-visible { clip-path: inset(0); }

  .js .stagger > * {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger)),
      transform var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger));
  }
  .js .stagger.is-visible > * { opacity: 1; transform: none; }
  .stagger > :nth-child(2) { --i: 1; }
  .stagger > :nth-child(3) { --i: 2; }
  .stagger > :nth-child(4) { --i: 3; }
  .stagger > :nth-child(5) { --i: 4; }
  .stagger > :nth-child(6) { --i: 5; }

  /* glass cards enter with blur and scale together */
  .js .pipeline.stagger > .stage {
    transform: translateY(8px) scale(0.97);
    filter: blur(6px);
    transition:
      opacity var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger)),
      transform var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger)),
      filter var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger));
  }
  .js .pipeline.stagger.is-visible > .stage { opacity: 1; transform: none; filter: none; }

  /* output tiles fill in last */
  .js .pipeline .tile {
    opacity: 0;
    transform: scale(0.96);
    transition:
      opacity var(--dur-base) var(--ease-out) calc(300ms + var(--t, 0) * 50ms),
      transform var(--dur-base) var(--ease-out) calc(300ms + var(--t, 0) * 50ms);
  }
  .js .pipeline.is-visible .tile { opacity: 1; transform: none; }
  .outputs > :nth-child(2) { --t: 1; }
  .outputs > :nth-child(3) { --t: 2; }
  .outputs > :nth-child(4) { --t: 3; }
}
