/* ==========================================================================
   Return to Service AI — returntoservice.ai
   Core stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Hangar (dark end of the narrative) */
  --ink-900: #04060a;
  --ink-800: #080c13;
  --ink-700: #0e141d;
  --ink-600: #161e2a;
  --ink-500: #222d3d;

  /* Ramp (light end of the narrative) */
  --ramp-050: #ffffff;
  --ramp-100: #f6f8fa;
  --ramp-200: #eceff3;
  --ramp-300: #dde2e9;
  --ramp-400: #b9c2ce;

  /* Signal */
  --signal: #ff9f1c;
  --signal-soft: #ffbe5c;
  --signal-dim: rgba(255, 159, 28, 0.14);
  --beacon: #ff4d4d;

  /* Text */
  --text-on-dark: #f2f5f8;
  --text-on-dark-mute: #93a1b3;
  --text-on-light: #0e141d;
  --text-on-light-mute: #566072;

  /* Structure */
  --hairline-dark: rgba(255, 255, 255, 0.09);
  --hairline-light: rgba(14, 20, 29, 0.1);

  --max: 1180px;
  --gut: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-on-light);
  background: var(--ink-900);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

p {
  margin: 0;
  text-wrap: pretty;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--signal);
  color: var(--ink-900);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

.u-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* --------------------------------------------------------------------------
   3. Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--gut);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
    backdrop-filter 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--hairline-light);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-on-dark);
  transition: color 0.4s var(--ease-out);
}
.nav.is-stuck .nav__brand {
  color: var(--text-on-light);
}

.nav__mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.nav__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav__name span {
  opacity: 0.55;
  font-weight: 400;
}

.nav__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--signal);
  --btn-fg: var(--ink-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background 0.25s var(--ease-out), color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out), opacity 0.2s linear;
  will-change: transform;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(255, 159, 28, 0.55);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-on-dark);
  border-color: var(--hairline-dark);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover:not(:disabled) {
  --btn-bg: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
.nav.is-stuck .btn--ghost {
  --btn-fg: var(--text-on-light);
  border-color: var(--hairline-light);
}
.nav.is-stuck .btn--ghost:hover:not(:disabled) {
  --btn-bg: rgba(14, 20, 29, 0.05);
  border-color: rgba(14, 20, 29, 0.25);
}

.btn--sm {
  padding: 0.6rem 1.05rem;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 1.05rem 2rem;
  font-size: 1.02rem;
}

.btn--block {
  width: 100%;
}

.btn__arrow {
  transition: transform 0.25s var(--ease-out);
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. The scene — first-person hangar exit
   -------------------------------------------------------------------------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  /* JS drives these */
  --p: 0;
  --light: 0;
}

.scene__layer {
  position: absolute;
  inset: 0;
  transform-origin: 50% 46%;
}

/* 5a. Sky / ambient wash ------------------------------------------------- */
.scene__night {
  background: radial-gradient(
      120% 90% at 50% 46%,
      #0b1420 0%,
      #06090f 55%,
      #020407 100%
    );
}

.scene__day {
  background: linear-gradient(
    178deg,
    #b6d4ee 0%,
    #d9e7f3 38%,
    #eef2f5 62%,
    #e4e2dc 84%,
    #cfcabf 100%
  );
  opacity: var(--light);
}

/* 5b. Sun bloom through the door aperture -------------------------------- */
.scene__bloom {
  background: radial-gradient(
    closest-side at 50% 44%,
    rgba(255, 246, 224, 0.98) 0%,
    rgba(255, 226, 170, 0.62) 34%,
    rgba(255, 200, 120, 0.22) 62%,
    rgba(255, 190, 110, 0) 100%
  );
  opacity: calc(var(--light) * 0.9);
  mix-blend-mode: screen;
}

/* 5c. Hangar interior — the frame that passes you ------------------------ */
.scene__hangar {
  will-change: transform, opacity;
}

.scene__hangar svg {
  width: 100%;
  height: 100%;
}

/* 5d. Ramp / runway beyond the door -------------------------------------- */
.scene__ramp {
  opacity: var(--light);
  will-change: transform, opacity;
}

/* Centreline stripes streaming toward the camera. The loop distance is tuned
   to mid-field spacing; the horizon haze covers the reset in the far field,
   and the aircraft covers it in the near field. */
@keyframes stream {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(84px);
  }
}

