/* --- Why it works page --- */

.page-why {
  background: #fff;
  overflow-x: clip;
}

.why-hero {
  max-width: 720px;
  padding-top: clamp(56px, 10vw, 100px);
  padding-bottom: clamp(48px, 8vw, 88px);
}

.why-hero h1 {
  max-width: none;
  margin: 0 0 48px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.why-formula {
  display: grid;
  margin: 0 0 48px;
  padding: 0;
  list-style: none;
  border: none;
  background: none;
  text-transform: none;
  letter-spacing: -0.05em;
}

.why-formula li {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 6px 0;
  border: 0;
  color: var(--ink);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 750;
  line-height: 1.02;
}

.why-formula li span {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.why-hero-line {
  max-width: 16ch;
  margin: 0 0 14px;
  color: var(--ink);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.why-hero-note {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.why-hero-skip {
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.why-hero-skip:hover {
  color: var(--blue);
}

/* --- Kinetic path (01-04) --- */

.why-path {
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 8% 18%, rgba(66, 111, 189, 0.07), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 72%, rgba(36, 75, 143, 0.05), transparent 50%),
    #f7fafc;
  border-block: 1px solid rgba(220, 229, 245, 0.9);
}

.why-path-shell {
  position: relative;
  padding: 28px 0 40px;
}

.why-path-progress {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto 20px;
  position: relative;
  z-index: 3;
}

.why-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.why-progress-steps li {
  display: inline-flex;
  align-items: center;
  opacity: 0.35;
  transition: opacity 0.45s ease, color 0.45s ease;
}

.why-progress-steps li span {
  color: inherit;
  font-weight: 800;
}

.why-progress-steps li.is-active {
  color: var(--blue-dark);
  opacity: 1;
}

.why-progress-track {
  position: relative;
  height: 2px;
  border-radius: 999px;
  background: rgba(66, 111, 189, 0.15);
  overflow: hidden;
}

.why-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
}

.why-path-stage {
  position: relative;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100vh - 132px);
  /* dvh учитывает адресную строку мобильных браузеров */
  min-height: calc(100dvh - 132px);
}

.why-step {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
}

.why-static .why-step {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  min-height: 0;
  padding-block: 36px;
}

.why-static .why-step--focus {
  min-height: 62vh;
  min-height: 62dvh;
}

.why-static .why-focus-cloud {
  position: absolute;
}

.why-step-num {
  position: absolute;
  top: 4%;
  right: -2%;
  z-index: 0;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(7rem, 18vw, 14rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: rgba(66, 111, 189, 0.09);
  user-select: none;
  pointer-events: none;
}

.why-step-body {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.why-step-eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.why-step-title {
  max-width: 12ch;
  margin: 0 0 14px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.why-step-lead {
  max-width: 18ch;
  margin: 0 0 28px;
  color: var(--blue-dark);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.2rem, 2.1vw, 1.5rem);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.why-step-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.why-step-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.45;
}

.why-accent {
  color: var(--ink) !important;
  font-weight: 650;
}

.why-muted-note {
  color: var(--muted);
  font-size: 0.95rem !important;
}

/* Floating kinetic words (step 01) */

.why-float-words {
  position: relative;
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 10px 18px;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  align-content: center;
}

.why-float-words span {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--blue-dark);
  line-height: 1.1;
  white-space: nowrap;
}

.why-float-words span:nth-child(1) {
  grid-column: 1 / -1;
  justify-self: start;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  color: var(--ink);
}

.why-float-words span:nth-child(2) {
  justify-self: end;
  color: rgba(36, 75, 143, 0.72);
}

.why-float-words span:nth-child(3) {
  justify-self: start;
  opacity: 0.85;
}

.why-float-words span:nth-child(4) {
  justify-self: end;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  opacity: 0.7;
}

.why-float-words span:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  color: var(--blue);
}

/* Chain */

.why-chain {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.why-chain li {
  position: relative;
  padding: 8px 0 8px 0;
  color: var(--ink);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  letter-spacing: -0.01em;
  border: none;
  background: transparent;
  border-radius: 0;
}

.why-chain li + li {
  border-top: 1px solid rgba(66, 111, 189, 0.12);
}

.why-chain li + li::before {
  display: none;
}

/* Focus cloud background (step 03) */

.why-step--focus {
  overflow: hidden;
  pointer-events: auto;
}

.why-step--focus .why-step-body {
  max-width: min(34rem, 42vw);
  padding: 18px 20px 20px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(247, 250, 252, 0.9),
    rgba(247, 250, 252, 0.78)
  );
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.why-step-copy--focus {
  max-width: 36rem;
}

.why-focus-cloud {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.why-step--focus .why-step-num,
.why-step--focus .why-step-body {
  position: relative;
  z-index: 1;
}

.why-focus-cloud span {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(24, 32, 51, 0.24);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  will-change: color, opacity, text-shadow;
}

.why-focus-cloud span.is-xl {
  font-size: clamp(1.35rem, 2.8vw, 2.35rem);
  font-weight: 750;
}

.why-focus-cloud span.is-lg {
  font-size: clamp(1.05rem, 2vw, 1.65rem);
  font-weight: 700;
}

.why-focus-cloud span.is-md {
  font-size: clamp(0.88rem, 1.45vw, 1.2rem);
}

.why-focus-cloud span.is-sm {
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
  font-weight: 600;
  opacity: 0.85;
}

.why-focus-formula {
  display: inline-block;
  margin-top: 8px !important;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

/* Act stack */

.why-act-stack {
  display: grid;
  gap: 4px;
}

.why-act-stack p {
  margin: 0;
  padding: 10px 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(66, 111, 189, 0.12);
  background: transparent;
  color: var(--ink);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.why-act-finale {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(66, 111, 189, 0.14);
  max-width: 28ch;
}

.why-act-path {
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.why-act-finale strong {
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* System metrics */

.why-system .section-heading {
  margin-bottom: 36px;
}

.why-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.why-metric {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.95);
}

.why-metric-num {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.why-metric h3 {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

/* Split */

.why-split-title {
  max-width: 18ch;
  margin-bottom: 34px;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.why-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.why-split-card {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.why-split-card--strong {
  border-color: rgba(66, 111, 189, 0.28);
  background:
    radial-gradient(circle at top right, rgba(66, 111, 189, 0.1), transparent 18rem),
    #fff;
  box-shadow: 0 18px 40px rgba(31, 62, 115, 0.08);
}

.why-split-label {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.why-split-flow {
  margin: 0 0 18px;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.55;
}

.why-split-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.why-split-card li + li {
  margin-top: 6px;
}

/* World */

.why-world-lead {
  max-width: 28rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.4;
}

.why-world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.why-world-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.why-world-mark {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.why-world-card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.why-world-idea {
  margin: 0 0 10px;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.45;
}

.why-world-diff {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Causal finale */

.why-causal {
  max-width: 760px;
  padding-block: clamp(72px, 12vw, 120px);
  text-align: center;
}

.why-causal-open,
.why-causal-link,
.why-causal-formula {
  margin: 0 auto;
  font-family: "Manrope", "Inter", system-ui, sans-serif;
  letter-spacing: -0.03em;
}

.why-causal-open {
  max-width: 14ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 650;
}

.why-causal-link {
  max-width: 16ch;
  margin-bottom: 42px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
}

.why-causal-chain {
  display: grid;
  gap: 14px;
  margin: 0 auto 42px;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 420px;
}

.why-causal-chain li {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.why-causal-chain strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-dark);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.why-causal-chain span {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

.why-causal-formula {
  max-width: 22ch;
  color: var(--ink);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.35;
  font-weight: 700;
}

/* Телефоны: два столбца слов не помещаются, разворачиваем в один */
@media (max-width: 767px) {
  .why-float-words {
    grid-template-columns: minmax(0, 1fr);
  }

  .why-float-words span {
    white-space: normal;
  }

  .why-float-words span:nth-child(2),
  .why-float-words span:nth-child(4) {
    justify-self: start;
  }
}

/* Mobile / tablet stack */

@media (max-width: 900px) {
  .why-path-shell {
    padding: 32px 0 24px;
  }

  .why-path-stage {
    min-height: 0;
    display: grid;
    gap: 48px;
  }

  .why-step {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-height: 0;
  }

  .why-step-num {
    top: -8px;
    right: 0;
    font-size: clamp(5rem, 28vw, 8rem);
  }

  .why-step-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .why-float-words {
    min-height: 160px;
  }

  .why-step--focus {
    min-height: 78vh;
    min-height: 78dvh;
  }

  .why-focus-cloud {
    position: absolute;
  }

  .why-focus-cloud span.is-xl {
    font-size: clamp(1.15rem, 5.5vw, 1.7rem);
  }

  .why-step--focus .why-step-body {
    margin-top: 12px;
    max-width: 100%;
    pointer-events: none;
  }

  .why-metrics,
  .why-split-grid,
  .why-world-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .why-progress-fill,
  .why-focus-cloud span,
  .why-progress-steps li {
    transition: none !important;
  }

  .why-step {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .why-path-stage {
    min-height: 0 !important;
    display: grid;
    gap: 40px;
  }
}
