/* ===================================================================
   UXUARIA — home.css
   Figma: uxuaria-Web, "Home — Desktop 1443" (120:3459) and
   "Home — Mobile 390" (130:3843). Spec: 11-home.
   The flow section keeps the frame's geometry: every value there is
   its Figma px value times --home-u, so the line stays aligned.
   =================================================================== */

:root {
  --home-u: calc(min(100vw, 1440px) / 1440);

  --home-size-hero: calc(64 * var(--home-u));
  --home-line-hero: calc(64 * var(--home-u));
  --home-track-hero: calc(-2.6 * var(--home-u));
  --home-size-lead: calc(24 * var(--home-u));
  --home-line-lead: calc(28.8 * var(--home-u));
  --home-size-metric: calc(64 * var(--home-u));
  --home-track-metric: calc(-2.6 * var(--home-u));
  --home-size-card: calc(40 * var(--home-u));
  --home-track-card: calc(-3.2 * var(--home-u));
  --home-line-card: calc(40 * var(--home-u));
  --home-size-step: calc(16 * var(--home-u));
  --home-line-step: calc(25.6 * var(--home-u));

  --home-size-section: 48px;
  --home-size-row: 40px;
  --home-size-statement: 56px;
  --home-size-contact: 40px;
}

.home {
  padding-top: var(--ux-header-height);
  overflow-x: clip;
}

/* ===== FLOW: hero, metrics and process, tied to the line ===== */
.home-flow {
  position: relative;
  max-width: 1440px;
  height: calc(2576.91 * var(--home-u));
  margin: 0 auto;
}

.home-flow__line {
  position: absolute;
  top: calc(-88 * var(--home-u));
  left: calc(-40 * var(--home-u));
  width: calc(1430 * var(--home-u));
  max-width: none;
  height: calc(2940 * var(--home-u));
  pointer-events: none;
}

.home-flow__line--mobile { display: none; }

/* Carries the line to the viewport edge on screens wider than the frame */
.home-flow::after {
  content: '';
  position: absolute;
  top: calc(2834.79 * var(--home-u));
  right: calc(100% + 21.73 * var(--home-u));
  width: 50vw;
  height: calc(13 * var(--home-u));
  border-block: 2px solid var(--ux-color-ink);
}

.home-hero {
  position: relative;
  width: calc(636 * var(--home-u));
  height: calc(734.91 * var(--home-u));
  margin-left: calc(164 * var(--home-u));
  padding-top: calc(131.91 * var(--home-u));
}

.shape-row {
  display: block;
  width: calc(185.636 * var(--home-u));
  height: calc(41.006 * var(--home-u));
  fill: var(--ux-color-ink);
}

.home-hero .shape-row { margin-bottom: calc(24 * var(--home-u)); }

.home-hero__title {
  margin-bottom: calc(32 * var(--home-u));
  color: var(--ux-color-text);
  font-size: var(--home-size-hero);
  font-weight: 700;
  line-height: var(--home-line-hero);
  letter-spacing: var(--home-track-hero);
}

.home-hero__word {
  display: inline-block;
  overflow-x: clip;
  white-space: nowrap;
}

.home-hero__lead {
  margin-bottom: calc(32 * var(--home-u));
  color: var(--ux-color-ink);
  font-size: var(--home-size-lead);
  line-height: var(--home-line-lead);
}

.home-hero__actions {
  display: flex;
  gap: calc(24 * var(--home-u));
  align-items: center;
}

.home-hero__call { width: calc(323 * var(--home-u)); }

.home-hero__diagnosis {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  color: var(--ux-color-ink);
  font-size: 16px;
  line-height: 28.8px;
  text-decoration: none;
  white-space: nowrap;
}

a.home-hero__diagnosis:hover { text-decoration: underline; }

/* ===== METRICS ===== */
.home-metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(16 * var(--home-u));
  align-items: center;
  width: calc(1117 * var(--home-u));
  height: calc(203 * var(--home-u));
  margin-left: calc(164 * var(--home-u));
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--ux-color-ink);
  border-radius: var(--ux-radius-card);
  background: var(--ux-color-surface);
}

.metric-card__stat {
  display: flex;
  flex-direction: column-reverse;
  gap: inherit;
  margin: 0;
}

