/* Визитка «Облачные технологии · Smarty» — дизайн-система UNICORN (kaminn-twin),
   перебрендированная в палитру Smarty: #0066C4 / #2697FF / #06437B + #FF6B00 */

@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/unbounded-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Unbounded";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/unbounded-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02C6, U+02DA-02DC, U+2000-206F;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/golos-text-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/golos-text-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6-02DA-02DC, U+2000-206F;
}

:root {
  --blue: #0066C4;
  --sky: #2697FF;
  --deep: #06437B;
  --orange: #FF6B00;
  --amber: #FFBD59;
  --bg: #F2F5FA;
  --card: #FFFFFF;
  --ink: #1A2433;
  --muted: #7A8699;
  --line: rgba(6, 67, 123, 0.10);
  --shadow: 0 10px 30px rgba(6, 67, 123, 0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Golos Text", -apple-system, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior: none;
}

::-webkit-scrollbar { width: 0; height: 0; }

/* --- фоновые сферы (плавающие бренд-затекания) --- */
.orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.orb-blue { width: 340px; height: 340px; top: -120px; left: -100px; background: rgba(38, 151, 255, 0.28); animation: drift1 26s ease-in-out infinite; }
.orb-orange { width: 260px; height: 260px; top: 32%; right: -110px; background: rgba(255, 107, 0, 0.16); animation: drift2 32s ease-in-out infinite; }
.orb-deep { width: 380px; height: 380px; bottom: -160px; left: 30%; background: rgba(0, 102, 196, 0.14); animation: drift1 40s ease-in-out infinite reverse; }

@keyframes drift1 { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(60px, 40px) } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) } 50% { transform: translate(-50px, 60px) } }

/* --- сплэш --- */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; gap: 22px;
  perspective: 700px;
  background: linear-gradient(150deg, var(--deep), var(--blue) 55%, var(--sky));
  transition: opacity 0.45s ease, visibility 0.45s;
}
.splash.is-hidden { opacity: 0; visibility: hidden; }
.splash-logo {
  width: 190px;
  animation: splashPop 0.9s var(--ease) both;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}
.splash-logo img { width: 100%; display: block; }
@keyframes splashPop {
  0% { transform: perspective(600px) rotateX(58deg) scale(0.6) translateY(26px); opacity: 0 }
  60% { transform: perspective(600px) rotateX(-6deg) scale(1.05) translateY(0); opacity: 1 }
  100% { transform: perspective(600px) rotateX(0) scale(1) translateY(0); opacity: 1 }
}
.splash-bar {
  width: 140px; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.22); overflow: hidden;
}
.splash-bar span {
  display: block; height: 100%; width: 40%;
  border-radius: 3px; background: var(--amber);
  animation: splashSlide 1.1s ease-in-out infinite;
}
@keyframes splashSlide { 0% { transform: translateX(-120%) } 100% { transform: translateX(360%) } }

/* --- каркас --- */
.app {
  max-width: 640px; margin: 0 auto;
  padding: 14px 14px calc(78px + env(safe-area-inset-bottom));
  min-height: 100%;
  position: relative;
}

.screen { display: none; animation: tabIn 0.4s var(--ease); }
.screen.active { display: block; }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(16px) }
  to { opacity: 1; transform: translateY(0) }
}

.screen-title {
  font-family: "Unbounded", sans-serif;
  font-size: 19px; letter-spacing: -0.01em;
  margin: 22px 2px 6px;
}
.screen-sub { color: var(--muted); margin: 0 2px 14px; }

