/* «Три точки» — сайт команды. Фон плавно идёт от чёрного (заставка) к светлому тёплому синему (работы и ниже):
   JS меняет --bg и --fg по прокрутке. */
:root {
  --black: #0d0c11;
  --blue: #cddcf0;          /* светлый тёплый синий */
  --bg: var(--black);
  --fg: #f4f2f7;
  --ink: #16131f;
  --muted-dark: #9a96a6;
  --muted-light: #5e6475;
  --white: #ffffff;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.55; overflow-x: hidden;
  transition: background-color .1s linear; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 860px; }
.h2 { font-family: var(--display); font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.lead { font-size: 18px; color: var(--muted-light); margin: 14px 0 0; max-width: 560px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 16px;
  font-weight: 800; font-size: 16px; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--ink); box-shadow: 0 10px 30px rgba(255, 255, 255, .12); }
.btn-ghost-light { border: 1.5px solid rgba(255, 255, 255, .28); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(22, 19, 31, .2); }
.btn-ghost-dark { border: 1.5px solid rgba(22, 19, 31, .2); color: var(--ink); }

/* кнопки справа */
.rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.rail-btn { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; position: relative;
  background: rgba(255, 255, 255, .12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .04em;
  transition: background .2s, color .2s, transform .15s; }
.rail-btn:hover { transform: scale(1.06); }
.rail-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn svg .f { fill: currentColor; stroke: none; }
.rail-btn.accent { background: #fff; color: var(--ink); }
.rail-btn[data-tip]:after { content: attr(data-label); position: absolute; right: 64px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.rail-btn[data-tip]:hover:after { opacity: 1; }
body.light .rail-btn { background: rgba(22, 19, 31, .08); border-color: rgba(22, 19, 31, .14); color: var(--ink); }
body.light .rail-btn.accent { background: var(--ink); color: #fff; }

/* панели */
.panel { position: fixed; inset: 0; z-index: 70; background: rgba(8, 8, 12, .45); backdrop-filter: blur(6px); display: flex; justify-content: flex-end; align-items: center; padding: 22px 92px 22px 22px; }
.panel-card { background: #fff; color: var(--ink); border-radius: 26px; padding: 26px; width: 300px; display: flex; flex-direction: column; gap: 4px; position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); animation: pop .25s ease; }
.panel-card a:not(.btn) { font-family: var(--display); font-weight: 700; font-size: 20px; padding: 10px 0; border-bottom: 1px solid #eee; }
.panel-x { position: absolute; right: 14px; top: 10px; font-size: 28px; color: #999; line-height: 1; }
.panel-card.support { width: 340px; gap: 12px; }
.sp-head { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.sp-head img { width: 44px; filter: invert(1); }
.panel-card.support p { color: #5f5b6b; }
.panel-card.support .btn-light { background: var(--ink); color: #fff; }
.panel-card.support .btn-ghost-light { border-color: #ddd; color: var(--ink); }
@keyframes pop { from { transform: translateY(12px) scale(.97); opacity: 0; } }

/* 1. заставка */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; }
.hero-in { max-width: 1180px; margin: 0 auto; padding: 40px 110px 80px 28px; width: 100%; display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; }
.chat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.chat-head img { width: 44px; }
.chat-head b { display: block; font-family: var(--display); font-size: 16px; }
.chat-head span { font-size: 14px; color: var(--muted-dark); }
.bubble-msg { background: #fff; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.1vw, 40px); line-height: 1.12;
  letter-spacing: -.02em; padding: 26px 30px; border-radius: 30px 30px 30px 8px; min-height: 2.3em; max-width: 620px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .45s, transform .45s; }
.bubble-msg.show { opacity: 1; transform: none; }
.caret { display: inline-block; width: 3px; height: .9em; background: var(--ink); margin-left: 4px; vertical-align: -0.08em; animation: blink 1s steps(1) infinite; }
.bubble-msg.done .caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { color: var(--muted-dark); max-width: 520px; margin-top: 22px; opacity: 0; transition: opacity .6s .1s; }
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; opacity: 0; transform: translateY(10px); transition: opacity .6s .25s, transform .6s .25s; }
.hero.ready .hero-sub, .hero.ready .hero-ctas { opacity: 1; transform: none; }
.hero-3d { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: center; }
#logo3d { width: 100%; height: 100%; display: block; }
.logo-fallback { position: absolute; inset: 12%; display: grid; place-items: center; }
.logo-fallback img { width: 100%; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted-dark); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transition: opacity .6s .5s; }
.hero.ready .scroll-hint { opacity: 1; }
.scroll-hint i { width: 22px; height: 34px; border: 2px solid currentColor; border-radius: 12px; position: relative; }
.scroll-hint i:after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: currentColor; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* 2. работы — переписка */
.works { padding: 120px 0 80px; color: var(--ink); }
.works .h2 { color: var(--ink); }
.thread { margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; align-items: flex-end; max-width: 100%; opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .5s, transform .5s cubic-bezier(.2, .9, .3, 1.2); }
.msg.in { opacity: 1; transform: none; }
.msg .ava { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.msg .ava img { width: 26px; }
.msg .ava.ghost { visibility: hidden; }
.b { background: #fff; border-radius: 24px 24px 24px 6px; padding: 14px 18px; box-shadow: 0 10px 30px rgba(40, 60, 100, .12); max-width: 620px; font-size: 17px; }
.b.typing { padding: 16px 20px; display: inline-flex; gap: 6px; }
.b.typing i { width: 9px; height: 9px; border-radius: 50%; background: #9aa2b4; animation: tdot 1s infinite; }
.b.typing i:nth-child(2) { animation-delay: .15s; } .b.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
.b.card { padding: 10px; width: min(620px, 100%); }
.shot { position: relative; border-radius: 16px; overflow: hidden; background: #e8eef7; aspect-ratio: 16 / 10; }
.shot .desk { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot .phone { position: absolute; right: 4%; bottom: -6%; width: 21%; border-radius: 16px; border: 5px solid #111; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); background: #111; }
.card-body { padding: 14px 10px 8px; }
.card-body h3 { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.card-body p { color: var(--muted-light); font-size: 15.5px; margin-top: 4px; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.open { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 13px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; }
.open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.time { font-size: 12.5px; color: #9aa2b4; display: flex; align-items: center; gap: 4px; }
.time svg { width: 16px; height: 16px; fill: none; stroke: #5b8def; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.msg.me { justify-content: flex-end; }
.msg.me .b { background: var(--ink); color: #fff; border-radius: 24px 24px 6px 24px; }

/* 3. почему мы */
.why { padding: 90px 0; color: var(--ink); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.why-card { background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); border-radius: var(--r); padding: 24px; backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.why-card.in { opacity: 1; transform: none; }
.why-card .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.why-card .ic svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.why-card h3 { font-family: var(--display); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.why-card p { color: var(--muted-light); font-size: 15.5px; }

/* 5. калькулятор */
.price { padding: 90px 0; color: var(--ink); }
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 44px; align-items: start; }
.calc > *, .contact-card > * { min-width: 0; }
.calc-q { background: rgba(255, 255, 255, .72); border-radius: 28px; padding: 30px; border: 1px solid #fff; }
.q + .q { margin-top: 26px; }
.q-t { font-weight: 800; margin-bottom: 12px; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opts button { padding: 13px 18px; border-radius: 14px; background: #fff; border: 1.5px solid rgba(22, 19, 31, .1); font-weight: 700; font-size: 15.5px; transition: all .15s; }
.opts.big button { flex: 1; min-width: 150px; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.opts.big button span { font-weight: 500; font-size: 13.5px; color: var(--muted-light); }
.opts button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.opts button.on span { color: #c9c5d4; }
.calc-out { background: var(--ink); color: #fff; border-radius: 28px; padding: 30px; position: sticky; top: 24px; }
.co-label { color: #a7a3b4; font-size: 14px; }
.co-price { font-family: var(--display); font-weight: 800; font-size: 58px; line-height: 1.1; margin: 6px 0 18px; }
.co-price small { font-size: 22px; font-weight: 700; }
.co-list { list-style: none; display: grid; gap: 9px; font-size: 15.5px; }
.co-list li { padding-left: 24px; position: relative; color: #dcd9e4; }
.co-list li:before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.co-note { font-size: 13.5px; color: #a7a3b4; margin: 16px 0 22px; }
.calc-out .btn-dark { background: #fff; color: var(--ink); width: 100%; }

/* 6. контакты */
.contact { padding: 90px 0 110px; color: var(--ink); }
.contact-card { background: #fff; border-radius: 34px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; box-shadow: 0 30px 80px rgba(40, 60, 100, .14); }
.direct { margin-top: 28px; display: grid; gap: 10px; }
.direct > span { font-size: 14px; color: var(--muted-light); }
.phone { font-family: var(--display); font-weight: 700; font-size: 28px; }
.direct-btns { display: flex; gap: 8px; }
.chip { padding: 10px 16px; border-radius: 12px; background: #eef2f8; font-weight: 700; font-size: 15px; }
.official { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-weight: 700; font-size: 15px; }
.official svg { width: 22px; height: 22px; fill: none; stroke: #2e9e5b; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.form { display: grid; gap: 14px; align-content: start; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted-light); }
.form input, .form select { height: 54px; border-radius: 14px; border: 1.5px solid #e2e6ee; padding: 0 16px; font: inherit; color: var(--ink); background: #f8f9fc; }
.form input:focus, .form select:focus { outline: none; border-color: var(--ink); background: #fff; }
.form .btn { width: 100%; }
.form-note { font-size: 13px; color: var(--muted-light); }

.foot { background: var(--black); color: #8e8a9b; padding: 34px 0; font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot img { height: 34px; }

/* адаптив */
@media (max-width: 1000px) {
  .why-grid { grid-template-columns: 1fr 1fr; }
  .calc, .contact-card { grid-template-columns: 1fr; }
  .calc-out { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .rail { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: 12px; transform: none; flex-direction: row; }
  .rail-btn { width: 48px; height: 48px; border-radius: 16px; }
  .rail-btn[data-tip]:after { display: none; }
  .panel { align-items: flex-end; justify-content: center; padding: 16px 16px calc(80px + env(safe-area-inset-bottom, 0px)); }
  .panel-card, .panel-card.support { width: 100%; }
  .hero-in { grid-template-columns: 1fr; padding: 24px 18px 90px; gap: 0; }
  .hero-3d { order: -1; max-width: 300px; margin-bottom: -10px; }
  .bubble-msg { padding: 20px 22px; border-radius: 24px 24px 24px 6px; }
  .hero-ctas .btn { flex: 1; }
  .scroll-hint { display: none; }
  .works { padding: 80px 0 50px; }
  .b { font-size: 16px; }
  .msg .ava { width: 34px; height: 34px; }
  .card-body h3 { font-size: 18px; }
  .why, .price { padding: 60px 0; }
  .why-grid { grid-template-columns: 1fr; gap: 12px; }
  .calc-q, .calc-out { padding: 22px; }
  .co-price { font-size: 46px; }
  .contact { padding: 60px 0 110px; }
  .contact-card { padding: 26px 20px; border-radius: 26px; }
  .phone { font-size: 23px; }
}
@media (max-width: 360px) {
  .btn { padding: 0 16px; font-size: 15px; white-space: normal; text-align: center; }
  .co-price { font-size: 40px; }
  .calc-q, .calc-out { padding: 18px; }
  .opts.big button { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .msg, .why-card, .bubble-msg, .hero-sub, .hero-ctas { opacity: 1 !important; transform: none !important; }
}