.metric-card__value {
  margin: 0;
  color: var(--ux-color-text);
  font-size: var(--home-size-metric);
  font-weight: 700;
  line-height: var(--home-size-metric);
  letter-spacing: var(--home-track-metric);
}

.metric-card__unit {
  margin-left: 4px;
  font-size: 13px;
  line-height: 0;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.metric-card__description {
  color: var(--ux-color-text);
  font-size: 16px;
}

.metric-card__logo {
  height: 30px;
  object-fit: cover;
  opacity: .8;
}

.metric-card__logo--monge-pay { width: 153.9px; }
.metric-card__logo--greenify { width: 104.8px; mix-blend-mode: difference; }

/* ===== PROCESS ===== */
.home-process {
  position: relative;
  height: calc(1628.25 * var(--home-u));
}

.process-block { display: contents; }

.process-step {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-step--research {
  top: calc(253 * var(--home-u));
  left: calc(171.79 * var(--home-u));
  width: calc(304.88 * var(--home-u));
  align-items: flex-end;
  text-align: right;
}

.process-step--design {
  top: calc(694 * var(--home-u));
  left: calc(1005 * var(--home-u));
  width: calc(276 * var(--home-u));
}

.process-step--build {
  top: calc(1152 * var(--home-u));
  left: calc(167.97 * var(--home-u));
  width: calc(300 * var(--home-u));
  align-items: flex-end;
  text-align: right;
}

.process-step__symbol { flex: none; width: 65px; height: 66px; }
.process-step__symbol--quarter { transform: rotate(90deg); }
.process-step__symbol--half { transform: rotate(180deg); }

.process-step__title {
  color: var(--ux-color-text);
  font-size: var(--home-size-card);
  font-weight: 500;
  line-height: var(--home-line-card);
  letter-spacing: var(--home-track-card);
}

.process-step__description {
  color: var(--ux-color-ink);
  font-size: var(--home-size-step);
  line-height: var(--home-line-step);
}

.process-context {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--home-u));
  align-items: flex-start;
  width: calc(595.01 * var(--home-u));
}

.process-context--research { top: calc(335 * var(--home-u)); left: calc(582.99 * var(--home-u)); }
.process-context--design { top: calc(780 * var(--home-u)); left: calc(303.42 * var(--home-u)); align-items: flex-end; text-align: right; }
.process-context--build { top: calc(1231 * var(--home-u)); left: calc(571 * var(--home-u)); gap: calc(16 * var(--home-u)); }

.process-context__text {
  width: 100%;
  color: var(--ux-color-ink);
  font-size: var(--home-size-lead);
  line-height: var(--home-line-lead);
}

.process-context__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 17px;
  border: 1px solid var(--ux-color-ink);
  border-radius: var(--ux-radius-pill);
  background: var(--ux-color-ink);
  color: var(--ux-color-text-inverse);
  font-family: var(--ux-font-display);
  font-size: 14px;
  line-height: 20.8px;
  text-decoration: none;
  white-space: nowrap;
}

/* ===== CLIENTS ===== */
.home-clients {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 267.25fr) 325fr;
  gap: 20px;
  max-width: calc(1186.75px + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

.client-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84.5px;
  padding: 17px 16px;
  border: 1px solid var(--ux-color-ink);
  border-radius: var(--ux-radius-card);
  background: var(--ux-color-surface);
}

.client-card__logo { height: auto; object-fit: contain; }
.client-card__logo--monge-pay { opacity: .8; }
.client-card__logo--striano { mix-blend-mode: difference; }
.client-card__logo--greenify { mix-blend-mode: difference; opacity: .8; }
.client-card__logo--points-of-you { mix-blend-mode: difference; }

/* ===== SERVICES ===== */
.home-services { margin-top: 254.5px; }

.home-section-head { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.home-section-head--services { gap: 16px; }

.home-section-title {
  color: var(--ux-color-text);
  font-size: var(--home-size-section);
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -3.2px;
  text-align: center;
}

.service-rows { margin-top: 48px; border-bottom: 1px solid var(--ux-color-ink); }

.service-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px clamp(16px, 11.25vw, 162px) 23px;
  border-top: 1px solid var(--ux-color-ink);
  color: var(--ux-color-text);
  font-size: var(--home-size-row);
  font-weight: 500;
  line-height: 51px;
  letter-spacing: -3.2px;
}