/* --- hero --- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px;
  padding: 30px 22px 24px;
  color: #fff;
  background: linear-gradient(150deg, var(--deep) 0%, var(--blue) 55%, var(--sky) 100%);
  background-size: 220% 220%;
  animation: heroShift 14s ease-in-out infinite;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateX(var(--gx, 0deg)) rotateY(var(--gy, 0deg));
  transition: transform 0.25s ease-out;
  will-change: transform;
  animation: heroShift 14s ease-in-out infinite, heroIn 0.7s var(--ease) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: perspective(900px) rotateX(16deg) translateY(26px) scale(0.96); }
  to { opacity: 1; }
}
@keyframes heroShift {
  0%, 100% { background-position: 0% 0% }
  50% { background-position: 100% 100% }
}

/* 3D-сцена: карусельное кольцо продуктов (mobile wow-эффект) */
.hero-stage {
  position: absolute; top: 16px; right: 6px;
  width: 168px; height: 168px;
  perspective: 640px;
  pointer-events: none;
  z-index: 2;
}
.orbit3d {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  animation: orbitSpin 18s linear infinite;
}
@keyframes orbitSpin { from { transform: rotateY(0deg) } to { transform: rotateY(-360deg) } }
.orbit3d::before {
  content: ""; position: absolute; inset: 16%;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.30);
  transform: translateZ(0);
}
.orbit-item {
  position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  transform-style: preserve-3d;
  pointer-events: auto;
  cursor: pointer;
}
.orbit-item .o-ico {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px;
  /* без backdrop-filter: он флэттит 3D-контекст в Chromium и плитки пропадают */
  background: rgba(9, 62, 111, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 20px rgba(4, 30, 56, 0.45);
  animation: oCounter 18s linear infinite;
  transition: transform 0.25s var(--ease);
  font-family: inherit;
  cursor: pointer;
}
/* держим иконки «лицом» к зрителю, компенсируя и вращение кольца, и свой угол на нём */
@keyframes oCounter {
  from { transform: rotateY(calc(-1 * var(--th, 0deg))) }
  to { transform: rotateY(calc(360deg - var(--th, 0deg))) }
}
.orbit-item:active .o-ico { transform: scale(0.88); }
@media (max-width: 400px) { .hero-stage { transform: scale(0.85); transform-origin: top right; } }
@media (prefers-reduced-motion: reduce) { .hero-stage { display: none; } }
/* вращающаяся 3D-аура за логотипом */
.hero-orbit {
  position: absolute; top: -70px; right: -60px;
  width: 250px; height: 250px; border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(255, 189, 89, 0.55), rgba(38, 151, 255, 0.30),
    rgba(255, 107, 0, 0.45), rgba(89, 175, 255, 0.35),
    rgba(255, 189, 89, 0.55));
  filter: blur(38px);
  animation: orbitSpin 11s linear infinite;
  pointer-events: none;
}
@keyframes orbitSpin { to { transform: rotate(360deg) } }
.hero-brand { will-change: transform; }
.hero-logo { width: 148px; margin-bottom: 18px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.3)); animation: logoFloat 5s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(42% 30% at 85% 90%, rgba(255, 189, 89, 0.35), transparent 70%),
    radial-gradient(50% 36% at -10% -10%, rgba(255, 255, 255, 0.25), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: "Unbounded", sans-serif;
  font-size: 27px; line-height: 1.12; letter-spacing: -0.02em;
  will-change: transform;
}
.hero-sub { margin-top: 10px; opacity: 0.92; font-size: 14.5px; max-width: 42ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

/* --- статистика --- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; perspective: 700px; }
.stat {
  background: var(--card); border-radius: 18px;
  padding: 14px 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: statIn 0.55s var(--ease) both;
  transform-style: preserve-3d;
}
.stat:nth-child(1) { animation-delay: 0.05s } .stat:nth-child(2) { animation-delay: 0.12s }
.stat:nth-child(3) { animation-delay: 0.19s } .stat:nth-child(4) { animation-delay: 0.26s }
@keyframes statIn {
  from { opacity: 0; transform: translateY(16px) rotateX(32deg) scale(0.94); }
  to { opacity: 1; transform: none }
}
.stat b {
  display: block; font-family: "Unbounded", sans-serif;
  font-size: 22px; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--blue), var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: 12.5px; color: var(--muted); }

/* --- карточки продуктов --- */
.product-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.product-cards.full { grid-template-columns: repeat(2, 1fr); }
.pcard {
  position: relative; overflow: hidden; text-align: left;
  border-radius: 20px; padding: 16px 14px 14px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: pointer;
  font: inherit; color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.pcard:active { transform: scale(0.97); }
.pcard::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}
/* блик-glare, следует за курсором (позиция — из JS: --mx/--my) */
.pcard::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.35), transparent 65%);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
@media (hover: hover) {
  .pcard:hover::after { opacity: 1; }
  .pcard:hover { box-shadow: 0 16px 38px rgba(6, 67, 123, 0.16); }
}
/* иконка «дышит» в 3D */
.pcard-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-size: 22px;
  perspective: 320px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--g1) 35%, transparent);
  margin-bottom: 10px;
  animation: iconFloat 6s ease-in-out infinite;
  animation-delay: var(--fd, 0s);
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg) }
  30% { transform: translateY(-4px) rotateX(10deg) rotateY(12deg) }
  65% { transform: translateY(2px) rotateX(-7deg) rotateY(-9deg) }
}
.pcard-name { font-family: "Unbounded", sans-serif; font-size: 14.5px; letter-spacing: -0.01em; }
.pcard-tag { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.pc-arrow {
  position: absolute; right: 12px; bottom: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--g1) 30%, transparent);
}

