/* ============================================================
   Mykola & Egor — внедрение ИИ, которое окупается
   Концепт: «размеченный аудит». Набранный отчёт (Piazzolla /
   Golos Text / JetBrains Mono) + второй слой «от руки» (Caveat):
   маркер, зачёркивания, стрелки, листы с пометками. Без рамок.
   ============================================================ */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efeae0;
  --bone: #fdfbf6;
  --ink: #17150f;
  --ink-soft: #4f4a3e;
  --muted: #6f6a5b;
  --line: rgba(23, 21, 15, 0.16);
  --line-soft: rgba(23, 21, 15, 0.09);
  --accent: #1a6840;
  --accent-deep: #124a2d;
  --accent-on-dark: #8cc9a4;

  --font-display: 'Piazzolla', 'Georgia', serif;
  --font-body: 'Golos Text', 'Arial', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-snappy: cubic-bezier(0.2, 0, 0, 1);
  --dur-hover: 200ms;
  --dur-reveal: 650ms;

  --container: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
}

/* ---------- база ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 40% at 12% 0%, rgba(106, 92, 56, 0.07), transparent 70%),
    radial-gradient(ellipse 50% 35% at 95% 90%, rgba(106, 92, 56, 0.05), transparent 70%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3, dt, dd, summary { hyphens: none; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* зерно: feTurbulence как data-URI, без ассетов */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.05;
  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='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* полоска прочтения — чистый CSS, тихо деградирует */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 70;
}
@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress-grow linear;
    animation-timeline: scroll(root);
  }
  @keyframes progress-grow { to { transform: scaleX(1); } }
}

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

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 0.6em;
  max-width: 16em;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2em;
}

/* рукописный слой */
.note {
  font-family: var(--font-hand);
  font-weight: 600;
  color: var(--accent-deep);
  line-height: 1.15;
}
.note--dark { color: var(--accent-on-dark); }
.note-big {
  display: inline-block;
  font-size: clamp(26px, 2.4vw, 34px);
  transform: rotate(-2deg);
  margin: 22px 0 8px;
}

/* ссылки: подчёркивание «рисуется», переживает перенос строк */
.site-nav a, .footer-meta a, .consent-text a, .faq-answer a, .link-arrow {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s var(--ease-out), color var(--dur-hover) var(--ease-out);
}
.site-nav a:hover, .footer-meta a:hover, .consent-text a:hover,
.faq-answer a:hover, .link-arrow:hover {
  background-size: 100% 1px;
}
.consent-text a, .footer-meta a, .faq-answer a, .link-arrow {
  background-size: 100% 1px;
}
.consent-text a:hover, .footer-meta a:hover, .faq-answer a:hover,
.link-arrow:hover { color: var(--accent); }

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

/* ---------- рисованные штрихи (общее) ---------- */

.draw-path {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.is-visible .draw-path {
  animation: draw 0.9s var(--ease-out) forwards;
  animation-delay: 0.45s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  padding: 18px 30px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-hover) var(--ease-out),
              background-color var(--dur-hover) var(--ease-out);
}
.btn--primary { background: var(--accent); color: var(--paper); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #000; transform: translateY(-1px); }
.btn--small { padding: 12px 18px; font-size: 14.5px; }
.btn-inner { display: inline-block; will-change: transform; }

.link-arrow {
  font-size: 16px;
  align-self: center;
  padding-block: 4px;
}

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 236, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-hover) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.amp { color: var(--accent); font-style: italic; }

.site-nav { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.site-nav a { font-size: 15px; color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); }

/* ---------- секции: мета-строка ---------- */

.section { padding-block: clamp(88px, 11vw, 136px); }

.section-meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: clamp(40px, 5vw, 64px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
/* номер секции — рукой консультанта */
.meta-index {
  font-family: var(--font-hand);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent-deep);
  display: inline-block;
  transform: rotate(-4deg) translateY(2px);
}
.meta-page { margin-left: auto; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 96px) clamp(72px, 9vw, 120px); }

