/* ==========================================================================
   FrictionSort — frictionsort.com
   Design system + page styles
   Vanilla CSS. No frameworks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — Intelligent Indigo */
  --indigo-50:  #F3F1FE;
  --indigo-100: #E7E3FD;
  --indigo-200: #CFC8FB;
  --indigo-300: #AFA4F6;
  --indigo-400: #8B7DF0;
  --indigo-500: #6D5DE8;
  --indigo-600: #5B4BDB; /* primary */
  --indigo-700: #4A3BC4;
  --indigo-800: #3C309E;
  --indigo-900: #2C2374;

  /* Ink — dark bands */
  --ink-950: #0B0A14;
  --ink-900: #0F0D1F;
  --ink-800: #17142C;
  --ink-700: #221E3C;

  /* Light neutrals */
  --paper:   #FFFFFF;
  --paper-2: #F8F8FC;
  --paper-3: #F2F1F9;
  --line:    #E7E6F0;
  --line-2:  #DCDAE9;
  --text:    #14121F;
  --text-2:  #4B4860;
  --text-3:  #6F6C85;

  /* On-dark */
  --d-text:    #FFFFFF;
  --d-text-2:  #B9B5CE;
  --d-text-3:  #8A85A3;
  --d-line:    rgba(255,255,255,.10);
  --d-line-2:  rgba(255,255,255,.18);
  --d-surface: rgba(255,255,255,.035);

  /* Signal colours (used sparingly, for the sort demo) */
  --warn: #E5A13A;
  --good: #34C08A;

  /* Type */
  --font-display: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1200px;
  --container-narrow: 820px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(72px, 10vw, 132px);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Elevation — restrained */
  --shadow-sm: 0 1px 2px rgba(20,18,31,.05), 0 1px 1px rgba(20,18,31,.04);
  --shadow-md: 0 4px 16px -4px rgba(20,18,31,.10), 0 2px 6px -2px rgba(20,18,31,.06);
  --shadow-lg: 0 24px 60px -18px rgba(28,22,80,.20), 0 8px 24px -12px rgba(28,22,80,.12);
  --shadow-indigo: 0 12px 28px -10px rgba(91,75,219,.44);

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast: .18s;
  --t: .32s;
  --t-slow: .6s;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* Painted before any content, so page-to-page navigation never flashes */
  background-color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Page transitions

   script.js swaps <main> in place rather than loading a new document, so
   the header, footer, stylesheet and fonts stay mounted. These three classes
   are the whole animation: a short lift-and-fade out, then a settle in.
   Durations are mirrored by EXIT_MS / ENTER_MS in script.js.
   -------------------------------------------------------------------------- */
main.pt-exit {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}

main.pt-enter {
  opacity: 0;
  transform: translateY(14px);
}

main.pt-enter.pt-enter-active {
  opacity: 1;
  transform: none;
  transition: opacity .34s var(--ease-out), transform .34s var(--ease-out);
}

/* The incoming page is mid-animation; don't let a stray scrollbar
   appear and shift the layout under it. */
main.pt-exit,
main.pt-enter { will-change: opacity, transform; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--indigo-600); text-decoration: none; }
a:hover { color: var(--indigo-700); }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--indigo-200); color: var(--ink-900); }

/* Visible focus for keyboard users everywhere */
:focus-visible {
  outline: 3px solid var(--indigo-600);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.footer :focus-visible {
  outline-color: var(--indigo-300);
}

/* After a client-side navigation the router focuses the new page's heading so
   screen readers announce it. That heading isn't interactive, so it shouldn't
   wear a focus ring — real interactive elements keep theirs. */
main > * h1[tabindex="-1"]:focus,
main h1[tabindex="-1"]:focus-visible,
main[tabindex="-1"]:focus,
main[tabindex="-1"]:focus-visible {
  outline: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--indigo-600);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 16px; color: #fff; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: var(--paper-2); }

/* Dark bands */
.on-dark {
  background: var(--ink-900);
  color: var(--d-text-2);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--d-text); }