/* --- кайдзен --- */
.kaizen {
  margin-top: 22px; border-radius: 20px; padding: 20px;
  background: linear-gradient(140deg, #fff 30%, #FFF4E8);
  border: 1px solid rgba(255, 107, 0, 0.18);
  box-shadow: var(--shadow);
}
.kaizen-quote {
  font-family: "Unbounded", sans-serif; font-size: 15.5px; line-height: 1.35;
  color: var(--orange); margin-bottom: 8px;
}
.kaizen p { font-size: 13.5px; color: var(--ink); opacity: 0.85; }

/* --- CTA --- */
.cta-main {
  display: block; width: 100%; margin-top: 22px;
  padding: 16px 20px; border: none; border-radius: 16px;
  font-family: "Unbounded", sans-serif; font-size: 15px; letter-spacing: 0.01em;
  color: #fff; background: linear-gradient(120deg, var(--blue), var(--sky) 60%, #59AFFF);
  box-shadow: 0 12px 26px rgba(0, 102, 196, 0.35);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative; overflow: hidden;
}
.cta-main::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 3.2s ease-in-out infinite;
}
@keyframes ctaShine { 0%, 60% { left: -80% } 100% { left: 160% } }
.cta-main:active { transform: scale(0.98); }
@media (hover: hover) { .cta-main:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 102, 196, 0.42); } }

/* --- детальная карточка продукта --- */
.detail { animation: detailIn 0.45s var(--ease) both; perspective: 900px; }
@keyframes detailIn {
  from { opacity: 0; transform: perspective(900px) translateX(36px) rotateY(5deg) }
  to { opacity: 1; transform: perspective(900px) translateX(0) rotateY(0) }
}
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 4px 0 14px; padding: 9px 15px 9px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.back-btn:active { transform: scale(0.96); }

.detail-header {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 24px 20px; color: #fff;
  background: linear-gradient(140deg, var(--g1), var(--g2));
  box-shadow: var(--shadow);
}
.detail-header .dh-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 26px;
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px); margin-bottom: 12px;
}
.detail-header h2 { font-family: "Unbounded", sans-serif; font-size: 21px; letter-spacing: -0.01em; }
.detail-header p { margin-top: 7px; font-size: 13.5px; opacity: 0.94; max-width: 46ch; }

.detail-body { display: grid; gap: 12px; margin-top: 14px; }
.dcard {
  background: var(--card); border-radius: 18px; padding: 17px 16px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: statIn 0.5s var(--ease) both;
}
.dcard h4 {
  font-family: "Unbounded", sans-serif; font-size: 13px;
  margin-bottom: 9px; color: var(--deep);
}
.dcard ul { list-style: none; display: grid; gap: 7px; }
.dcard li { position: relative; padding-left: 20px; font-size: 13.5px; opacity: 0.9; }
.dcard li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 9px; height: 9px; border-radius: 3px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
}
.modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.module {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 11px; border-radius: 13px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; line-height: 1.3;
  transition: transform 0.25s var(--ease);
}
.module:active { transform: scale(0.96); }
.module .m-ico { font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--g1) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--g1) 25%, transparent);
  color: var(--deep);
}