.hero-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 580;
  font-size: clamp(2.7rem, 7.6vw, 6.4rem);
  line-height: 1.03;
  letter-spacing: -0.027em;
  margin: 0 0 clamp(28px, 4vw, 52px);
  max-width: 13.5em;
}

.line-mask { display: block; overflow: hidden; padding-bottom: 0.3em; margin-bottom: -0.3em; }
.line {
  display: block;
  transform: translateY(150%);
  animation: line-up 0.9s var(--ease-snappy) forwards;
  animation-delay: calc(120ms + var(--l) * 110ms);
}
@keyframes line-up { to { transform: translateY(0); } }

/* маркерный штрих за словом */
.hl { position: relative; z-index: 0; white-space: nowrap; }
.hl-svg {
  position: absolute;
  left: -0.12em; right: -0.1em;
  top: 56%;
  height: 0.52em;
  width: calc(100% + 0.22em);
  transform: translateY(-50%);
  z-index: -1;
  overflow: visible;
}
.hl-svg .draw-path {
  stroke-width: 38;
  opacity: 0.3;
  mix-blend-mode: multiply;
}

/* пометка от руки рядом с заголовком */
.inline-note {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  font-size: clamp(20px, 2vw, 30px);
  letter-spacing: 0.01em;
  transform: rotate(-3deg) translateY(-0.4em);
  margin-left: 0.5em;
  white-space: nowrap;
  vertical-align: middle;
}
.note-arrow {
  width: 2.2em;
  height: auto;
  overflow: visible;
}
.note-arrow .draw-path { stroke-width: 2.6; stroke: var(--accent-deep); }

.hero-lower {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}

.hero-sub {
  font-size: clamp(17px, 1.35vw, 19px);
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 0 2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-bottom: 26px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
  max-width: 32em;
}
.pulse-dot {
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 104, 64, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(26, 104, 64, 0); }
}

/* ---------- лист отчёта (артефакт) ---------- */

.hero-artifact {
  justify-self: end;
  width: min(100%, 480px);
  margin-top: clamp(-110px, -7vw, -40px); /* налезает на заголовок — намеренно */
}

.sheet {
  position: relative;
  margin: 0;
  background: var(--bone);
  padding: 30px 30px 24px;
  transform: rotate(-1.4deg);
  box-shadow:
    0 1px 2px rgba(23, 21, 15, 0.07),
    0 14px 38px -14px rgba(23, 21, 15, 0.28);
}
/* скотч сверху */
.sheet::before, .tape-note::before, .polaroid::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  width: 104px;
  height: 26px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(213, 203, 178, 0.55);
  box-shadow: 0 1px 2px rgba(23, 21, 15, 0.08);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 2px;
}
.sheet-num { color: var(--accent); }