/* Premium grain — subtle, never over 4% opacity */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Soft indigo aura used behind dark sections */
.aura {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}

/* --------------------------------------------------------------------------
   4. Typography helpers
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo-700);
  margin: 0 0 20px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.on-dark .eyebrow { color: var(--indigo-300); }

.h-display {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  letter-spacing: -.038em;
  line-height: 1.04;
}
.h-section {
  font-size: clamp(1.95rem, 4.3vw, 3.05rem);
  letter-spacing: -.032em;
  line-height: 1.1;
}
.h-card {
  font-size: 1.16rem;
  letter-spacing: -.018em;
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.68;
  color: var(--text-2);
  max-width: 62ch;
}
.on-dark .lede { color: var(--d-text-2); }

.accent { color: var(--indigo-600); }
.on-dark .accent { color: var(--indigo-300); }

.section-head { max-width: 46rem; margin-bottom: clamp(44px, 6vw, 68px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head--center .lede { margin-inline: auto; }
.section-head .lede { margin-top: 22px; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--indigo-600);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.008em;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: transform var(--t) var(--ease),
              box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease),
              border-color var(--t) var(--ease),
              color var(--t) var(--ease);
  box-shadow: var(--shadow-indigo);
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  background: var(--indigo-700);
  box-shadow: 0 18px 34px -12px rgba(91,75,219,.54);
}
.btn:active { transform: translateY(0); }

/* Sliding sheen */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.22) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }

.btn .arw { transition: transform var(--t) var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-fg: var(--indigo-700);
  background: var(--indigo-50);
  border-color: var(--indigo-200);
  box-shadow: none;
}

.btn--on-dark {
  --btn-bg: #fff;
  --btn-fg: var(--ink-900);
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.6);
}
.btn--on-dark:hover { --btn-fg: var(--ink-900); background: #fff; opacity: .92; }

.btn--ghost-dark {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: var(--d-line-2);
  box-shadow: none;
}
.btn--ghost-dark:hover {
  --btn-fg: #fff;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.34);
  box-shadow: none;
}

.btn--sm { padding: 11px 20px; font-size: .94rem; }
.btn--block { width: 100%; }

/* Quiet text link with an animated underline */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--indigo-600);
  position: relative;
}
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; right: 22px; bottom: -3px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow .arw { transition: transform var(--t) var(--ease); }
.link-arrow:hover .arw { transform: translateX(4px); }
.on-dark .link-arrow { color: var(--indigo-300); }

/* --------------------------------------------------------------------------
   6. Brand lockup
   -------------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }

/* Light backgrounds: the wordmark, keyed to real transparency so it sits
   cleanly on white, grey, tinted or gradient surfaces alike.
   aspect-ratio reserves the exact box before the image decodes, so the
   header never reflows on load or between pages. */
.brand__wordmark {
  height: 33px;
  width: 102px;
  aspect-ratio: 620 / 200;
}

/* Dark backgrounds: the transparent icon + type lockup,
   set in Outfit to match the wordmark's letterforms. */
.brand__icon { width: 30px; height: 30px; aspect-ratio: 1; }
.brand__type {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: -.028em;
  color: #fff;
  line-height: 1;
}
.brand__type span { color: var(--indigo-400); }