/* 5e. The aircraft ------------------------------------------------------- */
.scene__aircraft {
  display: grid;
  place-items: center;
}

/* Transforms live on the inner wrapper so pitch and bank rotate about the
   aircraft itself rather than about the centre of the viewport. */
.scene__ac-inner {
  transform-origin: 50% 50%;
  will-change: transform;
}

.scene__aircraft svg {
  width: min(62vw, 620px);
  height: auto;
  overflow: visible;
}

.ac-body {
  fill: #05080d;
  transition: fill 0.1s linear;
}

.ac-shade {
  fill: rgba(255, 255, 255, 0.05);
}

.ac-rim {
  stroke: var(--signal-soft);
  stroke-width: 1.6;
  fill: none;
  opacity: calc(0.25 + var(--light) * 0.6);
}

.ac-prop {
  fill: rgba(190, 215, 240, 0.11);
}

.ac-beacon {
  fill: var(--beacon);
  animation: beacon 1.7s steps(1, end) infinite;
}

@keyframes beacon {
  0%,
  8% {
    opacity: 1;
  }
  9%,
  100% {
    opacity: 0.12;
  }
}

/* 5f. Dust in the light shaft -------------------------------------------- */
.scene__motes {
  opacity: calc(var(--light) * 0.8);
}
.mote {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 240, 210, 0.85);
  filter: blur(0.4px);
  animation: drift linear infinite;
}
@keyframes drift {
  from {
    transform: translate3d(0, 12vh, 0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  to {
    transform: translate3d(6vw, -22vh, 0);
    opacity: 0;
  }
}

/* 5g. Vignette ----------------------------------------------------------- */
.scene__vignette {
  background: radial-gradient(
    115% 85% at 50% 46%,
    transparent 42%,
    rgba(0, 0, 0, calc(0.55 - var(--light) * 0.4)) 100%
  );
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 10;
  height: 340vh; /* scroll runway for the scene */
}

.hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-inline: var(--gut);
}

.hero__stage {
  max-width: 44rem;
  transform: translateY(calc(var(--hero-y, 0) * 1px));
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1.4rem;
  opacity: var(--hero-o, 1);
}

.hero__eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.hero__title {
  font-size: clamp(3rem, 11.5vw, 7.5rem);
  letter-spacing: -0.055em;
  font-weight: 700;
  color: var(--text-on-dark);
  opacity: var(--hero-o, 1);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}

.hero__title em {
  font-style: normal;
  color: var(--signal);
}

.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 2.4vw, 1.3rem);
  color: var(--text-on-dark-mute);
  opacity: var(--hero-o, 1);
  max-width: 34rem;
  margin-inline: auto;
}

.hero__scroll {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-dark-mute);
  opacity: var(--hero-o, 1);
}

.hero__scroll-rail {
  width: 1px;
  height: 44px;
  background: linear-gradient(
    to bottom,
    var(--text-on-dark-mute),
    transparent
  );
  position: relative;
  overflow: hidden;
}

.hero__scroll-rail::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 14px;
  background: var(--signal);
  animation: railfall 2.1s var(--ease-io) infinite;
}

@keyframes railfall {
  0% {
    transform: translateY(-16px);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateY(46px);
    opacity: 0;
  }
}