.sheet-rows { list-style: none; margin: 0; padding: 0; }
.sheet-rows li {
  display: grid;
  grid-template-columns: 1fr auto minmax(74px, auto);
  align-items: baseline;
  gap: 12px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.sheet-label { color: var(--ink-soft); }
.sheet-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sheet-verdict {
  font-size: 21px;
  transform: rotate(-4deg);
  text-align: center;
  white-space: nowrap;
}
.sheet-row--rejected .sheet-label,
.sheet-row--rejected .sheet-value {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(23, 21, 15, 0.55);
  color: var(--muted);
}
.sheet-row--key { border-bottom: none; }
.sheet-row--key .sheet-label { color: var(--ink); font-weight: 500; }
.sheet-row--key .sheet-value { color: var(--accent-deep); font-size: 14px; }

.circle-wrap { position: relative; padding: 2px 6px; }
.circle-svg {
  position: absolute;
  inset: -12px -14px;
  width: calc(100% + 28px); height: calc(100% + 24px);
  overflow: visible;
}
.circle-svg .draw-path { stroke-width: 2.2; stroke: var(--accent-deep); }

.sheet-foot {
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- статистика под hero: проза с инлайн-цифрами ---------- */

.stats-line {
  margin: clamp(64px, 8vw, 110px) 0 0;
  max-width: 30em;
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.75;
  color: var(--ink-soft);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.5em;
  line-height: 1;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* статичный маркер-хайлайт для строчного текста */
.hl-text {
  background-image: linear-gradient(100deg,
    rgba(26, 104, 64, 0) 0%,
    rgba(26, 104, 64, 0.2) 4%,
    rgba(26, 104, 64, 0.24) 50%,
    rgba(26, 104, 64, 0.18) 96%,
    rgba(26, 104, 64, 0) 100%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0.04em 0.18em;
  margin-inline: -0.08em;
}

/* ---------- 01 диагноз ---------- */

.problem-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.problem-side p {
  margin: 0;
  color: var(--ink-soft);
}

.loss-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.ledger { list-style: none; margin: 0; padding: 0; }
.ledger-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding-block: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.ledger-row:first-child { border-top: 1px solid var(--line); }
.ledger-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 480;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ledger-row p { margin: 0; max-width: 38em; font-size: clamp(17px, 1.5vw, 20px); }

.loss-after {
  margin: 36px 0 0 auto;
  max-width: 34em;
  color: var(--ink-soft);
}

/* ---------- 02 кейсы ---------- */

.section--cases .display { margin-bottom: clamp(48px, 6vw, 88px); }

.case {
  border-top: 1px solid var(--line);
  padding-block: clamp(44px, 5vw, 72px);
}
.case:last-child { border-bottom: 1px solid var(--line); }

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 26px;
  margin-bottom: 30px;
}
.case-code {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 500;
}
.case-client {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.case-task {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

/* было → стало */
.case-swap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px clamp(18px, 3vw, 36px);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.was {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  color: var(--muted);
  padding-inline: 0.08em;
}
.strike-svg {
  position: absolute;
  inset: 8% -6% auto;
  width: 112%;
  height: 86%;
  overflow: visible;
}
.strike-svg .draw-path { stroke-width: 9; opacity: 0.72; mix-blend-mode: multiply; }

.swap-arrow {
  width: clamp(46px, 5vw, 74px);
  height: auto;
  align-self: center;
  overflow: visible;
}
.swap-arrow .draw-path { stroke-width: 3.2; stroke: var(--accent-deep); }

.now {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(3rem, 7.6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent-deep);
}
.case-task-tail {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  color: var(--ink-soft);
  transform: rotate(-2deg);
}

.case-cols {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(28px, 4vw, 96px);
  align-items: start;
}
.case-cols--flip .case-what { order: 2; }
.case-cols--flip > div:last-child { order: 1; }

.case-what p { margin: 0 0 1.2em; color: var(--ink-soft); max-width: 32em; }

.case-quote {
  position: relative;
  margin: 1.8em 0 0;
  padding-left: 1.4em;
}
/* висячая кавычка вместо цветной полосы */
.case-quote::before {
  content: '«';
  position: absolute;
  left: -0.06em;
  top: -0.34em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2.7em;
  line-height: 1;
  color: var(--accent);
}
.case-quote p { margin: 0 0 0.5em; font-style: italic; color: var(--ink); }
.case-quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* «чековые» строки с точечными лидерами — вместо таблиц */
.receipt { margin: 0; }
.receipt > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-block: 11px;
}
.receipt dt { color: var(--ink-soft); font-size: 15.5px; flex-shrink: 0; }
.receipt .dots {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted rgba(23, 21, 15, 0.28);
  transform: translateY(-4px);
}
.receipt dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.footnote {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0;
  max-width: 30em;
}

/* ---------- 03 процесс (тёмная) ---------- */

.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .section-meta { border-top-color: rgba(246, 243, 236, 0.25); color: rgba(246, 243, 236, 0.55); }
.section--dark .meta-index { color: var(--accent-on-dark); }
.section--dark ::selection { background: var(--accent-on-dark); color: var(--ink); }

.dark-lede {
  color: rgba(246, 243, 236, 0.7);
  max-width: 34em;
  margin: 0 0 clamp(48px, 6vw, 80px);
}

.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(20px, 4vw, 64px);
  padding-block: clamp(30px, 3.5vw, 44px);
  border-top: 1px solid rgba(246, 243, 236, 0.16);
}
.step-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 480;
  line-height: 1;
  color: var(--accent-on-dark);
  font-variant-numeric: tabular-nums;
}
.step-body h3 {
  font-family: var(--font-display);
  font-weight: 560;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.55em;
}
.step-time {
  font-family: var(--font-mono);
  font-size: 0.55em;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246, 243, 236, 0.55);
  white-space: nowrap;
}
.step-body p { margin: 0; max-width: 40em; color: rgba(246, 243, 236, 0.78); }

.step-note {
  position: absolute;
  right: 0;
  top: 50%;
  transform: rotate(-3deg) translateY(-50%);
  font-size: clamp(20px, 1.8vw, 26px);
  max-width: 9em;
  text-align: center;
}

/* ---------- 04 команда ---------- */

.team-intro {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(56px, 7vw, 100px);
}
.team-intro p { margin: 0; color: var(--ink-soft); }

.team-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 96px);
}