/* --------------------------------------------------------------------------
   7. Header / navigation
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease),
              background-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,.88);
  box-shadow: 0 1px 0 rgba(20,18,31,.02), 0 8px 24px -18px rgba(20,18,31,.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav__link {
  position: relative;
  padding: 9px 16px;
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--paper-3); }
.nav__link[aria-current="page"] { color: var(--indigo-700); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--indigo-600);
}

.header__actions { display: flex; align-items: center; gap: 12px; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.nav-toggle:hover { background: var(--paper-3); border-color: var(--line-2); }

.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .header__nav {
    position: fixed;
    inset: 74px 0 auto 0;
    display: block;
    padding: 18px var(--gutter) 30px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 44px -24px rgba(20,18,31,.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t) var(--ease),
                transform var(--t) var(--ease),
                visibility var(--t) var(--ease);
  }
  .header__nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

  .nav { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 14px 12px; font-size: 1.08rem; border-radius: var(--r-md); }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__link[aria-current="page"] { background: var(--indigo-50); }

  .header__nav .btn { margin-top: 14px; width: 100%; }
  .header__actions .btn--header { display: none; }
}

@media (min-width: 861px) {
  .header__nav { display: flex !important; align-items: center; }
  /* The CTA inside the drawer is for small screens only —
     on desktop the one in .header__actions is shown instead. */
  .btn--nav-cta { display: none; }
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 116px);
  background: linear-gradient(180deg, #FCFCFE 0%, var(--paper) 62%);
  overflow: hidden;
}

/* Faint technical grid, faded at the edges */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(91,75,219,.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91,75,219,.075) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 72%);
  mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 72%);
}
.hero__glow {
  position: absolute;
  z-index: -1;
  width: 760px; height: 620px;
  top: -320px; left: 50%;
  transform: translateX(-46%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(109,93,232,.30) 0%, rgba(139,125,240,.12) 42%, transparent 68%);
  filter: blur(18px);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(40px, 6vw, 76px);
  align-items: center;
}

.hero__title { margin-top: 4px; }
.hero__title .accent {
  position: relative;
  white-space: nowrap;
}
/* Hand-drawn style underline on the key word */
.hero__title .accent::after {
  content: "";
  position: absolute;
  left: 2%; right: 2%;
  bottom: .04em;
  height: .1em;
  background: var(--indigo-200);
  border-radius: 4px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in .9s var(--ease-out) .55s forwards;
}
@keyframes underline-in { to { transform: scaleX(1); } }

.hero__lede { margin-top: 26px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 36px;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  padding: 8px 16px 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.pulse {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--good);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* --------------------------------------------------------------------------
   9. The Sort — signature hero interaction
   -------------------------------------------------------------------------- */
.sorter {
  /* Row geometry lives here so CSS and script.js agree on one source of truth */
  --srow-h: 54px;
  --srow-gap: 12px;
  --srow-count: 6;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Indigo edge-light along the top of the panel */
.sorter::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--indigo-400), transparent);
}

.sorter__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.sorter__dots { display: flex; gap: 6px; flex: none; }
.sorter__dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-2);
}
.sorter__path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sorter__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  background: var(--indigo-600);
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.sorter__btn:hover { background: var(--indigo-700); transform: translateY(-1px); }
.sorter__btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.sorter__btn svg { transition: transform var(--t-slow) var(--ease-out); }
.sorter[data-state="sorted"] .sorter__btn svg { transform: rotate(180deg); }

/* Stage */
.sorter__stage {
  position: relative;
  padding: 16px;
  height: calc(
    var(--srow-count) * var(--srow-h)
    + (var(--srow-count) - 1) * var(--srow-gap)
    + 32px
  );
}

/* Sweep line that passes through during the sort */
.sorter__scan {
  position: absolute;
  left: 0; right: 0;
  height: 130px;
  top: -140px;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(109,93,232,.16) 45%, rgba(139,125,240,.30) 50%, rgba(109,93,232,.16) 55%, transparent);
}
.sorter.is-sorting .sorter__scan { animation: scan 1.05s var(--ease) forwards; }
@keyframes scan {
  0%   { opacity: 0;  transform: translateY(0); }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 0;  transform: translateY(560px); }
}

/* Rows */
.srow {
  position: absolute;
  left: 16px; right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--srow-h);
  padding: 0 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  will-change: transform;
  transition: transform .72s var(--ease-out),
              border-color .5s var(--ease),
              background-color .5s var(--ease),
              box-shadow .5s var(--ease);
}

.srow__dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn);
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease);
}

.srow__text { min-width: 0; flex: 1; }

.srow__label {
  display: block;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srow__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  max-height: 0;
  transition: opacity .45s var(--ease) .12s, max-height .45s var(--ease);
}

