/* ============================================================
   Hazzer — портфолио. Светлый стиль в духе Apple.
   ============================================================ */
:root {
  --white: #ffffff;
  --gray: #f5f5f7;
  --gray-2: #e8e8ed;
  --line: #d2d2d7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --blue: #0071e3;
  --blue-h: #0077ed;
  --blue-ink: #0066cc;
  --black: #000;
  --ok: #1b8a3f; --ok-bg: #e6f6ea;
  --info: #0066cc; --info-bg: #e8f1fd;
  --mute: #6e6e73; --mute-bg: #ededf0;
  --hdr: rgb(255 255 255 / .8);
  --hdr-solid: rgb(255 255 255 / .97);
  --hdr-line: rgb(0 0 0 / .08);
  --nav: #424245;
  --seg-on: #ffffff;
  --sum: #000000;
  --sum-2: #1d1d1f;
  --sum-line: #333336;
  --tile-dark: #000000;
  --ph-1: #ffffff; --ph-2: #ececf0;
  --gray-h: #dedee3;
  --shadow: rgb(0 0 0 / .18);
  color-scheme: light;
  --r: 28px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

/* ---------- Тёмная тема: по системе или по кнопке ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --white: #000000;
  --gray: #161617;
  --gray-2: #2c2c2e;
  --line: #48484a;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --blue-ink: #2997ff;
  --ok: #30d158; --ok-bg: rgb(48 209 88 / .14);
  --info: #64b5ff; --info-bg: rgb(41 151 255 / .16);
  --mute: #a1a1a6; --mute-bg: rgb(255 255 255 / .08);
  --hdr: rgb(22 22 23 / .8);
  --hdr-solid: rgb(22 22 23 / .97);
  --hdr-line: rgb(255 255 255 / .1);
  --nav: #d2d2d7;
  --seg-on: #636366;
  --sum: #1c1c1e;
  --sum-2: #2c2c2e;
  --sum-line: #3a3a3c;
  --tile-dark: #0a0a0a;
  --ph-1: #232325; --ph-2: #18181a;
  --gray-h: #3a3a3c;
  --shadow: rgb(0 0 0 / .6);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --white: #000000;
  --gray: #161617;
  --gray-2: #2c2c2e;
  --line: #48484a;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --blue-ink: #2997ff;
  --ok: #30d158; --ok-bg: rgb(48 209 88 / .14);
  --info: #64b5ff; --info-bg: rgb(41 151 255 / .16);
  --mute: #a1a1a6; --mute-bg: rgb(255 255 255 / .08);
  --hdr: rgb(22 22 23 / .8);
  --hdr-solid: rgb(22 22 23 / .97);
  --hdr-line: rgb(255 255 255 / .1);
  --nav: #d2d2d7;
  --seg-on: #636366;
  --sum: #1c1c1e;
  --sum-2: #2c2c2e;
  --sum-line: #3a3a3c;
  --tile-dark: #0a0a0a;
  --ph-1: #232325; --ph-2: #18181a;
  --gray-h: #3a3a3c;
  --shadow: rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); transition: background-color .3s, color .3s; color: var(--text); font: 400 17px/1.5 var(--font); letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.07; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
::selection { background: #b3d7ff; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 26px; border-radius: 999px; border: 0; font-weight: 500; font-size: 17px; text-decoration: none; white-space: nowrap; transition: background .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn--xs { height: 32px; padding: 0 15px; font-size: 13px; }
.btn--full { width: 100%; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-h); }
.btn--gray { background: var(--gray-2); color: var(--text); }
.btn--gray:hover { background: var(--gray-h); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link { color: var(--blue-ink); text-decoration: none; font-size: 17px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.link--light { color: #2997ff; }

/* ---------- Шапка ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--hdr); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.hdr.is-solid { border-color: var(--hdr-line); }
.hdr__in { display: flex; align-items: center; gap: 24px; height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 17px; }
.logo__mark { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--text); color: var(--white); font-size: 13px; font-weight: 800; }
.nav { display: flex; gap: 6px; margin: 0 auto; }
.nav a { text-decoration: none; font-size: 13px; color: var(--nav); padding: 6px 12px; transition: color .2s; }
.nav a:hover { color: var(--text); }
.hdr__act { display: flex; align-items: center; gap: 8px; }
.burger { display: none; width: 36px; height: 36px; border: 0; background: transparent; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), top .3s; }
.burger span:first-child { top: 14px; } .burger span:last-child { top: 21px; }
.burger[aria-expanded="true"] span:first-child { top: 17.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 17.5px; transform: rotate(-45deg); }

/* ---------- Устройства ---------- */
.dev-mac { width: 100%; }
.dev-mac__scr { background: #0b0b0d; border-radius: 4.2% 4.2% 0 0 / 6.5% 6.5% 0 0; padding: 2.2% 2.2% 3%; box-shadow: inset 0 0 0 1.5px #2f2f33; }
.dev-mac__scr img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 3px; background: #111; }
.dev-mac__base { height: 0; padding-bottom: 2.6%; margin: 0 -6.5%; background: linear-gradient(#e3e4e8, #b5b7bd 70%, #9c9ea4); border-radius: 0 0 40% 40% / 0 0 100% 100%; position: relative; }
.dev-mac__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 40%; transform: translateX(-50%); background: #c9cace; border-radius: 0 0 10px 10px; }
.dev-ip { position: relative; aspect-ratio: 9 / 19; background: #0b0b0d; border-radius: 15% / 7.2%; padding: 3.6%; box-shadow: inset 0 0 0 2px #2f2f33, 0 0 0 1px #9a9ca2; }
.dev-ip::before { content: ""; position: absolute; top: 3.8%; left: 50%; transform: translateX(-50%); width: 32%; height: 3.6%; border-radius: 20px; background: #000; z-index: 2; }
.dev-ip__scr { height: 100%; border-radius: 12% / 5.8%; overflow: hidden; background: #17212b; display: flex; align-items: center; }
.dev-ip__scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 84px 0 0; overflow: hidden; }
.news { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; color: var(--blue-ink); }
.news span { background: var(--gray); color: var(--text); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.news:hover { text-decoration: underline; }
.hero h1 { font-size: clamp(42px, 7vw, 80px); letter-spacing: -0.035em; line-height: 1.05; margin: 22px auto 20px; }
.hero__lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.4; color: var(--muted); max-width: 680px; margin: 0 auto; letter-spacing: -0.015em; }
.hero__cta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 32px; }

.stage { position: relative; max-width: 1080px; margin: 70px auto 0; height: 560px; }
.stage__c { position: absolute; left: 50%; top: 0; width: 700px; transform: translateX(-50%); filter: drop-shadow(0 40px 40px rgb(0 0 0 / .16)); }
.stage__l, .stage__r { position: absolute; top: 120px; width: 220px; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .25)); z-index: 2; }
.stage__l { left: 60px; }
.stage__r { right: 60px; }
.stage__l img, .stage__r img { object-fit: contain; background: #17212b; }

.facts { list-style: none; padding: 44px 0 0; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); max-width: 900px; }
.facts li { display: grid; gap: 4px; padding: 0 12px; }
.facts li + li { border-left: 1px solid var(--gray-2); }
.facts b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.facts span { font-size: 14px; color: var(--muted); }

/* ---------- Секции ---------- */
.sec { padding: 120px 0; }
.sec--gray { background: var(--gray); }
.title { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.035em; max-width: 900px; }
.title span { color: var(--faint); }
.title--c { text-align: center; margin: 0 auto 50px; }
.head { margin-bottom: 56px; }
.head--c { text-align: center; }
.head--c .title, .head--c .lead { margin-left: auto; margin-right: auto; }
.lead { font-size: 21px; color: var(--muted); max-width: 640px; margin-top: 20px; line-height: 1.45; letter-spacing: -0.015em; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- Плитки ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.tile { position: relative; overflow: hidden; background: var(--white); border-radius: var(--r); padding: 36px 34px; transition: transform .5s var(--ease), box-shadow .5s; }
.tile:hover { transform: scale(1.012); box-shadow: 0 20px 50px -24px var(--shadow); }
.tile__k { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.tile h3 { font-size: 26px; line-height: 1.15; margin-bottom: 12px; }
.tile p { color: var(--muted); font-size: 16px; }
.tile--wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.tile--wide h3 { font-size: 38px; max-width: 420px; }
.tile--wide > p { max-width: 380px; }
.tile--dark { background: var(--tile-dark); color: #f5f5f7; }
.tile--dark .tile__k { color: #a1a1a6; }
.tile--dark p { color: #a1a1a6; }
.tile--wide > :not(.tile__img) { position: relative; z-index: 1; }
.tile--wide > p:not(.tile__k) { max-width: 330px; }
.tile__img { position: absolute; right: 40px; bottom: -70px; width: 250px; border-radius: 22px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .8); transform: rotate(-6deg); }
.tile--blue { background: var(--blue); color: #fff; }
.tile--blue .tile__k { color: rgb(255 255 255 / .75); }
.ticks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-size: 17px; font-weight: 600; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: rgb(255 255 255 / .22); display: grid; place-items: center; font-size: 11px; font-weight: 800; }

/* ---------- Работы ---------- */
.filters { display: inline-flex; gap: 2px; padding: 3px; margin-top: 34px; border-radius: 12px; background: var(--gray-2); }
.fbtn { border: 0; background: transparent; padding: 7px 18px; border-radius: 9px; font-weight: 500; font-size: 14px; color: var(--text); transition: background .2s, box-shadow .2s; }
.fbtn.is-on { background: var(--seg-on); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }
.works { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.work { grid-column: span 4; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; cursor: pointer; background: var(--gray); border: 0; border-radius: var(--r); transition: transform .5s var(--ease), box-shadow .5s; }
.work:hover { transform: scale(1.012); box-shadow: 0 24px 60px -28px rgb(0 0 0 / .3); }
.work.is-big { grid-column: span 6; }
.work__media { position: relative; height: 300px; display: grid; place-items: end center; padding: 34px 30px 0; overflow: hidden; }
.work.is-big .work__media { height: 360px; }
.work__media--site { place-items: center; padding: 30px 46px; }
.work__media--site .dev-mac { width: 100%; max-width: 440px; filter: drop-shadow(0 20px 24px rgb(0 0 0 / .14)); transition: transform .6s var(--ease); }
.work__media--bot .dev-ip, .work__media--tool .dev-ip { width: 190px; margin-bottom: -150px; filter: drop-shadow(0 20px 30px rgb(0 0 0 / .22)); transition: transform .6s var(--ease); }
.work.is-big .work__media--bot .dev-ip { width: 220px; margin-bottom: -170px; }
.work__media--bot .dev-ip__scr img { object-fit: contain; }
.work:hover .dev-mac, .work:hover .dev-ip { transform: translateY(-8px); }
.work__ph { position: absolute; inset: 20px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--ph-1), var(--ph-2)); color: var(--muted); font-size: 15px; font-weight: 500; }
.work__ph span { padding: 10px 18px; border-radius: 999px; background: var(--seg-on); box-shadow: 0 2px 10px rgb(0 0 0 / .06); }
.work__body { position: relative; padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 8px; flex: 1; background: var(--gray); }
.work__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.work__kind { font-size: 13px; color: var(--faint); font-weight: 500; }
.work h3 { font-size: 26px; }
.work__tag { color: var(--muted); font-size: 16px; line-height: 1.4; }
.work__res { margin-top: auto; padding-top: 14px; font-size: 14.5px; color: var(--text); line-height: 1.45; }
.work__more { font-weight: 500; font-size: 15px; color: var(--blue-ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--muted { background: var(--mute-bg); color: var(--mute); }
.work.is-hidden { display: none; }

/* ---------- Модалка ---------- */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(1040px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 40px); }
.modal::backdrop { background: rgb(0 0 0 / .4); backdrop-filter: blur(10px); }
.modal[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.modal__box { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--white); border-radius: 30px; overflow: hidden; max-height: calc(100dvh - 40px); box-shadow: 0 40px 100px -30px rgb(0 0 0 / .4); }
.modal__x { position: absolute; right: 16px; top: 16px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gray-2); font-size: 14px; color: var(--muted); }
.modal__x:hover { background: var(--gray-h); }
.modal__media { background: var(--gray); display: flex; flex-direction: column; min-height: 0; }
.modal__main { flex: 1; min-height: 0; display: grid; place-items: center; padding: 30px; }
.modal__main img { max-height: 62vh; width: auto; max-width: 100%; border-radius: 16px; object-fit: contain; box-shadow: 0 24px 50px -20px rgb(0 0 0 / .35); }
.modal__thumbs { display: flex; gap: 8px; padding: 0 30px 26px; overflow-x: auto; }
.modal__thumbs button { flex: 0 0 76px; height: 50px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #ddd; opacity: .55; transition: opacity .2s, border-color .2s; }
.modal__thumbs button.is-on { border-color: var(--blue); opacity: 1; }
.modal__thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.modal__body { padding: 44px 40px 40px; overflow-y: auto; }
.modal__body h3 { font-size: 36px; margin: 14px 0 6px; }
.modal__body .work__tag { margin-bottom: 24px; font-size: 18px; }
.mrow { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--gray-2); font-size: 15.5px; line-height: 1.55; }
.mrow > span { font-size: 13px; font-weight: 600; color: var(--faint); padding-top: 2px; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.feat li { position: relative; padding-left: 20px; }
.feat li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.mquote { margin: 20px 0 0; padding: 20px 22px; border-radius: 18px; background: var(--gray); font-size: 15.5px; line-height: 1.55; }
.mquote b { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.mlink { margin: 24px 8px 0 0; height: 44px; font-size: 15px; }

/* ---------- Цены ---------- */
.price { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.price__list { background: var(--white); border-radius: var(--r); padding: 6px 30px; }
.prow { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 24px 0; align-items: center; }
.prow + .prow { border-top: 1px solid var(--gray-2); }
.prow h3 { font-size: 21px; letter-spacing: -0.02em; }
.prow p { color: var(--muted); font-size: 15px; grid-column: 1; }
.prow__price { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.prow__price b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.prow__price small { color: var(--faint); font-size: 13px; }
.price__extra { background: var(--white); border-radius: var(--r); padding: 30px; position: sticky; top: 80px; }
.price__extra h3 { font-size: 21px; margin-bottom: 10px; }
.price__extra ul { list-style: none; padding: 0; margin: 0 0 18px; }
.price__extra li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--gray-2); font-size: 14.5px; }
.price__extra li b { white-space: nowrap; font-weight: 600; color: var(--blue-ink); }
.price__extra .small b { color: var(--text); }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.calc__main { display: grid; gap: 16px; }
.step { padding: 30px; margin: 0; min-width: 0; background: var(--gray); border: 0; border-radius: var(--r); }
.step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 20px; padding: 0; }
.step legend + * { clear: both; }
.step__n { width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; letter-spacing: 0; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 10px; }
.tcard { position: relative; display: block; cursor: pointer; }
.tcard input, .ocard input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.tcard__in { display: block; height: 100%; background: var(--white); border: 2px solid transparent; border-radius: 18px; padding: 16px 16px 14px; transition: border-color .2s, box-shadow .2s; }
.tcard:hover .tcard__in { box-shadow: 0 6px 20px -10px rgb(0 0 0 / .2); }
.tcard input:checked + .tcard__in { border-color: var(--blue); }
.tcard input:focus-visible + .tcard__in { outline: 2px solid var(--blue); outline-offset: 2px; }
.tcard b { display: block; font-size: 16px; font-weight: 600; }
.tcard small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin: 5px 0 12px; }
.tcard em { font-style: normal; font-weight: 600; font-size: 14.5px; color: var(--blue-ink); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts__empty { color: var(--muted); font-size: 15px; grid-column: 1 / -1; }
.ocard { position: relative; display: flex; cursor: pointer; }
.ocard__in { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--white); border: 2px solid transparent; border-radius: 16px; padding: 13px 14px; font-size: 15px; transition: border-color .2s; }
.ocard__box { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: .2s; }
.ocard__box::after { content: "✓"; font-size: 12px; font-weight: 800; color: #fff; opacity: 0; }
.ocard input:checked + .ocard__in { border-color: var(--blue); }
.ocard input:checked + .ocard__in .ocard__box { background: var(--blue); border-color: var(--blue); }
.ocard input:checked + .ocard__in .ocard__box::after { opacity: 1; }
.ocard input:focus-visible + .ocard__in { outline: 2px solid var(--blue); outline-offset: 2px; }
.ocard__t { flex: 1; line-height: 1.35; }
.ocard__p { font-size: 14px; font-weight: 600; color: var(--blue-ink); white-space: nowrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--gray-2); max-width: 100%; vertical-align: top; }
.seg + .seg { margin-left: 10px; }
.seg label { cursor: pointer; position: relative; }
.seg span { display: block; padding: 8px 16px; border-radius: 9px; font-size: 14.5px; font-weight: 500; transition: .2s; }
.seg input:checked + span { background: var(--seg-on); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: grid; gap: 7px; }
.fld--wide { grid-column: 1 / -1; }
.fld > span { font-size: 14px; color: var(--muted); font-weight: 500; }
.fld i { font-style: normal; color: var(--faint); }
.fld input, .fld textarea { width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s; resize: vertical; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--faint); }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgb(0 113 227 / .15); }
.fld.is-err input { border-color: #e30000; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.sum { position: sticky; top: 72px; background: var(--sum); color: #f5f5f7; border-radius: var(--r); padding: 30px; }
.sum__k { font-size: 14px; font-weight: 600; color: #a1a1a6; }
.sum__type { font-size: 19px; font-weight: 600; margin-top: 8px; }
.sum__price { font-size: 34px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; margin-top: 6px; }
.sum__days { color: #a1a1a6; font-size: 15px; margin-top: 4px; }
.sum__list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--sum-line); }
.sum__list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--sum-line); color: #d2d2d7; }
.sum__list li span:last-child { font-weight: 600; white-space: nowrap; color: #fff; }
.sum__sup { font-size: 14px; color: #a1a1a6; margin: 12px 0 18px; min-height: 1px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #a1a1a6; margin-top: 14px; line-height: 1.4; cursor: pointer; }
.agree input { margin-top: 2px; accent-color: var(--blue); }
.form-msg { font-size: 14px; font-weight: 600; margin-top: 10px; min-height: 1px; }
.form-msg.is-ok { color: #30d158; } .form-msg.is-err { color: #ff6961; }
.sum__note { font-size: 12.5px; color: #a1a1a6; margin-top: 14px; padding: 12px 14px; background: var(--sum-2); border-radius: 14px; line-height: 1.45; }

/* ---------- Этапы ---------- */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { background: var(--white); border-radius: var(--r); padding: 30px 28px 34px; }
.steps__n { display: block; font-size: 15px; font-weight: 700; color: var(--blue-ink); margin-bottom: 50px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15.5px; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 56px; }
.rev { margin: 0; background: var(--gray); border-radius: var(--r); padding: 40px; display: flex; flex-direction: column; }
.stars { color: #ff9f0a; letter-spacing: 3px; font-size: 17px; }
.rev blockquote { margin: 20px 0 32px; font-size: 24px; line-height: 1.4; font-weight: 600; letter-spacing: -0.02em; }
.rev figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.rev figcaption b { display: block; color: var(--text); font-weight: 600; }
.ava { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #5ac8fa, #0071e3); color: #fff; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq__list { background: var(--white); border-radius: var(--r); padding: 6px 32px; }
.faq__list details + details { border-top: 1px solid var(--gray-2); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 24px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; flex: none; font-size: 26px; font-weight: 300; color: var(--blue); transition: transform .3s var(--ease); }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { color: var(--muted); padding: 0 40px 24px 0; font-size: 16.5px; line-height: 1.55; }

/* ---------- CTA / Footer ---------- */
.cta { background: var(--tile-dark); border-top: 1px solid var(--hdr-line); color: #f5f5f7; text-align: center; padding: 130px 0; }
.cta h2 { font-size: clamp(36px, 5.6vw, 64px); letter-spacing: -0.035em; }
.cta p { font-size: 21px; margin-top: 16px; color: #a1a1a6; }
.cta__btns { display: flex; gap: 14px 28px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 34px; }
.ftr { background: var(--gray); color: var(--faint); font-size: 12.5px; }
.ftr__in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 24px; }
.ftr a { color: var(--nav); text-decoration: none; }
.ftr a:hover { text-decoration: underline; }

/* ---------- Появление ---------- */
.rv { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .stage { height: 470px; }
  .stage__c { width: 600px; }
  .stage__l, .stage__r { width: 180px; top: 110px; }
  .stage__l { left: 20px; } .stage__r { right: 20px; }
  .calc { grid-template-columns: 1fr; }
  .sum { position: static; }
}
@media (max-width: 900px) {
  .nav { position: fixed; top: 52px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 24px 26px; background: var(--hdr-solid); backdrop-filter: blur(20px); border-bottom: 1px solid var(--gray-2); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; font-size: 22px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--gray-2); }
  .hdr__act { margin-left: auto; }
  .burger { display: block; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: 1 / -1; grid-row: auto; min-height: 380px; }
  .price, .reviews { grid-template-columns: 1fr; }
  .price__extra { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .work, .work.is-big { grid-column: span 6; }
  .facts { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .facts li:nth-child(3) { border-left: 0; }
  .modal__box { display: block; overflow-y: auto; }
  .modal__media, .modal__main { min-height: auto; }
  .modal__main { padding: 60px 20px 20px; }
  .modal__main img { max-height: 46vh; }
  .modal__body { overflow: visible; padding: 28px 24px 34px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hdr__act .btn { display: none; }
  .hero { padding-top: 56px; }
  .hero__cta .btn { width: 100%; max-width: 320px; }
  .stage { height: 300px; margin-top: 46px; }
  .stage__c { width: 92%; max-width: 360px; }
  .stage__l { width: 104px; left: 2px; top: 100px; }
  .stage__r { width: 104px; right: 2px; top: 100px; }
  .facts b { font-size: 26px; }
  .sec { padding: 80px 0; }
  .head { margin-bottom: 36px; }
  .lead { font-size: 18px; }
  .bento { grid-template-columns: 1fr; margin-top: 36px; gap: 14px; }
  .tile { padding: 28px 24px; }
  .tile--wide h3 { font-size: 30px; }
  .tile__img { width: 210px; bottom: -60px; }
  .works { gap: 14px; }
  .work, .work.is-big { grid-column: 1 / -1; }
  .work__media, .work.is-big .work__media { height: 270px; }
  .filters { display: flex; width: 100%; overflow-x: auto; }
  .fbtn { flex: 1; padding: 7px 10px; }
  .price__list { padding: 4px 22px; }
  .prow { grid-template-columns: 1fr; }
  .prow__price { grid-row: auto; grid-column: 1; text-align: left; margin-top: 8px; }
  .opts, .fields { grid-template-columns: 1fr; }
  .step { padding: 22px 18px; }
  .seg { display: flex; width: 100%; }
  .seg + .seg { margin: 10px 0 0; }
  .seg label { flex: 1; } .seg span { text-align: center; padding: 8px 6px; font-size: 13.5px; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .steps__n { margin-bottom: 20px; }
  .rev { padding: 28px 24px; } .rev blockquote { font-size: 20px; }
  .faq__list { padding: 4px 22px; }
  .faq__list summary { font-size: 17px; }
  .cta { padding: 90px 0; }
  .mrow { grid-template-columns: 1fr; gap: 4px; }
  .modal { max-width: 100vw; max-height: 100dvh; margin: 0; }
  .modal__box { border-radius: 0; max-height: 100dvh; height: 100dvh; }
}

/* ---------- Переключатель темы ---------- */
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; transition: background .2s; }
.theme-btn:hover { background: var(--gray-2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
  :root:not([data-theme="light"]) .tile--dark, :root:not([data-theme="light"]) .sum { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }
}
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .tile--dark, :root[data-theme="dark"] .sum { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); }

/* ============================================================
   v2: ровные фото и пошаговый калькулятор
   ============================================================ */
/* Карточка-скриншот: ровно, целиком, в родных пропорциях */
.card-shot { margin: 0; border-radius: 22px; overflow: hidden; background: #0e1621; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 30px 60px -24px rgb(0 0 0 / .45); }
.card-shot img { width: 100%; height: auto; display: block; }

/* Hero */
.stage { height: 520px; }
.stage__l, .stage__r { top: auto; bottom: 40px; width: 200px; filter: none; transform: none; }
.stage__l { left: 70px; } .stage__r { right: 70px; }
.stage__l img, .stage__r img { object-fit: initial; background: none; }

/* Тёмная плитка */
.tile--wide { min-height: 520px; }
.tile__img { right: 48px; bottom: 40px; width: 190px; transform: none; border-radius: 20px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08); }

/* Работы: скриншоты ботов — ровной карточкой, целиком */
.work__media--bot, .work__media--tool { place-items: center; padding: 28px; }
.work__media--bot .card-shot { max-height: 100%; width: auto; height: 100%; aspect-ratio: auto; display: flex; transition: transform .6s var(--ease); }
.work__media--bot .card-shot img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.work:hover .card-shot { transform: translateY(-6px); }

/* ---------- Мастер калькулятора ---------- */
.wiz { background: var(--gray); border-radius: var(--r); padding: 30px; min-width: 0; }
.wiz__bar { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.wiz__bar li { position: relative; }
.wiz__bar li::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 4px; border-radius: 4px; background: var(--gray-2); transition: background .3s; }
.wiz__bar li.is-done::after, .wiz__bar li.is-on::after { background: var(--blue); }
.wiz__bar button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 4px 0; font-size: 14.5px; font-weight: 600; color: var(--muted); text-align: left; }
.wiz__bar button span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--gray-2); color: var(--muted); transition: .3s; }
.wiz__bar li.is-on button { color: var(--text); }
.wiz__bar li.is-on button span, .wiz__bar li.is-done button span { background: var(--blue); color: #fff; }
.wiz__bar button:disabled { cursor: default; opacity: .6; }
.wiz__step { animation: stepIn .45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } }
.wiz__q { font-size: 28px; letter-spacing: -0.03em; outline: none; }
.wiz__hint { color: var(--muted); font-size: 16px; margin: 8px 0 22px; }
.wiz__sub { font-size: 14px; font-weight: 600; color: var(--muted); margin: 18px 0 10px; }
.wiz__sub:first-of-type { margin-top: 0; }
.wiz__nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gray-2); }
.wiz__nav .btn { height: 48px; min-width: 130px; }
.wiz__nav .btn:disabled { opacity: .4; pointer-events: none; }
.wiz__nav #wizBack { margin-right: auto; }
.wiz .agree { color: var(--muted); margin-top: 16px; }
.wiz .form-msg { text-align: right; }
.types { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tcard__in { padding: 18px; min-height: 140px; display: flex; flex-direction: column; }
.tcard em { margin-top: auto; font-size: 14px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ccard { position: relative; cursor: pointer; display: block; }
.ccard input { position: absolute; opacity: 0; pointer-events: none; }
.ccard__in { display: flex; gap: 12px; align-items: flex-start; height: 100%; background: var(--white); border: 2px solid transparent; border-radius: 16px; padding: 15px 16px; transition: border-color .2s; }
.ccard__in b { display: block; font-size: 15.5px; font-weight: 600; }
.ccard__in small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.ccard__dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line); transition: .2s; }
.ccard input:checked + .ccard__in { border-color: var(--blue); }
.ccard input:checked + .ccard__in .ccard__dot { border: 6px solid var(--blue); }
.ccard input:focus-visible + .ccard__in { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Итог */
.sum { padding: 0; overflow: hidden; }
.sum__head { display: grid; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; padding: 30px 30px 0; cursor: default; gap: 4px; }
.sum__head .sum__price { margin-top: 4px; }
.sum__more { display: none; }
.sum__body { padding: 8px 30px 30px; }
.sum__type { margin-top: 10px; font-size: 15px; color: #a1a1a6; font-weight: 500; }
.sum__list { margin-top: 12px; }
.sum.is-empty .sum__body .sum__list, .sum.is-empty .sum__body .sum__sup { display: none; }

@media (max-width: 1080px) {
  .stage { height: 450px; }
  .stage__l, .stage__r { width: 160px; bottom: 30px; }
  .stage__l { left: 20px; } .stage__r { right: 20px; }
  /* на планшете и телефоне итог — закреплённая панель снизу */
  .calc { position: relative; }
  .sum { position: sticky; bottom: 12px; top: auto; z-index: 20; margin-top: -4px; box-shadow: 0 20px 50px -10px rgb(0 0 0 / .45); }
  .sum__head { cursor: pointer; grid-template-columns: 1fr auto; padding: 16px 20px; gap: 0 12px; }
  .sum__head .sum__k { grid-column: 1; font-size: 12px; }
  .sum__head .sum__price { grid-column: 1; font-size: 22px; margin: 0; }
  .sum__head .sum__days { grid-column: 1; font-size: 13px; margin: 0; }
  .sum__more { display: block; grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 13px; font-weight: 600; color: #2997ff; }
  .sum.is-empty .sum__more { display: none; }
  .sum__body { display: none; padding: 0 20px 18px; }
  .sum.is-open .sum__body { display: block; }
  .sum.is-open .sum__more { color: #a1a1a6; }
}
@media (max-width: 640px) {
  .stage { height: auto; margin-top: 40px; padding: 0 20px; }
  .stage__c { position: relative; left: auto; transform: none; width: 100%; max-width: none; }
  .stage__l, .stage__r { display: none; }
  .tile--wide { min-height: 0; padding-bottom: 0; }
  .tile__img { position: relative; right: auto; bottom: auto; width: 170px; margin: 26px auto -40px; }
  .work__media, .work.is-big .work__media { height: 300px; }
  .wiz { padding: 22px 18px; }
  .wiz__bar { gap: 6px; margin-bottom: 26px; }
  .wiz__bar button { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
  .wiz__q { font-size: 23px; }
  .types { grid-template-columns: 1fr; }
  .tcard__in { min-height: 0; }
  .choice { grid-template-columns: 1fr; }
  .wiz__nav .btn { min-width: 0; flex: 1; }
  .wiz__nav #wizBack { margin-right: 0; flex: 0 0 auto; padding: 0 20px; }
}
.work__count { position: absolute; right: 16px; top: 16px; z-index: 2; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; backdrop-filter: blur(8px); }
[hidden] { display: none !important; }
/* модалка: фиксированная высота, галерея с миниатюрами всегда видна */
@media (min-width: 901px) {
  .modal__box { height: min(760px, calc(100dvh - 40px)); grid-template-rows: minmax(0, 1fr); }
  .modal__media { min-height: 0; overflow: hidden; }
  .modal__main { min-height: 0; overflow: hidden; }
  .modal__main img { max-height: 100%; }
}
.modal__main { position: relative; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); color: #1d1d1f; font-size: 20px; line-height: 1; box-shadow: 0 6px 20px -6px rgb(0 0 0 / .35); z-index: 2; }
.gal-nav:hover { background: #fff; }
.gal-prev { left: 14px; } .gal-next { right: 14px; }
.gal-cnt { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; }
.modal__thumbs { flex: none; }
/* заглушки проектов без скриншотов */
.work__ph { display: grid; place-items: center; }
.work__ph--big { position: relative; inset: auto; width: 100%; min-height: 300px; border-radius: 18px; }
.ph { display: grid; justify-items: center; gap: 18px; padding: 20px; }
.ph__ico { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--seg-on); color: var(--blue-ink); box-shadow: 0 10px 30px -12px var(--shadow); }
.ph__ico svg { width: 34px; height: 34px; }
.ph__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 360px; }
.ph__chips span { font-size: 13px; font-weight: 500; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--seg-on); }
.work__ph > span { display: none; }
.sum.is-empty .sum__type { display: none; }
@media (max-width: 640px) {
  .stage { padding: 0 34px; }
}