/* Mid-scroll caption cards that fade through as you taxi out ------------- */
.hero__beats {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.beat {
  position: absolute;
  max-width: 30rem;
  padding-inline: var(--gut);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.2vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-on-dark);
  opacity: 0;
  transform: translateY(16px);
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.75);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.beat.is-on {
  opacity: 1;
  transform: translateY(0);
}

.beat--dark {
  color: var(--text-on-dark);
}
.beat--light {
  color: #10202f;
  text-shadow: 0 2px 30px rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   7. Content sections
   -------------------------------------------------------------------------- */
.main {
  position: relative;
  z-index: 10;
  background: var(--ramp-100);
}

.section {
  padding-block: clamp(5rem, 13vh, 9rem);
}

.section--tight {
  padding-block: clamp(3.5rem, 9vh, 6rem);
}

.section--dark {
  background: var(--ink-900);
  color: var(--text-on-dark);
}

.section--white {
  background: var(--ramp-050);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-on-light-mute);
  margin-bottom: 1.1rem;
}
.section--dark .eyebrow {
  color: var(--signal);
}

.h2 {
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  max-width: 20ch;
}

.lede {
  margin-top: 1.3rem;
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--text-on-light-mute);
  max-width: 44ch;
}
.section--dark .lede {
  color: var(--text-on-dark-mute);
}

/* 7a. Reveal-on-scroll --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] {
  transition-delay: 0.09s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.18s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.27s;
}
.reveal[data-delay="4"] {
  transition-delay: 0.36s;
}
.reveal[data-delay="5"] {
  transition-delay: 0.45s;
}

/* 7b. Friction list (the problem, stated plainly) ------------------------ */
.friction {
  margin-top: 3.5rem;
  border-top: 1px solid var(--hairline-dark);
}

.friction__row {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 4vh, 2.4rem);
  border-bottom: 1px solid var(--hairline-dark);
  align-items: start;
}

.friction__idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--signal);
  padding-top: 0.5rem;
  letter-spacing: 0.08em;
}

.friction__head {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  letter-spacing: -0.025em;
  color: var(--text-on-dark);
}

.friction__body {
  margin-top: 0.55rem;
  color: var(--text-on-dark-mute);
  max-width: 58ch;
  font-size: 0.98rem;
}

/* 7c. Principles grid ---------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 3.5rem;
}

.card {
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background: var(--ramp-050);
  border: 1px solid var(--hairline-light);
  border-radius: 14px;
}

.card__icon {
  width: 34px;
  height: 34px;
  color: var(--signal);
  margin-bottom: 1.1rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.14rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card__body {
  font-size: 0.95rem;
  color: var(--text-on-light-mute);
}

/* 7d. Two doors — Provider / Owner --------------------------------------- */
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 3.5rem;
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: 18px;
  border: 1px solid var(--hairline-light);
  background: var(--ramp-050);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}

.door::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    130% 90% at 12% 0%,
    var(--signal-dim) 0%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.door:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 159, 28, 0.5);
  box-shadow: 0 22px 50px -26px rgba(14, 20, 29, 0.4);
}
.door:hover::before {
  opacity: 1;
}

.door__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1rem;
}

.door__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.door__body {
  color: var(--text-on-light-mute);
  font-size: 0.98rem;
  margin-bottom: 1.75rem;
}

.door__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-on-light);
}

.door__cta svg {
  transition: transform 0.3s var(--ease-out);
}
.door:hover .door__cta svg {
  transform: translateX(4px);
}

.door__meta {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ramp-400);
}

/* 7e. Pull quote --------------------------------------------------------- */
.pull {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.6vw, 2.9rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  max-width: 22ch;
}

.pull em {
  font-style: normal;
  color: var(--signal);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 10;
  background: var(--ink-900);
  color: var(--text-on-dark-mute);
  padding-block: clamp(3rem, 8vh, 5rem) 2rem;
  font-size: 0.9rem;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hairline-dark);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-on-dark);
}