.srow__tag {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  color: #8A6320;
  background: #FDF4E4;
  transition: color .5s var(--ease), background-color .5s var(--ease);
}

/* Sorted state */
.sorter[data-state="sorted"] .srow {
  border-style: solid;
  border-color: var(--indigo-100);
  background: #FDFDFF;
  box-shadow: inset 3px 0 0 var(--indigo-500), var(--shadow-sm);
}
.sorter[data-state="sorted"] .srow__dot {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(52,192,138,.16);
}
.sorter[data-state="sorted"] .srow__sub { opacity: 1; max-height: 20px; }
.sorter[data-state="sorted"] .srow__tag { color: var(--indigo-800); background: var(--indigo-50); }

.sorter__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--text-3);
}
.sorter__foot strong { color: var(--indigo-700); font-weight: 500; }

/* --------------------------------------------------------------------------
   10. Problem section — dark band with cursor spotlight
   -------------------------------------------------------------------------- */
.problem { background: var(--ink-900); }
.problem .aura--a { width: 620px; height: 520px; top: -180px; left: -140px; background: radial-gradient(circle, rgba(91,75,219,.50), transparent 66%); }
.problem .aura--b { width: 520px; height: 460px; bottom: -220px; right: -120px; background: radial-gradient(circle, rgba(60,48,158,.46), transparent 68%); }

.friction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1px;
  background: var(--d-line);
  border: 1px solid var(--d-line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.fcard {
  position: relative;
  padding: 34px 30px 36px;
  background: var(--ink-900);
  transition: background-color var(--t) var(--ease);
  overflow: hidden;
}
/* Spotlight follows the pointer (coords set in JS) */
.fcard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(139,125,240,.14), transparent 68%);
  transition: opacity var(--t) var(--ease);
}
.fcard:hover::before, .fcard:focus-within::before { opacity: 1; }
.fcard:hover { background: var(--ink-800); }

.fcard__n {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--indigo-300);
  opacity: .78;
}
.fcard__title {
  margin: 16px 0 12px;
  font-size: 1.14rem;
  letter-spacing: -.018em;
  line-height: 1.3;
  color: var(--d-text);
}
.fcard__body {
  font-size: .96rem;
  line-height: 1.64;
  color: var(--d-text-2);
}

.problem__note {
  margin-top: 44px;
  padding: 22px 26px;
  border: 1px solid var(--d-line);
  border-left: 2px solid var(--indigo-500);
  border-radius: var(--r-md);
  background: var(--d-surface);
  font-size: 1rem;
  line-height: 1.66;
  color: var(--d-text-2);
  max-width: 62rem;
}
.problem__note strong { color: var(--d-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   11. Mission
   -------------------------------------------------------------------------- */
.mission__layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.mission__sticky { position: sticky; top: 108px; }

.mlist { display: grid; gap: 2px; }

.mitem {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 24px 22px;
  border-radius: var(--r-md);
  transition: background-color var(--t) var(--ease);
}
.mitem:hover { background: var(--paper-2); }

.mitem__mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin-top: 2px;
  border-radius: 50%;
  color: var(--indigo-600);
  background: var(--indigo-50);
  border: 1px solid var(--indigo-100);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.mitem:hover .mitem__mark { color: #fff; background: var(--indigo-600); border-color: var(--indigo-600); }
.mitem__mark svg { width: 16px; height: 16px; }

.mitem__title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -.018em;
  color: var(--text);
  margin-bottom: 6px;
}
.mitem__body { font-size: .97rem; line-height: 1.62; }

/* --------------------------------------------------------------------------
   12. Process
   -------------------------------------------------------------------------- */
.process { background: var(--paper-2); }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(24px, 4vw, 44px);
}
/* Connecting rail + progress fill */
.steps__rail {
  position: absolute;
  top: 27px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.steps__rail i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--indigo-500), var(--indigo-600));
  transition: transform 1.2s var(--ease-out);
}
.steps.is-active .steps__rail i { transform: scaleX(1); }

