/* =========================================================
   WebWorks — стили
   Адаптив: телефоны от 320px → планшеты → ноутбуки → 2K/4K
   ========================================================= */
:root {
  --bg: #0b0b10;
  --bg-2: #12121a;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f2f2f5;
  --muted: #9a9aa8;
  --accent: #b8ff5c;
  --accent-2: #7c5cff;
  --radius: 22px;
  --container: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #000; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
.accent { color: var(--accent); }

/* ---------- Noise overlay ---------- */
.noise {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise 1s steps(4) infinite;
}
@keyframes noise { 0%{transform:translate(0,0)} 25%{transform:translate(-5%,3%)} 50%{transform:translate(3%,-4%)} 75%{transform:translate(-3%,5%)} }

/* ---------- Cursor glow + sparkle trail ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none;
  width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,255,92,.16) 0%, rgba(124,92,255,.10) 35%, transparent 68%);
  mix-blend-mode: screen; opacity: 0; will-change: transform;
  transition: opacity .6s;
}
.cursor-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,255,92,.35) 0%, rgba(184,255,92,.08) 22%, transparent 45%);
  transform: scale(.35); opacity: 0; transition: transform .6s var(--ease), opacity .5s;
}
.cursor-glow.is-active { opacity: 1; }
.cursor-glow.is-hover::after { transform: scale(.55); opacity: 1; }
.cursor-trail { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 998; pointer-events: none; }
body.in-frame .cursor-glow, body.in-frame .cursor-trail { opacity: 0 !important; }
@media (hover: none), (pointer: coarse) { .cursor-glow { display: none; } }

/* касание на телефоне — мягкая вспышка */
.tap-glow {
  position: fixed; z-index: 59; pointer-events: none; border-radius: 50%;
  width: 260px; height: 260px; margin: -130px 0 0 -130px;
  background: radial-gradient(circle, rgba(184,255,92,.30) 0%, rgba(124,92,255,.16) 38%, transparent 70%);
  mix-blend-mode: screen; animation: tapGlow .9s var(--ease) forwards;
}
@keyframes tapGlow { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  transition: transform 1s var(--ease) .1s;
}
.preloader.done { transform: translateY(-100%); }
.preloader__logo { font-family: var(--font-display); font-size: clamp(32px, 6vw, 72px); font-weight: 800; letter-spacing: -0.03em; }
.preloader__logo span, .logo span { color: var(--accent); }
.preloader__bar { width: 200px; height: 2px; background: var(--border); overflow: hidden; border-radius: 2px; }
.preloader__bar i { display: block; height: 100%; width: 0; background: var(--accent); animation: load 1.1s var(--ease) forwards; }
@keyframes load { to { width: 100%; } }

/* ---------- Header ---------- */
.header {
  position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; z-index: 50;
  width: min(var(--container) + 32px, 100% - 32px); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 12px 26px; border-radius: 100px;
  border: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s, transform .5s var(--ease);
}
.header.scrolled { background: rgba(14,14,20,.65); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-color: var(--border); }
.header.hidden { transform: translate(-50%, -160%); }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; position: relative; z-index: 2; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 10px 18px; border-radius: 100px; font-size: 15px; font-weight: 500; color: var(--muted); transition: color .3s, background .3s; }
.nav a.nav__cta { background: var(--accent); color: #000; font-weight: 700; }
.burger { display: none; position: relative; z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); }
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.burger span:first-child { top: 18px; } .burger span:last-child { top: 26px; }
.burger.open span:first-child { top: 22px; transform: rotate(45deg); }
.burger.open span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 30px; border-radius: 100px; font-weight: 700; font-size: 16px; line-height: 1.2; text-align: center;
  overflow: hidden; isolation: isolate; transition: color .4s var(--ease), transform .3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn--primary { background: var(--accent); color: #000; }
.btn--primary::before { background: #fff; }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost::before { background: var(--text); }
.btn svg { flex: none; transition: transform .4s var(--ease); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; pointer-events: none; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* hover-эффекты только там, где есть мышь — на телефоне они «залипают» */
@media (hover: hover) {
  .nav a:hover { color: var(--text); background: var(--surface); }
  .nav a.nav__cta:hover { background: #fff; color: #000; }
  .btn:hover::before { transform: translateY(0); }
  .btn--ghost:hover { color: #000; }
  .btn:hover svg { transform: translateX(4px); }
  .review:hover { border-color: rgba(184,255,92,.3); transform: translateY(-4px); }
  .footer__top:hover, .footer__link:hover { color: var(--accent); }
  .browser__open:hover { color: #fff; }
  .modal__close:hover { transform: rotate(90deg); background: var(--accent); color: #000; }
  .star-input label:hover { transform: scale(1.15); }
  .star-input label:hover, .star-input label:hover ~ label { color: var(--accent); }
  .device-switch button:not(.active):hover { color: var(--text); }
}

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(184,255,92,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(184,255,92,0); } 100% { box-shadow: 0 0 0 0 rgba(184,255,92,0); } }

/* ---------- Hero ---------- */
/* overflow-x: clip — свечение не обрезается резкой линией снизу, а мягко уходит в следующий блок */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 140px 0 110px; overflow-x: hidden; overflow-x: clip; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero__orb { position: absolute; border-radius: 50%; filter: blur(110px); pointer-events: none; }
.hero__orb--1 { width: clamp(280px, 38vw, 820px); aspect-ratio: 1; background: var(--accent-2); top: -12%; right: -8%; opacity: .45; animation: float 14s ease-in-out infinite; }
.hero__orb--2 { width: clamp(240px, 30vw, 680px); aspect-ratio: 1; background: var(--accent); bottom: -22%; left: -10%; opacity: .18; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(60px, 40px) scale(1.1); } }
.hero__inner { position: relative; z-index: 2; }
.hero__title {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-weight: 500;
  /* учитываем и ширину, и высоту экрана — чтобы на ноутбуках 1366×768 всё влезало в первый экран */
  font-size: clamp(36px, min(7.4vw, 11.5vh), 106px); line-height: 1.02; letter-spacing: -0.015em; margin-bottom: 32px;
}
.hero__title .line { display: block; overflow: hidden; padding: 0 .1em .14em 0; margin-bottom: -.06em; }
.hero__title .it { font-style: italic; color: #d9d9e3; }
.hero__title .accent { font-style: italic; padding-right: .08em; }
.hero__title .word { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
.loaded .hero__title .line:nth-child(1) .word { transform: none; transition-delay: .1s; }
.loaded .hero__title .line:nth-child(2) .word { transform: none; transition-delay: .2s; }
.loaded .hero__title .line:nth-child(3) .word { transform: none; transition-delay: .3s; }
.hero__title .accent { background: linear-gradient(90deg, var(--accent), #5cffc8 50%, var(--accent)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.hero__title em { font-style: normal; color: var(--accent-2); -webkit-text-fill-color: var(--accent-2); }
@keyframes shine { to { background-position: -200% 0; } }
.hero__lead { max-width: 36em; font-size: clamp(16px, 12px + 0.55vw, 24px); color: var(--muted); margin-bottom: 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.hero__rating { display: inline-flex; align-items: center; gap: 14px; padding: 14px 22px 14px 18px; border-radius: 100px; background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero__rating b { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.hero__rating small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.scroll-hint { position: absolute; bottom: max(32px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid var(--border); border-radius: 20px; z-index: 2; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--accent); border-radius: 4px; animation: scroll 1.8s var(--ease) infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 12vw, 170px) 0; position: relative; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 32px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.section__title { font-family: var(--font-display); font-size: clamp(30px, 4.4vw, 62px); font-weight: 700; line-height: 1.04; letter-spacing: -0.04em; }
.section__head .eyebrow { margin-bottom: 16px; }

/* ---------- Embedded portfolio ---------- */
.device-switch { display: inline-flex; padding: 4px; border-radius: 100px; border: 1px solid var(--border); background: var(--surface); }
.device-switch button { padding: 10px 20px; border-radius: 100px; font-size: 14px; font-weight: 600; color: var(--muted); transition: all .35s var(--ease); }
.device-switch button.active { background: var(--text); color: #000; }
.browser {
  width: 100%; max-width: 100%; margin-inline: auto; border-radius: 22px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
  box-shadow: 0 50px 120px -30px rgba(124, 92, 255, .35), 0 0 0 1px rgba(255,255,255,.02);
  transition: max-width .7s var(--ease), border-radius .7s var(--ease), opacity 1s var(--ease), transform 1s var(--ease);
}
.browser.is-mobile { max-width: 400px; border-radius: 40px; }
.browser__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.03); }
.browser__dots { display: flex; gap: 7px; flex: none; }
.browser__dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; } .browser__dots i:nth-child(3) { background: #28c840; }
.browser__url { flex: 1; min-width: 0; text-align: center; font-size: 13px; color: var(--muted); padding: 7px 14px; border-radius: 100px; background: rgba(0,0,0,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser__url::before { content: "🔒 "; font-size: 11px; }
.browser__open { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); }
.browser.is-mobile .browser__dots, .browser.is-mobile .browser__open { display: none; }
.browser__screen { position: relative; height: min(78vh, 860px); background: #fff; }
.browser.is-mobile .browser__screen { height: min(78vh, 780px); }
.browser__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.browser__loader { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg-2); color: var(--muted); font-size: 14px; transition: opacity .6s, visibility .6s; }
.browser__loader span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.browser__loader.done { opacity: 0; visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }
.portfolio__hint { text-align: center; color: var(--muted); font-size: 15px; margin-top: 24px; padding-inline: 8px; }
.portfolio__hint a { color: var(--accent); white-space: nowrap; }

/* ---------- Reviews ---------- */
.reviews__summary { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; }
.reviews__score { display: flex; align-items: center; gap: 14px; }
.reviews__score b { font-family: var(--font-display); font-size: clamp(36px, 3vw, 48px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.reviews__score small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.stars { display: inline-flex; gap: 2px; color: var(--accent); font-size: 18px; line-height: 1; }
.stars .off { color: rgba(255,255,255,.15); }
.reviews { columns: 3 300px; column-gap: 24px; }
.review {
  break-inside: avoid; margin-bottom: 24px; padding: clamp(22px, 2.4vw, 34px); position: relative;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .4s, opacity 1s var(--ease), transform 1s var(--ease);
}
.review::after { content: "\201D"; position: absolute; bottom: -10px; right: 22px; font-family: var(--font-display); font-size: 110px; line-height: 1; color: rgba(255,255,255,.04); pointer-events: none; }
.review__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.review__date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.review__text { margin: 18px 0 26px; font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.review__author { display: flex; align-items: center; gap: 14px; min-width: 0; }
.review__avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #0b0b10; }
.review__author b { display: block; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.review__author small { color: var(--muted); font-size: 13px; }
.reviews__empty {
  column-span: all; text-align: center; padding: clamp(44px, 7vw, 80px) 24px; border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.18); color: var(--muted);
}
.reviews__empty h3 { font-family: var(--font-display); font-size: clamp(20px, 2vw, 28px); color: var(--text); margin-bottom: 10px; letter-spacing: -0.02em; }
.reviews__empty .btn { margin-top: 26px; }
.reviews__more { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- CTA ---------- */
.cta { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(124,92,255,.2), transparent 70%); text-align: center; }
.cta__title { font-family: var(--font-display); font-size: clamp(32px, 5.6vw, 80px); font-weight: 800; line-height: 1.02; letter-spacing: -0.045em; margin-bottom: clamp(32px, 4vw, 56px); }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 36px 0 max(36px, env(safe-area-inset-bottom)); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer__link { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5,5,8,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity .5s var(--ease); }
.modal.open .modal__backdrop { opacity: 1; }
.modal__dialog {
  position: relative; width: min(640px, 100%); max-height: 90vh; max-height: 90svh; overflow: auto; overscroll-behavior: contain;
  border-radius: 28px; background: var(--bg-2); border: 1px solid var(--border);
  opacity: 0; transform: translateY(40px) scale(.97); transition: all .6s var(--ease);
}
.modal.open .modal__dialog { opacity: 1; transform: none; }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); border: 1px solid var(--border); transition: transform .4s var(--ease), background .3s; }

/* ---------- Forms ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 36px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); }
.form .full { grid-column: 1 / -1; }
.form label span { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.form label span em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .7; }
.form input, .form textarea {
  width: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 16px; resize: vertical;
  transition: border-color .3s, box-shadow .3s;
}
.form input::placeholder, .form textarea::placeholder { color: #5d5d6b; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(184,255,92,.12); }
.form .btn { margin-top: 6px; }
.form__note { grid-column: 1 / -1; text-align: center; color: var(--accent); font-weight: 600; min-height: 1.6em; }
.form__note.error { color: #ff7a7a; }
.form__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; padding-right: 48px; }
.form__label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form__counter { display: block; text-align: right; color: #5d5d6b; font-size: 12px; margin-top: 6px; }
.form .check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.form .check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); cursor: pointer; }
.form .check span { margin: 0; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; }
.form .check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.form--modal { background: none; border: 0; padding: 44px 40px 36px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 40px; line-height: 1; padding: 2px; color: rgba(255,255,255,.15); cursor: pointer; transition: color .2s, transform .25s var(--ease); }
.star-input input:checked ~ label { color: var(--accent); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Sub pages (privacy, 404) ---------- */
.page { min-height: 100vh; min-height: 100svh; padding: 150px 0 100px; position: relative; overflow: hidden; }
.page--center { display: grid; place-items: center; text-align: center; padding: 120px 0; }
.page .header { position: absolute; }
.legal { max-width: 820px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 56px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 16px; overflow-wrap: anywhere; }
.legal h2 { font-family: var(--font-display); font-size: clamp(18px, 2vw, 22px); font-weight: 600; letter-spacing: -0.02em; margin: 44px 0 14px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; display: grid; gap: 6px; }
.legal a { color: var(--accent); overflow-wrap: anywhere; }
.legal .updated { font-size: 14px; margin-bottom: 36px; }
.err__code { font-family: var(--font-display); font-size: clamp(110px, 26vw, 300px); font-weight: 800; line-height: .9; letter-spacing: -0.07em;
  background: linear-gradient(135deg, var(--accent), #5cffc8 45%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err__title { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); margin: 18px 0 12px; letter-spacing: -0.02em; }
.err p { color: var(--muted); margin-bottom: 36px; }

/* =========================================================
   АДАПТИВ
   ========================================================= */

/* --- Большие мониторы: 1600+ (Full HD и больше) --- */
@media (min-width: 1600px) {
  :root { --container: 1440px; --radius: 26px; }
  body { font-size: 18px; }
  .logo { font-size: 22px; }
  .nav a { font-size: 16px; padding: 11px 20px; }
  .header { padding: 14px 16px 14px 30px; }
  .btn { padding: 20px 36px; font-size: 17px; }
  .eyebrow { font-size: 14px; }
  .hero__title { font-size: min(5.5vw, 11.5vh, 150px); }
  .hero__rating b { font-size: 40px; }
  .section { padding: clamp(170px, 10vw, 240px) 0; }
  .section__title { font-size: min(3.8vw, 88px); }
  .cta__title { font-size: min(4.9vw, 116px); }
  .browser__screen { height: min(80vh, 1000px); }
  .browser.is-mobile { max-width: 430px; }
  .browser__url, .browser__open { font-size: 14px; }
  .reviews { columns: 3 360px; column-gap: 28px; }
  .review { margin-bottom: 28px; }
  .review__text { font-size: 17px; }
  .stars { font-size: 20px; }
  .modal__dialog { width: min(720px, 100%); }
}
/* --- 2K / 4K: 2200+ --- */
@media (min-width: 2200px) {
  :root { --container: 1720px; }
  body { font-size: 20px; }
  .logo { font-size: 26px; }
  .nav a { font-size: 18px; }
  .btn { padding: 24px 42px; font-size: 19px; }
  .eyebrow { font-size: 16px; }
  .hero__rating b { font-size: 46px; }
  .hero__rating small, .reviews__score small, .review__date, .review__author small { font-size: 16px; }
  .browser__screen { height: min(80vh, 1300px); }
  .browser.is-mobile { max-width: 480px; }
  .review__text { font-size: 19px; }
  .review__avatar { width: 56px; height: 56px; font-size: 20px; }
  .stars { font-size: 24px; }
  .reviews { columns: 4 380px; }
  .portfolio__hint { font-size: 17px; }
  .footer__inner { font-size: 16px; }
  .cursor-glow { width: 760px; height: 760px; margin: -380px 0 0 -380px; }
}

/* --- Планшеты и узкие ноутбуки: до 900 --- */
@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: 10px;
    background: rgba(11,11,16,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    clip-path: circle(0 at calc(100% - 40px) 40px);
    transition: clip-path .8s var(--ease), visibility 0s linear .8s;
    visibility: hidden;
  }
  .nav.open { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
  .nav a { font-family: var(--font-display); font-size: clamp(26px, 7vw, 36px); color: var(--text); padding: 12px 26px; }
  .nav a.nav__cta { margin-top: 16px; font-size: 20px; padding: 16px 34px; }
  /* без transform у шапки, иначе меню (position: fixed) раскрывается только внутри шапки */
  .header { top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px; width: auto; transform: none; padding: 8px 8px 8px 22px; }
  .header.hidden { transform: translateY(-160%); }
  .header.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
  .hero { padding: 120px 0 100px; }
  .browser__screen { height: min(75vh, 900px); }
}

/* --- Телефоны: до 600 --- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 110px 0 90px; align-items: flex-end; }
  .hero__title { margin-bottom: 24px; letter-spacing: -0.04em; }
  .hero__lead { margin-bottom: 30px; }
  .hero__actions { margin-bottom: 36px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__rating { padding: 12px 18px 12px 14px; }
  .hero__rating b { font-size: 28px; }
  .hero__orb { filter: blur(80px); }
  .scroll-hint { display: none; }
  .eyebrow { font-size: 12px; letter-spacing: .12em; margin-bottom: 14px; }
  .section__head { align-items: stretch; }
  .section__head > div:first-child { width: 100%; }
  .reviews__summary { width: 100%; justify-content: space-between; }
  .reviews__summary .btn { flex: 1 1 100%; }
  .device-switch { display: none; }
  .browser { border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(124, 92, 255, .35); }
  .browser__bar { padding: 10px 12px; gap: 10px; }
  .browser__dots { display: none; }
  .browser__url { font-size: 12px; text-align: left; }
  .browser__screen { height: 72vh; height: 72svh; }
  .portfolio__hint { font-size: 14px; }
  .review { margin-bottom: 16px; border-radius: 18px; }
  .review__text { font-size: 15.5px; }
  .cta__actions .btn { flex: 1 1 100%; }
  .footer__inner { flex-direction: column; text-align: center; }
  .modal { padding: 10px; align-items: end; }
  .modal__dialog { border-radius: 24px; max-height: 94svh; }
  .modal__close { top: 12px; right: 12px; }
  .form { grid-template-columns: 1fr; padding: 24px; gap: 16px; }
  .form--modal { padding: 30px 20px 22px; }
  .star-input label { font-size: 42px; }
  .page { padding: 120px 0 70px; }
}

/* --- Маленькие телефоны: до 380 --- */
@media (max-width: 380px) {
  .logo { font-size: 18px; }
  .burger { width: 42px; height: 42px; }
  .burger span { left: 12px; right: 12px; }
  .burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
  .burger.open span:first-child, .burger.open span:last-child { top: 20px; }
  .btn { padding: 16px 22px; font-size: 15px; }
  .reviews__score b { font-size: 40px; }
  .star-input { gap: 2px; }
  .star-input label { font-size: 36px; }
}

/* --- Телефон, повёрнутый горизонтально --- */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 100px 0 60px; align-items: center; }
  .hero__title { font-size: clamp(32px, 5.8vw, 64px); }
  .scroll-hint { display: none; }
  .browser__screen { height: 82vh; height: 82svh; }
  .modal { align-items: center; }
  .nav { gap: 2px; }
  .nav a { font-size: 22px; padding: 6px 20px; }
}

/* --- Меньше анимаций по желанию пользователя --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__title .word { transform: none; }
  .cursor-glow, .cursor-trail, .tap-glow { display: none !important; }
}

/* =========================================================
   Изящный шрифт с засечками для всех крупных заголовков
   ========================================================= */
.section__title, .cta__title, .form__title, .reviews__empty h3,
.reviews__score b, .hero__rating b,
.legal h1, .legal h2, .err__title, .err__code {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.section__title { line-height: 1.08; }
.cta__title { line-height: 1.06; }
.err__code { font-style: italic; letter-spacing: -0.03em; padding-right: .06em; }
/* выделенные слова — курсивом, как «клиентами» в главном заголовке */
.section__title .accent, .cta__title .accent { font-style: italic; padding-right: .04em; }

/* =========================================================
   Фон в стиле программирования
   ========================================================= */
.code-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 20%, transparent 80%);
}
.code-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media (max-width: 600px) { .code-grid { background-size: 40px 40px; } }

/* =========================================================
   Окно редактора на первом экране
   ========================================================= */
.hero__code { display: none; }
@media (min-width: 1200px) {
  .hero__inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(40px, 4vw, 80px); align-items: center; }
  .hero__code { display: block; position: relative; perspective: 1400px; animation: editorFloat 7s ease-in-out infinite; }
  .hero__title { font-size: min(5vw, 11vh, 92px); }
}
@media (min-width: 1600px) { .hero__title { font-size: min(4.3vw, 11vh, 128px); } }
@keyframes editorFloat { 50% { transform: translateY(-14px); } }

.hero__code::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 40px;
  background: radial-gradient(circle at 40% 40%, rgba(124,92,255,.45), rgba(184,255,92,.12) 55%, transparent 75%);
  filter: blur(60px);
}
.editor {
  --rx: 0deg; --ry: 0deg;
  position: relative; border-radius: 20px; overflow: hidden;
  background: rgba(16, 16, 26, .72);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 100px -30px rgba(124,92,255,.5), inset 0 1px 0 rgba(255,255,255,.07);
  transform: rotateY(calc(-9deg + var(--ry))) rotateX(calc(4deg + var(--rx)));
  transition: transform .8s var(--ease);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  opacity: 0;
}
.loaded .editor { opacity: 1; transition: transform .8s var(--ease), opacity 1.2s var(--ease) .5s; }
.editor__bar { display: flex; align-items: center; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.editor__tab { font-size: 12.5px; color: var(--text); padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.editor__tab b { color: #f7df1e; font-weight: 500; font-size: 10.5px; margin-right: 6px; }
.editor__body { display: flex; gap: 20px; padding: 20px 22px 24px; font-size: clamp(12px, .95vw, 15px); line-height: 1.75; }
.editor__lines { color: rgba(255,255,255,.18); text-align: right; white-space: pre; user-select: none; }
.editor__code { margin: 0; flex: 1; min-width: 0; font: inherit; color: #e6e6ef; white-space: pre; overflow: hidden; }
.editor__code code { font: inherit; transition: opacity .6s; }
.editor__code code.fade { opacity: 0; }
.tk-k { color: #c4a7ff; }
.tk-s { color: var(--accent); }
.tk-n { color: #ffb86b; }
.tk-b { color: #ff8fa3; }
.tk-f { color: #7dd3fc; }
.tk-p { color: var(--muted); }
.tk-c { color: #63637a; font-style: italic; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.2em; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor__status { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }
.editor__status span:last-child { margin-left: auto; }
.editor__live { color: var(--accent); }
.editor__live i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@media (min-width: 2200px) {
  .editor__body { font-size: 18px; }
  .editor__tab, .editor__status { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .editor { opacity: 1; } }

/* =========================================================
   Фон: северное сияние + подсветка сетки у курсора
   ========================================================= */
.aurora { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; will-change: transform; }
.aurora span:nth-child(1) {
  width: 60vmax; height: 60vmax; left: -18vmax; top: -10vmax;
  background: radial-gradient(circle, rgba(124,92,255,.32) 0%, rgba(124,92,255,.12) 35%, transparent 65%);
  animation: aurora1 28s ease-in-out infinite alternate;
}
.aurora span:nth-child(2) {
  width: 55vmax; height: 55vmax; right: -20vmax; top: 20vh;
  background: radial-gradient(circle, rgba(45,212,191,.20) 0%, rgba(45,212,191,.07) 35%, transparent 65%);
  animation: aurora2 34s ease-in-out infinite alternate;
}
.aurora span:nth-child(3) {
  width: 50vmax; height: 50vmax; left: 25vw; bottom: -30vmax;
  background: radial-gradient(circle, rgba(184,255,92,.14) 0%, rgba(184,255,92,.05) 35%, transparent 65%);
  animation: aurora3 30s ease-in-out infinite alternate;
}
@keyframes aurora1 { to { transform: translate(22vw, 18vh) scale(1.15); } }
@keyframes aurora2 { to { transform: translate(-26vw, -12vh) scale(.9); } }
@keyframes aurora3 { to { transform: translate(-18vw, -20vh) scale(1.2); } }

.code-grid--glow {
  background-image:
    linear-gradient(rgba(184,255,92,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,255,92,.22) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(240px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, rgba(0,0,0,.4) 45%, transparent 75%);
          mask-image: radial-gradient(240px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, rgba(0,0,0,.4) 45%, transparent 75%);
  transition: opacity .5s;
}
body.in-frame .code-grid--glow { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .code-grid--glow { display: none; } }

/* =========================================================
   Сетка-«пол» в перспективе внизу первого экрана
   ========================================================= */
.hero__floor {
  position: absolute; left: -40%; right: -40%; bottom: 0; height: 46%;
  z-index: 0; pointer-events: none; overflow: hidden;
  perspective: 420px; perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 35%, transparent 80%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.55) 35%, transparent 80%);
  opacity: 0; transition: opacity 2s var(--ease) .6s;
}
.loaded .hero__floor { opacity: .9; }
.hero__floor::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 260%;
  transform-origin: 50% 100%; transform: rotateX(76deg);
  background-image:
    linear-gradient(rgba(184,255,92,.45) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(167,139,250,.38) 1.5px, transparent 1.5px);
  --fs: 70px;
  background-size: var(--fs) var(--fs);
  animation: floorMove 2.6s linear infinite;
}
/* светящаяся линия горизонта */
.hero__floor::after {
  content: ""; position: absolute; left: 20%; right: 20%; top: 18%; height: 2px;
  background: radial-gradient(ellipse at center, rgba(184,255,92,.55), transparent 70%);
  filter: blur(2px);
}
@keyframes floorMove { to { background-position: 0 var(--fs); } }
@media (max-width: 600px) {
  .hero__floor { height: 32%; perspective: 300px; }
  .hero__floor::before { --fs: 46px; animation-duration: 2.2s; }
}
@media (prefers-reduced-motion: reduce) { .hero__floor::before { animation: none; } }


/* =========================================================
   ПРОИЗВОДИТЕЛЬНОСТЬ — убираем тяжёлые эффекты
   ========================================================= */
/* шум без анимации */
.noise { animation: none; inset: 0; }
/* свечение курсора без режима наложения (он заставлял перерисовывать всё под ним) */
.cursor-glow { mix-blend-mode: normal; background: radial-gradient(circle, rgba(184,255,92,.09) 0%, rgba(124,92,255,.06) 35%, transparent 68%); }
.tap-glow { mix-blend-mode: normal; }
/* шары-свечения: градиент вместо фильтра blur */
.hero__orb { filter: none !important; }
.hero__orb--1 { background: radial-gradient(circle, rgba(124,92,255,.9) 0%, rgba(124,92,255,.25) 40%, transparent 70%); opacity: .5; }
.hero__orb--2 { background: radial-gradient(circle, rgba(184,255,92,.9) 0%, rgba(184,255,92,.2) 40%, transparent 70%); opacity: .2; }
/* размытие под шапкой и окном пересчитывалось каждый кадр из-за движущегося фона */
.header.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(13,13,19,.9); }
.editor { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(16,16,26,.93); }
.hero__rating { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(20,20,30,.75); }
/* подсветка сетки: маленькое пятно, двигается через transform */
.code-grid--glow {
  inset: auto; left: 0; top: 0; width: 480px; height: 480px;
  transform: translate3d(-9999px, 0, 0); will-change: transform;
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.4) 32%, transparent 68%);
          mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.4) 32%, transparent 68%);
}
@media (max-width: 600px) { .code-grid--glow { background-size: 40px 40px; } }
@media (hover: none) { .code-grid--glow { display: none; } }
/* «пол»: двигаем через transform (видеокарта), а не через background-position (перерисовка) */
.hero__floor::before {
  height: calc(260% + var(--fs));
  will-change: transform;
  animation: floorMoveFast 2.6s linear infinite;
}
@keyframes floorMoveFast {
  from { transform: rotateX(76deg) translate3d(0, 0, 0); }
  to   { transform: rotateX(76deg) translate3d(0, var(--fs), 0); }
}
@media (max-width: 600px) { .hero__floor::before { animation-duration: 2.2s; } }
@media (prefers-reduced-motion: reduce) { .hero__floor::before { animation: none; } }
/* окно редактора парит через transform — подсказываем браузеру */
.hero__code { will-change: transform; }

/* =========================================================
   Заставка-терминал
   ========================================================= */
.preloader { gap: 28px; padding: 20px; }
.preloader__logo { font-size: clamp(30px, 5vw, 56px); }
.term {
  width: min(460px, 100%); border-radius: 14px; overflow: hidden; text-align: left;
  background: rgba(18,18,28,.95); border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(124,92,255,.45);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13.5px;
}
.term__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }
.term__bar .browser__dots i { width: 10px; height: 10px; }
.term__body { padding: 16px 18px 18px; min-height: 124px; line-height: 1.75; white-space: pre; color: var(--text); }
.t-p, .t-ok { color: var(--accent); }
.t-m { color: var(--muted); }
.t-bar { color: #a78bfa; }
@media (max-width: 380px) { .term { font-size: 12px; } }

/* =========================================================
   Полоска прогресса прокрутки
   ========================================================= */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0); will-change: transform;
  background: linear-gradient(90deg, var(--accent), #5cffc8, var(--accent-2));
  box-shadow: 0 0 10px rgba(184,255,92,.6);
}

/* =========================================================
   Портфолио разворачивается в 3D при прокрутке
   ========================================================= */
.browser-stage { perspective: 1600px; }
.browser-stage .browser { transform-origin: 50% 0; will-change: transform, opacity; transition: max-width .7s var(--ease), border-radius .7s var(--ease); }

/* =========================================================
   Раздел «Секреты»
   ========================================================= */
kbd {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .85em;
  padding: 1px 7px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--border); background: rgba(255,255,255,.05); color: var(--accent);
}
.secrets__score { display: flex; align-items: center; gap: 16px; }
.secrets__count { display: flex; align-items: baseline; gap: 4px; }
.secrets__count b { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(44px, 4vw, 60px); line-height: 1; color: var(--accent); }
.secrets__count span { font-family: "Playfair Display", Georgia, serif; font-size: 24px; color: var(--muted); }
.secrets__count i { font-style: normal; }
.secrets__score small { color: var(--muted); font-size: 14px; }
.secrets__bar { width: 180px; height: 6px; margin-top: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.secrets__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #5cffc8); box-shadow: 0 0 12px rgba(184,255,92,.5); transition: width .8s var(--ease); }
.secrets__lead { color: var(--muted); max-width: 660px; margin: calc(clamp(36px, 5vw, 64px) * -0.4) 0 clamp(28px, 4vw, 44px); font-size: clamp(16px, 1.2vw, 18px); }
.secrets__lead.all { color: var(--accent); font-weight: 600; }
@media (max-width: 600px) {
  .secrets__score { width: 100%; }
  .secrets__bar { width: 100%; }
  .secrets__score > div:last-child { flex: 1; }
}

/* Уведомление «Секрет найден» */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 960;
  max-width: calc(100vw - 32px); padding: 14px 22px; border-radius: 100px; pointer-events: none;
  background: rgba(14,14,22,.96); border: 1px solid rgba(184,255,92,.4);
  box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 30px rgba(184,255,92,.15);
  font-weight: 600; font-size: 15px; text-align: center;
  opacity: 0; transform: translate(-50%, 30px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--accent); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* холст для конфетти и снега */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 955; pointer-events: none; }
@keyframes fxFlip {
  from { transform: perspective(1800px) rotateY(0deg); }
  to   { transform: perspective(1800px) rotateY(360deg); }
}
@keyframes discoHue {
  to { -webkit-backdrop-filter: hue-rotate(360deg) saturate(1.7); backdrop-filter: hue-rotate(360deg) saturate(1.7); }
}

/* =========================================================
   Портфолио: обложка + раскрытие «порталом»
   ========================================================= */
.browser__screen { overflow: hidden; background: #0d0d16; }

/* само портфолио — раскрывается кругом из точки клика */
.pf-view {
  position: absolute; inset: 0; z-index: 3; background: #fff;
  clip-path: circle(0px at var(--rx, 50%) var(--ry, 50%));
  transition: clip-path 1.15s cubic-bezier(.77,0,.18,1);
}
.browser.is-open .pf-view { clip-path: circle(150% at var(--rx, 50%) var(--ry, 50%)); }

/* светящееся кольцо по краю «портала» */
.pf-ring {
  position: absolute; z-index: 4; left: var(--rx, 50%); top: var(--ry, 50%);
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--accent); opacity: 0;
  box-shadow: 0 0 30px rgba(184,255,92,.7), inset 0 0 20px rgba(184,255,92,.4);
}
.browser.revealing .pf-ring { animation: pfRing 1.15s cubic-bezier(.77,0,.18,1) forwards; }
@keyframes pfRing {
  0% { transform: scale(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: scale(var(--rs, 80)); opacity: 0; }
}

/* обложка */
.pf-cover {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center;
  cursor: pointer; overflow: hidden; outline: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, rgba(124,92,255,.38), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 95%, rgba(184,255,92,.16), transparent 70%),
    radial-gradient(ellipse 40% 35% at 10% 90%, rgba(45,212,191,.12), transparent 70%),
    #0d0d16;
  transition: transform 1.1s var(--ease), opacity .9s var(--ease) .15s;
}
.browser.is-open .pf-cover { transform: scale(1.12); opacity: 0; pointer-events: none; }
.pf-cover:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.pf-cover__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 80%);
}
.pf-cover__chips span {
  position: absolute; left: var(--x); top: var(--y); white-space: nowrap;
  padding: 8px 14px; border-radius: 100px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted);
  animation: chipFloat 7s ease-in-out infinite; animation-delay: var(--d);
  transition: color .4s, border-color .4s, background .4s;
}
@keyframes chipFloat { 50% { transform: translateY(-12px); } }
.pf-cover:hover .pf-cover__chips span { color: var(--text); border-color: rgba(184,255,92,.3); background: rgba(184,255,92,.05); }
.pf-cover__center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 24px; }
.pf-play {
  position: relative; width: 104px; height: 104px; margin-bottom: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #000;
  animation: pfPulse 2.4s infinite; transition: transform .4s var(--ease);
}
@keyframes pfPulse {
  0% { box-shadow: 0 0 0 0 rgba(184,255,92,.45); }
  70% { box-shadow: 0 0 0 26px rgba(184,255,92,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,255,92,0); }
}
.pf-play__icon { width: 34px; height: 34px; transition: transform .5s var(--ease); }
.pf-play__ring { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); overflow: visible; }
.pf-play__ring circle {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset .3s;
  filter: drop-shadow(0 0 6px rgba(184,255,92,.8));
}
.pf-cover.arming .pf-play__ring circle { stroke-dashoffset: 0; transition: stroke-dashoffset .9s linear; }
@media (hover: hover) {
  .pf-cover:hover .pf-play { transform: scale(1.08); }
  .pf-cover:hover .pf-play__icon { transform: rotate(45deg); }
}
.pf-cover__title { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(28px, 4vw, 54px); line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 10px; }
.pf-cover__title em { font-style: italic; color: var(--accent); }
.pf-cover__sub { color: var(--muted); font-size: clamp(14px, 1.2vw, 17px); max-width: 30em; }
.pf-cover__hint { margin-top: 18px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #7a7a8c; }
.only-touch { display: none; }
@media (hover: none) { .only-mouse { display: none; } .only-touch { display: inline; } }

/* панель окна: «Свернуть» и «Открыть» — только когда портфолио открыто */
.browser__close {
  flex: none; display: none; align-items: center; padding: 5px 12px; border-radius: 100px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--border);
  transition: color .3s, border-color .3s;
}
.browser.is-open .browser__close { display: inline-flex; }
.browser:not(.is-open) .browser__open { display: none; }
@media (hover: hover) { .browser__close:hover { color: var(--text); border-color: rgba(255,255,255,.3); } }
.browser:not(.is-open) .browser__url { color: #6f6f80; font-style: italic; }

/* узкий режим («Телефон») и телефоны: меньше плавающих названий */
.browser.is-mobile .pf-cover__chips span:nth-child(n+5) { display: none; }
.browser.is-mobile .pf-cover__title { font-size: 30px; }
@media (max-width: 600px) {
  .pf-cover__chips span:nth-child(n+5) { display: none; }
  .pf-cover__chips span { font-size: 11px; padding: 6px 10px; }
  .pf-play { width: 84px; height: 84px; }
}

/* =========================================================
   Портфолио свёрнуто в компактную карточку-приглашение
   ========================================================= */
.browser__bar { max-height: 90px; overflow: hidden; transition: max-height .6s var(--ease), padding .6s var(--ease), opacity .5s, border-color .5s; }
.browser__screen { transition: height .9s cubic-bezier(.77,0,.18,1); }

.browser.is-collapsed { border-radius: 30px; box-shadow: 0 30px 90px -30px rgba(124,92,255,.55), 0 0 0 1px rgba(184,255,92,.08); }
.browser.is-collapsed .browser__bar { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-color: transparent; }
.browser.is-collapsed .browser__screen { height: 360px; }
.browser.is-collapsed .pf-play { width: 84px; height: 84px; margin-bottom: 18px; }
.browser.is-collapsed .pf-cover__title { font-size: clamp(28px, 3.4vw, 46px); }
.browser.is-collapsed .pf-cover__chips span:nth-child(n+6) { display: none; }
@media (hover: hover) {
  .browser.is-collapsed:hover { box-shadow: 0 40px 110px -30px rgba(124,92,255,.7), 0 0 0 1px rgba(184,255,92,.3); }
}

/* переключатель «Компьютер/Телефон» и подсказка — только когда окно развёрнуто */
#portfolio .device-switch, #portfolio .portfolio__hint { transition: opacity .5s var(--ease), visibility .5s; }
#portfolio.pf-collapsed .device-switch, #portfolio.pf-collapsed .portfolio__hint { opacity: 0 !important; visibility: hidden; }

@media (max-width: 600px) {
  .browser.is-collapsed .browser__screen { height: 330px; }
  .browser.is-collapsed .pf-play { width: 72px; height: 72px; }
  .browser.is-collapsed .pf-cover__chips span:nth-child(n+4) { display: none; }
}

/* =========================================================
   Карточка-приглашение — компактнее
   ========================================================= */
.browser.is-collapsed { max-width: 760px; border-radius: 24px; }
.browser.is-collapsed .browser__screen { height: 230px; }
.browser.is-collapsed .pf-cover__center { padding: 16px; }
.browser.is-collapsed .pf-play { width: 58px; height: 58px; margin-bottom: 12px; }
.browser.is-collapsed .pf-play__icon { width: 24px; height: 24px; }
.browser.is-collapsed .pf-play__ring { inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); }
.browser.is-collapsed .pf-cover__title { font-size: clamp(22px, 2.4vw, 32px); margin-bottom: 6px; }
.browser.is-collapsed .pf-cover__sub { font-size: 14px; }
.browser.is-collapsed .pf-cover__hint { margin-top: 10px; font-size: 11px; }
.browser.is-collapsed .pf-cover__chips span { font-size: 11px; padding: 5px 10px; }
.browser.is-collapsed .pf-cover__chips span:nth-child(n+5) { display: none; }
.browser.is-collapsed .pf-cover__grid { background-size: 32px 32px; }
@media (min-width: 1600px) {
  .browser.is-collapsed { max-width: 860px; }
  .browser.is-collapsed .browser__screen { height: 260px; }
}
@media (max-width: 600px) {
  .browser.is-collapsed { max-width: 100%; }
  .browser.is-collapsed .browser__screen { height: 240px; }
  .browser.is-collapsed .pf-play { width: 54px; height: 54px; }
  .browser.is-collapsed .pf-cover__sub { font-size: 13px; }
  .browser.is-collapsed .pf-cover__chips span:nth-child(n+3) { display: none; }
}
.browser.is-collapsed .pf-cover__sub { max-width: 46em; }

/* Полоска-таймер: окно скоро свернётся (курсор ушёл) */
.browser { position: relative; }
.browser::after {
  content: ""; position: absolute; left: 0; top: 0; z-index: 10; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), #5cffc8); box-shadow: 0 0 12px rgba(184,255,92,.7);
  transform-origin: 0 50%; transform: scaleX(0); opacity: 0; pointer-events: none;
}
.browser.leaving::after { opacity: 1; animation: leaveBar 1.2s linear forwards; }
@keyframes leaveBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* =========================================================
   Компактные отступы между разделами
   ========================================================= */
.section { padding: clamp(44px, 5.5vw, 88px) 0; }
.section__head { margin-bottom: clamp(24px, 3vw, 40px); }
.section__head .eyebrow { margin-bottom: 10px; }
#portfolio { padding-top: clamp(56px, 6vw, 96px); } /* после первого экрана — чуть больше воздуха */
.cta { padding-bottom: clamp(56px, 6vw, 100px); }
.cta__title { margin-bottom: clamp(24px, 3vw, 40px); }
.reviews__empty { padding: clamp(28px, 3.5vw, 44px) 24px; }
.reviews__empty .btn { margin-top: 18px; }
.reviews__more { margin-top: 0; }
.reviews__more:has(> [hidden]) { display: none; }
.secrets__lead { margin: calc(clamp(24px, 3vw, 40px) * -0.4) 0 clamp(20px, 2.5vw, 32px); }
.portfolio__hint { margin-top: 16px; }
/* у свёрнутой карточки подсказка под окном не занимает место */
#portfolio.pf-collapsed .portfolio__hint { display: none; }

@media (min-width: 1600px) {
  .section { padding: clamp(80px, 5vw, 120px) 0; }
  #portfolio { padding-top: clamp(96px, 6vw, 140px); }
}
@media (max-width: 600px) {
  .section { padding: 40px 0; }
  #portfolio { padding-top: 48px; }
}

/* ещё плотнее */
.section { padding: clamp(28px, 3.2vw, 52px) 0; }
#portfolio { padding-top: clamp(48px, 5vw, 80px); }
@media (min-width: 1600px) {
  .section { padding: clamp(52px, 3.2vw, 80px) 0; }
  #portfolio { padding-top: clamp(80px, 5vw, 120px); }
}
@media (max-width: 600px) {
  .section { padding: 28px 0; }
  #portfolio { padding-top: 44px; }
}
.section { padding: clamp(20px, 2.2vw, 36px) 0; }
@media (min-width: 1600px) { .section { padding: clamp(36px, 2.4vw, 60px) 0; } }
@media (max-width: 600px) { .section { padding: 22px 0; } }

/* =========================================================
   ПЕРВАЯ ЗАГРУЗКА: заставка открывается «порталом» + постановка первого экрана
   ========================================================= */
@property --hole { syntax: "<length>"; inherits: true; initial-value: 0px; }

.preloader {
  --hole: 0px;
  transform: none !important;
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 1.5px));
          mask: radial-gradient(circle at 50% 50%, transparent var(--hole), #000 calc(var(--hole) + 1.5px));
  transition: --hole 1.15s cubic-bezier(.77,0,.18,1) .35s, visibility 0s linear 1.55s;
}
.preloader.done { --hole: 150vmax; visibility: hidden; }
/* логотип и терминал перед открытием уменьшаются и тают */
.preloader > * { transition: transform .55s var(--ease), opacity .45s var(--ease), filter .55s; }
.preloader.done > * { transform: scale(.9); opacity: 0; filter: blur(6px); }
/* светящееся кольцо по краю «портала» */
.preloader::after {
  content: ""; position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none;
  width: calc(var(--hole) * 2); height: calc(var(--hole) * 2);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(184,255,92,.95);
  box-shadow: 0 0 30px 6px rgba(184,255,92,.45), 0 0 90px 20px rgba(124,92,255,.35);
  opacity: 0; transition: opacity .3s .35s;
}
.preloader.done::after { opacity: 1; }

/* фон проявляется после открытия */
.aurora, .code-grid, .code-bg { transition: opacity 2.2s var(--ease) .5s; }
body:not(.loaded) .aurora, body:not(.loaded) .code-grid, body:not(.loaded) .code-bg { opacity: 0; }
.hero__orb { transition: opacity 2s var(--ease) .4s; }
body:not(.loaded) .hero__orb { opacity: 0 !important; }

/* шапка опускается сверху */
.header { transition: background .4s, border-color .4s, backdrop-filter .4s, transform .5s var(--ease), translate 1s var(--ease) .55s, opacity 1s var(--ease) .55s; }
body:not(.loaded) .header { opacity: 0; translate: 0 -28px; }

/* строки заголовка: поднимаются по очереди и из размытых становятся резкими */
.hero__title .word { opacity: 0; filter: blur(14px); transition: transform 1.3s var(--ease), opacity 1.1s var(--ease), filter 1.3s var(--ease); }
.loaded .hero__title .word { opacity: 1; filter: blur(0); }
.loaded .hero__title .line:nth-child(1) .word { transition-delay: .5s; }
.loaded .hero__title .line:nth-child(2) .word { transition-delay: .65s; }
.loaded .hero__title .line:nth-child(3) .word { transition-delay: .8s; }

/* подпись, текст, кнопки — по очереди */
body:not(.loaded) .hero .reveal { opacity: 0 !important; transform: translateY(30px) !important; }
.hero .eyebrow.reveal { transition-delay: .4s; }
.hero__lead.reveal { transition-delay: 1s; }
.hero__actions.reveal { transition-delay: 1.15s; }
.hero__rating.reveal { transition-delay: 1.3s; }

/* окно редактора прилетает справа */
.hero__code { transition: opacity 1.4s var(--ease) .9s, translate 1.4s var(--ease) .9s, scale 1.4s var(--ease) .9s; }
body:not(.loaded) .hero__code { opacity: 0; translate: 70px 24px; scale: .92; }

/* «пол» и подсказка прокрутки — в конце */
.loaded .hero__floor { transition-delay: 1s; }
.scroll-hint { transition: opacity 1s var(--ease) 1.8s; }
body:not(.loaded) .scroll-hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .preloader { -webkit-mask: none; mask: none; }
  .preloader.done { opacity: 0; }
  .preloader::after { display: none; }
}
/* «портал» теперь двигает скрипт — CSS-переход по --hole и скрытие через visibility отключаем */
.preloader { transition: none !important; }
.preloader.done { visibility: visible; }
.preloader::after { transition: opacity .3s .35s !important; }

/* =========================================================
   «Взрыв» при нажатии на кнопки
   ========================================================= */
.shock {
  position: fixed; z-index: 997; pointer-events: none; border-radius: 50%;
  width: 200px; height: 200px; margin: -100px 0 0 -100px;
  border: 2px solid rgba(184,255,92,.95);
  background: radial-gradient(circle, rgba(255,255,255,.85) 0%, rgba(184,255,92,.45) 14%, rgba(124,92,255,.18) 32%, transparent 55%);
  box-shadow: 0 0 30px rgba(184,255,92,.55), inset 0 0 24px rgba(184,255,92,.35);
  animation: shock .65s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes shock {
  0%   { transform: scale(.05); opacity: 1; }
  60%  { opacity: .8; }
  100% { transform: scale(1); opacity: 0; border-width: .5px; }
}
.boom { animation: boom .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes boom { 0% { scale: 1; } 30% { scale: .9; } 65% { scale: 1.07; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .shock { display: none; } .boom { animation: none; } }

/* =========================================================
   Красочная заставка
   ========================================================= */
.preloader { isolation: isolate; background: #08080d; }

/* перетекающее цветное сияние */
.pre-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.pre-bg span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; animation: preBlob 5s ease-in-out infinite alternate; }
.pre-bg span:nth-child(1) { left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(124,92,255,.55), transparent 65%); }
.pre-bg span:nth-child(2) { right: -20vmax; bottom: -26vmax; background: radial-gradient(circle, rgba(184,255,92,.35), transparent 65%); animation-delay: -1.5s; }
.pre-bg span:nth-child(3) { left: 25%; bottom: -34vmax; background: radial-gradient(circle, rgba(92,255,200,.32), transparent 65%); animation-delay: -3s; }
.pre-bg span:nth-child(4) { right: 5%; top: -30vmax; background: radial-gradient(circle, rgba(255,107,203,.32), transparent 65%); animation-delay: -2.2s; }
@keyframes preBlob { to { transform: translate(7vmax, 5vmax) scale(1.18); } }
.pre-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 20%, transparent 75%);
}
/* цветной дождь из кода */
.pre-rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* фон и дождь не тают вместе с терминалом — остаются до «портала» */
.preloader.done > .pre-bg, .preloader.done > .pre-rain { transform: none; opacity: 1; filter: none; }

/* радужный переливающийся логотип */
.preloader__logo {
  background: linear-gradient(90deg, #fff 0%, #b8ff5c 22%, #5cffc8 40%, #7c9cff 58%, #ff6bcb 76%, #fff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: logoShine 2.6s linear infinite;
  filter: drop-shadow(0 0 22px rgba(124,92,255,.5));
}
.preloader__logo span { color: transparent; }
@keyframes logoShine { to { background-position: -250% 0; } }

/* терминал в рамке с бегущим радужным светом */
.term { position: relative; isolation: isolate; background: transparent; border: 0;
  box-shadow: 0 30px 80px -20px rgba(124,92,255,.55), 0 0 60px -10px rgba(92,255,200,.25); }
.term::before {
  content: ""; position: absolute; inset: -60%; z-index: -2;
  background: conic-gradient(from 0deg, #b8ff5c, #5cffc8, #7c9cff, #7c5cff, #ff6bcb, #ffd166, #b8ff5c);
  animation: spin 3s linear infinite;
}
.term::after { content: ""; position: absolute; inset: 1.5px; z-index: -1; border-radius: 12.5px; background: rgba(13,13,21,.97); }
.term__body { min-height: 206px; }
.t-teal { color: #5cffc8; } .t-vio { color: #a78bfa; } .t-pink { color: #ff8fd8; }

/* «портал»: радужные концентрические кольца */
.preloader::after {
  border-color: #b8ff5c;
  box-shadow:
    0 0 0 3px rgba(92,255,200,.7),
    0 0 0 7px rgba(124,156,255,.5),
    0 0 0 12px rgba(124,92,255,.38),
    0 0 0 18px rgba(255,107,203,.25),
    0 0 50px 22px rgba(124,92,255,.4),
    inset 0 0 40px rgba(184,255,92,.35);
}
@media (prefers-reduced-motion: reduce) {
  .pre-bg span, .term::before, .preloader__logo { animation: none; }
  .pre-rain { display: none; }
}

/* =========================================================
   Контакты: кнопки мессенджеров и почты с иконками
   ========================================================= */
.cta__title { margin-bottom: 14px; }
.cta__lead { color: var(--muted); font-size: clamp(15px, 1.2vw, 18px); margin-bottom: clamp(24px, 3vw, 36px); }
.contacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; }
.contact-btn {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 12px 18px 12px 12px; border-radius: 20px;
  background: rgba(255,255,255,.035); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .35s, background .35s, box-shadow .35s;
}
.contact-btn__ico {
  flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  background: var(--c); box-shadow: 0 8px 22px -6px var(--c);
  transition: transform .45s var(--ease);
}
.contact-btn__ico svg { width: 26px; height: 26px; }
.contact-btn__txt b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.contact-btn__txt small { display: block; font-size: 12.5px; color: var(--muted); }
.contact-btn:active { transform: scale(.97); }
@media (hover: hover) {
  .contact-btn:hover { transform: translateY(-4px); border-color: var(--c); background: rgba(255,255,255,.06); box-shadow: 0 16px 40px -16px var(--c); }
  .contact-btn:hover .contact-btn__ico { transform: rotate(-8deg) scale(1.08); }
}
.cta__alt { margin-top: 22px; color: var(--muted); font-size: 15px; }
.cta__alt a { color: var(--accent); }
@media (max-width: 900px) { .contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) {
  .contacts { gap: 10px; }
  .contact-btn { padding: 10px 12px 10px 10px; gap: 10px; border-radius: 16px; }
  .contact-btn__ico { width: 40px; height: 40px; border-radius: 12px; }
  .contact-btn__ico svg { width: 22px; height: 22px; }
  .contact-btn__txt b { font-size: 15px; }
  .contact-btn__txt small { font-size: 11.5px; }
}

/* окно «Как отправить письмо?» */
.modal__dialog--mail { width: min(560px, 100%); }
.mail-pick { padding: 40px 36px 32px; }
.mail-pick__sub { color: var(--muted); font-size: 15px; margin: 8px 0 22px; }
.mail-pick__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mail-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.mail-opt__ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.mail-opt b { display: block; font-size: 15px; font-weight: 700; }
.mail-opt small { display: block; font-size: 12.5px; color: var(--muted); }
@media (hover: hover) { .mail-opt:hover { transform: translateY(-2px); border-color: var(--c); background: rgba(255,255,255,.06); } }
@media (max-width: 600px) {
  .mail-pick { padding: 32px 20px 22px; }
  .mail-pick__list { grid-template-columns: 1fr; }
}

/* =========================================================
   Переключатель языка + флаги
   ========================================================= */
.nav { margin-left: auto; }
.lang { position: relative; z-index: 3; margin-left: 10px; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 10px; border-radius: 100px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); font-size: 13px; font-weight: 700; color: var(--text);
  transition: border-color .3s, background .3s;
}
.lang__btn svg { opacity: .7; transition: transform .3s var(--ease); }
.lang.open .lang__btn svg { transform: rotate(180deg); }
@media (hover: hover) { .lang__btn:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.07); } }
.lang__list {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; list-style: none; padding: 6px;
  border-radius: 18px; background: rgba(14,14,22,.97); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 40px -10px rgba(124,92,255,.35);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.lang.open .lang__list { opacity: 1; transform: none; pointer-events: auto; }
.lang__list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--text); text-align: left; transition: background .2s;
}
.lang__list button small { margin-left: auto; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.lang__list button.active { background: rgba(184,255,92,.1); color: var(--accent); }
@media (hover: hover) { .lang__list button:not(.active):hover { background: rgba(255,255,255,.06); } }

.flag { flex: none; display: inline-block; width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); background-size: cover; background-position: center; }
.flag[data-flag="ru"] { background: linear-gradient(#fff 0 33.33%, #0039a6 0 66.66%, #d52b1e 0); }
.flag[data-flag="pl"] { background: linear-gradient(#fff 0 50%, #dc143c 0); }
.flag[data-flag="de"] { background: linear-gradient(#000 0 33.33%, #dd0000 0 66.66%, #ffce00 0); }
.flag[data-flag="fr"] { background: linear-gradient(90deg, #0055a4 0 33.33%, #fff 0 66.66%, #ef4135 0); }
.flag[data-flag="it"] { background: linear-gradient(90deg, #009246 0 33.33%, #fff 0 66.66%, #ce2b37 0); }
.flag[data-flag="es"] { background: linear-gradient(#aa151b 0 25%, #f1bf00 0 75%, #aa151b 0); }
.flag[data-flag="en"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='t'%3E%3Cpath d='M30,15h30v15zv15h-30zh-30v-15zv-15h30z'/%3E%3C/clipPath%3E%3Cpath d='M0,0v30h60v-30z' fill='%23012169'/%3E%3Cpath d='M0,0L60,30M60,0L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0L60,30M60,0L0,30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0v30M0,15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0v30M0,15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E"); }

@media (max-width: 900px) {
  .lang { margin-left: auto; margin-right: 8px; }
  .lang__btn { height: 42px; }
}
@media (max-width: 380px) {
  .lang__btn { padding: 0 9px 0 8px; gap: 6px; }
  .lang__btn svg { display: none; }
}

/* =========================================================
   Экран выбора языка (перед заставкой)
   ========================================================= */
.lang-pick { display: none; flex-direction: column; align-items: center; gap: 24px; width: min(700px, 100%); text-align: center; }
.preloader.picking .lang-pick { display: flex; animation: pickIn .7s var(--ease); }
.preloader.picking .term { display: none; }
.preloader.picked .lang-pick { opacity: 0; transform: scale(.96); filter: blur(4px); transition: opacity .4s var(--ease), transform .4s var(--ease), filter .4s; }
@keyframes pickIn { from { opacity: 0; transform: translateY(16px); } }
.term { animation: termIn .55s var(--ease); }
@keyframes termIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.lang-pick__title {
  min-height: 1.5em; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .04em;
  color: var(--text); transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.lang-pick__title::before { content: "$ "; color: var(--accent); }
.lang-pick__title::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 4px; vertical-align: -0.18em; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1s steps(1) infinite; }
.lang-pick__title.swap { opacity: 0; transform: translateY(-6px); }

.lang-pick__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.lang-pick__btn {
  position: relative; display: flex; align-items: center; gap: 12px; width: 158px; padding: 14px 16px; border-radius: 16px;
  background: rgba(14,14,22,.78); border: 1px solid rgba(255,255,255,.12); color: var(--text);
  font-size: 15.5px; font-weight: 700; text-align: left;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, background .3s;
}
.lang-pick__btn .flag { width: 28px; height: 19px; border-radius: 4px; }
.lang-pick__btn.is-current { border-color: rgba(184,255,92,.55); box-shadow: 0 0 0 1px rgba(184,255,92,.2), 0 0 26px -6px rgba(184,255,92,.65); }
.lang-pick__btn.is-chosen { background: var(--accent); color: #0b0b10; border-color: var(--accent); transform: scale(1.06); box-shadow: 0 0 40px -4px rgba(184,255,92,.8); }
.lang-pick__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) {
  .lang-pick__btn:not(.is-chosen):hover { transform: translateY(-3px); border-color: rgba(184,255,92,.7); background: rgba(20,20,32,.9); box-shadow: 0 12px 30px -12px rgba(184,255,92,.6); }
}
@media (max-width: 600px) {
  .lang-pick { gap: 18px; }
  .lang-pick__title { font-size: 14px; }
  .lang-pick__grid { gap: 10px; }
  .lang-pick__btn { width: calc(50% - 5px); padding: 12px 14px; font-size: 15px; }
}

/* =========================================================
   Эмблема рядом с WebWorks
   ========================================================= */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { display: inline-flex; flex: none; width: 34px; height: 34px; font-style: normal; }
.logo__mark svg, .pre-mark svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 12px rgba(124,92,255,.4)); }
@media (hover: hover) { .logo:hover .logo__mark { animation: emHop .6s var(--ease); } }
@keyframes emHop { 40% { transform: translateY(-3px) rotate(-8deg) scale(1.08); } }
.footer .logo__mark { width: 30px; height: 30px; }
@media (max-width: 380px) { .logo__mark { width: 28px; height: 28px; } .logo { gap: 8px; } }
@media (min-width: 2200px) { .logo__mark { width: 42px; height: 42px; } }

/* эмблема на заставке */
.pre-mark { width: 92px; height: 92px; margin-bottom: -6px; animation: preMarkIn .9s var(--ease) both; }
.pre-mark svg { filter: drop-shadow(0 12px 34px rgba(124,92,255,.55)) drop-shadow(0 0 18px rgba(184,255,92,.25)); }
@keyframes preMarkIn { from { opacity: 0; transform: scale(.6) rotate(-20deg); } }
@media (max-width: 600px) { .pre-mark { width: 72px; height: 72px; } }

/* анимации внутри эмблем */
[data-emblem] svg *, .em-trial svg * { transform-box: view-box; transform-origin: 32px 32px; }
.em-spin { animation: spin 14s linear infinite; }
.em-spin-rev { animation: spin 10s linear infinite reverse; }
.em-spin-fast { animation: spin 3s linear infinite; }
.em-blink { animation: blink 1s steps(1) infinite; }
.em-dash { animation: emDash 1.2s linear infinite; }
@keyframes emDash { to { stroke-dashoffset: -12; } }
.em-twinkle { animation: emTw 2.6s ease-in-out infinite; }
@keyframes emTw { 50% { transform: scale(.86) rotate(14deg); opacity: .85; } }
.em-pulse { animation: emPulse 1.8s ease-in-out infinite; }
@keyframes emPulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { [data-emblem] svg *, .em-trial svg * { animation: none !important; } }

/* =========================================================
   Панель «Пробный режим» — выбор эмблемы (временно)
   ========================================================= */
.em-trial {
  position: fixed; left: 16px; bottom: 16px; z-index: 963; width: 300px; padding: 12px; border-radius: 18px;
  background: rgba(14,14,22,.95); border: 1px solid rgba(184,255,92,.35);
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 30px -8px rgba(184,255,92,.35);
  font-family: var(--font-body);
}
.em-trial__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; cursor: default; }
.em-trial__head b { font-size: 13px; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.em-trial__head span { font-size: 12.5px; color: var(--muted); }
.em-trial__toggle { margin-left: auto; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); font-size: 16px; line-height: 1; color: var(--text); }
.em-trial__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.em-trial__list button {
  position: relative; aspect-ratio: 1; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03);
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.em-trial__list button svg { width: 100%; height: 100%; overflow: visible; }
.em-trial__list button small { position: absolute; left: 5px; top: 3px; font-size: 10px; font-weight: 700; color: var(--muted); }
.em-trial__list button.active { border-color: var(--accent); background: rgba(184,255,92,.1); box-shadow: 0 0 18px -4px rgba(184,255,92,.6); }
.em-trial__list button.active small { color: var(--accent); }
@media (hover: hover) { .em-trial__list button:hover { transform: translateY(-2px); border-color: rgba(184,255,92,.5); } }
.em-trial__name { margin-top: 10px; font-size: 13px; font-weight: 700; text-align: center; color: var(--text); }
.em-trial.min { width: auto; padding: 8px 10px; }
.em-trial.min .em-trial__list, .em-trial.min .em-trial__name { display: none; }
.em-trial.min .em-trial__head { margin: 0; cursor: pointer; }
@media (max-width: 600px) { .em-trial { left: 10px; right: 10px; width: auto; bottom: 10px; } }
/* отступ только у эмблемы — чтобы «WebWorks» не разъезжалось */
.logo { gap: 0; }
.logo__mark { margin-right: 10px; }
@media (max-width: 380px) { .logo__mark { margin-right: 8px; } }
/* панель пробного режима — справа, не закрывает кнопки */
.em-trial { left: auto; right: 16px; width: 330px; }
.em-trial__head b { white-space: nowrap; }
@media (max-width: 600px) { .em-trial { left: 10px; right: 10px; width: auto; } }
.em-trial__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.em-trial__list button { min-width: 0; }
/* орбита «течёт» — штрихи бегут по кругу */
.em-flow { animation: emFlow 1.1s linear infinite; }
@keyframes emFlow { to { stroke-dashoffset: -11; } }
@media (prefers-reduced-motion: reduce) { .em-flow { animation: none; } }
/* центр вращения задаём только вращающимся частям — иначе наклон орбиты (transform в SVG) смещается */
[data-emblem] svg *, .em-trial svg * { transform-box: view-box; transform-origin: 0 0; }
[data-emblem] svg .em-spin, [data-emblem] svg .em-spin-rev, [data-emblem] svg .em-spin-fast, [data-emblem] svg .em-twinkle,
.em-trial svg .em-spin, .em-trial svg .em-spin-rev, .em-trial svg .em-spin-fast, .em-trial svg .em-twinkle { transform-origin: 32px 32px; }
@keyframes emFlow { to { stroke-dashoffset: -11; } }

/* =========================================================
   Надпись WebWorks с орбитами на экране выбора языка
   ========================================================= */
.pre-brand { position: relative; display: grid; place-items: center; font-size: clamp(30px, 5vw, 56px); width: 9.6em; height: 2.7em; margin: -4px 0; }
.pre-brand .preloader__logo { position: relative; z-index: 1; font-size: 1em; }
.pre-brand__orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pre-brand__orbit--back { z-index: 0; }
.pre-brand__orbit--front { z-index: 2; }
.pre-brand__orbit path { filter: drop-shadow(0 0 6px rgba(184,255,92,.35)); }
.pb-flow { animation: pbFlow 1.4s linear infinite; }
.pb-flow--rev { animation-direction: reverse; animation-duration: 1.9s; }
@keyframes pbFlow { to { stroke-dashoffset: -30; } }
.pre-brand { animation: preBrandIn 1s var(--ease) both; }
@keyframes preBrandIn { from { opacity: 0; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) { .pb-flow, .pre-brand { animation: none; } }

/* =========================================================
   1) ГЛОБУС: «Сайты для всей Европы и мира»
   ========================================================= */
.world__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.world__lead { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); max-width: 34em; margin: 18px 0 30px; }
.world__stats { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 44px); }
.world__stats div { display: flex; flex-direction: column; }
.world__stats b {
  font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(34px, 3.4vw, 52px); line-height: 1;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.world__stats span { color: var(--muted); font-size: 14px; margin-top: 6px; }
.world__globe { position: relative; display: flex; flex-direction: column; align-items: center; }
#globe { display: block; width: min(100%, 580px); aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
#globe.grabbing { cursor: grabbing; }
.world__hint { margin-top: -6px; font-size: 13px; color: #6f6f80; }
@media (max-width: 900px) { .world__inner { grid-template-columns: 1fr; } #globe { width: min(100%, 460px); } }

/* =========================================================
   2) СКРОЛЛ-ИСТОРИЯ «Как рождается сайт»
   ========================================================= */
.story { position: relative; }
.story__track { height: 320vh; }
.story__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.story__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.story__steps { list-style: none; display: grid; gap: 8px; margin-top: 26px; }
.story__step {
  display: flex; gap: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid transparent; cursor: pointer; opacity: .42;
  transition: opacity .4s, background .4s, border-color .4s, transform .5s var(--ease);
}
.story__step.is-done { opacity: .7; }
.story__step.is-done .story__num::after { content: " \2713"; }
.story__step.is-active { opacity: 1; background: rgba(255,255,255,.04); border-color: rgba(184,255,92,.3); transform: translateX(6px); }
.story__num { flex: none; padding-top: 4px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; color: var(--accent); }
.story__step b { display: block; font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.25; }
.story__step p { color: var(--muted); font-size: 14.5px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease), opacity .4s, margin .4s; }
.story__step.is-active p { max-height: 90px; opacity: 1; margin-top: 4px; }
.story__progress { margin-top: 18px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.story__progress i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #b8ff5c, #5cffc8, #7c5cff, #ff6bcb); }

.story__mock {
  position: relative; aspect-ratio: 16 / 11; border-radius: 20px; overflow: hidden;
  background: #0f0f18; border: 1px solid var(--border);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8); transition: box-shadow .8s var(--ease), border-color .8s;
}
.mock__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.mock__url { flex: 1; max-width: 220px; padding: 4px 12px; border-radius: 100px; background: rgba(0,0,0,.35); font-size: 11.5px; color: var(--muted); font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.mock__live { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #28c840; opacity: 0; transform: scale(.8); transition: opacity .5s, transform .5s var(--ease); }
.mock__page {
  position: relative; height: calc(100% - 42px); padding: 4.5% 5%; display: flex; flex-direction: column; gap: 6%;
  background-image: linear-gradient(rgba(92,156,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(92,156,255,.08) 1px, transparent 1px);
  background-size: 22px 22px; transition: background .8s;
}
.mock__page i, .mk-hero__img, .mk-card {
  display: block; border: 1.5px dashed rgba(184,255,92,.38); background: transparent; border-radius: 6px;
  transition: background .8s var(--ease), border-color .8s, box-shadow .8s, transform .8s var(--ease);
}
.mk-nav { display: flex; align-items: center; gap: 4%; height: 8%; }
.mk-logo { width: 9%; height: 100%; }
.mk-link { width: 9%; height: 42%; }
.mk-btn { margin-left: auto; width: 14%; height: 85%; border-radius: 100px !important; }
.mk-hero { display: flex; gap: 5%; height: 42%; }
.mk-hero__text { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8%; }
.mk-h1 { height: 13%; width: 92%; }
.mk-h1.short { width: 62%; }
.mk-p { height: 6%; width: 86%; }
.mk-p.short { width: 58%; }
.mk-cta { width: 40%; height: 16%; margin-top: 3%; border-radius: 100px !important; }
.mk-hero__img { position: relative; width: 42%; border-radius: 14px; overflow: hidden; }
.mk-hero__img span { position: absolute; border-radius: 50%; opacity: 0; transition: opacity .8s .2s; }
.mk-hero__img span:nth-child(1) { width: 60%; aspect-ratio: 1; left: 12%; top: 14%; background: radial-gradient(circle at 35% 35%, #fff, #b8ff5c 40%, #2a7a3a); }
.mk-hero__img span:nth-child(2) { width: 30%; aspect-ratio: 1; right: 10%; bottom: 12%; background: radial-gradient(circle at 35% 35%, #fff, #ff6bcb 45%, #6a1d55); }
.mk-cards { display: flex; gap: 4%; flex: 1; }
.mk-card { flex: 1; border-radius: 12px; padding: 5% 6%; display: flex; flex-direction: column; gap: 12%; }
.mk-ico { width: 24%; aspect-ratio: 1; border-radius: 8px; }
.mk-line { height: 9%; width: 90%; }
.mk-line.short { width: 60%; }

.story__mock.is-design .mock__page { background-image: radial-gradient(ellipse 70% 60% at 25% 0%, rgba(124,92,255,.32), transparent 70%), radial-gradient(ellipse 60% 50% at 100% 100%, rgba(184,255,92,.12), transparent 70%); background-size: auto; }
.story__mock.is-design .mock__page i, .story__mock.is-design .mk-hero__img, .story__mock.is-design .mk-card { border-color: transparent; }
.story__mock.is-design .mk-logo { background: linear-gradient(135deg, #b8ff5c, #5cffc8); border-radius: 8px; }
.story__mock.is-design .mk-link { background: rgba(255,255,255,.3); }
.story__mock.is-design .mk-btn { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.story__mock.is-design .mk-h1 { background: #fff; }
.story__mock.is-design .mk-h1.short { background: linear-gradient(90deg, #b8ff5c, #5cffc8); }
.story__mock.is-design .mk-p { background: rgba(255,255,255,.3); }
.story__mock.is-design .mk-cta { background: var(--accent); box-shadow: 0 6px 20px -4px rgba(184,255,92,.6); }
.story__mock.is-design .mk-hero__img { background: linear-gradient(135deg, #3b2f7a, #7c5cff 55%, #ff6bcb); }
.story__mock.is-design .mk-hero__img span { opacity: 1; }
.story__mock.is-design .mk-card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.story__mock.is-design .mk-card:nth-child(1) .mk-ico { background: #b8ff5c; }
.story__mock.is-design .mk-card:nth-child(2) .mk-ico { background: #7c5cff; }
.story__mock.is-design .mk-card:nth-child(3) .mk-ico { background: #ff6bcb; }
.story__mock.is-design .mk-line { background: rgba(255,255,255,.25); }

.mk-code {
  position: absolute; top: 8%; right: 4%; bottom: 8%; width: 52%; margin: 0; padding: 14px 16px; border-radius: 12px;
  background: rgba(10,10,18,.92); border: 1px solid rgba(124,92,255,.4); box-shadow: 0 20px 50px rgba(0,0,0,.5);
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: clamp(9px, .8vw, 12.5px); line-height: 1.7; color: #e6e6ef;
  white-space: pre; overflow: hidden; opacity: 0; transform: translateX(30px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.mk-code span { display: block; opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; }
.c-t { color: #7dd3fc; font-weight: 400; } .c-a { color: #c4a7ff; font-weight: 400; } .c-s { color: #b8ff5c; font-weight: 400; }
.c-k { color: #ff8fd8; font-weight: 400; } .c-n { color: #ffb86b; font-weight: 400; }
.story__mock.is-code .mk-code { opacity: 1; transform: none; }
.story__mock.is-code .mk-code span { opacity: 1; transform: none; }
.story__mock.is-code .mk-code span:nth-child(2) { transition-delay: .08s; }
.story__mock.is-code .mk-code span:nth-child(3) { transition-delay: .16s; }
.story__mock.is-code .mk-code span:nth-child(4) { transition-delay: .24s; }
.story__mock.is-code .mk-code span:nth-child(5) { transition-delay: .32s; }
.story__mock.is-code .mk-code span:nth-child(6) { transition-delay: .4s; }
.story__mock.is-code .mk-code span:nth-child(7) { transition-delay: .48s; }
.story__mock.is-code .mk-code span:nth-child(8) { transition-delay: .56s; }
.story__mock.is-code .mk-code span:nth-child(9) { transition-delay: .64s; }
.mk-tag {
  position: absolute; padding: 2px 7px; border-radius: 5px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: clamp(8px, .7vw, 11px);
  color: #0b0b10; background: #7dd3fc; opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s;
}
.mk-tag--nav { left: 5%; top: 1.5%; }
.mk-tag--hero { left: 5%; top: 17%; background: #c4a7ff; }
.mk-tag--cards { left: 5%; top: 66%; background: #ff8fd8; }
.story__mock.is-code .mk-tag { opacity: 1; transform: none; }

.story__mock.is-live { border-color: rgba(184,255,92,.45); box-shadow: 0 0 0 1px rgba(184,255,92,.15), 0 40px 100px -30px rgba(184,255,92,.45); }
.story__mock.is-live .mock__live { opacity: 1; transform: none; animation: emPulse 1.6s ease-in-out infinite; }
.story__mock.is-live .mk-cta { animation: ctaPulse 1.6s ease-in-out infinite; }
@keyframes ctaPulse { 50% { box-shadow: 0 0 0 6px rgba(184,255,92,.18), 0 6px 26px -2px rgba(184,255,92,.8); } }
.mk-cursor { position: absolute; width: 22px; height: 22px; left: 78%; top: 88%; opacity: 0; transition: opacity .4s; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.story__mock.is-live .mk-cursor { opacity: 1; animation: cursorClick 3.2s var(--ease) infinite; }
@keyframes cursorClick {
  0% { left: 78%; top: 88%; }
  45% { left: 26%; top: 49%; transform: scale(1); }
  52% { left: 26%; top: 49%; transform: scale(.82); }
  60% { left: 26%; top: 49%; transform: scale(1); }
  100% { left: 78%; top: 88%; }
}

@media (max-width: 900px) {
  .story__track { height: 300vh; }
  .story__inner { grid-template-columns: 1fr; gap: 18px; }
  .story__steps { margin-top: 14px; gap: 4px; }
  .story__step { padding: 9px 12px; }
  .story__step:not(.is-active) b { font-size: 16px; }
  .story__mock { aspect-ratio: 16 / 10.5; }
  .mk-code { width: 60%; }
}
@media (max-height: 700px) and (min-width: 901px) { .story__step p { font-size: 13.5px; } .story__steps { gap: 4px; margin-top: 16px; } }

/* =========================================================
   3) КАЛЬКУЛЯТОР СТОИМОСТИ
   ========================================================= */
.calc__lead { color: var(--muted); max-width: 680px; margin: calc(clamp(24px, 3vw, 40px) * -0.4) 0 clamp(22px, 3vw, 34px); }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.calc__form, .calc__result { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: clamp(20px, 2.4vw, 30px); }
.calc__form > * + * { margin-top: 26px; }
.calc__result {
  position: sticky; top: 96px; border-color: rgba(184,255,92,.28);
  background: radial-gradient(ellipse at 30% 0%, rgba(124,92,255,.24), transparent 60%), rgba(255,255,255,.035);
}
.calc__label { display: block; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc__types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.calc__type {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--border); background: rgba(255,255,255,.02); transition: border-color .3s, background .3s, transform .3s var(--ease), box-shadow .3s;
}
.calc__ico { font-size: 22px; margin-bottom: 4px; }
.calc__type b { font-size: 14.5px; line-height: 1.25; }
.calc__type small { font-size: 12px; color: var(--muted); }
.calc__type em { margin-top: 6px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.calc__type.active { border-color: var(--accent); background: rgba(184,255,92,.08); box-shadow: 0 0 26px -8px rgba(184,255,92,.65); }
@media (hover: hover) { .calc__type:not(.active):hover { transform: translateY(-2px); border-color: rgba(184,255,92,.45); } }
.calc__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.calc__range { display: block; }
.calc__range > span { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.calc__range b { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.calc__range output { font-family: "Playfair Display", Georgia, serif; font-size: 30px; line-height: 1; color: var(--text); }
.calc__range input {
  width: 100%; height: 6px; border-radius: 6px; outline: none; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8 var(--p, 0%), rgba(255,255,255,.1) var(--p, 0%));
}
.calc__range input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid #b8ff5c; box-shadow: 0 0 16px rgba(184,255,92,.7); }
.calc__range input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 5px solid #b8ff5c; box-shadow: 0 0 16px rgba(184,255,92,.7); }
.calc__range input:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.calc__feats { display: flex; flex-wrap: wrap; gap: 8px; }
.calc__feat {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border); font-size: 14px; transition: border-color .25s, background .25s, color .25s;
}
.calc__feat input { position: absolute; opacity: 0; pointer-events: none; }
.calc__feat em { font-style: normal; font-size: 12px; color: var(--muted); }
.calc__feat.on { border-color: var(--accent); background: rgba(184,255,92,.1); color: var(--accent); }
.calc__feat.on em { color: var(--accent); }
.calc__feat:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc__urgent { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.calc__urgent input { position: absolute; opacity: 0; }
.calc__switch { position: relative; flex: none; width: 46px; height: 26px; border-radius: 26px; background: rgba(255,255,255,.12); transition: background .3s; }
.calc__switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease); }
.calc__urgent input:checked + .calc__switch { background: #ff6bcb; }
.calc__urgent input:checked + .calc__switch::after { transform: translateX(20px); }
.calc__urgent input:focus-visible + .calc__switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.calc__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.calc__price small { font-size: 15px; color: var(--muted); }
.calc__price b {
  display: inline-block; font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(48px, 5vw, 70px); line-height: 1;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.calc__price span { font-family: "Playfair Display", Georgia, serif; font-size: 30px; color: var(--accent); }
.calc__price.bump b { animation: calcBump .45s var(--ease); }
@keyframes calcBump { 40% { transform: scale(1.07); } }
.calc__days { margin-bottom: 18px; font-weight: 600; }
.calc__breakdown { list-style: none; display: grid; gap: 8px; margin-bottom: 20px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calc__breakdown li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.calc__breakdown li b { color: var(--text); white-space: nowrap; }
.calc__send { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.calc__btn {
  padding: 12px 8px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--text);
  border: 1px solid var(--c); background: rgba(255,255,255,.03); transition: background .25s, color .25s, transform .25s var(--ease);
}
@media (hover: hover) { .calc__btn:hover { background: var(--c); color: #0b0b10; transform: translateY(-2px); } }
.calc__note { margin-top: 14px; font-size: 12px; color: #6f6f80; }
@media (max-width: 900px) { .calc__grid { grid-template-columns: 1fr; } .calc__result { position: static; } }
@media (max-width: 600px) { .calc__row { grid-template-columns: 1fr; } .calc__types { grid-template-columns: 1fr 1fr; } }

/* меню: место для пункта «Стоимость» на средних экранах */
@media (min-width: 901px) and (max-width: 1240px) { .nav a { padding: 10px 12px; font-size: 14px; } }

/* =========================================================
   КОНСТРУКТОР ПРОЕКТА (без цен): срок + масштаб + итог
   ========================================================= */
.calc__price small { font-family: "Playfair Display", Georgia, serif; font-size: 34px; color: var(--accent); }
.calc__price span { font-family: var(--font-body); font-size: 20px; font-weight: 700; color: var(--text); }
.calc__scale { margin: 14px 0 22px; }
.calc__scale-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13.5px; color: var(--muted); }
.calc__scale-head b { color: var(--text); font-size: 14px; }
.calc__meter { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.calc__meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #b8ff5c, #5cffc8, #7c5cff, #ff6bcb); background-size: 340px 100%; transition: width .7s var(--ease); }
.calc__summary li { justify-content: flex-start; gap: 10px; color: var(--text); }
.calc__summary li::before { content: "✓"; color: var(--accent); font-weight: 800; }

/* =========================================================
   3D-ГАЛЕРЕЯ ПРОЕКТОВ
   ========================================================= */
.g3d { position: relative; margin: 0 0 clamp(26px, 4vw, 46px); }
.g3d__stage { position: relative; height: clamp(380px, 34vw, 470px); perspective: 1500px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.g3d__card {
  position: absolute; left: 50%; top: 50%; width: clamp(250px, 25vw, 330px); transform-style: preserve-3d; cursor: pointer;
  transition: transform .75s var(--ease), opacity .6s, filter .6s; outline: none;
}
.g3d__inner {
  --tx: 0deg; --ty: 0deg;
  border-radius: 22px; overflow: hidden; background: #12121c; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.85);
  transform: rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .25s ease-out, box-shadow .5s;
}
.g3d__card.is-active .g3d__inner { box-shadow: 0 40px 90px -30px var(--g2), 0 0 0 1px rgba(255,255,255,.14); }
.g3d__card:focus-visible .g3d__inner { box-shadow: 0 0 0 2px var(--accent); }
.g3d__art { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.g3d__art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.35), transparent 50%); }
.g3d__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g3d__mock {
  position: absolute; left: 9%; right: 9%; top: 18%; bottom: -8%; padding: 9% 8%; border-radius: 12px 12px 0 0;
  display: flex; flex-direction: column; gap: 9%; background: rgba(10,10,18,.55); border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}
.g3d__mock i { display: block; height: 8%; width: 70%; border-radius: 4px; background: rgba(255,255,255,.45); }
.g3d__mock i.s { width: 50%; background: rgba(255,255,255,.28); }
.g3d__mock i.xs { width: 38%; background: rgba(255,255,255,.2); }
.g3d__mock b { display: block; width: 34%; height: 15%; margin-top: auto; border-radius: 100px; background: rgba(255,255,255,.9); }
.g3d__icon { position: absolute; z-index: 1; right: 9%; top: 24%; font-size: clamp(42px, 4.2vw, 60px); filter: drop-shadow(0 10px 18px rgba(0,0,0,.4)); }
.g3d__badge {
  position: absolute; z-index: 2; left: 12px; top: 12px; padding: 4px 10px; border-radius: 100px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.45);
}
.g3d__badge.live { color: #0b0b10; background: #b8ff5c; box-shadow: 0 0 14px rgba(184,255,92,.7); }
.g3d__shine {
  --sx: -120%; position: absolute; z-index: 2; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 46%, transparent 62%);
  transform: translateX(var(--sx)); transition: transform .4s ease-out;
}
.g3d__info { display: flex; flex-direction: column; gap: 3px; padding: 15px 18px 18px; }
.g3d__info small { font-size: 12.5px; color: #9a9aa8; }
.g3d__info h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 22px; line-height: 1.2; color: #f2f2f5; }
.g3d__open { align-self: flex-start; margin-top: 8px; font-size: 13px; font-weight: 700; color: #b8ff5c; transition: opacity .4s; }
.g3d__card:not(.is-active) .g3d__open { opacity: 0; pointer-events: none; }
.g3d__controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.g3d__arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); font-size: 18px; color: var(--text); transition: border-color .3s, background .3s, transform .3s var(--ease); }
@media (hover: hover) { .g3d__arrow:hover { border-color: var(--accent); background: rgba(184,255,92,.08); transform: scale(1.06); } }
.g3d__dots { display: flex; gap: 8px; }
.g3d__dots button { width: 8px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.2); transition: width .35s var(--ease), background .3s; }
.g3d__dots button.active { width: 26px; background: var(--accent); }
.g3d__hint { margin-top: 10px; text-align: center; font-size: 13px; color: #6f6f80; }
@media (max-width: 600px) { .g3d__stage { height: 380px; } .g3d__card { width: 250px; } }

/* =========================================================
   АССИСТЕНТ «СПРОСИ МЕНЯ»
   ========================================================= */
.ask-btn {
  position: fixed; z-index: 964; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 100px;
  background: rgba(14,14,22,.95); border: 1px solid rgba(184,255,92,.42); color: #f2f2f5; font-size: 14px; font-weight: 700;
  box-shadow: 0 12px 34px rgba(0,0,0,.45), 0 0 26px -6px rgba(184,255,92,.45);
  transition: transform .35s var(--ease), opacity .3s;
}
.ask-btn__ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #b8ff5c; color: #0b0b10; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 700; }
.ask-btn.is-hidden { opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none; }
body.loading .ask-btn { opacity: 0; pointer-events: none; }
@media (hover: hover) { .ask-btn:hover { transform: translateY(-3px); } }
.ask {
  position: fixed; z-index: 965; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 32px)); height: min(540px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: rgba(12,12,20,.97); border: 1px solid rgba(184,255,92,.3); color: #e6e6ef;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 40px -12px rgba(124,92,255,.5);
  transform-origin: bottom left; opacity: 0; transform: translateY(20px) scale(.96); pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.ask.open { opacity: 1; transform: none; pointer-events: auto; }
.ask__bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 12px; color: #9a9aa8; }
.ask__close { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); color: #e6e6ef; }
.ask__log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 13.5px; line-height: 1.6; }
.ask__q { color: #b8ff5c; }
.ask__q::before { content: "$ "; color: #5cffc8; }
.ask__a { color: #e6e6ef; white-space: pre-wrap; }
.ask__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.ask__chips button {
  padding: 8px 12px; border-radius: 100px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.03);
  color: #e6e6ef; font-size: 13px; font-weight: 600; text-align: left; transition: border-color .25s, background .25s, opacity .25s;
}
.ask__chips button.used { opacity: .55; }
.ask__chips button:disabled { opacity: .3; pointer-events: none; }
.ask__chips .ask__cta { border-color: #b8ff5c; color: #b8ff5c; }
@media (hover: hover) { .ask__chips button:hover { border-color: #b8ff5c; background: rgba(184,255,92,.08); } }
.ask__chips .ask__more { display: none; }
@media (max-width: 600px) {
  .ask-btn { padding: 6px 14px 6px 6px; font-size: 13px; }
  .ask { left: 10px; right: 10px; bottom: 10px; width: auto; height: min(78vh, 600px); height: min(78svh, 600px); }
  .ask__log { min-height: 0; }
  /* список вопросов: не больше 45% окна (с прокруткой), после выбора вопроса сворачивается в одну кнопку */
  .ask__chips { max-height: 45%; overflow-y: auto; flex: none; }
  .ask__chips .ask__more { display: block; width: 100%; text-align: center; border-color: rgba(92,255,200,.45); color: #5cffc8; background: rgba(92,255,200,.06); }
  .ask__chips.is-folded > button:not(.ask__more) { display: none; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes bugWiggle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes bugSquash { to { transform: scale(1.7, .2); opacity: 0; } }
@keyframes resultIn { from { opacity: 0; transform: translate(-50%, -44%) scale(.94); } }

/* =========================================================
   КНОПКА ТЕМЫ + переход «Рассвет»
   ========================================================= */
.theme-btn {
  position: relative; z-index: 3; flex: none; display: grid; place-items: center; width: 42px; height: 42px; margin-left: 8px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--text); transition: border-color .3s, background .3s, transform .4s var(--ease);
}
.theme-btn svg { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform .55s var(--ease), opacity .4s; }
.theme-btn__sun { color: #ffd166; }
.theme-btn__moon { color: #7c5cff; }
html:not(.light) .theme-btn__moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
html.light .theme-btn__sun { opacity: 0; transform: rotate(90deg) scale(.4); }
@media (hover: hover) { .theme-btn:hover { transform: rotate(18deg); border-color: rgba(255,209,102,.6); } }
@media (max-width: 900px) { .theme-btn { margin-left: 0; margin-right: 8px; } }
@media (max-width: 380px) { .theme-btn { width: 38px; height: 38px; } }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

/* =========================================================
   СВЕТЛАЯ ТЕМА «РАССВЕТ»
   ========================================================= */
html.light { --bg: #f5f4fa; --bg-2: #ffffff; --surface: rgba(20,18,40,.035); --border: rgba(20,18,40,.11); --text: #16141f; --muted: #5d5a72; --accent: #4c9a00; color-scheme: light; }
html.light body { background: var(--bg); }
html.light .noise { opacity: .02; }
html.light .code-grid { background-image: linear-gradient(rgba(20,18,40,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(20,18,40,.055) 1px, transparent 1px); }
html.light .code-grid--glow { background-image: linear-gradient(rgba(76,154,0,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(76,154,0,.35) 1px, transparent 1px); }
html.light .aurora span { opacity: .55; }
html.light .header.scrolled { background: rgba(255,255,255,.86); border-color: var(--border); }
@media (max-width: 900px) { html.light .nav { background: rgba(245,244,250,.97); } }
html.light .nav a.nav__cta { color: #0b0b10; }
html.light .hero__title .it { color: #3a3650; }
html.light .hero__title .accent { background: linear-gradient(90deg, #3f8f00, #0f9f7a 50%, #3f8f00); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; }
html.light .world__stats b, html.light .calc__price b { background: linear-gradient(90deg, #3f8f00, #0f9f7a); -webkit-background-clip: text; background-clip: text; }
html.light .hero__rating { background: rgba(255,255,255,.85); }
html.light .btn--primary::before { background: #16141f; }
html.light .btn--primary:hover { color: #fff; }
html.light .btn--ghost:hover { color: #fff; }
html.light .device-switch button.active { color: #fff; }
html.light .lang__list { background: rgba(255,255,255,.98); box-shadow: 0 24px 60px rgba(20,18,40,.18); }
html.light .lang__list button.active { background: rgba(76,154,0,.1); }
html.light .toast { color: #f2f2f5; }
html.light .pf-cover { color: #f2f2f5; }
html.light .pf-cover__sub { color: #b9b6cc; }
html.light .review, html.light .calc__form, html.light .contact-btn, html.light .mail-opt, html.light .story__step.is-active { background: #fff; }
html.light .story__step.is-active { box-shadow: 0 10px 30px -14px rgba(20,18,40,.25); }
html.light .calc__result { background: radial-gradient(ellipse at 30% 0%, rgba(124,92,255,.14), transparent 60%), #fff; }
html.light .calc__switch { background: rgba(20,18,40,.15); }
html.light .calc__meter { background: rgba(20,18,40,.08); }
html.light .calc__range input { background: linear-gradient(90deg, #4c9a00, #0f9f7a var(--p, 0%), rgba(20,18,40,.1) var(--p, 0%)); }
html.light .reviews__empty { border-color: rgba(20,18,40,.18); }
html.light .stars .off { color: rgba(20,18,40,.15); }
html.light .form input, html.light .form textarea { background: #fff; }
html.light .modal__dialog { background: #fff; }
html.light .modal__backdrop { background: rgba(20,18,40,.45); }
html.light .g3d__dots button:not(.active) { background: rgba(20,18,40,.2); }
html.light .story__progress, html.light .secrets__bar { background: rgba(20,18,40,.08); }
html.light .footer { border-color: var(--border); }


/* =========================================================
   «Ваш сайт — только ваш»: домен, доступы, поддержка без привязки
   ========================================================= */
.own__lead { color: var(--muted); max-width: 700px; margin: calc(clamp(24px, 3vw, 40px) * -0.4) 0 clamp(22px, 3vw, 34px); font-size: clamp(15px, 1.15vw, 17px); }
.own__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.own__card { padding: clamp(22px, 2.4vw, 30px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .4s, transform .5s var(--ease); }
@media (hover: hover) { .own__card:hover { border-color: rgba(184,255,92,.35); transform: translateY(-4px); } }
.own__ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 14px; font-size: 24px; background: rgba(184,255,92,.08); border: 1px solid rgba(184,255,92,.2); }
.own__card h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 23px; line-height: 1.2; margin-bottom: 8px; }
.own__card p { color: var(--muted); font-size: 15px; }
.own__plan {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 18px;
  padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); border: 1px solid rgba(184,255,92,.28);
  background: radial-gradient(ellipse at 15% 0%, rgba(124,92,255,.22), transparent 60%), rgba(255,255,255,.035);
}
.own__plan h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 18px; }
.own__list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.own__list li { display: flex; gap: 10px; font-size: 15px; }
.own__list li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #0b0b10; background: #b8ff5c; }
.own__free { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--border); }
.own__badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; font-size: 14px; background: rgba(184,255,92,.1); border: 1px solid rgba(184,255,92,.35); }
.own__badge b { color: var(--accent); }
.own__free p { color: var(--muted); font-size: 15px; }
html.light .own__card { background: #fff; }
html.light .own__plan { background: radial-gradient(ellipse at 15% 0%, rgba(124,92,255,.12), transparent 60%), #fff; }
@media (max-width: 900px) {
  .own__cards { grid-template-columns: 1fr; }
  .own__plan { grid-template-columns: 1fr; }
  .own__free { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 600px) { .own__list { grid-template-columns: 1fr; } }


/* =========================================================
   3D-галерея v2: живое листание + анимированные иллюстрации
   ========================================================= */
.g3d__stage { cursor: grab; height: clamp(420px, 37vw, 520px); }
.g3d__stage.is-drag { cursor: grabbing; }
.g3d__stage::before {
  content: ""; position: absolute; left: 50%; bottom: 4%; width: min(70%, 640px); height: 70px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(ellipse, rgba(184,255,92,.16), transparent 70%); pointer-events: none;
}
.g3d__card { top: 46%; transition: none; will-change: transform, opacity; }
.g3d__inner { position: relative; -webkit-box-reflect: below 10px linear-gradient(transparent 72%, rgba(255,255,255,.14)); }
.g3d__dim { position: absolute; inset: 0; z-index: 5; background: #07070d; opacity: 0; pointer-events: none; border-radius: inherit; }
.g3d__art { background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--g2) 55%, transparent), transparent 62%), linear-gradient(150deg, var(--g1), #0b0b14 120%); }
.g3d__art::after { background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.22), transparent 45%); z-index: 1; pointer-events: none; }
.g3d__halo {
  position: absolute; left: 50%; top: 50%; width: 64%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  background: radial-gradient(circle, rgba(255,255,255,.1), rgba(255,255,255,.02) 60%, transparent 70%);
  box-shadow: inset 0 0 40px rgba(255,255,255,.06), 0 0 60px -10px var(--g2);
}
.g3d__card.is-active .g3d__halo { animation: g3halo 4s ease-in-out infinite; }
@keyframes g3halo { 50% { transform: translate(-50%, -50%) scale(1.06); box-shadow: inset 0 0 40px rgba(255,255,255,.08), 0 0 90px -6px var(--g2); } }
.g3d__dust { position: absolute; left: 22%; bottom: 10%; width: 6px; height: 6px; border-radius: 50%; background: var(--g2); box-shadow: 0 0 10px var(--g2); opacity: 0; }
.g3d__dust.d2 { left: 72%; width: 4px; height: 4px; }
.g3d__dust.d3 { left: 58%; width: 5px; height: 5px; }
.g3d__card.is-active .g3d__dust { animation: g3dust 3.6s ease-in infinite; }
.g3d__card.is-active .g3d__dust.d2 { animation-delay: 1.2s; }
.g3d__card.is-active .g3d__dust.d3 { animation-delay: 2.3s; }
@keyframes g3dust { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-150px); opacity: 0; } }
.g3d__scene {
  position: absolute; inset: 9% 0 7%; display: grid; place-items: center; z-index: 1;
  transform: scale(.9); transition: transform .8s var(--ease); filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
}
.g3d__card.is-active .g3d__scene { transform: scale(1); }
.g3i { height: 100%; width: auto; max-width: 78%; overflow: visible; }
.g3i--wide { max-width: 88%; }
.g3d__flash { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-120%); }
.g3d__art.flash .g3d__flash { animation: g3flash 1s .25s var(--ease); }
@keyframes g3flash { to { transform: translateX(120%); } }

/* анимации — только у активной карточки (экономим ресурсы) */
.g3i * { transform-box: view-box; }
.g3i-wheel, .g3i-snip, .g3i-sway, .g3i-petals, .g3i-petals2, .g3i-pen { transform-origin: 0 0; }
.is-active .g3i-bob { animation: g3bob 3s ease-in-out infinite; }
@keyframes g3bob { 50% { transform: translateY(-4px); } }
/* ESP32 */
.g3i-wifi path { opacity: .15; }
.is-active .g3i-wifi path { animation: g3wifi 1.8s ease-in-out infinite; }
.is-active .g3i-wifi .w2 { animation-delay: .2s; }
.is-active .g3i-wifi .w3 { animation-delay: .4s; }
@keyframes g3wifi { 0%, 100% { opacity: .15; } 40% { opacity: 1; } }
.is-active .g3i-led { animation: g3blink 1.1s steps(2) infinite; }
@keyframes g3blink { 50% { opacity: .15; } }
.g3i-trace { stroke-dasharray: 4 3; }
.is-active .g3i-trace { animation: g3trace 1s linear infinite; }
@keyframes g3trace { to { stroke-dashoffset: -14; } }
/* Автомобиль */
.is-active .g3i-wheel { animation: g3spin .55s linear infinite; }
@keyframes g3spin { to { transform: rotate(360deg); } }
.is-active .g3i-body { animation: g3ride .5s ease-in-out infinite; }
@keyframes g3ride { 50% { transform: translateY(-1.5px); } }
.g3i-speed path { opacity: 0; }
.is-active .g3i-speed path { animation: g3speed .8s linear infinite; }
.is-active .g3i-speed path:nth-child(2) { animation-delay: .25s; }
.is-active .g3i-speed path:nth-child(3) { animation-delay: .5s; }
@keyframes g3speed { 0% { opacity: 0; transform: translateX(16px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translateX(-14px); } }
.is-active .g3i-glow { animation: g3glow 2s ease-in-out infinite; }
@keyframes g3glow { 50% { opacity: .45; } }
/* Ножницы */
.g3i-snip { transform: rotate(-16deg); }
.is-active .g3i-snip { animation: g3snip 1.3s ease-in-out infinite; }
@keyframes g3snip { 0%, 100% { transform: rotate(-17deg); } 45%, 55% { transform: rotate(-3deg); } }
.g3i-hair { opacity: 0; }
.is-active .g3i-hair path { animation: g3hair 1.3s ease-in infinite; }
.is-active .g3i-hair { opacity: 1; }
@keyframes g3hair { 0%, 45% { opacity: 0; transform: translateY(0) rotate(0); } 55% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px) rotate(25deg); } }
.g3i-glint { opacity: 0; transform-origin: center; transform-box: fill-box; }
.is-active .g3i-glint { animation: g3glint 2.4s ease-in-out infinite; }
.is-active .g3i-glint.g2 { animation-delay: 1.2s; }
@keyframes g3glint { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
/* Вилка */
.g3i-spark { opacity: 0; }
.is-active .g3i-spark { animation: g3spark 1.6s ease-out infinite; }
@keyframes g3spark { 0%, 55% { opacity: 0; } 62% { opacity: 1; } 75% { opacity: .3; } 82% { opacity: 1; } 100% { opacity: 0; } }
.is-active .g3i-bolt { animation: g3bolt 1.6s ease-in-out infinite; }
@keyframes g3bolt { 0%, 55%, 100% { filter: none; } 62%, 82% { filter: drop-shadow(0 0 6px #fde047) brightness(1.3); } }
/* Коробка */
.is-active .g3i-badge > * { animation: g3pop 2.6s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes g3pop { 0% { transform: scale(0); } 15% { transform: scale(1.15); } 25%, 85% { transform: scale(1); } 100% { transform: scale(0); } }
/* Форма */
.g3i-tick { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-active .g3i-tick { animation: g3tick 3.6s ease-out infinite; }
.is-active .g3i-tick.t2 { animation-delay: .5s; }
.is-active .g3i-tick.t3 { animation-delay: 1s; }
@keyframes g3tick { 0%, 8% { stroke-dashoffset: 1; } 22%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
.is-active .g3i-pen { animation: g3pen 1.2s ease-in-out infinite; }
@keyframes g3pen { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(2px, -1px); } 75% { transform: translate(-1px, 3px); } }
/* Цветок */
.is-active .g3i-sway { animation: g3sway 4s ease-in-out infinite; }
@keyframes g3sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.is-active .g3i-petals { animation: g3bloom 3s ease-in-out infinite; }
.is-active .g3i-petals2 { animation: g3bloom 3s .3s ease-in-out infinite; }
@keyframes g3bloom { 50% { transform: scale(1.07); } }
.g3i-leaf { transform-box: fill-box; transform-origin: 0% 100%; }
.is-active .g3i-leaf { animation: g3leaf 3s ease-in-out infinite; }
@keyframes g3leaf { 50% { transform: rotate(-8deg); } }

html.light .g3d__inner { -webkit-box-reflect: below 10px linear-gradient(transparent 75%, rgba(255,255,255,.22)); }
@media (max-width: 600px) { .g3d__stage { height: 420px; } }
@media (prefers-reduced-motion: reduce) { .g3d__card * { animation: none !important; } }
.g3i-hair path { transform-box: fill-box; transform-origin: center; }


/* =========================================================
   «Как рождается сайт»: настоящие фото для каждого шага
   ========================================================= */
.story__sticky { position: sticky; }
.story__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.story__bg i {
  position: absolute; inset: -4%; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08); transition: opacity 1.2s ease, transform 6s ease-out;
  filter: saturate(1.1);
}
.story__bg i.is-on { opacity: .2; transform: scale(1); }
.story__bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 70% 50%, rgba(11,11,16,.35), rgba(11,11,16,.88) 75%),
              linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%);
}
.story__inner { position: relative; z-index: 1; }
.story__visual { position: relative; }
.story__photo {
  position: absolute; z-index: 3; left: -7%; bottom: -9%; width: 40%; margin: 0;
  padding: 8px 8px 0; border-radius: 14px; background: #f7f5ef;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(0,0,0,.08);
  transform: rotate(-5deg); transition: transform .8s var(--ease);
  animation: phFloat 6s ease-in-out infinite;
}
@keyframes phFloat { 50% { translate: 0 -6px; } }
.story__frames { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: #ddd; }
.story__frames img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12); clip-path: inset(0 0 0 100%);
  transition: opacity .7s ease, transform 4s ease-out, clip-path .9s var(--ease);
}
.story__frames img.is-on { opacity: 1; transform: scale(1); clip-path: inset(0 0 0 0); }
.story__photo figcaption {
  display: flex; align-items: baseline; gap: 8px; padding: 8px 6px 10px;
  font-family: "Playfair Display", Georgia, serif; font-size: clamp(13px, 1.1vw, 16px); color: #1d1b26;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story__photo figcaption span { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; color: #4c9a00; }
.story__photo figcaption b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* скотч сверху — как у настоящего снимка */
.story__photo::before {
  content: ""; position: absolute; z-index: 2; top: -10px; left: 50%; width: 70px; height: 20px;
  transform: translateX(-50%) rotate(3deg); background: rgba(255,255,255,.55);
  box-shadow: 0 1px 3px rgba(0,0,0,.15); backdrop-filter: blur(1px);
}
html.light .story__bg i.is-on { opacity: .14; }
html.light .story__bg::after { background: radial-gradient(ellipse 80% 70% at 70% 50%, rgba(245,244,250,.35), rgba(245,244,250,.9) 75%), linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%); }
@media (max-width: 900px) {
  .story__photo { width: 34%; left: -2%; bottom: -12%; padding: 5px 5px 0; }
  .story__photo figcaption { padding: 5px 3px 6px; font-size: 11.5px; gap: 5px; }
  .story__photo figcaption span { font-size: 9.5px; }
  .story__photo::before { width: 46px; height: 14px; top: -7px; }
}
@media (prefers-reduced-motion: reduce) { .story__photo { animation: none; } }


/* =========================================================
   «Запуск»: в окне your-brand.eu появляется готовый сайт
   ========================================================= */
.story__mock { container-type: inline-size; }
.mkf {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 2.2cqw;
  padding: 2.6cqw 3.6cqw 3.2cqw; background: #14100d; color: #f6efe6;
  font-family: var(--font-body);
  opacity: 0; clip-path: inset(0 0 100% 0 round 0); pointer-events: none;
  transition: opacity .5s ease, clip-path 1.1s var(--ease);
}
.story__mock.is-live .mkf { opacity: 1; clip-path: inset(0 0 0 0 round 0); }
.story__mock .mk-cursor { z-index: 4; }
.mkf-nav { display: flex; align-items: center; gap: 3cqw; font-size: 1.75cqw; color: rgba(246,239,230,.75); }
.mkf-logo { display: flex; align-items: center; gap: .8cqw; margin-right: auto; font-family: "Playfair Display", Georgia, serif; font-size: 2.6cqw; font-weight: 600; color: #fff; }
.mkf-logo i { font-style: normal; display: grid; place-items: center; width: 3.8cqw; height: 3.8cqw; border-radius: 1cqw; font-size: 2.2cqw; background: linear-gradient(135deg, #e8a25c, #8a4b1f); }
.mkf-btn { font-style: normal; padding: .8cqw 2.2cqw; border-radius: 100px; border: 1px solid rgba(232,162,92,.6); color: #f3c38f; font-weight: 700; }
.mkf-hero { position: relative; flex: 1.45; min-height: 0; border-radius: 1.8cqw; overflow: hidden; }
.mkf-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 2.4s var(--ease); }
.story__mock.is-live .mkf-hero img { transform: scale(1); }
.mkf-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,16,13,.88) 0%, rgba(20,16,13,.55) 45%, transparent 80%); }
.mkf-hero__txt { position: absolute; z-index: 1; left: 4cqw; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start; gap: 1cqw; }
.mkf-hero__txt small { font-size: 1.5cqw; letter-spacing: .12em; text-transform: uppercase; color: #f3c38f; }
.mkf-hero__txt h4 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: 4.6cqw; line-height: 1.05; color: #fff; }
.mkf-hero__txt h4 em { color: #f3c38f; }
.mkf-cta { margin-top: .8cqw; padding: 1.2cqw 2.6cqw; border-radius: 100px; font-size: 1.7cqw; font-weight: 800; color: #1a120b; background: linear-gradient(135deg, #f6c58c, #e08a3c); box-shadow: 0 1cqw 3cqw -1cqw rgba(224,138,60,.8); }
.story__mock.is-live .mkf-cta { animation: ctaPulse 1.6s ease-in-out infinite; }
.mkf-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.mkf-cards figure { position: relative; margin: 0; border-radius: 1.4cqw; overflow: hidden; background: #221a14; opacity: 0; transform: translateY(3cqw); transition: opacity .6s, transform .8s var(--ease); }
.story__mock.is-live .mkf-cards figure { opacity: 1; transform: none; }
.story__mock.is-live .mkf-cards figure:nth-child(1) { transition-delay: .45s; }
.story__mock.is-live .mkf-cards figure:nth-child(2) { transition-delay: .6s; }
.story__mock.is-live .mkf-cards figure:nth-child(3) { transition-delay: .75s; }
.mkf-cards img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkf-cards figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 3cqw 1.4cqw 1.2cqw; font-size: 1.6cqw; font-weight: 700; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.mkf-cards figcaption b { font-size: 1.4cqw; color: #ffd27a; }
.story__mock.is-live .mk-tag, .story__mock.is-live .mk-code { opacity: 0 !important; }
/* на «Запуске» снимок уходит — главное теперь готовый сайт */
.story__visual:has(.story__mock.is-live) .story__photo { opacity: 0; transform: rotate(-14deg) translate(-18%, 22%) scale(.85); pointer-events: none; }
.story__photo { transition: transform .8s var(--ease), opacity .6s ease; }
.mkf-hero__bg { position: absolute; inset: 0; background: url(../images/story/site-hero.jpg) center 55% / cover no-repeat; transform: scale(1.15); transition: transform 2.4s var(--ease); }
.story__mock.is-live .mkf-hero__bg { transform: scale(1); }
.mock__page .mkf-hero__bg { border: 0; border-radius: 0; background: url(../images/story/site-hero.jpg) center 55% / cover no-repeat; }
.mock__page .mkf-logo i { border: 0; border-radius: 1cqw; background: linear-gradient(135deg, #e8a25c, #8a4b1f); }
.story__mock.is-live .mk-cursor { animation-name: cursorClickLive; }
@keyframes cursorClickLive {
  0% { left: 78%; top: 88%; }
  45% { left: 17%; top: 50%; transform: scale(1); }
  52% { left: 17%; top: 50%; transform: scale(.82); }
  60% { left: 17%; top: 50%; transform: scale(1); }
  100% { left: 78%; top: 88%; }
}


/* =========================================================
   «Дизайн»: полотно дизайнера (мудборд, палитра, шрифты, кнопка)
   ========================================================= */
.mkd {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: grid; grid-template-columns: 38fr 62fr; grid-template-rows: auto 1fr auto; gap: 2cqw;
  padding: 2.6cqw 3.2cqw 3cqw; color: #ece9f5; font-family: var(--font-body);
  background-color: #12111a;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.2px);
  background-size: 2.6cqw 2.6cqw;
  opacity: 0; transform: scale(.97); transition: opacity .6s ease, transform .8s var(--ease);
}
.story__mock[data-stage="2"] .mkd { opacity: 1; transform: none; }
.mkd-card {
  position: relative; display: flex; flex-direction: column; gap: 1cqw; min-height: 0;
  padding: 1.6cqw; border-radius: 1.4cqw; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 1.5cqw 4cqw -2cqw rgba(0,0,0,.6);
  opacity: 0; transform: translateY(2.4cqw); transition: opacity .5s, transform .7s var(--ease);
}
.story__mock[data-stage="2"] .mkd-card { opacity: 1; transform: none; }
.story__mock[data-stage="2"] .mkd-type { transition-delay: .12s; }
.story__mock[data-stage="2"] .mkd-mood { transition-delay: .24s; }
.story__mock[data-stage="2"] .mkd-ui { transition-delay: .36s; }
.mkd-lbl { font-size: 1.35cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a39fc0; }
/* палитра */
.mkd-pal { grid-column: 1 / -1; }
.mkd-sw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2cqw; }
.mkd-chip {
  display: flex; align-items: flex-end; height: 6.4cqw; padding: .8cqw; border-radius: 1cqw; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); transform: scale(0); transition: transform .5s var(--ease);
}
.mkd-chip b { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 1.15cqw; font-weight: 600; padding: .2cqw .6cqw; border-radius: .6cqw; background: rgba(0,0,0,.45); color: #fff; }
.story__mock[data-stage="2"] .mkd-chip { transform: none; }
.story__mock[data-stage="2"] .mkd-chip:nth-child(2) { transition-delay: .08s; }
.story__mock[data-stage="2"] .mkd-chip:nth-child(3) { transition-delay: .16s; }
.story__mock[data-stage="2"] .mkd-chip:nth-child(4) { transition-delay: .24s; }
.story__mock[data-stage="2"] .mkd-chip:nth-child(5) { transition-delay: .32s; }
/* шрифты */
.mkd-type { grid-row: 2 / 4; }
.mkd-aa { font-family: "Playfair Display", Georgia, serif; font-size: 10cqw; line-height: .95; color: #f6c58c; }
.mkd-fn { font-family: "Playfair Display", Georgia, serif; font-size: 1.8cqw; }
.mkd-aa2 { margin-top: auto; font-size: 3.4cqw; font-weight: 800; }
.mkd-aa2 small { font-size: 1.5cqw; font-weight: 500; color: #a39fc0; }
/* мудборд */
.mkd-ph { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 1cqw; }
.mkd-ph span { border-radius: .9cqw; background-size: cover; background-position: center; }
.mkd-ph span:first-child { grid-row: 1 / 3; }
.story__mock[data-stage="2"] .mkd-ph span { animation: mkdPh .9s var(--ease) both; }
.story__mock[data-stage="2"] .mkd-ph span:nth-child(2) { animation-delay: .4s; }
.story__mock[data-stage="2"] .mkd-ph span:nth-child(3) { animation-delay: .55s; }
@keyframes mkdPh { from { opacity: 0; transform: scale(.85) rotate(-3deg); } }
/* кнопка с выделением, как в Figma */
.mkd-ui { flex-direction: row; align-items: center; justify-content: space-between; }
.mkd-sel { position: relative; padding: .6cqw; outline: 1.5px solid #4ea8ff; }
.mkd-btn { display: block; padding: 1.1cqw 2.4cqw; border-radius: 100px; font-size: 1.6cqw; font-weight: 800; color: #1a120b; background: linear-gradient(135deg, #f6c58c, #e08a3c); white-space: nowrap; }
.mkd-h { position: absolute; width: .9cqw; height: .9cqw; background: #fff; border: 1.5px solid #4ea8ff; }
.mkd-h.h1 { left: -.5cqw; top: -.5cqw; } .mkd-h.h2 { right: -.5cqw; top: -.5cqw; }
.mkd-h.h3 { left: -.5cqw; bottom: -.5cqw; } .mkd-h.h4 { right: -.5cqw; bottom: -.5cqw; }
.mkd-size { position: absolute; left: 50%; top: calc(100% + .8cqw); transform: translateX(-50%); padding: .2cqw .7cqw; border-radius: .5cqw; font-style: normal; font-size: 1.1cqw; font-weight: 700; color: #fff; background: #4ea8ff; white-space: nowrap; }
/* курсор дизайнера с именем */
.mkd-cur { position: absolute; left: 70%; top: 30%; display: flex; align-items: flex-start; gap: .2cqw; opacity: 0; }
.mkd-cur svg { width: 2.6cqw; height: 2.6cqw; filter: drop-shadow(0 .3cqw .6cqw rgba(0,0,0,.5)); }
.mkd-cur span { margin-top: 1.8cqw; padding: .3cqw .9cqw; border-radius: .6cqw; font-size: 1.2cqw; font-weight: 700; color: #fff; background: #ff6bcb; white-space: nowrap; }
.story__mock[data-stage="2"] .mkd-cur { opacity: 1; animation: mkdCur 5s var(--ease) .6s infinite; }
@keyframes mkdCur {
  0%   { left: 70%; top: 30%; }
  25%  { left: 52%; top: 14%; }
  45%  { left: 52%; top: 14%; }
  70%  { left: 62%; top: 82%; }
  85%  { left: 62%; top: 82%; }
  100% { left: 70%; top: 30%; }
}
@media (prefers-reduced-motion: reduce) { .mkd-cur { animation: none !important; } }
.story__visual:has(.story__mock[data-stage="2"]) .story__photo { transform: rotate(-7deg) translate(-4%, 16%); }
.mkd-type { justify-content: flex-start; }
.mkd-aa { font-size: 8.5cqw; }


/* =========================================================
   «Код»: мини-редактор с живым набором
   ========================================================= */
.mk-code {
  top: 6%; bottom: 6%; width: 58%; padding: 0 0 12px; counter-reset: ln;
  white-space: pre-wrap; word-break: break-word; line-height: 1.6; scroll-behavior: smooth;
}
.mk-code::before {
  content: "index.html"; position: sticky; top: 0; z-index: 1; display: block; margin-bottom: 8px; padding: 7px 14px;
  font-size: .9em; color: #c4a7ff; background: #14131f; border-bottom: 1px solid rgba(124,92,255,.35);
  box-shadow: inset 0 -2px 0 #7c5cff;
}
.mk-code span { position: relative; padding-left: 3.4em; padding-right: 10px; counter-increment: ln; }
.mk-code span::before { content: counter(ln); position: absolute; left: 0; width: 2.4em; text-align: right; color: #4b4a63; }
.story__mock.is-code .mk-code span { transition-delay: 0s !important; }
.c-c { color: #6f7390; font-style: italic; font-weight: 400; }
.mk-caret { display: inline-block; width: .55em; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: #b8ff5c; animation: mkCaret 1s steps(1) infinite; }
@keyframes mkCaret { 50% { opacity: 0; } }
@media (max-width: 900px) { .mk-code { width: 64%; font-size: 8.5px; } }

/* эмблема: штрихи пунктирной орбиты бегут по кругу */
.em-flow { animation: emFlow2 1.4s linear infinite; }
@keyframes emFlow2 { to { stroke-dashoffset: -15; } }

/* «Получить предложение»: кнопки с иконками мессенджеров */
.calc__send { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc__btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 10px; }
.calc__ico {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); box-shadow: 0 4px 14px -4px var(--c); transition: box-shadow .25s, transform .25s var(--ease);
}
.calc__ico svg { width: 19px; height: 19px; }
@media (hover: hover) {
  .calc__btn:hover .calc__ico { box-shadow: 0 0 0 2px rgba(255,255,255,.85); transform: scale(1.06); }
  .calc__btn:hover .calc__ico--dark { box-shadow: 0 0 0 2px #0b0b10; }
}
@media (max-width: 380px) { .calc__btn { font-size: 13px; gap: 7px; } .calc__ico { width: 26px; height: 26px; } .calc__ico svg { width: 16px; height: 16px; } }
/* кнопки мессенджеров — узкие, по ширине содержимого; иконки прежнего размера */
.calc__send { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px; }
.calc__btn { justify-content: flex-start; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 100px; font-size: 13.5px; }
/* фото проекта целиком, без обрезки и искажений (квадратный снимок в карточке 16:11) */
.g3d__art img.is-contain { object-fit: contain; object-position: center; background: radial-gradient(ellipse at 50% 42%, #fbfbfb 0%, #ececec 55%, #d6d6d6 100%); }
.g3d__art:has(img.is-contain)::after { background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 45%); }
.g3d__photo { position: absolute; inset: 0; background-repeat: no-repeat; background-position: center; background-size: cover; }
/* квадратное фото платы целиком, с правильными пропорциями */
.g3d__photo.is-contain { background-size: contain; }
.g3d__art:has(.g3d__photo.is-contain) { background: linear-gradient(90deg, #cfcfcf 0%, #d9d9d9 45%, #e3e3e3 100%); }
.g3d__art:has(.g3d__photo.is-contain)::after { background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 45%); }
/* узкие телефоны: форма «Соберите свой проект» не вылезает за экран на любом языке */
@media (max-width: 900px) { .calc__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .calc__types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc__type { min-width: 0; }
  .calc__type b, .calc__type small { overflow-wrap: anywhere; hyphens: auto; }
}
@media (max-width: 380px) {
  .calc__form, .calc__result { padding: 16px; }
  .calc__types { gap: 8px; }
  .calc__type { padding: 12px 10px; }
}

/* шапка на телефонах: кнопка меню никогда не сжимается */
@media (max-width: 900px) {
  .burger { flex: none; }
  .logo { flex: 0 1 auto; min-width: 0; white-space: nowrap; margin-right: auto; }
  .lang, .theme-btn { flex: none; }
}
@media (max-width: 600px) {
  .header { padding: 8px 8px 8px 16px; }
  .lang { margin-left: 6px; }
  .lang__btn { height: 40px; gap: 6px; padding: 0 10px; }
  .lang__btn svg { display: none; }
  .theme-btn { width: 40px; height: 40px; margin-right: 6px; }
  .burger { width: 42px; height: 42px; }
  .burger span { left: 12px; right: 12px; }
  .burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
  .burger.open span:first-child, .burger.open span:last-child { top: 20px; }
}
@media (max-width: 380px) {
  .header { width: calc(100% - 20px); padding: 6px 6px 6px 12px; }
  .logo { font-size: 16px; }
  .logo__mark { width: 26px; height: 26px; margin-right: 6px; }
  .lang { margin-left: 4px; }
  .lang__btn { height: 36px; padding: 0 8px; gap: 5px; font-size: 12px; }
  .theme-btn { width: 36px; height: 36px; margin-right: 4px; }
  .theme-btn svg { width: 17px; height: 17px; }
  .burger { width: 38px; height: 38px; }
  .burger span { left: 11px; right: 11px; }
  .burger span:first-child { top: 14px; } .burger span:last-child { top: 22px; }
  .burger.open span:first-child, .burger.open span:last-child { top: 18px; }
}
/* планшеты: окно с кодом под текстом первого экрана, чтобы не было пустоты */
@media (min-width: 700px) and (max-width: 1199px) {
  .hero__code { display: block; position: relative; width: min(100%, 620px); margin-top: clamp(36px, 5vh, 60px); perspective: 1400px; animation: editorFloat 7s ease-in-out infinite; }
  .hero__code .editor__body { min-height: 0; }
}
/* планшет горизонтально: как на компьютере — текст слева, окно с кодом справа */
@media (min-width: 900px) and (max-width: 1199px) and (orientation: landscape) {
  .hero__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: center; }
  .hero__code { width: auto; margin-top: 0; }
  .hero__title { font-size: min(5.6vw, 10.5vh, 80px); }
}

/* фоновые пятна экрана загрузки не выходят за край на телефонах */
.preloader { overflow: hidden; }

/* 3D-галерея: боковые карточки не расширяют страницу на телефоне (иначе браузер растягивает экран) */
#portfolio { overflow-x: hidden; overflow-x: clip; }

/* экран выбора языка: короткая фраза о том, что это за сайт */
.pre-tagline {
  display: none; max-width: min(92vw, 640px); min-height: 1.3em; margin: -6px 0 2px; text-align: center;
  font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(19px, 2.6vw, 30px); line-height: 1.25;
  color: #f2f2f5; letter-spacing: .005em; text-shadow: 0 4px 24px rgba(0,0,0,.6);
  transition: opacity .3s var(--ease), transform .3s var(--ease), filter .3s;
}
.pre-tagline em {
  font-style: italic; white-space: nowrap;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8 55%, #7cc8ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader.picking .pre-tagline, .preloader.picked .pre-tagline { display: block; animation: tagIn .8s var(--ease) both .15s; }
.pre-tagline.swap { opacity: 0; transform: translateY(8px); filter: blur(3px); }
@keyframes tagIn { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 600px) {
  .pre-tagline { font-size: 19px; min-height: 2.5em; margin-bottom: -10px; }
  .pre-tagline em { display: block; white-space: normal; }
}
@media (max-width: 360px) { .pre-tagline { font-size: 17.5px; } }

/* ===== Кнопка «Узнать стоимость» и окно с ценами ===== */
.calc__pricebtn {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 18px; padding: 12px 14px; border-radius: 14px;
  font-size: 15px; font-weight: 700; color: var(--text); text-align: left;
  border: 1px dashed rgba(184,255,92,.55); background: rgba(184,255,92,.06);
  transition: background .25s, border-color .25s, transform .25s var(--ease);
}
.calc__pricebtn-ico { font-size: 20px; }
.calc__pricebtn-cur { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
@media (hover: hover) { .calc__pricebtn:hover { background: rgba(184,255,92,.14); border-style: solid; transform: translateY(-2px); } }

.modal__dialog--price { width: min(720px, 100%); }
.price { padding: 40px 36px 32px; }
.price .form__title { margin-bottom: 18px; }
.price__cur { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 22px; border-radius: 100px; border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.price__cur button { padding: 8px 16px; border-radius: 100px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: background .25s, color .25s; }
.price__cur button b { color: var(--text); margin-right: 4px; }
.price__cur button.active { background: var(--accent); color: #0b0b10; }
.price__cur button.active b { color: #0b0b10; }
.price__est { padding: 20px 22px; margin-bottom: 22px; border-radius: 18px; border: 1px solid rgba(184,255,92,.3);
  background: radial-gradient(ellipse at 10% 0%, rgba(124,92,255,.22), transparent 60%), rgba(255,255,255,.03); }
.price__total { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 12px; }
.price__total small { font-size: 26px; color: var(--accent); }
.price__total b { font-family: "Playfair Display", Georgia, serif; font-weight: 500; font-size: clamp(36px, 6vw, 52px); line-height: 1;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price__lines, .price__list ul { list-style: none; margin: 0; padding: 0; }
.price__lines li, .price__list li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14.5px; border-bottom: 1px dashed rgba(255,255,255,.08); }
.price__lines li:last-child, .price__list li:last-child { border-bottom: 0; }
.price__lines li span, .price__list li span { color: var(--muted); }
.price__lines li b, .price__list li b { white-space: nowrap; font-weight: 700; }
.price__list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 6px 0 18px; }
.price__note { font-size: 12.5px; color: #8a8a9a; margin-bottom: 18px; }
.price__send { width: 100%; justify-content: center; }
html.light .price__est { background: radial-gradient(ellipse at 10% 0%, rgba(124,92,255,.12), transparent 60%), #fff; }
html.light .price__lines li, html.light .price__list li { border-bottom-color: rgba(20,18,40,.1); }
@media (max-width: 600px) {
  .price { padding: 32px 18px 22px; }
  .price__list { grid-template-columns: 1fr; }
  .price__cur button { padding: 7px 12px; }
}

/* отзыв по приглашению */
.review__verified { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 9px; border-radius: 100px;
  font-size: 11.5px; font-weight: 700; color: #0b0b10; background: linear-gradient(90deg, #b8ff5c, #5cffc8); }
.review__author > div { display: flex; flex-direction: column; align-items: flex-start; }
.review-hello { margin-top: 10px; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.5;
  background: rgba(184,255,92,.08); border: 1px solid rgba(184,255,92,.35); color: var(--text); }

/* «Готово. Добро пожаловать!» — летит в камеру, затем буквы разлетаются взрывом */
.pre-welcome { position: fixed; inset: 0; z-index: 1002; display: grid; place-items: center; pointer-events: none; overflow: hidden; perspective: 900px; perspective-origin: 50% 50%; }
.pre-welcome__inner { display: flex; flex-direction: column; align-items: center; gap: .45em; max-width: 100vw; padding: 0 5vw; text-align: center; opacity: 0; will-change: transform, opacity, filter; }
.pw-title { display: flex; flex-wrap: wrap; justify-content: center; column-gap: .26em; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 500; font-size: min(8vmin, 66px); line-height: 1.08; }
.pw-title { flex-direction: column; align-items: center; row-gap: .02em; }
@media (max-width: 799px) { .pw-title { font-size: min(9.4vmin, 44px); } }
.pw-word { display: inline-flex; white-space: nowrap; }
.pw-l { display: inline-block; will-change: transform, opacity; }
.pw-title .pw-l { text-shadow: 0 0 .32em currentColor, 0 .08em .5em rgba(0,0,0,.55); }
.pw-flash, .pw-ring { position: absolute; left: 50%; top: 50%; opacity: 0; border-radius: 50%; pointer-events: none; }
.pw-flash { width: 70vmax; height: 70vmax; margin: -35vmax 0 0 -35vmax; background: radial-gradient(circle, rgba(255,255,255,.9), rgba(184,255,92,.4) 28%, rgba(124,92,255,.15) 50%, transparent 66%); }
.pw-ring { width: 24vmin; height: 24vmin; margin: -12vmin 0 0 -12vmin; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 0 40px rgba(92,255,200,.7), inset 0 0 30px rgba(184,255,92,.5); }
.preloader.welcome > .pre-mark, .preloader.welcome > .pre-brand, .preloader.welcome > .term { opacity: .14; filter: blur(3px); }
@media (prefers-reduced-motion: reduce) { .pre-welcome { display: none; } }

/* ===== облегчение заставки: никаких размытий и лишних анимаций под надписью ===== */
.preloader.done > * { filter: none; }                                   /* вместо blur(6px) при уходе заставки */
.preloader.welcome > .pre-mark, .preloader.welcome > .pre-brand, .preloader.welcome > .term { opacity: 0; filter: none; transition: opacity .3s linear; }
.preloader.welcome-off > .pre-mark, .preloader.welcome-off > .pre-brand, .preloader.welcome-off > .term { display: none; }
.preloader.welcome .pre-bg span { animation-play-state: paused; }       /* цветные пятна замирают */
.pre-welcome__inner { will-change: transform, opacity; }
.pw-title .pw-l { text-shadow: 0 0 .2em currentColor; }
.pre-welcome.boom .pw-title .pw-l { text-shadow: none; }
.pw-flash { width: 46vmax; height: 46vmax; margin: -23vmax 0 0 -23vmax; }
.pw-ring { box-shadow: 0 0 18px rgba(92,255,200,.6); }

/* пока идёт заставка и открывается «портал», бесконечные анимации сайта стоят — их всё равно почти не видно, а процессор нужен для круга */
body:not(.intro-done) .noise,
body:not(.intro-done) .aurora span,
body:not(.intro-done) .hero,
body:not(.intro-done) .hero * { animation-play-state: paused; }
/* «портал» через clip-path — маска выключается */
.preloader.clipmode { -webkit-mask: none !important; mask: none !important; }

/* заголовок первого экрана появляется без размытия (оно дорогое для слабых видеокарт) */
.hero__title .word { filter: none !important; }

/* WebWorks и эмблема остаются на заднем плане, как раньше: приглушены (без размытия), анимации стоят */
.preloader.welcome > .pre-mark, .preloader.welcome > .pre-brand, .preloader.welcome > .term { opacity: .16; filter: none; }
.preloader.welcome-off > .pre-mark, .preloader.welcome-off > .pre-brand, .preloader.welcome-off > .term { display: revert; }
.preloader.welcome .preloader__logo, .preloader.welcome .pb-flow, .preloader.welcome .term::before, .preloader.welcome .pre-mark * { animation-play-state: paused; }

/* «Как рождается сайт»: обычный раздел без прокрутки-«липучки» — шаги меняются сами */
.story .story__track { height: auto !important; }
.story .story__sticky { position: relative !important; height: auto !important; min-height: 0; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0; }
.story__step { cursor: pointer; }
.story__progress i { transition: transform .8s var(--ease); }

/* ===== «Как рождается сайт»: свёрнут в карточку, раскрывается как портфолио ===== */
.story.story--collapsed { padding: clamp(24px, 4vw, 52px) 0; }
.story__stage {
  position: relative; width: min(760px, calc(100% - 32px)); height: 230px; margin: 0 auto; overflow: hidden;
  border-radius: 24px; background: #0d0d16; transform-origin: 50% 0;
  box-shadow: 0 30px 90px -30px rgba(124,92,255,.55), 0 0 0 1px rgba(184,255,92,.08);
  transition: width .95s cubic-bezier(.77,0,.18,1), height .95s cubic-bezier(.77,0,.18,1), border-radius .95s cubic-bezier(.77,0,.18,1), box-shadow .6s, background .6s;
}
@media (hover: hover) { .story__stage.is-collapsed:hover { box-shadow: 0 40px 110px -30px rgba(124,92,255,.7), 0 0 0 1px rgba(184,255,92,.3); } }
.story__stage.is-open { width: 100%; border-radius: 0; box-shadow: none; background: transparent; }
.story__stage.is-settled { height: auto !important; overflow: visible; }
/* тело раздела: пока идёт рост — на полную ширину экрана, чтобы текст не «прыгал» */
.story__body { position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); visibility: hidden; }
.story__stage.is-open .story__body { visibility: visible; }
.story__stage.is-settled .story__body { position: relative; left: 0; width: 100%; transform: none; }
.story__stage .story__track { height: auto !important; }
/* обложка */
.st-cover .pf-cover__center { padding: 16px; }
.st-cover .pf-play { width: 58px; height: 58px; margin-bottom: 12px; }
.st-cover .pf-play__icon { width: 24px; height: 24px; }
.st-cover .pf-play__ring { inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); }
.st-cover .pf-cover__title { font-size: clamp(24px, 2.8vw, 36px); margin-bottom: 6px; }
.st-cover .pf-cover__sub { font-size: 14px; max-width: 46em; }
.st-cover .pf-cover__hint { margin-top: 10px; font-size: 11px; }
.st-cover .pf-cover__chips span { font-size: 11px; padding: 5px 10px; }
.st-cover .pf-cover__chips i { font-style: normal; }
.st-cover .pf-cover__grid { background-size: 32px 32px; }
.story__stage.is-open .st-cover { transform: scale(1.12); opacity: 0; pointer-events: none; visibility: hidden; transition: transform 1.1s var(--ease), opacity .9s var(--ease) .15s, visibility 0s 1.1s; }
/* кнопка «Свернуть» */
.st-close { position: absolute; top: 18px; right: 18px; z-index: 6; display: none; }
.story__stage.is-open .st-close { display: inline-flex; }
@media (min-width: 1600px) { .story__stage { width: min(860px, calc(100% - 32px)); height: 260px; } .story__stage.is-open { width: 100%; } }
@media (max-width: 600px) {
  .story__stage { width: calc(100% - 24px); height: 240px; }
  .story__stage.is-open { width: 100%; }
  .st-cover .pf-play { width: 54px; height: 54px; }
  .st-cover .pf-cover__sub { font-size: 13px; }
  .st-cover .pf-cover__chips { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story__stage { transition: none; } }

/* ===== раскрытие без тормозов: размеры не анимируются, плавно меняется только обрезка и прозрачность ===== */
.story__stage { width: 100%; height: auto; margin: 0; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; transition: none; transform-origin: 50% 0; }
.story__stage.is-collapsed { height: 230px; }
.story__stage.is-collapsed:hover { box-shadow: none; }
.story__stage.is-open { width: 100%; box-shadow: none; }
.story__body { position: relative; top: auto; left: auto; width: 100%; transform: none; visibility: visible; will-change: clip-path; }
.story__stage.is-collapsed .story__body { display: none; }
/* карточка-обложка: по центру, фиксированного размера, со своей тенью */
.st-cover {
  inset: auto; top: 0; left: 50%; width: min(760px, calc(100% - 32px)); height: 230px; transform: translateX(-50%);
  border-radius: 24px; box-shadow: 0 30px 90px -30px rgba(124,92,255,.55), 0 0 0 1px rgba(184,255,92,.08);
  transition: transform 1.1s var(--ease), opacity .9s var(--ease) .15s, visibility 0s;
}
@media (hover: hover) { .story__stage.is-collapsed .st-cover:hover { box-shadow: 0 40px 110px -30px rgba(124,92,255,.7), 0 0 0 1px rgba(184,255,92,.3); } }
.story__stage.is-open .st-cover { transform: translateX(-50%) scale(1.06); opacity: 0; pointer-events: none; visibility: hidden; transition: transform 1.1s var(--ease), opacity .9s var(--ease) .1s, visibility 0s 1.1s; }
@media (min-width: 1600px) { .story__stage.is-collapsed { height: 260px; } .st-cover { width: min(860px, calc(100% - 32px)); height: 260px; } }
@media (max-width: 600px) { .story__stage.is-collapsed { height: 240px; } .st-cover { width: calc(100% - 24px); height: 240px; } }
.st-close { top: 18px; }

.st-ring { position: absolute; z-index: 7; width: 110px; height: 110px; margin: 0; border-radius: 50%; pointer-events: none; will-change: transform, opacity;
  border: 2px solid rgba(184,255,92,.95); box-shadow: 0 0 22px 4px rgba(184,255,92,.45), inset 0 0 18px rgba(124,92,255,.35); }
.story__body { will-change: auto; }

.story__bg i { filter: none !important; }

/* полоска-таймер: раздел сам свернётся, когда мышь ушла */
.story__stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 8; transform-origin: 0 50%; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, #b8ff5c, #5cffc8, #7c5cff, #ff6bcb); }
.story__stage.leaving::after { opacity: 1; animation: leaveBar 1.2s linear forwards; }

/* ===== общие облегчения ===== */
/* пульсация кнопки-«плеера» — кольцом через transform/opacity (видеокарта), а не анимацией тени (перерисовка каждый кадр) */
.pf-play { animation: none; isolation: isolate; }
.pf-play::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: rgba(184,255,92,.5); animation: pfRing 2.4s ease-out infinite; will-change: transform, opacity; }
@keyframes pfRing { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
/* отражения под карточками 3D-галереи — самое тяжёлое украшение, убираем (подсветка снизу остаётся) */
.g3d__inner { -webkit-box-reflect: unset !important; }
/* ===== «Лайт»: включается сам на слабом устройстве ===== */
html.lite .aurora, html.lite .code-grid--glow, html.lite .noise, html.lite .hero__orb { display: none !important; }
html.lite .pf-play::before, html.lite .pf-cover__chips span, html.lite .hero__floor::before, html.lite .hero__code { animation: none !important; }
html.lite .pf-cover:hover .pf-cover__chips span { transition: none; }
html.lite .g3d__stage::before { display: none; }
html.lite .st-ring { display: none; }

/* ---------- Телефоны и планшеты (без мыши): галерея легче, портфолио открывается во весь экран ---------- */
@media (hover: none), (pointer: coarse) {
  .g3d__inner { -webkit-box-reflect: none; box-shadow: 0 16px 34px -18px rgba(0,0,0,.9); transition: transform .25s ease-out; }
  .g3d__card.is-active .g3d__inner { box-shadow: 0 18px 40px -22px var(--g2), 0 0 0 1px rgba(255,255,255,.14); }
  .g3d__stage::before { display: none; }
  .g3d__icon { filter: none; }
  .g3d__shine { display: none; }
  /* на телефоне портфолио открывается в новой вкладке — переключатель вида и подсказка про курсор не нужны */
  #portfolio .device-switch, #portfolio .portfolio__hint { display: none; }
}

/* ---------- Цена сразу в калькуляторе ---------- */
.calc__cost {
  margin-bottom: 18px; padding: 14px 16px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(184,255,92,.10), rgba(124,92,255,.10)); border: 1px solid rgba(184,255,92,.28);
}
.calc__cost-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.calc__cost-head .calc__label { margin: 0; }
.calc__cur { display: inline-flex; padding: 3px; gap: 2px; border-radius: 100px; background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.calc__cur button { min-width: 34px; padding: 4px 10px; border-radius: 100px; font-weight: 800; font-size: 13px; color: var(--muted); transition: background .25s, color .25s; }
.calc__cur button.active { background: var(--accent); color: #0b0b10; }
.calc__cost-sum { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.calc__cost-sum small { font-size: 22px; color: var(--muted); }
.calc__cost-sum b { font-family: var(--font-display); font-size: clamp(34px, 4vw, 46px); line-height: 1.05; font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--accent) 60%, #5cffc8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.calc__cost.bump b { animation: calcBump .45s var(--ease); display: inline-block; }
html.light .calc__cost-sum b { background: linear-gradient(90deg, #1b1340, #4a7a10); -webkit-background-clip: text; background-clip: text; }

/* ===== «Ваш проект»: карточка, раскрывается как «Процесс» ===== */
.calc.calc--collapsed { padding: clamp(24px, 4vw, 52px) 0; }
.cx-stage { position: relative; }
.cx-stage.is-collapsed .cx-body { display: none; }
.cx-cover { position: absolute; z-index: 5; }
.cx-stage.is-open { min-height: 0; }

/* ===== Кнопка «Спросить» на телефоне: маленький круглый значок, прячется при прокрутке ===== */
.ask-btn.is-away { opacity: 0; transform: translateY(24px) scale(.85); pointer-events: none; }
@media (max-width: 600px), (hover: none) {
  .ask-btn { padding: 4px; gap: 0; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
  .ask-btn > span:not(.ask-btn__ico) { display: none; }
  .ask-btn__ico { width: 40px; height: 40px; font-size: 13px; }
}

/* перевод отзыва: кнопка «Оригинал» */
.review__orig { align-self: flex-start; margin: -6px 0 14px; padding: 0; font-size: 12px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.review__orig::before { content: "🌐 "; text-decoration: none; }
@media (hover: hover) { .review__orig:hover { color: var(--accent); } }


/* Телефон: описания крупнее — как основной текст на портфолио WEBWORKS (17–19px) */
@media (max-width: 600px) {
  .hero__lead { font-size: 18px; line-height: 1.55; }
  .world__lead, .secrets__lead, .calc__lead { font-size: 17.5px; line-height: 1.55; }
  .own__lead, .cta__lead { font-size: 17px; line-height: 1.55; }
  .story__step p, .own__card p, .own__free p, .own__list li { font-size: 16.5px; line-height: 1.55; }
  .review__text { font-size: 17px; }
  .calc__note, .price__note { font-size: 13.5px; }
  .mail-pick__sub { font-size: 16px; }
  body .inquiry-intro { font-size: 16.5px; }
}

/* подсказка под галереей «Листайте проекты…» — крупнее и чуть светлее (на телефоне — 16.5px, выше) */
.g3d__hint { font-size: 15.5px; color: #8a8a9c; }
@media (max-width: 600px) { .g3d__hint { font-size: 16.5px; line-height: 1.45; padding: 0 8px; } }

/* карточки галереи: подпись «Сайт салона красоты» и «Открыть ↗» крупнее и светлее */
.g3d__info small { font-size: 17px; font-weight: 600; line-height: 1.3; color: #c9c9d6; letter-spacing: .01em; }
.g3d__open { font-size: 15px; }
.g3d__badge { font-size: 12px; padding: 5px 11px; }
@media (max-width: 600px) { .g3d__info small { font-size: 17.5px; } .g3d__open { font-size: 16px; } }

/* обложки «Портфолио», «Как рождается сайт», «Калькулятор»: подзаголовок и подсказка чуть крупнее */
body .pf-cover__sub { font-size: 15.5px; line-height: 1.45; }
body .pf-cover__hint { font-size: 12px; }
@media (max-width: 600px) {
  body .pf-cover__sub { font-size: 14.5px; }
  body .pf-cover__hint { font-size: 11.5px; }
}

/* «Спросить» на телефоне: своя видимая полоса прокрутки у списка вопросов + затухание внизу, пока есть ещё вопросы */
.ask__rail { display: none; }
@media (max-width: 600px) {
  .ask__chips { scrollbar-width: none; }
  .ask__chips::-webkit-scrollbar { display: none; }
  .ask__chips.has-rail { padding-right: 26px;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0,0,0,.25)); mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0,0,0,.25)); }
  .ask__chips.has-rail.at-end { -webkit-mask-image: none; mask-image: none; }
  .ask__rail.on { display: block; position: absolute; right: 8px; width: 5px; border-radius: 5px; background: rgba(255,255,255,.12); pointer-events: none; z-index: 2; }
  .ask__rail i { display: block; width: 100%; border-radius: 5px; background: #b8ff5c; box-shadow: 0 0 8px rgba(184,255,92,.6); }
}
