/* ═══════════════════════════════════════════
   KAI — Цифровые двойники / ИИ-аватары
   Тёмная тема · оранжевый акцент
   ═══════════════════════════════════════════ */

:root {
  --bg:        #000000;
  --bg-1:      #08080a;
  --surface:   #0d0d10;
  --surface-2: #131317;
  --border:    #222228;
  --border-2:  #2c2c34;

  --text:      #f4f4f6;
  --text-2:    #b0b0b8;
  --text-3:    #6d6d78;
  --muted:     #3a3a42;

  --accent:      #ff5a1f;
  --accent-2:    #ff7a3c;
  --accent-deep: #d63e0a;
  --accent-glow: rgba(255, 90, 31, 0.45);

  --font-display: "Unbounded", sans-serif;
  --font-body:    "Inter Tight", system-ui, sans-serif;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 80px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

a { color: inherit; text-decoration: none; }

/* ─── Reveal on load ─── */
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════ НАВИГАЦИЯ ═══════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 20px var(--pad);
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
  backdrop-filter: blur(6px);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px; letter-spacing: -.02em;
}
.logo-dot { color: var(--accent); }
.nav-links {
  display: flex; gap: 34px; margin: 0 auto;
  font-size: 15px; color: var(--text-2);
}
.nav-links a { position: relative; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--accent);
}
.btn-cta {
  background: #fff; color: #000;
  font-weight: 600; font-size: 15px;
  padding: 13px 28px; border-radius: 2px;
  transition: transform .2s, box-shadow .2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,.15); }

.burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.burger span { width: 26px; height: 2px; background: var(--text); transition: .3s; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 0 var(--pad);
  overflow: hidden;
}

/* Свечение, следующее за курсором (на фоне, за текстом и аватаром) */
.hero-cursor {
  position: absolute; top: 0; left: 0;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(255, 90, 31, 0.34) 0%,
    rgba(255, 90, 31, 0.12) 42%,
    transparent 68%);
  filter: blur(48px);
  pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity .45s ease;
  transform: translate3d(var(--gx, -9999px), var(--gy, -9999px), 0);
  will-change: transform, opacity;
}
.hero.cursor-active .hero-cursor { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-cursor { display: none; }
}

.hero-type {
  position: absolute; left: 0; right: 0; top: 15vh;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display);
  font-weight: 500; line-height: .82; text-align: center;
  pointer-events: none; z-index: 1;
}
.hero-type .line { display: block; letter-spacing: -.03em; }
.hero-type .line-1 {
  font-size: clamp(48px, 12vw, 168px);
  color: var(--text);
  animation: rise .9s ease both;
}
.hero-type .line-2 {
  font-size: clamp(56px, 15vw, 210px);
  color: #17171b; /* «утопленная» вторая строка как в референсе */
  animation: rise .9s ease .08s both;
}

.hero-visual {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: clamp(360px, 50vw, 680px); height: 88vh;
  z-index: 2;
}
.hero-img {
  position: absolute; inset: 0;
  background-image: url("photos/muravei.png");
  background-size: contain; background-position: bottom center; background-repeat: no-repeat;
  /* Мягко растворяем края квадратного кадра в чёрном фоне страницы */
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 52%, transparent 82%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 46%, #000 52%, transparent 82%);
}
/* Тёплое свечение под аватаром — поддерживает акцент */
.hero-glow {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%);
  width: 50%; height: 45%;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
  filter: blur(50px); z-index: -1; opacity: .5;
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.5} 50%{opacity:.9} }

/* Левый оффер-блок */
.hero-left {
  position: absolute; left: var(--pad); top: 46vh; max-width: 340px; z-index: 3;
  animation: rise .9s ease .2s both;
}
.eyebrow {
  font-size: 14px; color: var(--text); font-weight: 500;
  margin-bottom: 14px;
}
.hero-sub { font-size: 15px; color: var(--text-2); line-height: 1.55; }

.hero-tags {
  position: absolute; left: var(--pad); bottom: 130px; display: flex; gap: 12px; z-index: 3;
  animation: rise .9s ease .3s both;
}
.tag {
  border: 1px solid var(--border-2); border-radius: 40px;
  padding: 11px 24px; font-size: 14px; color: var(--text-2);
  transition: border-color .2s, color .2s;
}
.tag:hover { border-color: var(--accent); color: var(--text); }