.step { position: relative; text-align: center; }

.step__num {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: .94rem;
  font-weight: 500;
  color: var(--indigo-700);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: color .5s var(--ease), background-color .5s var(--ease),
              border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.steps.is-active .step__num {
  color: #fff;
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  box-shadow: 0 10px 24px -10px rgba(91,75,219,.6);
}
.steps.is-active .step:nth-child(3) .step__num { transition-delay: .18s; }
.steps.is-active .step:nth-child(4) .step__num { transition-delay: .36s; }

.step__title { font-size: 1.32rem; letter-spacing: -.024em; margin-bottom: 12px; }
.step__body { font-size: .99rem; line-height: 1.64; max-width: 32ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   13. What's next
   -------------------------------------------------------------------------- */
.next__layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,.92fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.path { display: grid; gap: 14px; }

.pitem {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.pitem:hover { border-color: var(--indigo-200); box-shadow: var(--shadow-md); }

.pitem--now { border-color: var(--indigo-300); box-shadow: var(--shadow-md); }
.pitem--now::after {
  content: "Now";
  position: absolute;
  top: -10px; right: 20px;
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--indigo-600);
  border-radius: var(--r-pill);
}

.pitem__mark {
  flex: none;
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--paper-3);
  border: 1px solid var(--line);
}
.pitem--now .pitem__mark { color: var(--indigo-700); background: var(--indigo-50); border-color: var(--indigo-200); }

.pitem__title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -.016em;
  color: var(--text);
  margin-bottom: 4px;
}
.pitem__body { font-size: .95rem; line-height: 1.6; }

/* --------------------------------------------------------------------------
   14. Final CTA
   -------------------------------------------------------------------------- */
.cta-final { background: var(--ink-900); text-align: center; }
.cta-final .aura--c {
  width: 780px; height: 520px;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(91,75,219,.42), transparent 66%);
}
.cta-final__inner { max-width: 44rem; margin-inline: auto; }
.cta-final__title { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.034em; }
.cta-final__lede { margin: 22px auto 0; color: var(--d-text-2); }
.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  margin-top: 38px;
}
.cta-final__meta {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--d-text-3);
}
.cta-final__meta a { color: var(--indigo-300); text-decoration: underline; text-underline-offset: 3px; }
.cta-final__meta a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink-950);
  color: var(--d-text-3);
  padding-block: clamp(56px, 7vw, 82px) 32px;
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .8fr));
  gap: clamp(34px, 5vw, 64px);
  padding-bottom: 44px;
  border-bottom: 1px solid var(--d-line);
}
.footer__mission {
  margin-top: 18px;
  max-width: 34ch;
  font-size: .97rem;
  line-height: 1.66;
  color: var(--d-text-2);
}

.footer__h {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--d-text-3);
  margin: 0 0 18px;
}
.footer__list { display: grid; gap: 11px; }
.footer__list a {
  font-size: .97rem;
  color: var(--d-text-2);
  transition: color var(--t) var(--ease);
}
.footer__list a:hover { color: #fff; }

.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  color: var(--d-text-2);
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: var(--r-md);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.socials a:hover {
  color: #fff;
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  transform: translateY(-2px);
}
.socials svg { width: 17px; height: 17px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 26px;
  font-size: .88rem;
}
.footer__bottom p { color: var(--d-text-3); }
.footer__bottom a { color: var(--d-text-2); }
.footer__bottom a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   16. Contact page
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(52px, 7vw, 84px) clamp(30px, 4vw, 46px);
  background: linear-gradient(180deg, #FBFBFE, var(--paper));
  overflow: hidden;
}
.page-hero__glow {
  position: absolute;
  z-index: -1;
  width: 640px; height: 460px;
  top: -280px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(109,93,232,.24), transparent 66%);
}

.crumb {
  /* flex, not inline-flex — it must claim its own line above the eyebrow */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--text-3);
  margin-bottom: 22px;
}
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--indigo-700); }
.crumb span[aria-current] { color: var(--indigo-700); }