.service-row:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.service-row__arrow { flex: none; }

/* The link covers the whole row, arrow included */
.service-row__link { color: inherit; text-decoration: none; }
.service-row__link::after { content: ''; position: absolute; inset: 0; }
.service-row:has(.service-row__link:focus-visible) { outline: 2px solid var(--ux-color-ink); outline-offset: -4px; }

/* ===== TESTIMONIALS ===== */
.home-testimonials {
  margin-top: 80px;
  padding: 40px 16px;
}

.home-testimonials__title { max-width: 725px; margin: 0 auto; }

.home-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 311px));
  gap: 28px;
  align-items: start;
  justify-content: center;
  margin-top: 64px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--ux-color-ink);
  border-radius: var(--ux-radius-card);
  background: var(--ux-color-surface);
}

.testimonial-card__badge {
  width: 101px;
  border: 1px solid var(--ux-color-border-soft);
  border-radius: var(--ux-radius-badge);
  color: var(--ux-color-text-subtle);
  font-family: var(--ux-font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 17.6px;
  letter-spacing: .3px;
  text-align: center;
}

.testimonial-card__quote {
  color: var(--ux-color-text);
  font-size: 16px;
}

.testimonial-card__attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  justify-content: space-between;
  width: 100%;
  color: var(--ux-color-text);
  font-family: var(--ux-font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 17.6px;
  letter-spacing: .3px;
}

/* ===== CLOSING BLOCK ===== */
.home-closing {
  margin-top: 80px;
  padding: 100px 16px 96px;
  background: var(--ux-color-surface-inverse);
  color: var(--ux-color-text-inverse);
}

.home-closing__inner { max-width: 1119px; margin: 0 auto; }

.home-closing__statement {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ux-color-text-inverse);
}

.home-closing__title {
  margin-bottom: 16px;
  font-family: var(--ux-font-ui);
  font-size: var(--home-size-statement);
  font-weight: 700;
  line-height: 54.3px;
  letter-spacing: -1.7px;
}

.home-closing__text {
  max-width: 826.93px;
  font-size: 20px;
  line-height: 28.8px;
}

.home-closing__symbols {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 16px;
  width: 66px;
}

.home-closing__symbol { width: 65px; height: 66px; }
.home-closing__symbol--cw { transform: rotate(90deg); }
.home-closing__symbol--ccw { transform: rotate(-90deg); }

.home-closing__contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.home-closing__contact-title {
  margin-bottom: 16px;
  font-family: var(--ux-font-ui);
  font-size: var(--home-size-contact);
  font-weight: 700;
  line-height: 54.3px;
  letter-spacing: -1.7px;
}

.home-closing__contact-text {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 28.8px;
}

.home-closing__link { color: inherit; text-decoration: none; }
.home-closing__link:hover { text-decoration: underline; }
.home-closing__link--email { text-decoration: underline; }

.home-closing__calendar {
  height: 450.375px;
  overflow: hidden;
  border: 1px solid var(--ux-color-text-inverse);
  border-radius: var(--ux-radius-frame);
}

.home-closing__calendar { background: var(--ux-color-surface); }

/* ===== BETWEEN THE FRAMES =====
   No tablet frame: stacks the content and drops the line, which only
   fits the geometry of each frame. */