.stages { display: grid; gap: 0; }
.stage {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px;
  padding: 13px 4px; position: relative;
}
.stage + .stage::before {
  content: ""; position: absolute; left: 21px; top: -8px; height: 14px;
  border-left: 2px dashed color-mix(in srgb, var(--g1) 35%, transparent);
}
.stage-n {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Unbounded", sans-serif; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--g1) 30%, transparent);
}
.stage-t { font-weight: 700; font-size: 14px; padding-top: 3px; }
.stage-x { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.result {
  padding: 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: color-mix(in srgb, var(--g1) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--g1) 22%, transparent);
  display: flex; gap: 8px; align-items: flex-start;
}
.result::before { content: "↗"; color: var(--g1); font-weight: 800; }

.pdf-btn {
  width: 100%; padding: 14px; border-radius: 15px;
  border: 1.5px dashed color-mix(in srgb, var(--g1) 45%, transparent);
  background: color-mix(in srgb, var(--g1) 5%, #fff);
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--deep);
  cursor: pointer; transition: transform 0.25s var(--ease);
}
.pdf-btn:active { transform: scale(0.97); }

/* --- почему мы --- */
.criteria-list { display: grid; gap: 7px; margin-top: 12px; }
.criterion {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600;
}
.criterion .c-check {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--sky)); color: #fff;
}
.review {
  margin-top: 10px; border-radius: 20px; padding: 18px 16px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative;
}
.review::before {
  content: "“"; position: absolute; top: 6px; right: 14px;
  font-family: "Unbounded", sans-serif; font-size: 46px; color: rgba(0, 102, 196, 0.14);
}
.review p { font-size: 13.5px; opacity: 0.9; }
.review .r-who { margin-top: 10px; }
.review .r-who b { font-size: 13.5px; }
.review .r-who span { display: block; font-size: 12px; color: var(--muted); }

.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.proof {
  padding: 14px 10px; border-radius: 16px; text-align: center;
  background: linear-gradient(150deg, var(--deep), var(--blue));
  color: #fff; box-shadow: var(--shadow);
}
.proof b {
  display: block; font-family: "Unbounded", sans-serif;
  font-size: 19px; color: var(--amber); margin-bottom: 5px;
}
.proof span { font-size: 10.5px; line-height: 1.35; opacity: 0.9; display: block; }

/* --- контакты --- */
.contact-card {
  border-radius: 20px; padding: 19px 17px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 10px;
}
.contact-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.contact-row .ct-ico {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 17px;
  background: linear-gradient(135deg, rgba(0, 102, 196, 0.12), rgba(38, 151, 255, 0.12));
}
.contact-row b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.contact-row a { color: var(--blue); text-decoration: none; font-weight: 600; }

.site-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.site-chips a {
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  padding: 7px 13px; border-radius: 999px; color: var(--deep);
  background: color-mix(in srgb, var(--sky) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--sky) 30%, transparent);
  transition: transform 0.25s var(--ease);
}
.site-chips a:active { transform: scale(0.95); }