.footer__tag {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__links a {
  color: var(--text-on-dark-mute);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__links a:hover {
  color: var(--signal);
}

.footer__base {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #5b6779;
}

/* --------------------------------------------------------------------------
   9. Survey pages
   -------------------------------------------------------------------------- */
.survey-page {
  background: var(--ramp-100);
  min-height: 100vh;
}

.survey-hero {
  background: var(--ink-900);
  color: var(--text-on-dark);
  padding-block: clamp(7rem, 16vh, 10rem) clamp(3rem, 8vh, 5rem);
  position: relative;
  overflow: hidden;
}

.survey-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 70% at 78% 12%,
    rgba(255, 159, 28, 0.16) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.survey-hero .wrap {
  position: relative;
  z-index: 1;
}

.survey-hero__title {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  max-width: 18ch;
}

.survey-hero__sub {
  margin-top: 1.2rem;
  color: var(--text-on-dark-mute);
  max-width: 50ch;
}

.survey-hero__pledge {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pledge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--hairline-dark);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-on-dark-mute);
}
.pledge svg {
  width: 14px;
  height: 14px;
  color: var(--signal);
  flex: none;
}

.form {
  max-width: 46rem;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vh, 4rem) clamp(4rem, 10vh, 6rem);
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 clamp(2rem, 5vh, 3rem);
}

.fieldset__legend {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
  padding: 0;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.fieldset__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
  letter-spacing: 0.08em;
}

.fieldset__hint {
  color: var(--text-on-light-mute);
  font-size: 0.93rem;
  margin-bottom: 1.4rem;
  max-width: 54ch;
}

.field {
  margin-bottom: 1.4rem;
}

.field__label {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 0.45rem;
}

.field__req {
  color: var(--signal);
  margin-left: 0.15rem;
}

.field__help {
  font-size: 0.84rem;
  color: var(--text-on-light-mute);
  margin-top: 0.4rem;
}

.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-on-light);
  background: var(--ramp-050);
  border: 1px solid var(--ramp-300);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
}

.input[aria-invalid="true"] {
  border-color: #d7263d;
  box-shadow: 0 0 0 3px rgba(215, 38, 61, 0.12);
}

.input--mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23566072' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
  padding-right: 2.6rem;
}

.textarea {
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.6;
}

.field__error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.84rem;
  color: #b81b31;
  font-weight: 500;
}
.field__error.is-on {
  display: block;
}

.counter {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-on-light-mute);
  margin-top: 0.35rem;
}

/* 9a. Checkbox / radio sets ---------------------------------------------- */
.choices {
  display: grid;
  gap: 0.5rem;
}

.choices--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  background: var(--ramp-050);
  border: 1px solid var(--ramp-300);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.94rem;
  transition: border-color 0.2s, background 0.2s;
}

.choice:hover {
  border-color: var(--ramp-400);
}

.choice input {
  margin: 0.2rem 0 0;
  accent-color: var(--signal);
  flex: none;
  width: 17px;
  height: 17px;
}

.choice:has(input:checked) {
  border-color: var(--signal);
  background: #fffaf2;
}

.choice:has(input:focus-visible) {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

/* 9b. Ranking list ------------------------------------------------------- */
.rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: rank;
}

.rank__item {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: var(--ramp-050);
  border: 1px solid var(--ramp-300);
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s,
    transform 0.18s var(--ease-out);
  touch-action: none;
}

.rank__item:hover {
  border-color: var(--ramp-400);
}

.rank__item:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

.rank__item.is-dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.rank__item.is-over {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
}

.rank__item.is-moved {
  animation: nudge 0.32s var(--ease-out);
}

@keyframes nudge {
  0% {
    transform: scale(0.985);
    background: #fff5e6;
  }
  100% {
    transform: scale(1);
    background: var(--ramp-050);
  }
}

/* Top three get visual weight */
.rank__item:nth-child(-n + 3) {
  border-color: rgba(255, 159, 28, 0.4);
  background: #fffcf7;
}