.hero-bottom {
  position: absolute; left: var(--pad); bottom: 46px; display: flex; align-items: center; gap: 34px; z-index: 3;
  animation: rise .9s ease .4s both;
}
.btn-read {
  background: linear-gradient(180deg, #1a1a1e, #0c0c0e);
  border: 1px solid var(--border-2);
  padding: 18px 46px; font-size: 15px; font-weight: 500;
  border-radius: 2px; transition: .2s;
}
.btn-read:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px var(--accent-glow); }
.btn-play { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.play-ico { color: var(--accent); font-size: 13px; }

.hero-stats {
  position: absolute; right: var(--pad); bottom: 46px; display: flex; gap: 18px; z-index: 3;
  animation: rise .9s ease .5s both;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 26px 30px 22px; min-width: 150px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.stat-num { font-family: var(--font-display); font-weight: 600; font-size: 40px; letter-spacing: -.03em; }
.stat-label { font-size: 13px; color: var(--text-3); margin-top: 10px; line-height: 1.35; }

/* ═══════════ ОБЩИЕ СЕКЦИИ ═══════════ */
.section { padding: clamp(80px, 12vh, 160px) var(--pad); max-width: var(--maxw); margin: 0 auto; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; margin-bottom: 72px; }
.sec-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 5.4vw, 68px); line-height: .98; letter-spacing: -.03em;
  text-transform: uppercase;
}
.sec-title .muted { color: var(--muted); }
.sec-note { color: var(--text-3); font-size: 15px; text-align: right; line-height: 1.6; max-width: 320px; margin-left: auto; }

/* ═══════════ ВОЗМОЖНОСТИ ═══════════ */
.features { position: relative; }
/* Анимированный фон-волна из точек (Three.js-эффект, портирован на canvas) */
.dotted-surface {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; height: 100%;
  z-index: 0; pointer-events: none;
  /* мягко гасим точки у верх/низ, чтобы фон сливался с соседними секциями */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%);
}
.features .sec-head, .features .cards { position: relative; z-index: 1; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  padding: 40px 34px; border-radius: 6px; min-height: 420px;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  /* полупрозрачная подложка — сквозь неё видно точки-волну */
  background: rgba(19, 19, 23, 0.55);
  transition: .3s;
}
.card--hl { background: rgba(19, 19, 23, 0.72); }
.card:hover { background: rgba(28, 28, 34, 0.72); border-color: var(--border-2); transform: translateY(-6px); }
.card-ico {
  width: 54px; height: 54px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 24px; margin-bottom: auto;
  box-shadow: 0 8px 30px var(--accent-glow);
}
.card-title {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  font-size: 30px; line-height: .98; letter-spacing: -.02em; margin: 34px 0 18px;
}
.card-text { color: var(--text-3); font-size: 15px; line-height: 1.6; }

/* ═══════════ ТАРИФЫ ═══════════ */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.tier {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 36px 32px 34px;
  display: flex; flex-direction: column; transition: .3s;
}
.tier:hover { transform: translateY(-6px); border-color: var(--border-2); }
.tier--hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 30px 80px rgba(255,90,31,.12); }
.tier-badge {
  position: absolute; top: 22px; right: 24px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 40px; text-transform: uppercase; letter-spacing: .04em;
}
.tier-ico {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 30px;
}
.tier-ico--hl { background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 26px var(--accent-glow); }
.tier-name { font-family: var(--font-display); font-weight: 600; font-size: 28px; letter-spacing: -.02em; }
.tier-desc { color: var(--text-3); font-size: 14px; margin: 12px 0 26px; max-width: 220px; line-height: 1.5; }
.tier-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 26px; }
.tier-price .price { font-family: var(--font-display); font-weight: 600; font-size: 52px; letter-spacing: -.03em; }
.tier-price .per { color: var(--text-3); font-size: 17px; }
.tier-feat-label { font-size: 18px; font-weight: 500; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tier-list { list-style: none; display: flex; flex-direction: column; gap: 15px; margin-bottom: 32px; flex: 1; }
.tier-list li { position: relative; padding-left: 32px; font-size: 15px; color: var(--text-2); }
.tier-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--border-2); color: var(--accent);
  font-size: 11px; display: grid; place-items: center;
}
.tier-btn {
  text-align: center; padding: 17px; border-radius: 6px;
  border: 1px solid var(--border-2); color: var(--text);
  font-size: 15px; font-weight: 500; transition: .2s;
}
.tier-btn:hover { border-color: var(--accent); background: rgba(255,90,31,.06); }
.tier-btn--hl { border-color: var(--accent); background: rgba(255,90,31,.08); }
.tier-btn--hl:hover { background: var(--accent); color: #fff; }

/* ═══════════ КЕЙСЫ / ЦИФРЫ ═══════════ */
.cases-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px; align-items: stretch; }
.case-big {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--surface), var(--bg-1));
  border: 1px solid var(--border); border-radius: 12px; padding: 46px;
  margin-bottom: 4px;
}
.case-lead { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin-top: 14px; max-width: 780px; }
.case-num { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 34px 30px; }
.case-num .cn { font-family: var(--font-display); font-weight: 600; font-size: 46px; color: var(--accent); letter-spacing: -.03em; }
.case-num .cl { color: var(--text-3); font-size: 14px; margin-top: 12px; line-height: 1.4; }