@media (min-width: 641px) and (max-width: 1279px) {
  :root {
    --home-u: 1px;
    --home-size-hero: clamp(40px, 7vw, 64px);
    --home-line-hero: 1.05em;
    --home-track-hero: -.03em;
    --home-size-lead: 20px;
    --home-line-lead: 1.3;
    --home-size-metric: 48px;
    --home-size-card: 32px;
    --home-line-card: 1.05em;
    --home-track-card: -.05em;
    --home-size-section: 36px;
    --home-size-row: 28px;
    --home-size-statement: 40px;
    --home-size-contact: 32px;
  }

  .home-flow { height: auto; padding: 0 16px; }
  .home-flow__line, .home-flow::after { display: none; }
  .home-hero { width: auto; height: auto; margin: 0; padding: 56px 0; }
  .home-hero__actions { flex-wrap: wrap; }
  .home-hero__call { width: auto; padding-inline: 24px; white-space: normal; }
  .home-hero__diagnosis { padding-inline: 0; white-space: normal; }
  .home-metrics { width: auto; height: auto; margin: 0; align-items: stretch; }
  .home-process { display: grid; gap: 56px; height: auto; margin: 72px 0; }
  .process-block { display: grid; gap: 24px; }
  .process-step, .process-context { position: static; width: auto; }
  .home-services { margin-top: 96px; }
  .home-section-title { padding-inline: 16px; line-height: 1.1; }
  .service-row { line-height: 1.2; }
  .home-testimonials { margin-top: 72px; }
  .home-testimonials__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-clients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== MOBILE =====
   Figma: Home — Mobile 390 (130:3843). Same approach as desktop: every
   value is its Figma px value times --home-u, so the line stays aligned. */
@media (max-width: 640px) {
  :root {
    --home-u: calc(100vw / 390);

    --home-size-hero: calc(44 * var(--home-u));
    --home-line-hero: calc(44 * var(--home-u));
    --home-track-hero: calc(-2 * var(--home-u));
    --home-size-lead: calc(18 * var(--home-u));
    --home-line-lead: calc(25 * var(--home-u));
    --home-size-metric: calc(52 * var(--home-u));
    --home-size-card: calc(30 * var(--home-u));
    --home-line-card: calc(32 * var(--home-u));
    --home-track-card: calc(-1.5 * var(--home-u));
    --home-size-section: calc(32 * var(--home-u));
    --home-size-row: calc(24 * var(--home-u));
    --home-size-statement: calc(34 * var(--home-u));
    --home-size-contact: calc(28 * var(--home-u));
  }

  .home-flow { height: calc(3525.55 * var(--home-u)); }
  .home-flow::after, .home-flow__line--desktop { display: none; }

  .home-flow__line--mobile {
    display: block;
    top: calc(30.67 * var(--home-u));
    left: calc(-2 * var(--home-u));
    width: calc(440 * var(--home-u));
    height: calc(3680 * var(--home-u));
  }

  .home-hero {
    width: auto;
    height: calc(693.75 * var(--home-u));
    margin: 0;
    padding: calc(58 * var(--home-u)) calc(48 * var(--home-u)) 0 calc(24 * var(--home-u));
  }

  .shape-row {
    width: calc(139.23 * var(--home-u));
    height: calc(30.75 * var(--home-u));
  }

  .home-hero .shape-row { margin-bottom: calc(28 * var(--home-u)); }
  .home-hero__title { margin-bottom: calc(16 * var(--home-u)); }
  .home-hero__lead { margin-bottom: calc(28 * var(--home-u)); }
  .home-hero__actions { flex-direction: column; gap: calc(24 * var(--home-u)); align-items: stretch; }

  .home-hero__call {
    width: 100%;
    padding-block: calc(9 * var(--home-u));
    font-size: calc(16 * var(--home-u));
    line-height: calc(28.8 * var(--home-u));
  }

  .home-hero__diagnosis {
    justify-content: space-between;
    padding: 0;
    font-size: calc(16 * var(--home-u));
    line-height: calc(28.8 * var(--home-u));
  }

  .home-hero__diagnosis img { width: calc(20 * var(--home-u)); height: calc(20 * var(--home-u)); }

  .home-metrics {
    display: flex;
    flex-direction: column;
    gap: calc(20 * var(--home-u));
    align-items: stretch;
    width: calc(343 * var(--home-u));
    height: auto;
    margin: calc(57.5 * var(--home-u)) 0 calc(57.5 * var(--home-u)) calc(24 * var(--home-u));
  }

  .metric-card { gap: calc(8 * var(--home-u)); padding: calc(16 * var(--home-u)); }
  .metric-card__value { line-height: calc(56 * var(--home-u)); }

  .metric-card__unit {
    margin-left: .25em;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: none;
  }

  .metric-card__description { font-size: calc(16 * var(--home-u)); }
  .metric-card__logo { height: calc(30 * var(--home-u)); }
  .metric-card__logo--monge-pay { width: calc(153.9 * var(--home-u)); }
  .metric-card__logo--greenify { width: calc(104.8 * var(--home-u)); }
  .metric-card .arrow-link { gap: calc(8 * var(--home-u)); font-size: calc(16 * var(--home-u)); line-height: calc(28.8 * var(--home-u)); }
  .metric-card .arrow-link img { width: calc(24 * var(--home-u)); height: calc(24 * var(--home-u)); }

  .home-process { height: calc(2095.8 * var(--home-u)); }

  .process-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: calc(32 * var(--home-u));
    padding-inline: calc(48 * var(--home-u));
  }

  .process-block--research { height: calc(671 * var(--home-u)); padding-top: calc(78 * var(--home-u)); }
  .process-block--design { height: calc(697 * var(--home-u)); padding-top: calc(79 * var(--home-u)); }
  .process-block--build { height: calc(654 * var(--home-u)); padding-top: calc(32 * var(--home-u)); }

  .process-step {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    gap: calc(8 * var(--home-u));
  }

  .process-step--research, .process-step--build { align-items: flex-start; text-align: left; }
  .process-step--design { align-items: flex-end; text-align: right; }
  .process-step__symbol { width: calc(65 * var(--home-u)); height: calc(66 * var(--home-u)); }
  .process-step .arrow-link { display: none; }

  .process-context {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    gap: calc(20 * var(--home-u));
    align-items: stretch;
    text-align: left;
  }

  .process-context__action {
    padding: calc(6 * var(--home-u));
    font-size: calc(14 * var(--home-u));
    line-height: calc(20.8 * var(--home-u));
  }

  .home-clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: calc(16 * var(--home-u)) calc(21.3 * var(--home-u));
    align-items: center;
    max-width: none;
    padding: 0 calc(24 * var(--home-u));
  }

  .client-card {
    height: calc(50.7 * var(--home-u));
    padding: calc(10 * var(--home-u));
    border-radius: calc(7.8 * var(--home-u));
  }

  .client-card__logo--monge-pay { width: calc(141.2 * var(--home-u)); }
  .client-card__logo--striano { width: calc(86.4 * var(--home-u)); }
  .client-card__logo--greenify { width: calc(99.6 * var(--home-u)); }
  .client-card__logo--points-of-you { width: calc(136.5 * var(--home-u)); }

  .home-services { margin-top: calc(107.21 * var(--home-u)); }
  .home-section-head, .home-section-head--services { gap: calc(24 * var(--home-u)); }

  .home-section-title {
    padding-inline: calc(24 * var(--home-u));
    line-height: calc(34 * var(--home-u));
    letter-spacing: calc(-1.6 * var(--home-u));
  }

  .service-rows { margin-top: calc(40 * var(--home-u)); }

  .service-row {
    gap: calc(20 * var(--home-u));
    align-items: center;
    padding: calc(24 * var(--home-u)) calc(24 * var(--home-u)) calc(23 * var(--home-u));
    line-height: calc(28 * var(--home-u));
    letter-spacing: calc(-1 * var(--home-u));
  }

  .service-row__arrow { width: calc(24 * var(--home-u)); height: calc(24 * var(--home-u)); }

  .home-testimonials {
    margin-top: calc(72 * var(--home-u));
    padding: calc(24 * var(--home-u)) calc(24 * var(--home-u)) calc(72 * var(--home-u));
  }

  .home-testimonials__title { padding-inline: 0; }

  .home-testimonials__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: calc(20 * var(--home-u));
    margin-top: calc(40 * var(--home-u));
  }

  .testimonial-card { gap: calc(16 * var(--home-u)); padding: calc(16 * var(--home-u)); }
  .testimonial-card__quote { font-size: calc(16 * var(--home-u)); line-height: calc(23 * var(--home-u)); }
  .testimonial-card__attribution { font-size: calc(12 * var(--home-u)); }

  .home-closing {
    margin-top: 0;
    padding: calc(56 * var(--home-u)) calc(24 * var(--home-u));
  }

  .home-closing__statement {
    flex-direction: column;
    gap: calc(24 * var(--home-u));
    align-items: flex-start;
    padding-bottom: calc(40 * var(--home-u));
  }

  .home-closing__title {
    margin-bottom: calc(24 * var(--home-u));
    line-height: calc(36 * var(--home-u));
    letter-spacing: calc(-1.4 * var(--home-u));
  }

  .home-closing__title br { display: none; }
  .home-closing__text { font-size: calc(18 * var(--home-u)); line-height: calc(26 * var(--home-u)); }
  .home-closing__symbols { flex-direction: row; width: auto; }
  .home-closing__symbol { width: calc(43 * var(--home-u)); height: calc(43 * var(--home-u)); }

  .home-closing__contact {
    grid-template-columns: minmax(0, 1fr);
    gap: calc(40 * var(--home-u));
    margin-top: calc(40 * var(--home-u));
  }

  .home-closing__contact-title {
    line-height: calc(34 * var(--home-u));
    letter-spacing: calc(-1.2 * var(--home-u));
  }

  .home-closing__contact-text { font-size: calc(16 * var(--home-u)); line-height: calc(28.8 * var(--home-u)); }
  .home-closing__contact-text:last-child { margin-bottom: 0; }
  .home-closing__calendar { height: calc(330 * var(--home-u)); }
}

