:root {
  --paper: #EDEFF0;
  --white: #FFFFFF;
  --ink: #0D0F12;
  --ink-soft: #171A1F;
  --text-2: #4A5058;
  --line: #D3D7DA;
  --coral: #FF5A36;
  --coral-hi: #FF7A5C;
  --coral-text: #D63A16;
  --on-ink: #F3F4F5;
  --on-ink-2: #A9AEB5;
  --line-ink: #2B3038;
  --font: 'Geologica', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: clamp(20px, 2.4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--coral) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 1.0625rem/1.5 var(--font); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { flex: none; }
::selection { background: var(--ink); color: var(--coral); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.sec--ink :focus-visible, .foot :focus-visible, .svc--help :focus-visible, .talk__card :focus-visible { outline-color: var(--coral); }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 24px; }

.wrap { max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 16px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 26px; border-radius: 16px; border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; transition: background-color .25s, color .25s, border-color .25s, translate .4s var(--ease), box-shadow .4s var(--ease); }
.btn svg { width: 20px; height: 20px; transition: translate .4s var(--ease); }
.btn:hover svg { translate: 4px 0; }
.btn:active { translate: 0 1px; }
.btn--ink { background: var(--ink); color: #fff; box-shadow: 0 18px 36px -18px rgba(13, 15, 18, .7); }
.btn--ink:hover { background: #fff; color: var(--ink); }
.btn--coral { background: var(--coral); color: var(--ink); box-shadow: 0 18px 36px -18px rgba(255, 90, 54, .8); }
.btn--coral:hover { background: var(--coral-hi); }
.btn--line { border-color: currentColor; }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.sec--ink .btn--line:hover, .talk__card .btn--line:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn--line:hover svg { translate: none; }
.btn--l { min-height: 68px; padding: 0 34px; font-size: 1.0625rem; }
.btn--full { width: 100%; }
.btn:disabled { background: var(--line); color: #7C838B; box-shadow: none; cursor: not-allowed; }
.btn:disabled svg { translate: none; }

/* Первый экран */
.hero { position: relative; background: var(--coral); border-radius: 0 0 var(--r) var(--r); padding-bottom: clamp(24px, 3vw, 40px); overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; right: -12%; top: -30%; z-index: -1; width: 70vw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, #FF8F6B, transparent); }
.hero ::selection { background: var(--ink); color: #fff; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; margin-top: 16px; padding: 12px 22px; border-radius: 20px; background: var(--ink); color: var(--on-ink); }
.brand { display: inline-flex; align-items: center; gap: 16px; }
.brand b { font-weight: 800; font-size: 1.5rem; letter-spacing: -.04em; }
.brand span { max-width: 26ch; padding-left: 16px; border-left: 1px solid var(--line-ink); font-size: .8125rem; line-height: 1.3; color: var(--on-ink-2); }
.bar__nav { display: flex; gap: 4px 26px; font-weight: 400; font-size: .9375rem; }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; transition: color .2s; }
.bar__nav a:hover { color: var(--coral); }
.bar__phone { font-weight: 700; font-size: 1.125rem; white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .2s; }
.bar__phone:hover { color: var(--coral); }

.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); align-items: center; gap: 24px clamp(24px, 4vw, 56px); padding-block: clamp(32px, 5vw, 72px) clamp(24px, 3vw, 40px); }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(20px, 2.4vw, 32px); }
h1 { font-weight: 800; font-size: clamp(2rem, 4.5vw, 4.125rem); line-height: 1.02; letter-spacing: -.035em; }
h1 em { font-style: normal; color: #fff; white-space: nowrap; }
.hero__copy p { max-width: 36ch; font-size: clamp(1.0625rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 400; color: #2A0D05; }
.hero__art { position: relative; justify-self: center; width: min(100%, 520px); }
.hero__art img { width: 100%; filter: drop-shadow(0 50px 50px rgba(90, 20, 0, .45)); }
.days { position: absolute; left: -8%; top: 6%; display: flex; flex-direction: column; gap: 8px; }
.days li { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--on-ink-2); font-size: .8125rem; line-height: 1.3; box-shadow: 0 18px 30px -16px rgba(13, 15, 18, .7); }
.days b { font-weight: 700; font-size: .9375rem; color: #fff; }
.days li:nth-child(2) { translate: 14px 0; }
.days li:nth-child(3) { translate: 28px 0; background: #fff; color: var(--text-2); }
.days li:nth-child(3) b { color: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: 22px; background: var(--ink); color: var(--on-ink); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; padding: clamp(18px, 2.4vw, 30px); border-left: 1px solid var(--line-ink); }
.stats div:first-child { border-left: 0; }
.stats dd { font-weight: 800; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1; letter-spacing: -.04em; color: var(--coral); font-variant-numeric: tabular-nums; }
.stats dt { max-width: 22ch; font-size: .9375rem; line-height: 1.35; color: var(--on-ink-2); }

/* Секции */
.sec { position: relative; padding-block: clamp(64px, 9vw, 128px); }
.sec--white { background: var(--white); border-radius: var(--r); }
.sec--ink { background: var(--ink); color: var(--on-ink); border-radius: var(--r); }
.sec--coral { background: var(--coral); border-radius: var(--r); overflow: hidden; isolation: isolate; }
h2 { max-width: 20em; margin-bottom: clamp(32px, 4.5vw, 60px); font-weight: 700; font-size: clamp(1.625rem, 3.5vw, 3rem); line-height: 1.06; letter-spacing: -.03em; }
h2 em { font-style: normal; color: var(--coral-text); }
.sec--ink h2 em { color: var(--coral); }

/* Услуги */
.svcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.svc { display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 20px; border-radius: 26px; background: var(--white); transition: translate .5s var(--ease), box-shadow .5s var(--ease); }
.svc:hover { translate: 0 -8px; box-shadow: 0 34px 50px -34px rgba(13, 15, 18, .45); }
.svc__shot { --vh: clamp(200px, 19vw, 260px); height: var(--vh); overflow: hidden; border-radius: 16px; background: var(--paper); }
.svc__shot img { width: 100%; transition: transform 1s var(--ease); }
.svc__shot:hover img, .svc__shot:focus-visible img { transform: translateY(calc(-100% + var(--vh))); transition: transform 7s linear; }
.svc h3 { padding-inline: 8px; font-weight: 700; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.02em; }
.svc p { flex-grow: 1; padding-inline: 8px; font-size: .9375rem; line-height: 1.45; color: var(--text-2); }
.svc dl { display: flex; gap: 0; margin-inline: 8px; border-block: 1px solid var(--line); }
.svc dl div { flex: 1; padding: 12px 0; }
.svc dl div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.svc dt { font-size: .8125rem; color: var(--text-2); }
.svc dd { font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; white-space: nowrap; }
.svc .btn { margin-inline: 8px; min-height: 52px; padding-inline: 16px; font-size: .9375rem; }
.svc--help { justify-content: flex-end; padding: 28px 22px 22px; background: var(--ink); color: var(--on-ink); }
.svc--help h3, .svc--help p, .svc--help .btn { padding-inline: 0; margin-inline: 0; }
.svc--help p { flex-grow: 0; color: var(--on-ink-2); }
.svc__face { width: 96px; height: 96px; margin-bottom: auto; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px var(--coral); }

/* Портфолио */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.work__shot { width: 100%; aspect-ratio: 1 / .86; overflow: hidden; border-radius: 22px; background: var(--ink-soft); border: 1px solid var(--line-ink); }
.work__shot img { width: 100%; transition: scale .8s var(--ease); transform-origin: 50% 0; }
.work:hover .work__shot img { scale: 1.05; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: .8125rem; font-weight: 600; }
.work h3 { font-weight: 500; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.25; letter-spacing: -.02em; }
.work h3 b { font-weight: 800; color: var(--coral); white-space: nowrap; }
.done { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr) auto; align-items: center; gap: 20px 32px; margin-top: clamp(32px, 4vw, 56px); padding: clamp(20px, 2.6vw, 32px); border-radius: 24px; background: var(--ink-soft); border: 1px solid var(--line-ink); }
.done h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; }
.done ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.done li { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; }
.done li svg { width: 18px; height: 18px; color: var(--coral); }

/* Квиз */
.quiz { display: grid; grid-template-columns: 300px minmax(0, 1fr); border-radius: 28px; overflow: hidden; background: var(--white); box-shadow: 0 40px 70px -50px rgba(13, 15, 18, .5); }
.quiz__side { display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 2.6vw, 32px); background: var(--ink); color: var(--on-ink); }
.who { display: flex; align-items: center; gap: 14px; }
.who img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.who div { display: flex; flex-direction: column; line-height: 1.3; }
.who b { font-weight: 700; }
.who span { font-size: .875rem; color: var(--on-ink-2); }
.who--l img { width: 84px; height: 84px; }
.who--l span { color: var(--text-2); }
.quiz__ask { font-size: .9375rem; color: var(--on-ink-2); }
.quiz__ask a { color: var(--coral); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.quiz__meter { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quiz__bar { height: 6px; border-radius: 6px; background: var(--line-ink); overflow: hidden; }
.quiz__bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--coral); transition: width .6s var(--ease); }
.quiz__main { display: flex; flex-direction: column; gap: 24px; padding: clamp(20px, 3vw, 40px); min-height: 440px; }
.quiz fieldset { display: flex; flex-direction: column; }
.quiz fieldset:not([hidden]) { animation: step .5s var(--ease); }
@keyframes step { from { opacity: 0; translate: 18px 0; } }
.say { order: -1; align-self: flex-start; max-width: 58ch; margin-bottom: 22px; padding: 14px 18px; border-radius: 4px 18px 18px 18px; background: var(--paper); font-size: .9375rem; line-height: 1.45; color: var(--text-2); }
.quiz legend { float: left; width: 100%; margin-bottom: 18px; font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; }
.quiz legend + * { clear: both; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.opts--row { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 18px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 400; transition: border-color .2s, background-color .2s, translate .35s var(--ease); }
.opt input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.opt::before { content: ''; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #AEB4BA; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.opt:hover { border-color: var(--ink); translate: 0 -2px; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--ink); color: #fff; }
.opt:has(input:checked)::before { border-color: var(--coral); background: var(--coral); box-shadow: inset 0 0 0 4px var(--ink); }
.opt:has(input:focus-visible) { outline: 2px solid var(--coral-text); outline-offset: 3px; }
.quiz__hint { margin: -6px 0 18px; color: var(--text-2); }
.quiz__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; }
.quiz__nav [data-q-back] { margin-right: auto; }
.quiz__done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.quiz__done svg { width: 56px; height: 56px; padding: 13px; border-radius: 50%; background: var(--coral); }
.quiz__done h3 { font-weight: 700; font-size: 1.75rem; letter-spacing: -.02em; }

/* Поля */
.lead { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: .875rem; font-weight: 500; }
.field input { width: 100%; max-width: 520px; height: 56px; padding: 0 18px; border-radius: 16px; background: var(--paper); border: 1.5px solid transparent; caret-color: var(--coral-text); transition: border-color .2s, background-color .2s; }
.lead .field input { max-width: none; }
.field input::placeholder { color: #7C838B; }
.field input:hover { border-color: var(--line); }
.field input:focus { outline: none; border-color: var(--ink); background: #fff; }
.field input[aria-invalid="true"] { border-color: #C2281A; }
.field__err { font-size: .8125rem; font-weight: 500; color: #B0200F; }
.consent { font-size: .8125rem; line-height: 1.45; color: var(--text-2); }
.consent button { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.consent button:hover { color: var(--coral-text); }
.demo-note { font-size: .8125rem; color: var(--text-2); }
.lead__done { display: flex; align-items: flex-start; gap: 14px; }
.lead__done svg { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--coral); color: var(--ink); }
.lead__done b { display: block; font-weight: 700; font-size: 1.125rem; }
.lead__done span { display: block; margin-top: 4px; font-size: .9375rem; }
.talk__card .field input { background: var(--ink-soft); border-color: var(--line-ink); color: #fff; caret-color: var(--coral); }
.talk__card .field input::placeholder { color: #8C929A; }
.talk__card .field input:focus { border-color: var(--coral); background: var(--ink-soft); }
.talk__card .field input[aria-invalid="true"] { border-color: #FF8A7A; }
.talk__card .field__err { color: #FF9C8E; }
.talk__card .consent, .talk__card .demo-note { color: var(--on-ink-2); }
.talk__card .consent button:hover { color: var(--coral); }

/* 6 причин */
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); counter-reset: w; }
.why li { counter-increment: w; padding: 22px 0 34px; border-top: 1.5px solid var(--ink); }
.why li::before { content: counter(w); display: block; margin-bottom: 26px; font-weight: 800; font-size: clamp(3rem, 6vw, 5rem); line-height: .9; letter-spacing: -.05em; color: var(--coral); }
.why h3 { font-weight: 700; font-size: 1.375rem; line-height: 1.15; letter-spacing: -.02em; }
.why p { margin-top: 10px; max-width: 38ch; font-size: 1rem; color: var(--text-2); }

/* Гарантии */
.sheets { position: absolute; left: 0; bottom: 0; z-index: -1; width: 100%; min-width: 900px; filter: drop-shadow(0 -10px 30px rgba(90, 20, 0, .35)); pointer-events: none; }
.sec--coral { padding-bottom: clamp(190px, 26vw, 360px); }
.sec--coral h2 { max-width: 22em; }
.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: clamp(24px, 3vw, 40px); }
.terms li { padding: clamp(20px, 2.4vw, 30px); border-radius: 24px; background: var(--ink); color: var(--on-ink); }
.terms h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; }
.terms p { margin-top: 10px; font-size: .9375rem; color: var(--on-ink-2); }

/* Команда */
.team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.team li { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 20px; border-radius: 26px; background: var(--white); }
.team img, .team i { width: 100%; aspect-ratio: 1; margin-bottom: 12px; border-radius: 16px; object-fit: cover; }
.team i { display: flex; align-items: center; justify-content: center; background: var(--paper); font-style: normal; font-weight: 800; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.04em; color: var(--coral-text); }
.team b { padding-inline: 6px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.team span { padding-inline: 6px; font-size: .875rem; color: var(--text-2); }

/* Алгоритм */
.route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: r; }
.route li { counter-increment: r; position: relative; padding: clamp(20px, 2.4vw, 30px); padding-top: clamp(64px, 6vw, 84px); border-radius: 24px; background: var(--ink-soft); border: 1px solid var(--line-ink); transition: border-color .3s, translate .5s var(--ease); }
.route li:hover { border-color: var(--coral); translate: 0 -6px; }
.route li::before { content: '0' counter(r); position: absolute; left: clamp(20px, 2.4vw, 30px); top: clamp(20px, 2.4vw, 28px); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; color: var(--coral); }
.route li::after { content: ''; position: absolute; left: clamp(64px, 6vw, 80px); right: clamp(20px, 2.4vw, 30px); top: clamp(34px, 3.4vw, 42px); height: 1px; background: var(--line-ink); }
.route h3 { font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em; }
.route p { margin-top: 10px; font-size: .9375rem; color: var(--on-ink-2); }

/* Консультация */
.talk { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.talk h2 { margin-bottom: 28px; }
.ticks { display: flex; flex-direction: column; margin-top: 24px; }
.ticks li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-weight: 400; }
.ticks svg { width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--coral); }
.talk__card { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 40px); border-radius: 28px; background: var(--ink); color: var(--on-ink); box-shadow: 0 40px 70px -40px rgba(13, 15, 18, .7); }
.talk__card h3 { font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.15; letter-spacing: -.02em; }
.talk__card > p { font-size: .9375rem; color: var(--on-ink-2); }
.talk__msg { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.talk__msg .btn { flex: 1 1 140px; }

/* Подвал */
.foot { margin-top: clamp(16px, 2vw, 24px); background: var(--ink); color: var(--on-ink); border-radius: var(--r) var(--r) 0 0; }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 32px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: .9375rem; color: var(--on-ink-2); }
.foot__nav a { display: inline-flex; align-items: center; min-height: 40px; transition: color .2s; }
.foot__nav a:hover { color: var(--coral); }
.foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 20px 32px; border-top: 1px solid var(--line-ink); font-size: .8125rem; color: #8C929A; }
.foot__legal p { max-width: 80ch; }
.foot__legal button { color: var(--on-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.foot__legal button:hover { color: var(--coral); }

/* Окна */
.modal { width: min(500px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: clamp(24px, 4vw, 40px); border: 0; border-radius: 28px; background: var(--white); color: var(--ink); box-shadow: 0 60px 120px -40px rgba(13, 15, 18, .8); overflow: auto; }
.modal::backdrop { background: rgba(13, 15, 18, .72); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal h2 { margin: 0; padding-right: 44px; font-size: clamp(1.375rem, 3vw, 1.75rem); }
.modal__lead { margin: 12px 0 22px; color: var(--text-2); }
.modal__x { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--paper); transition: background-color .2s, color .2s, rotate .4s var(--ease); }
.modal__x svg { width: 18px; height: 18px; }
.modal__x:hover { background: var(--ink); color: #fff; rotate: 90deg; }
.modal--text { width: min(720px, calc(100vw - 24px)); }
.modal--text p { margin-top: 14px; color: var(--text-2); max-width: 70ch; }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy > * { animation: rise .9s var(--ease) backwards; }
  .hero__copy > :nth-child(2) { animation-delay: .08s; }
  .hero__copy > :nth-child(3) { animation-delay: .16s; }
  .hero__art img { animation: land 1.2s var(--ease) backwards .1s; }
  .days li { animation: rise .8s var(--ease) backwards; }
  .days li:nth-child(1) { animation-delay: .7s; }
  .days li:nth-child(2) { animation-delay: 1s; }
  .days li:nth-child(3) { animation-delay: 1.3s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes land { from { opacity: 0; transform: translateY(60px) rotate(6deg); } }

@media (max-width: 1080px) {
  .brand span { display: none; }
  .svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc__shot { --vh: clamp(200px, 34vw, 300px); }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .done { grid-template-columns: 1fr; }
  .done .btn { justify-self: start; }
}
@media (max-width: 900px) {
  .bar__nav { display: none; }
  .hero__grid, .talk { grid-template-columns: 1fr; }
  .hero__art { width: min(80%, 400px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line-ink); }
  .works { display: flex; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .works::-webkit-scrollbar { display: none; }
  .work { flex: 0 0 min(80vw, 340px); scroll-snap-align: start; }
  .quiz { grid-template-columns: 1fr; }
  .quiz__side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .quiz__ask { display: none; }
  .quiz__meter { margin: 0 0 0 auto; min-width: 120px; }
  .quiz__main { min-height: 0; }
  .why, .route { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terms { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .bar { padding: 10px 16px; }
  .brand b { font-size: 1.25rem; }
  .bar__phone { font-size: .9375rem; }
  .btn--l { width: 100%; min-height: 60px; padding: 0 18px; font-size: 1rem; }
  .svcs, .why, .route { grid-template-columns: 1fr; }
  .svc__shot { --vh: 240px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts--row { grid-template-columns: 1fr; }
  .quiz__nav { flex-wrap: wrap; }
  .quiz__nav .btn { flex: 1 1 auto; }
  .days { left: -10%; top: 0; }
  .days li { padding: 8px 12px; }
  .foot__row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Портфолио: фильтр и сетка работ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line-ink); font-weight: 500; font-size: .9375rem; color: var(--on-ink-2); transition: background-color .2s, color .2s, border-color .2s; }
.filters button:hover { border-color: var(--coral); color: #fff; }
.filters button[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: var(--ink); font-weight: 600; }
.works { gap: 32px 20px; }
.work__shot { aspect-ratio: 16 / 10; }
.work__shot img { height: 100%; object-fit: cover; object-position: top; }
.work h3 { font-weight: 600; }
.work:not([hidden]) { animation: step .5s var(--ease); }
@media (max-width: 900px) {
  .filters { flex-wrap: nowrap; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
}

/* Работа-ссылка на перерисованный сайт */
.work > a { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; }
.work__shot { position: relative; }
.work__go { position: absolute; right: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; background: var(--coral); color: var(--ink); font-size: .8125rem; font-weight: 600; opacity: 0; translate: 0 8px; transition: opacity .3s, translate .4s var(--ease); }
.work > a:hover .work__go, .work > a:focus-visible .work__go { opacity: 1; translate: 0; }
.work > a:hover h3 { color: var(--coral); }
@media (hover: none) { .work__go { opacity: 1; translate: 0; } }

/* Якоря: заголовок раздела встаёт сразу под шапкой, без лишнего отступа сверху */
section.sec[id] { scroll-margin-top: calc(24px - clamp(64px, 9vw, 128px)); }