.reasons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
  margin-top: clamp(38px, 5vw, 54px);
}
.reason {
  padding: 24px 24px 26px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.reason:hover { border-color: var(--indigo-200); background: var(--paper); }
.reason__k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--indigo-700);
}
.reason__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.018em;
  color: var(--text);
  margin: 12px 0 8px;
}
.reason__body { font-size: .94rem; line-height: 1.6; }

/* Contact layout */
.contact__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(34px, 5vw, 64px);
  align-items: start;
}

.form-panel {
  padding: clamp(28px, 4vw, 42px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   17. Form
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }

.field { display: grid; gap: 8px; }

.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}
.field__opt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  transition: border-color var(--t) var(--ease),
              background-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.field textarea { resize: vertical; min-height: 148px; }

.field input::placeholder,
.field textarea::placeholder { color: #9B98AD; }

.field input:hover,
.field textarea:hover { border-color: #C9C6DC; }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 4px rgba(91,75,219,.14);
}
/* Keep a strong outline for keyboard users specifically */
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--indigo-600);
  outline-offset: 2px;
}

.field.has-error input,
.field.has-error textarea {
  border-color: #D2405B;
  background: #FEF6F7;
}
.field.has-error input:focus,
.field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(210,64,91,.14); }

.field__error {
  display: none;
  align-items: center;
  gap: 7px;
  font-size: .86rem;
  font-weight: 500;
  color: #C0324C;
}
.field.has-error .field__error { display: flex; }
.field__error svg { width: 14px; height: 14px; flex: none; }

/* Honeypot — hidden from humans, visible to bots */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__foot { display: grid; gap: 16px; }
.form__note {
  font-size: .87rem;
  line-height: 1.6;
  color: var(--text-3);
}