.person--offset { margin-top: clamp(32px, 5vw, 84px); }

/* полароид, приклеенный скотчем */
.polaroid {
  position: relative;
  background: var(--bone);
  padding: 14px 14px 10px;
  box-shadow:
    0 1px 2px rgba(23, 21, 15, 0.07),
    0 14px 34px -14px rgba(23, 21, 15, 0.3);
  margin-bottom: 30px;
  width: min(100%, 380px);
}
.polaroid--left { transform: rotate(-2deg); }
.polaroid--right { transform: rotate(1.6deg); }

/* фото «берут в руки»: выпрямляется и чуть приподнимается */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .polaroid { transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out); }
  .polaroid:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow:
      0 2px 4px rgba(23, 21, 15, 0.07),
      0 22px 48px -16px rgba(23, 21, 15, 0.34);
  }
  .sheet { transition: transform 0.7s var(--ease-out); }
  .hero-artifact:hover .sheet { transform: rotate(-0.5deg); }
}

.polaroid-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(165deg, var(--paper-deep) 0%, #e3dccc 100%);
  /* лёгкая «печать на бумаге», чтобы фото не спорили с тёплой палитрой */
  filter: saturate(0.9) contrast(0.97) sepia(0.06);
}
.polaroid-caption {
  margin: 8px 0 2px;
  text-align: center;
  font-size: 26px;
}

.person h3 {
  /* имя уже написано на полароиде от руки — заголовок остаётся для структуры */
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.person-role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.person-bio { margin: 0; color: var(--ink-soft); max-width: 30em; }

/* записка на скотче */
.tape-note {
  position: absolute;
  top: clamp(-30px, -2vw, -16px);
  right: clamp(0px, 5vw, 70px);
  transform: rotate(-3deg);
  background: var(--bone);
  padding: 18px 26px 16px;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  text-align: center;
  box-shadow:
    0 1px 2px rgba(23, 21, 15, 0.07),
    0 10px 24px -10px rgba(23, 21, 15, 0.3);
  margin: 0;
}

/* ---------- 05 вопросы ---------- */

.section--faq .display { margin-bottom: clamp(40px, 5vw, 64px); }

.faq-list { max-width: 880px; }

.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  padding-block: 24px;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  letter-spacing: -0.01em;
  transition: color var(--dur-hover) var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-deep); }