/* ===== MOTION (spec 11-home) ===== */
.home-flow__line { color: var(--ux-color-ink); }

/* Wait for GSAP in home's script; show anyway if that script fails */
.home-motion .shape-row,
.home-motion .home-hero__lead,
.home-motion [data-split] {
  visibility: hidden;
  animation: home-hero-fallback 0s linear 3s forwards;
}

@keyframes home-hero-fallback {
  to { visibility: visible; }
}

.home-motion [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.home-motion [data-reveal].is-visible { opacity: 1; transform: none; }

.home-motion .process-step__symbol {
  transition: rotate .9s cubic-bezier(.2, .8, .2, 1) .15s;
  rotate: -180deg;
}

.home-motion .is-visible .process-step__symbol { rotate: 0deg; }

.home-motion .home-flow::after {
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s ease;
}

.home-motion .home-flow--line-done::after { transform: scaleX(1); }

.home-motion .service-row[data-reveal]:nth-child(odd) { transform: translateX(-48px); }
.home-motion .service-row[data-reveal]:nth-child(even) { transform: translateX(48px); }
.home-motion .service-row[data-reveal].is-visible { transform: none; }

.service-row { position: relative; isolation: isolate; }

.service-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ux-color-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.service-row:nth-child(even)::before { transform-origin: right; }
.service-row__arrow { transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .2s; }

@media (hover: hover) {
  .service-row { transition: color .2s; }
  .service-row:hover { color: var(--ux-color-text-inverse); }
  .service-row:hover::before { transform: scaleX(1); }
  .service-row:hover .service-row__arrow { filter: invert(1); transform: translateX(12px); }
  .service-row:nth-child(even):hover .service-row__arrow { transform: translateX(-12px) rotate(180deg); }
}

/* --- Context buttons: inverted on hover --- */
@media (hover: hover) {
  .process-context__action { transition: background-color .2s ease, color .2s ease; }
  .process-context__action:hover { background: var(--ux-color-surface); color: var(--ux-color-ink); }
}

/* --- Metric cards --- */
.metric-card { transition: transform .25s ease, box-shadow .25s ease; }
.metric-card:has(a) { position: relative; }
.metric-card:has(a) a::after { content: ''; position: absolute; inset: 0; border-radius: var(--ux-radius-card); }

.metric-card:hover,
.metric-card:has(a:focus-visible) {
  position: relative;
  z-index: 2;
  transform: scale(1.025);
  box-shadow: var(--ux-shadow-card-hover);
}

/* --- Clients strip: moved from home.js with the scroll --- */
.home-motion .home-clients { will-change: transform; }

/* --- Testimonials: the hovered card stands out and the rest step back --- */
.testimonial-card { transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease; }

.home-testimonials__grid:has(.testimonial-card:hover) .testimonial-card:not(:hover) { opacity: .4; }

.testimonial-card:hover {
  position: relative;
  z-index: 2;
  transform: scale(1.03);
  box-shadow: var(--ux-shadow-card-hover);
}

@media (prefers-reduced-motion: reduce) {
  .home-flow__strokes { stroke-dasharray: none !important; }
  .metric-card:hover, .metric-card:has(a:focus-visible), .testimonial-card:hover { transform: none; }
}