/* Submit button loading state */
.btn.is-loading { pointer-events: none; opacity: .82; }
.btn__spinner { display: none; width: 16px; height: 16px; }
.btn.is-loading .btn__spinner { display: block; animation: spin .8s linear infinite; }
.btn.is-loading .btn__label { opacity: .85; }
.btn.is-loading .arw { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Form status messages */
.form-status {
  display: none;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  font-size: .97rem;
  line-height: 1.6;
}
.form-status.is-visible { display: flex; }
.form-status__icon { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.form-status__title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -.016em;
  margin-bottom: 5px;
}

.form-status--success {
  color: #1C6B4D;
  background: #EDFAF4;
  border: 1px solid #BCE8D6;
}
.form-status--success .form-status__title { color: #12543A; }
.form-status--success .form-status__icon { color: #1F9968; }

.form-status--error {
  color: #8A2B40;
  background: #FEF5F7;
  border: 1px solid #F2C9D2;
}
.form-status--error .form-status__title { color: #7A2337; }
.form-status--error .form-status__icon { color: #C0324C; }
.form-status--error a { color: #8A2B40; text-decoration: underline; text-underline-offset: 3px; }

/* Success panel replaces the form */
.form-panel.is-sent .form { display: none; }

/* Aside cards */
.aside { display: grid; gap: 18px; position: sticky; top: 108px; }

.acard {
  padding: 26px 26px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.acard--dark {
  background: var(--ink-900);
  border-color: transparent;
  color: var(--d-text-2);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.acard--dark .acard__h { color: #fff; }
.acard--dark .aura--d {
  width: 340px; height: 300px;
  top: -140px; right: -100px;
  background: radial-gradient(circle, rgba(91,75,219,.55), transparent 68%);
}

.acard__h {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -.018em;
  color: var(--text);
  margin-bottom: 12px;
}
.acard__body { font-size: .95rem; line-height: 1.64; }

.acard__email {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: .87rem;
  color: var(--indigo-700);
  background: var(--indigo-50);
  border: 1px solid var(--indigo-100);
  border-radius: var(--r-pill);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
  word-break: break-all;
}
.acard__email:hover { background: var(--indigo-100); border-color: var(--indigo-200); }
.acard__email svg { width: 15px; height: 15px; flex: none; }

.checklist { display: grid; gap: 12px; margin-top: 4px; }
.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  font-size: .94rem;
  line-height: 1.55;
}
.checklist svg { width: 17px; height: 17px; margin-top: 2px; color: var(--indigo-400); flex: none; }

/* --------------------------------------------------------------------------
   18. Scroll reveal
   -------------------------------------------------------------------------- */
/* Only hide revealable content when JavaScript is actually running.
   The .js class is set by an inline script in <head>, so without JS
   (or if script.js fails to load) every section stays fully visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* Returning to a page within the same session: show the finished state
   immediately. Replaying the intro on every visit reads as a flicker. */
.no-intro .hero-anim {
  opacity: 1;
  transform: none;
  animation: none;
}
.no-intro .hero__title .accent::after {
  transform: scaleX(1);
  animation: none;
}

/* First paint animation for the hero (no observer needed) */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-in .85s var(--ease-out) forwards;
}
.hero-anim--1 { animation-delay: .05s; }
.hero-anim--2 { animation-delay: .14s; }
.hero-anim--3 { animation-delay: .23s; }
.hero-anim--4 { animation-delay: .32s; }
.hero-anim--5 { animation-delay: .41s; }
.hero-anim--6 { animation-delay: .30s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__col--text { max-width: 44rem; }
  .mission__layout { grid-template-columns: 1fr; }
  .mission__sticky { position: static; }
  .next__layout { grid-template-columns: 1fr; }
  .contact__layout { grid-template-columns: 1fr; }
  .aside { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .friction-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .reasons { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; gap: 34px; text-align: left; }
  .steps__rail { display: none; }
  .step { display: grid; grid-template-columns: auto 1fr; gap: 20px; text-align: left; }
  .step__num { margin-bottom: 0; width: 48px; height: 48px; }
  .step__body { margin-inline: 0; max-width: none; }
  .aside { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .friction-grid { grid-template-columns: 1fr; }

  .form__row { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 34px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero__actions .btn { width: 100%; }
  .cta-final__actions .btn { width: 100%; }
  .mitem { padding: 20px 0; gap: 16px; }
  .mitem:hover { background: transparent; }
}

@media (max-width: 420px) {
  :root { --section-y: 62px; }
  .sorter { --srow-h: 50px; --srow-gap: 10px; }
  .sorter__stage { padding: 12px; }
  .srow { left: 12px; right: 12px; padding: 0 11px; gap: 9px; }
  .srow__label { font-size: .88rem; }
  .srow__tag { display: none; }
  /* The path label is dropped on the narrowest screens —
     keep the button pinned right so the bar doesn't collapse left. */
  .sorter__path { display: none; }
  .sorter__btn { margin-left: auto; }
  /* The button label already explains the interaction at this size */
  #sorter-help { display: none; }
  .sorter__foot { justify-content: flex-end; }
  .form-panel { padding: 22px 18px; }

  .fcard { padding: 26px 22px 28px; }
}

/* --------------------------------------------------------------------------
   20. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal, .hero-anim { opacity: 1 !important; transform: none !important; }
  main.pt-exit, main.pt-enter { opacity: 1 !important; transform: none !important; }

  .hero__title .accent::after { transform: scaleX(1); }
  .steps__rail i { transform: scaleX(1); }
  .btn:hover, .card:hover, .socials a:hover, .pitem:hover { transform: none; }
  .sorter__scan { display: none; }
  .pulse::after { display: none; }
}

/* --------------------------------------------------------------------------
   21. Print
   -------------------------------------------------------------------------- */
@media print {
  .header, .footer, .sorter, .nav-toggle, .skip-link { display: none !important; }
  .on-dark, .problem, .cta-final { background: #fff !important; color: #000 !important; }
  .on-dark h1, .on-dark h2, .on-dark h3 { color: #000 !important; }
  body { font-size: 12pt; }
}