/* --- форма заявки --- */
.lead-card {
  margin-top: 14px; border-radius: 20px; padding: 19px 17px;
  background: linear-gradient(160deg, var(--card) 40%, color-mix(in srgb, var(--sky) 6%, #fff));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.lead-card h3 { font-family: "Unbounded", sans-serif; font-size: 16px; }
.lead-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
#lead-form { display: grid; gap: 9px; }
#lead-form input, #lead-form select, #lead-form textarea {
  width: 100%; padding: 13px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff;
  font: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
#lead-form textarea { resize: none; }
#lead-form input:focus, #lead-form select:focus, #lead-form textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(38, 151, 255, 0.15);
}
#lead-submit { margin-top: 6px; }
#lead-submit:disabled { opacity: 0.6; }
.lead-ok {
  text-align: center; font-weight: 700; font-size: 14px; color: #1B8A3A;
  padding: 12px; border-radius: 13px; background: #EAF9EF;
}
.lead-err { text-align: center; font-size: 13px; color: #C0392B; }

/* --- мини-CRM (визитки) --- */
.crm-toolbar { display: flex; gap: 8px; margin-top: 12px; }
.crm-toolbar input {
  flex: 1; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-size: 14px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.crm-toolbar input:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(38, 151, 255, 0.15);
}
.crm-export {
  padding: 12px 14px; border-radius: 14px; border: none;
  font: inherit; font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, var(--blue), var(--sky));
  box-shadow: 0 8px 18px rgba(0, 102, 196, 0.28); cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.crm-export:active { transform: scale(0.95); }
/* ручное добавление контакта */
.crm-add {
  width: 100%; margin-top: 10px; padding: 12px;
  border-radius: 14px; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--blue) 35%, transparent);
  background: color-mix(in srgb, var(--blue) 5%, var(--card));
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--deep);
  transition: transform 0.25s var(--ease), border-color 0.25s ease;
}
.crm-add:active { transform: scale(0.98); }
.crm-form { display: grid; gap: 8px; margin-top: 10px; }
.crm-form input, .crm-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 13px;
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-size: 14px; color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.crm-form textarea { resize: none; }
.crm-form input:focus, .crm-form textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(38, 151, 255, 0.15);
}
.crm-form-actions { display: flex; gap: 8px; }
.crm-cancel {
  flex: 1; padding: 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.crm-save {
  flex: 2; padding: 12px; border-radius: 14px; border: none; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, var(--blue), var(--sky));
  box-shadow: 0 8px 18px rgba(0, 102, 196, 0.28);
  transition: transform 0.25s var(--ease);
}
.crm-save:active { transform: scale(0.97); }
.crm-card {
  margin-top: 10px; border-radius: 18px; padding: 15px 16px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: statIn 0.5s var(--ease) both;
}
.crm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-name { font-weight: 700; font-size: 15px; }
.crm-del {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(216, 63, 63, 0.10); color: #D83F3F;
  font-size: 12px; cursor: pointer; transition: transform 0.25s var(--ease);
}
.crm-del:active { transform: scale(0.88); }
.crm-org { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.crm-rows { display: grid; gap: 6px; margin-top: 9px; }
.crm-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink); text-decoration: none;
}
a.crm-row { color: var(--blue); font-weight: 600; }
.crm-row span { font-size: 14px; }
.crm-note { color: var(--muted); font-size: 12.5px; }
.crm-total { text-align: center; font-size: 12px; color: var(--muted); margin-top: 12px; }
.crm-loading { text-align: center; color: var(--muted); font-size: 13px; padding: 18px 0; }
.crm-empty {
  margin-top: 14px; border-radius: 20px; padding: 26px 20px;
  text-align: center; background: var(--card);
  border: 1.5px dashed var(--line);
}
.crm-empty-ico { font-size: 34px; animation: logoFloat 4s ease-in-out infinite; }
.crm-empty p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