/* ═══════════ ФОРМА ═══════════ */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-note { text-align: left; margin-left: 0; margin-top: 24px; max-width: 380px; font-size: 16px; color: var(--text-2); }
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label { font-size: 14px; color: var(--text-3); }
.field input, .field select, .field textarea {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 15px 18px; color: var(--text);
  font-family: var(--font-body); font-size: 15px; transition: border-color .2s;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,90,31,.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.form-btn {
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  padding: 18px; border-radius: 6px; font-size: 16px; font-weight: 600;
  font-family: var(--font-body); transition: .2s; margin-top: 6px;
}
.form-btn:hover { background: var(--accent-2); box-shadow: 0 12px 40px var(--accent-glow); }
.form-status { font-size: 14px; color: var(--accent-2); min-height: 18px; }

/* ═══════════ ФУТЕР ═══════════ */
.footer {
  border-top: 1px solid var(--border); padding: 60px var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.foot-logo { font-family: var(--font-display); font-weight: 700; font-size: 28px; }
.foot-slogan { color: var(--text-3); font-size: 15px; }
.foot-meta { display: flex; gap: 28px; align-items: center; color: var(--text-3); font-size: 14px; }
.foot-meta a:hover { color: var(--text); }

/* ═══════════ ПОП-АП «ЗАЯВКА ПРИНЯТА» ═══════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 48px 36px 36px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,90,31,.08);
  transform: scale(.9) translateY(10px); opacity: 0;
  transition: transform .38s cubic-bezier(.2,.8,.2,1), opacity .38s ease;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); opacity: 1; }

.modal-check { width: 92px; height: 92px; margin: 0 auto 26px; }
.modal-check svg { width: 100%; height: 100%; }
.mc-circle {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-dasharray: 151; stroke-dashoffset: 151;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.mc-check {
  fill: none; stroke: var(--accent); stroke-width: 3.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 42; stroke-dashoffset: 42;
}
.modal-overlay.open .mc-circle { animation: mc-draw-circle .55s ease forwards; }
.modal-overlay.open .mc-check { animation: mc-draw-check .35s .45s ease forwards; }
@keyframes mc-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes mc-draw-check { to { stroke-dashoffset: 0; } }

.modal-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; letter-spacing: -.02em; margin-bottom: 12px;
}
.modal-text { color: var(--text-2); font-size: 16px; line-height: 1.55; margin-bottom: 30px; }
.modal-btn {
  width: 100%; padding: 16px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; border-radius: 8px;
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  transition: background .2s, box-shadow .2s;
}
.modal-btn:hover { background: var(--accent-2); box-shadow: 0 12px 40px var(--accent-glow); }

@media (prefers-reduced-motion: reduce) {
  .modal, .mc-circle, .mc-check { transition: none; animation: none; }
  .modal-overlay.open .mc-circle, .modal-overlay.open .mc-check { stroke-dashoffset: 0; }
}

/* ═══════════ АДАПТИВ ═══════════ */
@media (max-width: 980px) {
  .cards, .tiers { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .sec-note { text-align: left; margin-left: 0; }
  .card { min-height: auto; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg-1); border-top: 1px solid var(--border);
    transform: translateY(-140%); transition: transform .35s; z-index: 90;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 18px var(--pad); border-bottom: 1px solid var(--border); }
  .nav-links a.active::after { display: none; }
  .btn-cta { display: none; }
  .burger { display: flex; margin-left: auto; }

  .hero { min-height: auto; padding-top: 96px; padding-bottom: 40px; }
  .hero-type { position: static; margin-bottom: 20px; }
  .hero-visual { position: relative; left: auto; transform: none; width: 100%; height: 52vh; margin: 0 auto; }
  .hero-left, .hero-tags, .hero-bottom, .hero-stats { position: static; max-width: none; margin-top: 26px; }
  .hero-bottom { flex-wrap: wrap; gap: 20px; }
  .hero-stats { flex-wrap: wrap; }
  .stat { flex: 1; min-width: 130px; }
  .cases-grid { grid-template-columns: 1fr; }
}
