/* ============================================================
   Сергей Борисов — AI-бизнес-партнёр
   Дизайн-система: бумага + чернила + кислотный акцент, radius 0.
   Токены сняты с прототипа и зафиксированы здесь.
   ============================================================ */

:root {
  --ink:        #11120f;
  --ink-soft:   #1a1b17;
  --paper:      #f1f0e9;
  --paper-deep: #e6e4dc;
  --white:      #fbfbf7;
  --muted:      #6c6d65;
  --muted-dark: #8d8e85;
  --on-dark-1:  rgba(251, 251, 247, 0.68);
  --on-dark-2:  rgba(251, 251, 247, 0.56);
  --line:       #11120f2e;
  --line-dark:  #fbfbf726;
  --acid:       #d8ff36;
  --case-accent: #d8ff36;   /* переопределяется на каждой карточке и странице кейса */

  /* Шрифты. Стек системный — ровно как в прототипе.
     Чтобы поставить свои (Golos Text + Literata), добавьте @font-face
     и подставьте семейство первым в соответствующую переменную. */
  --sans: "Helvetica Neue", Helvetica, "Golos Text", Arial, sans-serif;
  --serif: Literata, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Отступы: --gut для текстовых секций, --edge для полноширинных сеток */
  --gut:  clamp(20px, 3.2vw, 52px);
  --edge: clamp(12px, 0.9vw, 14px);
  --rail: clamp(0px, 5vw, 80px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Типографика ---------- */

.eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--acid { color: var(--case-accent); }
.eyebrow--ink  { color: var(--ink); }

.display-1 {
  font-size: clamp(40px, 7.2vw, 121px);
  line-height: 0.86;
  letter-spacing: -0.075em;
}
.display-2 {
  font-size: clamp(32px, 5.3vw, 87px);
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.display-3 {
  font-size: clamp(28px, 3.6vw, 59px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
.accent {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
}
.accent--italic { font-style: italic; }
.accent--acid { color: var(--acid); }

.lede {
  font-size: clamp(16px, 1.3vw, 21.6px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}
.hero .lede { color: var(--on-dark-1); }
.note {
  font-size: clamp(13.5px, 0.92vw, 15.4px);
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- Служебное ---------- */

.section { padding-inline: var(--gut); }
.section--dark  { background: var(--ink);  color: var(--white); }
.section--paper { background: var(--paper); }
.section--deep  { background: var(--paper-deep); }
.section--acid  { background: var(--acid); color: var(--ink); }

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.25s var(--ease);
}
.link-underline .arrow { transition: transform 0.35s var(--ease); }
.link-underline:hover .arrow { transform: translateX(6px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  background: var(--ink);
  color: var(--acid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), background-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

/* ---------- Шапка ---------- */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gut);
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid var(--line-dark);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.brand__lines {
  font-size: 9.5px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.site-nav { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.site-nav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.site-nav a:hover { color: var(--acid); opacity: 1; }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.header-cta:hover { color: var(--acid); }
.header-cta .arrow { transition: transform 0.35s var(--ease); }
.header-cta:hover .arrow { transform: translateX(5px); }

/* ---------- Герой ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: clamp(60px, 8vw, 118px) var(--gut) clamp(56px, 7vw, 96px);
}
.hero__arcs .arc { fill: none; stroke: var(--case-accent); stroke-width: 1; }
.hero__arcs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero__rail {
  position: absolute;
  left: var(--gut);
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line-dark);
  display: none;
}
.rail-label {
  position: absolute;
  left: 50%;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-dark);
  background: var(--ink);
  padding: 12px 0;
}
.rail-label--top { top: 40px; }
.rail-label--bottom { bottom: 40px; }

.hero__inner { position: relative; z-index: 2; }
.hero__body { grid-column: 1 / span 7; }
.hero__title { margin: 26px 0 0; color: var(--white); }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(32px, 4vw, 58px);
}

.panel {
  grid-column: 9 / span 4;
  align-self: end;
  border: 1px solid var(--line-dark);
  background: #ffffff08;
  backdrop-filter: blur(2px);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-dark);
}
.panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acid);
}
.dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--acid);
  animation: pulse 2.4s var(--ease) infinite;
}
.panel__row {
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-dark);
  transition: background-color 0.3s var(--ease);
}
.panel__row:last-child { border-bottom: 0; }
.panel__row:hover { background: #ffffff0d; }
.panel__n { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted-dark); }
.panel__title { display: block; font-size: 14px; font-weight: 500; }
.panel__text { display: block; font-size: 11.5px; color: var(--on-dark-2); margin-top: 3px; }
.panel__mark { font-size: 11px; color: var(--acid); text-align: right; }

/* ---------- Полоса показателей ---------- */

.kpi {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: var(--acid);
  color: var(--ink);
  margin: 0 var(--edge);
}
.kpi--accent { background: var(--case-accent); }
.kpi__cell {
  padding: 18px clamp(14px, 1.4vw, 22px);
  border-left: 1px solid #11120f2b;
}
.kpi__cell:first-child { border-left: 0; }
.kpi__value {
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.kpi__label {
  margin-top: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #11120fa6;
}

/* ---------- Кейсы ---------- */

.cases { padding: clamp(48px, 6vw, 92px) var(--edge) clamp(48px, 6vw, 96px); }
.cases__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
  align-items: start;
  padding: 0 clamp(4px, 0.6vw, 10px) clamp(36px, 4.4vw, 62px);
}
.cases__eyebrow { grid-column: 1 / span 3; }
.cases__title   { grid-column: 4 / span 5; }
.cases__note    { grid-column: 10 / span 3; }

.cases__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border: 1px solid var(--line);
}
.case-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: clamp(340px, 27vw, 490px);
  padding: clamp(20px, 1.9vw, 26px);
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color 0.26s var(--ease);
}
/* Заливка цветом кейса снизу вверх */
.case-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0;
  background: var(--case-accent);
  transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.case-card:hover::before,
.case-card:focus-visible::before { height: 100%; }
.case-card > * { position: relative; z-index: 1; }

.case-card__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: start;
}
.case-card__n {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-top: 3px;
}
.case-card__head .eyebrow { padding-top: 3px; }
.case-arrow {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
  color: var(--ink);
  transition: transform 0.3s var(--ease), background-color 0.2s var(--ease),
              color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.case-card__content { margin-top: auto; max-width: 650px; }
.case-card__title {
  font-size: clamp(24px, 3.5vw, 59px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 14ch;
}
.case-card__text {
  margin-top: 16px;
  font-size: clamp(14px, 0.95vw, 16px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
  transition: color 0.26s var(--ease);
}
.case-card__metrics {
  display: flex;
  gap: clamp(24px, 2.6vw, 44px);
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  transition: border-color 0.26s var(--ease);
}
.case-card__value { font-size: 15px; letter-spacing: -0.02em; }
.case-card__label {
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 22ch;
  transition: color 0.26s var(--ease);
}

/* Состояние наведения: текст темнеет на ярком, стрелка разворачивается */
.case-card:hover .case-card__n,
.case-card:hover .eyebrow,
.case-card:hover .case-card__text,
.case-card:hover .case-card__label { color: rgba(17, 18, 15, 0.66); }
.case-card:hover .case-card__metrics { border-color: rgba(17, 18, 15, 0.25); }
.case-card:hover .case-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  transform: rotate(-28deg);
}

/* ---------- Подход ---------- */

.approach { padding: clamp(56px, 7vw, 110px) var(--gut); }
.approach__aside { grid-column: 1 / span 5; }
.approach__list  { grid-column: 6 / span 7; border-top: 1px solid var(--line-dark); }
.approach__title { margin-top: 26px; color: var(--white); }
.step {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(16px, 2vw, 34px);
  align-items: start;
  padding: clamp(22px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--line-dark);
}
.step__n { font-size: 9.5px; letter-spacing: 0.1em; color: var(--acid); padding-top: 6px; }
.step__title {
  font-size: clamp(22px, 2vw, 33.6px);
  line-height: 1.45;
  letter-spacing: -0.04em;
}
.step__text {
  font-size: clamp(13px, 0.88vw, 14.7px);
  line-height: 1.6;
  color: var(--on-dark-2);
}

/* ---------- Профиль ---------- */

.profile { padding: clamp(56px, 7vw, 110px) var(--gut); }
.profile__aside { grid-column: 1 / span 6; }
.profile__cols  { grid-column: 8 / span 5; }
.profile__statement { margin-top: 26px; }
.profile__block {
  padding: clamp(22px, 2.4vw, 32px) 0;
  border-top: 1px solid var(--line);
}
.profile__block:last-child { border-bottom: 1px solid var(--line); }
.profile__head { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; }
.profile__n { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); }
.profile__title { font-size: clamp(17px, 1.3vw, 21px); letter-spacing: -0.02em; }
.profile__items { margin: 20px 0 0 56px; display: grid; gap: 12px; }
.profile__items li {
  position: relative;
  padding-left: 18px;
  font-size: clamp(12.5px, 0.81vw, 13.6px);
  line-height: 1.45;
  color: var(--muted);
}
.profile__items li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

/* ---------- Финальный призыв ---------- */

.cta { padding: clamp(56px, 7vw, 108px) var(--gut); }
.cta__body { grid-column: 1 / span 7; }
.cta__side {
  grid-column: 9 / span 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.cta__title { margin: 26px 0 22px; }
.cta__lede {
  color: #11120fb3;
  max-width: 42ch;
  font-size: clamp(13.5px, 0.92vw, 15.4px);
  line-height: 1.55;
}

/* ---------- Подвал ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gut);
  background: var(--ink);
  color: var(--muted-dark);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.site-footer a:hover { color: var(--acid); }
.site-footer strong { color: var(--white); font-weight: 600; }

/* ---------- Страница кейса ---------- */

.case-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: clamp(40px, 4.6vw, 66px) var(--gut) clamp(46px, 5.6vw, 82px);
}
.case-hero__top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: clamp(28px, 3.4vw, 48px);
}
.case-hero__grid { position: relative; z-index: 2; align-items: end; }
.case-hero__body { grid-column: 1 / span 7; }
.case-hero__title { margin-top: 20px; line-height: 0.9; color: var(--white); }
.case-hero__summary { grid-column: 9 / span 4; }
.case-hero__summary p {
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.55;
  color: var(--on-dark-1);
}

.case-body { padding: clamp(44px, 5vw, 76px) var(--gut) clamp(48px, 6vw, 88px); }
.case-body__aside { grid-column: 1 / span 3; }
.case-body__blocks { grid-column: 4 / span 9; }
.aside-sticky { position: sticky; top: 32px; }
.aside-sticky p {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--case-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--case-accent) 24%, transparent);
}

.block {
  display: grid;
  grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: start;
  padding: clamp(24px, 2.6vw, 38px) 0;
  border-top: 1px solid var(--line);
}
.block:last-child { border-bottom: 1px solid var(--line); }
.block__n { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); padding-top: 6px; }
.block__title {
  font-size: clamp(24px, 2.6vw, 43.7px);
  line-height: 1;
  letter-spacing: -0.05em;
}
.block__items { display: grid; gap: 12px; }
.block__items li {
  font-size: clamp(14px, 0.95vw, 16px);
  line-height: 1.62;
  color: var(--muted);
}
.block--bullets .block__items li { position: relative; padding-left: 18px; }
.block--bullets .block__items li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.67em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--case-accent);
}
.block--bullets .block__items li { padding-left: 22px; }

/* Блок «Результат» подсвечен мягкой заливкой цвета кейса */
.block--result {
  background: color-mix(in srgb, var(--case-accent) 25%, var(--paper));
  margin-left: -20px;
  padding-left: 20px;
  margin-right: calc(var(--gut) * -1);
  padding-right: var(--gut);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.next-case {
  background: var(--case-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(30px, 3.6vw, 52px) var(--gut);
  color: var(--ink);
  transition: filter 0.3s var(--ease);
}
.next-case:hover { filter: brightness(1.04); }
.next-case__title {
  font-size: clamp(20px, 2.1vw, 34px);
  letter-spacing: -0.035em;
  text-align: center;
  flex: 1;
}
.next-case__circle {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid #11120f3d;
  border-radius: 50%;
  transition: transform 0.4s var(--ease);
}
.next-case:hover .next-case__circle { transform: translateX(6px); }

/* ---------- Появление при скролле ---------- */

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  animation: signal-in 0.7s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes signal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .dot { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Адаптив ---------- */

@media (min-width: 1200px) {
  .hero { padding-left: calc(var(--gut) + var(--rail)); }
  .hero__rail { display: block; }
}

@media (max-width: 1100px) {
  .hero__body, .cta__body, .case-hero__body { grid-column: 1 / span 12; }
  .panel, .cta__side, .case-hero__summary { grid-column: 1 / span 12; }
  .cta__side { justify-content: flex-start; }
  .approach__aside, .approach__list,
  .profile__aside, .profile__cols,
  .case-body__aside, .case-body__blocks { grid-column: 1 / span 12; }
  .aside-sticky { position: static; }
  .cases__eyebrow, .cases__title, .cases__note { grid-column: 1 / span 12; }
  .case-card { grid-column: span 12 !important; }
  .step { grid-template-columns: 44px 1fr; }
  .step__text { grid-column: 2; }
  .block { grid-template-columns: 36px 1fr; }
  .block__items { grid-column: 2; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .brand__lines { display: none; }
  .site-header { padding: 16px var(--gut); }
  .header-cta { font-size: 10px; white-space: nowrap; }
  .case-hero__top { padding-bottom: 24px; }
  .kpi { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .kpi__cell:nth-child(3) { border-left: 0; }
  .kpi__cell:nth-child(n+3) { border-top: 1px solid #11120f2b; }
  .profile__items { margin-left: 0; }
  .next-case { flex-direction: column; align-items: flex-start; }
  .next-case__title { text-align: left; }
}