.rank__num {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-on-light-mute);
  text-align: center;
  background: var(--ramp-200);
  border-radius: 6px;
  padding: 0.3rem 0;
}

.rank__item:nth-child(-n + 3) .rank__num {
  background: var(--signal);
  color: var(--ink-900);
}

.rank__num::before {
  content: counter(rank);
}

.rank__label {
  font-size: 0.95rem;
  line-height: 1.35;
}

.rank__label small {
  display: block;
  color: var(--text-on-light-mute);
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.rank__handle {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  color: var(--ramp-400);
}

.rank__btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--ramp-300);
  border-radius: 7px;
  color: var(--text-on-light-mute);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rank__btn:hover:not(:disabled) {
  background: var(--ramp-200);
  color: var(--text-on-light);
}
.rank__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.rank__btn svg {
  width: 14px;
  height: 14px;
}

.rank__cut {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.rank__cut::before,
.rank__cut::after {
  content: "";
  height: 1px;
  background: rgba(255, 159, 28, 0.35);
  flex: 1;
}

/* 9c. "Other" write-in row ---------------------------------------------- */
.addrow {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.addrow .input {
  flex: 1;
}

/* 9d. Turnstile + submit ------------------------------------------------- */
.submit-block {
  border-top: 1px solid var(--hairline-light);
  padding-top: 2rem;
  margin-top: 1rem;
}

.turnstile-slot {
  min-height: 68px;
  margin-bottom: 1.25rem;
}

.consent {
  margin-bottom: 1.5rem;
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  display: none;
}
.form-status.is-on {
  display: block;
}
.form-status--err {
  background: #fdecee;
  color: #8e1524;
  border: 1px solid #f5c2c9;
}
.form-status--ok {
  background: #eefaf1;
  color: #14663a;
  border: 1px solid #bde8ce;
}

.honeypot {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* 9e. Progress bar ------------------------------------------------------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: transparent;
  z-index: 70;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--signal);
  transition: width 0.15s linear;
}

/* --------------------------------------------------------------------------
   10. Thank-you page
   -------------------------------------------------------------------------- */
.thanks {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink-900);
  color: var(--text-on-dark);
  padding: var(--gut);
  position: relative;
  overflow: hidden;
}

.thanks::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    70% 55% at 50% 30%,
    rgba(255, 159, 28, 0.18) 0%,
    transparent 65%
  );
}

.thanks__inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.thanks__title {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  margin-block: 1.5rem 1rem;
}

.thanks__body {
  color: var(--text-on-dark-mute);
  margin-bottom: 2.2rem;
}

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .nav__name {
    font-size: 0.88rem;
  }
  .nav__name span {
    display: none;
  }

  .hero {
    height: 300vh;
  }

  .friction__row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .friction__idx {
    padding-top: 0;
  }

  .rank__item {
    grid-template-columns: 2.1rem 1fr auto;
    padding: 0.7rem;
  }
  .rank__label {
    font-size: 0.9rem;
  }

  .footer__top {
    flex-direction: column;
    gap: 1.75rem;
  }
}

/* --------------------------------------------------------------------------
   12. Motion & contrast preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .hero {
    height: auto;
  }
  .hero__pin {
    position: relative;
    min-height: 88vh;
  }
  .hero__beats {
    display: none;
  }
  .scene {
    --p: 0.35;
    --light: 0.45;
  }
  .scene__motes {
    display: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .beat {
    opacity: 1;
    transform: none;
    position: static;
    margin-block: 1rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-on-dark-mute: #c3cedb;
    --text-on-light-mute: #3b4453;
    --hairline-light: rgba(14, 20, 29, 0.25);
    --hairline-dark: rgba(255, 255, 255, 0.25);
  }
}

/* Print */
@media print {
  .scene,
  .nav,
  .hero__scroll,
  .progress {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
