/* Максим Юрин — сайт. Визуальная система по скилу landing-page-design:
   шкала Tailwind для шрифтов, шаги отступов 2/4/8/12/16/24/32/40/48/64/80/96, плоские фоны. */

:root {
  --bg: #FFFFFF;
  --soft: #F5F6F8;
  --ink: #0B0D12;
  --ink-2: #3F4654;
  --muted: #6B7280;
  --line: #E3E6EB;
  --accent: #1C3D8F;
  --accent-hover: #163275;
  --accent-soft: #EDF1FA;
  --ok: #17663A;
  --err: #B42318;

  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--s-900); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 24px; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); }

.skip {
  position: absolute; left: var(--s-200); top: var(--s-200); z-index: 100;
  padding: var(--s-75) var(--s-100); background: var(--ink); color: #fff; border-radius: var(--r-lg);
  transform: translateY(-200%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-300); }

/* ---------- Типографика ---------- */
.kicker {
  font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent);
  margin-bottom: var(--s-200);
}
.h2 { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; max-width: 760px; }
.h3 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: 18px; line-height: 28px; color: var(--ink-2); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); border: 1px solid transparent;
  font: 600 16px/24px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .5s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn--sm { font-size: 14px; line-height: 20px; }
.btn--lg { padding: var(--s-100) var(--s-300); }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line); background: var(--bg); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---------- Навигация ---------- */
.nav { position: fixed; top: var(--s-200); left: 0; right: 0; z-index: 50; padding: 0 var(--s-200); pointer-events: none; }
.nav__bar {
  pointer-events: auto; margin: 0 auto; max-width: 1080px;
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(227, 230, 235, .9);
  border-radius: var(--r-2xl); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: box-shadow .3s var(--ease);
}
.nav.is-scrolled .nav__bar { box-shadow: 0 8px 24px rgba(11, 13, 18, .06); }
.nav__brand { display: flex; align-items: center; gap: var(--s-75); font-weight: 700; text-decoration: none; margin-right: auto; }
.nav__mono {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-lg);
  background: var(--ink); color: #fff; font-size: 12px; line-height: 16px; font-weight: 700;
}
.nav__links { display: flex; gap: var(--s-300); }
.nav__links a {
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .3s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__links a[aria-current="true"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.nav__toggle { display: none; }

.menu {
  pointer-events: auto; position: fixed; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: var(--s-900) var(--s-300) var(--s-400);
}
.menu nav { display: flex; flex-direction: column; gap: var(--s-75); }
.menu a:not(.btn) { font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none; padding: var(--s-75) 0; }
.menu .btn { margin-top: var(--s-300); }
.menu nav > * { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.menu.is-open nav > * { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: 160px 0 var(--s-900); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s-700); align-items: center; }
.hero__title {
  font-size: 60px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; max-width: 680px;
  background: linear-gradient(90deg, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: var(--s-50);
}
.hero__sub { margin-top: var(--s-300); max-width: 680px; font-size: 18px; line-height: 28px; color: var(--ink-2); }
.hero__actions { margin-top: var(--s-400); display: flex; align-items: center; gap: var(--s-200); flex-wrap: wrap; }
.hero__note { font-size: 14px; line-height: 20px; color: var(--muted); max-width: 260px; }
.stats { margin: var(--s-600) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-300); border-top: 1px solid var(--line); padding-top: var(--s-300); }
.stat dt { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat dd { margin: var(--s-50) 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }

.hero__photo { position: relative; margin: 0; }
.hero__photo img { width: 100%; border-radius: var(--r-3xl); aspect-ratio: 4 / 5; object-fit: cover; }
.badge {
  position: absolute; left: calc(-1 * var(--s-600)); bottom: var(--s-400);
  display: flex; flex-direction: column; gap: var(--s-25);
  padding: var(--s-200); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2xl);
  box-shadow: 0 16px 40px rgba(11, 13, 18, .10); font-size: 14px; line-height: 20px;
}
.badge__label { font-size: 12px; line-height: 16px; color: var(--muted); }
.badge strong { font-size: 16px; line-height: 24px; }
.badge span:last-child { color: var(--ink-2); }

/* ---------- Секции ---------- */
.section { padding: var(--s-900) 0; }
.section--soft { background: var(--soft); }
.section--tight { padding: var(--s-600) 0; }
.section .h2 { margin-bottom: var(--s-600); }

.grid { display: grid; gap: var(--s-200); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card { padding: var(--s-300); border-radius: var(--r-2xl); background: var(--soft); }
.card p { margin-top: var(--s-75); color: var(--ink-2); }
.card--line { background: var(--bg); border: 1px solid var(--line); transition: border-color .3s var(--ease), transform .5s var(--ease); }
.card--line:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__num { display: block; margin-bottom: var(--s-300); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---------- Кейсы ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-200); }
.case { display: flex; flex-direction: column; gap: var(--s-200); padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.case--wide { grid-column: 1 / -1; background: var(--ink); color: #fff; border-color: var(--ink); }
.case__tag { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.case--wide .case__tag { color: #9AA3B2; }
.case--wide .h3 { font-size: 24px; line-height: 32px; margin-top: var(--s-75); }
.case__nums { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-300); }
.case__nums--2 { grid-template-columns: repeat(2, 1fr); }
.case__nums dt { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.case__nums dd { margin: var(--s-50) 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.case--wide .case__nums dd { color: #B6BDC9; }
.case--wide .case__nums { padding: var(--s-300) 0; border-top: 1px solid #2A2F3A; border-bottom: 1px solid #2A2F3A; }
.case__result { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--accent); }
.case__text { color: var(--ink-2); margin-top: auto; }
.case--wide .case__text { color: #D3D8E0; max-width: 760px; }

/* ---------- Фраза-манифест ---------- */
.tagline { padding: 160px 0; }
.tagline__text { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; max-width: 960px; text-wrap: balance; }
.tagline__text .w { color: rgba(11, 13, 18, .25); transition: color .6s var(--ease); }
.tagline__text .w.on { color: var(--ink); }

/* ---------- Шаги ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-200); counter-reset: none; }
.step { padding: var(--s-400); background: var(--bg); border-radius: var(--r-3xl); border: 1px solid var(--line); }
.step__num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--s-300);
  border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.step p { margin-top: var(--s-75); color: var(--ink-2); }

/* ---------- Обо мне ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-700); align-items: start; }
.about .h2 { margin-bottom: var(--s-300); }
.chips { list-style: none; padding: 0; margin: var(--s-400) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-75); }
.chips li { padding: var(--s-50) var(--s-100); border: 1px solid var(--line); border-radius: var(--r-full); font-size: 14px; line-height: 20px; color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; flex-direction: column; gap: var(--s-25); padding: var(--s-300) 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline__year { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.timeline strong { font-size: 16px; line-height: 24px; font-weight: 600; }
.timeline li > span:last-child { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- ASM ---------- */
.asm { display: flex; align-items: center; justify-content: space-between; gap: var(--s-400); padding: var(--s-400); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.asm .kicker { margin-bottom: var(--s-75); }
.asm__title { margin-bottom: var(--s-75); }
.asm p:not(.kicker) { color: var(--ink-2); max-width: 680px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s-700); align-items: start; }
.faq__list { display: flex; flex-direction: column; gap: var(--s-75); }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2xl); transition: border-color .3s var(--ease); }
.faq details[open] { border-color: var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200);
  padding: var(--s-200) var(--s-300); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat;
  transition: transform .5s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s-300) var(--s-300); color: var(--ink-2); }

/* ---------- Заявка ---------- */
.lead-section { background: var(--soft); }
.lead-grid { display: grid; grid-template-columns: 1fr 480px; gap: var(--s-700); align-items: start; }
.lead-copy .h2 { margin-bottom: var(--s-300); }
.contacts { list-style: none; padding: 0; margin: var(--s-500) 0 0; display: flex; flex-direction: column; gap: var(--s-100); }
.contacts li { display: flex; gap: var(--s-200); }
.contacts span { width: 80px; flex: none; color: var(--muted); }
.contacts a { font-weight: 600; text-decoration: none; }
.contacts a:hover { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: var(--s-200); padding: var(--s-400); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-3xl); }
.field { display: flex; flex-direction: column; gap: var(--s-75); }
.field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  font: 400 16px/24px var(--font); color: var(--ink);
  padding: var(--s-100) var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--bg);
  transition: border-color .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field textarea:hover { border-color: #C5CAD3; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field__err { font-size: 14px; line-height: 20px; color: var(--err); }
.check { display: flex; gap: var(--s-100); align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: var(--s-25) 0 0; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent); }
.form__status { font-size: 14px; line-height: 20px; min-height: 20px; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }

/* ---------- Подвал ---------- */
.footer { padding: var(--s-400) 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--muted); }
.footer__row { display: flex; justify-content: space-between; gap: var(--s-200); flex-wrap: wrap; }
.footer nav { display: flex; gap: var(--s-300); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Служебные страницы: политика, 404 ---------- */
.legal { padding-top: var(--s-700); }
.legal__wrap { max-width: 760px; }
.legal__upd { margin: var(--s-200) 0 var(--s-400); font-size: 14px; line-height: 20px; color: var(--muted); }
.legal .h3 { margin: var(--s-400) 0 var(--s-100); }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: var(--s-100); }
.legal ul { margin: var(--s-100) 0 0; padding-left: var(--s-300); }
.legal li + li { margin-top: var(--s-75); }
.legal a { color: var(--accent); }
.legal .kicker a { text-decoration: none; }
.notfound { min-height: 100vh; display: grid; place-items: center; }
.notfound .lead { margin: var(--s-300) 0 var(--s-400); }

/* ---------- Появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity .6s linear; }
  .menu nav > * { transform: none; }
  .btn:hover, .card--line:hover { transform: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-500); }
  .hero__title { font-size: 48px; }
  .badge { left: calc(-1 * var(--s-300)); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .cases { grid-template-columns: repeat(2, 1fr); }
  .case__nums { grid-template-columns: repeat(2, 1fr); }
  .case:nth-child(4) { grid-column: 1 / -1; }
  .tagline__text { font-size: 36px; }
  .lead-grid { grid-template-columns: 1fr 1fr; gap: var(--s-500); }
}

@media (max-width: 760px) {
  .wrap { padding: 0 var(--s-200); }
  .nav { top: var(--s-100); padding: 0 var(--s-100); }
  .nav__cta { display: none; }
  .nav__toggle {
    display: grid; place-items: center; position: relative; width: 40px; height: 40px; border: 0; border-radius: var(--r-lg);
    background: transparent; cursor: pointer;
  }
  .nav__toggle span { position: absolute; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .5s var(--ease); }
  .nav__toggle span:first-child { transform: translateY(-4px); }
  .nav__toggle span:last-child { transform: translateY(4px); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

  .hero { padding: 120px 0 var(--s-700); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { max-width: 280px; }
  .badge { left: auto; right: calc(-1 * var(--s-700)); bottom: var(--s-300); padding: var(--s-100); }
  .hero__title { font-size: 36px; line-height: 40px; }
  .hero__title br { display: none; }
  .hero__sub { font-size: 16px; line-height: 24px; }
  .stats { grid-template-columns: 1fr; gap: var(--s-200); }
  .stat { display: flex; align-items: baseline; gap: var(--s-200); }
  .stat dt { min-width: 112px; font-size: 24px; line-height: 32px; }

  .section { padding: var(--s-700) 0; }
  .section .h2 { margin-bottom: var(--s-400); }
  .h2 { font-size: 30px; line-height: 36px; }
  .grid--4, .grid--3, .cases, .steps, .about, .faq, .lead-grid { grid-template-columns: 1fr; }
  .about, .faq, .lead-grid { gap: var(--s-400); }
  .case { padding: var(--s-300); }
  .case__nums, .case__nums--2 { grid-template-columns: 1fr; gap: var(--s-200); }
  .case__nums div { display: flex; align-items: baseline; gap: var(--s-200); }
  .case__nums dt { min-width: 128px; font-size: 24px; line-height: 32px; }
  .case__nums dd { margin: 0; }
  .tagline { padding: var(--s-900) 0; }
  .tagline__text { font-size: 30px; line-height: 36px; }
  .asm { flex-direction: column; align-items: flex-start; padding: var(--s-300); }
  .form { padding: var(--s-300); }
}