.faq-marker { flex: none; position: relative; width: 16px; height: 16px; }
.faq-marker::before, .faq-marker::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%; height: 1.5px;
  background: var(--accent);
  transition: transform 0.3s var(--ease-out);
}
.faq-marker::after { transform: rotate(90deg); }
.faq-item[open] .faq-marker::after { transform: rotate(0deg); }

.faq-answer { padding: 0 0 26px; }
.faq-answer p { margin: 0; max-width: 40em; color: var(--ink-soft); }

@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.35s var(--ease-out), content-visibility 0.35s allow-discrete;
  }
  .faq-item[open]::details-content { block-size: auto; }
}

/* ---------- 06 контакт ---------- */

.section--contact { padding-bottom: clamp(96px, 12vw, 160px); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}
.contact-copy > p { color: var(--ink-soft); max-width: 30em; margin: 0 0 36px; }

.tg-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--paper);
  padding: 22px 24px;
  text-decoration: none;
  transition: transform var(--dur-hover) var(--ease-out);
}
.tg-card:hover { transform: translateY(-2px); }
.tg-card:hover .tg-arrow { transform: translateX(4px); }

.tg-avatar {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.tg-text { display: grid; gap: 3px; }
.tg-text strong { font-size: 16.5px; font-weight: 500; }
.tg-text span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(246, 243, 236, 0.6);
}
.tg-arrow {
  margin-left: auto;
  font-size: 22px;
  color: var(--accent-on-dark);
  transition: transform var(--dur-hover) var(--ease-out);
}

/* форма */
.contact-form { display: grid; gap: 26px; }

.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px 12px;
  border-radius: 0;
  transition: border-color var(--dur-hover) var(--ease-out);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 11px;
}
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #a33b2e; }
.field-error {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #a33b2e;
  min-height: 1em;
}

/* чекбокс согласия — без предустановки, нарисован свой */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  max-width: 36em;
}
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-box {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--ink);
  background: transparent;
  position: relative;
  transition: background-color var(--dur-hover) var(--ease-out);
}
.consent input:checked + .consent-box { background: var(--accent); border-color: var(--accent); }
.consent input:checked + .consent-box::after {
  content: '';
  position: absolute;
  left: 4.5px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.consent input:focus-visible + .consent-box {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.consent-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.btn--submit { justify-self: start; }

.form-status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  min-height: 1.4em;
}

/* ---------- футер ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 52px;
}
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin: 0;
}
.footer-meta { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.04em; color: var(--muted); }
.footer-meta p { margin: 0 0 6px; }
.footer-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  max-width: 26em;
  margin: 0;
  text-align: right;
}

/* ---------- reveal-система ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* элементы с трансформом: не затирать их transform ревилом */
.case-swap[data-reveal] { transform: none; }

.no-js [data-reveal], .no-observer [data-reveal] { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .line { transform: none; animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .draw-path { stroke-dashoffset: 0; animation: none; }
  .progress { display: none; }
}

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

.br-narrow { display: none; }

@media (max-width: 1080px) {
  .hero-lower { grid-template-columns: 1fr; }
  .hero-artifact { justify-self: start; margin-top: 16px; }
  .inline-note { display: none; }
  .problem-grid, .team-intro { grid-template-columns: 1fr; align-items: start; }
  .case-cols { grid-template-columns: 1fr; }
  .case-cols--flip .case-what { order: 1; }
  .case-cols--flip > div:last-child { order: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .tape-note { position: static; display: inline-block; margin-top: 12px; justify-self: start; }
  .step-note { position: static; transform: rotate(-2deg); margin-top: 14px; max-width: none; text-align: left; grid-column: 2; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .step-note { grid-column: 1; }
  .ledger-row { grid-template-columns: 56px 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .person--offset { margin-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-note { text-align: left; }
  .br-narrow { display: inline; }
  .sheet { transform: rotate(-0.8deg); }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .receipt dt { font-size: 14.5px; }
}