/* --- таббар --- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(612px, calc(100% - 20px));
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(6, 67, 123, 0.18);
  z-index: 10;
}
/* скользящая пилюля под активной вкладкой (позицию двигает JS) */
.tab-glider {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: 25%;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  box-shadow: 0 8px 20px rgba(0, 102, 196, 0.35);
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.tab {
  position: relative; z-index: 1;
  display: grid; justify-items: center; gap: 3px;
  padding: 8px 4px 7px; border: none; border-radius: 16px;
  overflow: hidden;
  background: none; color: var(--muted);
  font: inherit; font-size: 10.5px; font-weight: 600;
  cursor: pointer; transition: color 0.25s ease, transform 0.25s var(--ease);
}
.tab svg { width: 21px; height: 21px; }
.tab:active { transform: scale(0.92); }
.tab.active { color: #fff; }

/* --- reveal-on-scroll --- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ================= 3D & MOTION LAYER v2 ================= */

/* прогресс скролла — тонкая градиентная нить сверху */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40;
  background: linear-gradient(90deg, var(--blue), var(--sky), var(--amber));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.08s linear;
  pointer-events: none;
}

/* липкая шапка: появляется, когда герой уехал */
.topbar {
  position: fixed; top: 0; left: 50%; z-index: 30;
  width: min(612px, calc(100% - 16px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--line); border-top: none;
  box-shadow: 0 10px 28px rgba(6, 67, 123, 0.14);
  transform: translate(-50%, -110%);
  transition: transform 0.45s var(--ease);
}
.topbar.is-shown { transform: translate(-50%, 0); }
.topbar-logo { height: 22px; }
.topbar-cta {
  border: none; border-radius: 12px; padding: 9px 14px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, var(--blue), var(--sky));
  box-shadow: 0 8px 18px rgba(0, 102, 196, 0.30);
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.topbar-cta:active { transform: scale(0.94); }

/* 3D-переход между экранами: старый «уезжает» с поворотом, новый влетает */
.screen.leaving {
  display: block;
  animation: screenOut 0.24s ease-in both;
  pointer-events: none;
}
@keyframes screenOut {
  to { opacity: 0; transform: perspective(900px) translateX(-30px) rotateY(10deg) scale(0.97); }
}
.screen.active { animation: tabIn3D 0.42s var(--ease); }
@keyframes tabIn3D {
  from { opacity: 0; transform: perspective(900px) translateX(30px) rotateY(-8deg); }
  to { opacity: 1; transform: perspective(900px) translateX(0) rotateY(0); }
}

/* bounce иконки активной вкладки */
.tab.active svg { animation: tabBounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tabBounce {
  0% { transform: translateY(0) scale(1) }
  35% { transform: translateY(-6px) scale(1.12) }
  70% { transform: translateY(1px) scale(0.96) }
  100% { transform: translateY(0) scale(1) }
}

/* нажатие карточки на тач-устройствах: объёмный «вдавливающийся» наклон */
.pcard:active {
  transform: perspective(700px) rotateX(5deg) scale(0.96) translateY(2px);
}

/* мягкое дыхание CTA — тень пульсирует */
.cta-main { animation: ctaGlow 2.8s ease-in-out infinite; }
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 12px 26px rgba(0, 102, 196, 0.35) }
  50% { box-shadow: 0 12px 34px rgba(0, 102, 196, 0.55) }
}

/* ripple: волна от точки тапа (JS спавнит span.ripple) */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0); opacity: 0.9;
  animation: rippleOut 0.55s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut { to { transform: scale(2.4); opacity: 0 } }

/* конфетти при успешной заявке (как в досье Миши) */
.confetti-wrap { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti {
  position: absolute; top: -16px; width: 9px; height: 13px;
  border-radius: 3px; opacity: 0.95;
  animation: confettiFall var(--d, 2.2s) cubic-bezier(0.2, 0.55, 0.45, 1) forwards;
}
@keyframes confettiFall {
  to { transform: translate3d(var(--dx, 0px), 106vh, 0) rotate(var(--rot, 540deg)); opacity: 0.9 }
}

/* 3D-tilt карточек на устройствах с hover (координаты задаёт JS) */
@media (hover: hover) {
  .pcard.tilt {
    transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    box-shadow: 0 20px 42px rgba(6, 67, 123, 0.20);
    transition: transform 0.12s ease-out, box-shadow 0.35s var(--ease);
  }
  .pcard.tilt::after { opacity: 1; }
}

/* линия между этапами «прорастает» при появлении */
.stages .stage + .stage::before {
  animation: lineGrow 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.14s);
  transform-origin: top center;
}
@keyframes lineGrow { from { transform: scaleY(0) } to { transform: scaleY(1) } }

/* модули-плитки влетают каскадом */
.modules-grid .module {
  animation: modIn 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.045s);
}
@keyframes modIn {
  from { opacity: 0; transform: translateY(10px) rotateX(14deg) scale(0.96) }
  to { opacity: 1; transform: none }
}

/* magnetic-кнопки: притягиваются к курсору (transform задаёт JS) */
@media (hover: hover) {
  .cta-main { will-change: transform; }
}

/* доступность */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
