@import url('../assets/fonts/fonts.css');

:root {
  --cream: #f5f3ee;
  --cream-2: #ece8e0;
  --dark: #101013;
  --dark-2: #17171b;
  --ink: #16171b;
  --ink-dim: #6c6c72;
  --paper: #f1efe9;
  --paper-dim: #85858c;
  --accent: #4550e6;
  --accent-light: #6c76f0;
  --hairline-light: rgba(22, 23, 27, 0.12);
  --hairline-dark: rgba(241, 239, 233, 0.14);
  --radius: 18px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Unbounded', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 96px 0;
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

.section--dark {
  background: var(--dark);
  color: var(--paper);
}
.section--cream2 { background: var(--cream-2); }

.kicker {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section--dark .kicker { color: var(--accent-light); }

.dim { color: var(--ink-dim); }
.section--dark .dim { color: var(--paper-dim); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  box-shadow: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { opacity: 0.92; }
.btn--ghost-dark { background: rgba(36, 37, 46, 0.9); backdrop-filter: blur(6px); color: var(--paper); border: 1px solid rgba(241, 239, 233, 0.28); box-shadow: 0 8px 24px -10px rgba(69, 80, 230, 0.3); }
.btn--ghost-dark:hover { border-color: rgba(108, 118, 240, 0.5); }
.btn--ghost-light { background: transparent; color: var(--ink); border: 1px solid var(--hairline-light); }
.btn--tg { background: #29a9eb; color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 13px; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 243, 238, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-light);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.logo span { color: var(--accent); }
.logo-group { display: flex; align-items: baseline; gap: 10px; }
.logo-tagline {
  font-size: 12.5px;
  color: var(--ink-dim);
  font-weight: 500;
  white-space: nowrap;
  padding-left: 10px;
  border-left: 1px solid var(--hairline-light);
}
@media (max-width: 720px) { .logo-tagline { display: none; } }
.nav {
  display: flex;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}
.nav a {
  padding: 9px 16px;
  border-radius: 100px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nav a:hover {
  background: var(--cream-2);
  color: var(--accent);
}
.nav a:active { transform: scale(0.96); }
@media (max-width: 860px) { .nav { display: none; } }

/* Hero */
.hero {
  background: var(--dark);
  color: var(--paper);
  padding: 210px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-sphere-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1100px, 92vw);
  height: min(1100px, 92vw);
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}
#sphereCanvas { width: 100%; height: 100%; display: block; }
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(241, 239, 233, 0.12);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}
.orbit--1 {
  width: min(1180px, 96vw);
  height: min(1180px, 96vw);
  margin: calc(min(1180px, 96vw) / -2) 0 0 calc(min(1180px, 96vw) / -2);
  animation: orbit-spin 34s linear infinite;
}
.orbit--2 {
  width: min(1260px, 102vw);
  height: min(1260px, 102vw);
  margin: calc(min(1260px, 102vw) / -2) 0 0 calc(min(1260px, 102vw) / -2);
  border-color: rgba(108, 118, 240, 0.2);
  animation: orbit-spin 50s linear infinite reverse;
}
.orbit-dot {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 10px 2px rgba(108, 118, 240, 0.55);
  transform: translateX(-50%);
}
.orbit-dot--b {
  top: auto;
  bottom: -3px;
  background: var(--paper);
  box-shadow: 0 0 8px 2px rgba(241, 239, 233, 0.4);
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 720px 560px at 50% 42%, rgba(16, 16, 19, 0.82) 0%, rgba(16, 16, 19, 0.55) 45%, rgba(16, 16, 19, 0) 78%);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 64px);
  max-width: 880px;
  margin-top: 8px;
}
.hero h1 .accent { color: var(--accent-light); }
.hero p.lead {
  max-width: 620px;
  margin: 22px 0 40px;
  font-size: 18px;
  color: var(--paper-dim);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 56px; }

/* Search / funnel widget */
.funnel {
  width: 100%;
  max-width: 640px;
  background: rgb(34, 35, 43);
  border: 1px solid rgba(241, 239, 233, 0.24);
  border-radius: 22px;
  padding: 6px;
  text-align: left;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 0 1px rgba(108, 118, 240, 0.12), 0 12px 40px -12px rgba(69, 80, 230, 0.35), 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}
/* сама область с данными (открытый список вопросов/чипов) — полностью непрозрачный
   фон, чтобы анимация сферы за спиной не просвечивала и не мелькала */
.funnel-body {
  background: rgb(30, 31, 38);
  border-radius: 0 0 18px 18px;
}
.funnel-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.funnel-input-row svg { flex-shrink: 0; opacity: 0.6; }
.funnel-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}
.funnel-input-row input::placeholder { color: var(--paper-dim); }
.funnel-body {
  display: none;
  padding: 4px 12px 16px;
  border-top: 1px solid var(--hairline-dark);
  margin-top: 4px;
}
.funnel.open .funnel-body { display: block; }
.funnel-msg {
  font-size: 14px;
  color: var(--paper-dim);
  padding: 12px 4px 4px;
}
.funnel-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 4px 4px;
}
.funnel-choice {
  padding: 9px 15px;
  border-radius: 100px;
  border: 1px solid var(--hairline-dark);
  color: var(--paper);
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  font-family: 'Inter', sans-serif;
}
.funnel-choice:hover { border-color: var(--accent-light); color: var(--accent-light); }
.funnel-estimate {
  padding: 16px 4px 4px;
}
.funnel-estimate .num {
  font-family: 'Unbounded', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--paper);
}
.funnel-estimate .note {
  font-size: 13px;
  color: var(--paper-dim);
  margin-top: 6px;
}
.funnel-loading { padding: 14px 4px; font-size: 14px; color: var(--paper-dim); }
.funnel-loading .dots::after { content: '...'; }

/* Scroll reveal statement */
.statement {
  background: var(--dark);
  color: var(--paper);
  padding: 40px 0 130px;
}
.statement .container { max-width: 920px; }
#revealText {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.35;
}
.rv { color: rgba(241, 239, 233, 0.16); transition: color 0.15s linear; }
.rv.on { color: var(--paper); }

/* Services grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: 0 12px 30px -18px rgba(22, 23, 27, 0.18);
}
.card .letter {
  font-family: 'Unbounded', sans-serif;
  font-size: 34px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 14px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--ink-dim); margin: 0; }

/* Compare: classic vs AI-onboard */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 820px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  border-radius: var(--radius);
  padding: 38px 32px;
}
.compare-card--light { background: #fff; border: 1px solid var(--hairline-light); }
.compare-card--hi { background: var(--dark); color: var(--paper); border: 1px solid var(--hairline-dark); }
.compare-card .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.compare-card--light .badge { background: var(--cream-2); color: var(--ink-dim); }
.compare-card--hi .badge { background: var(--accent-light); color: var(--dark); }
.compare-card h3 { font-size: 22px; margin-bottom: 6px; }
.compare-card .compare-sub { font-size: 13.5px; margin-bottom: 22px; }
.compare-card--light .compare-sub { color: var(--ink-dim); }
.compare-card--hi .compare-sub { color: var(--paper-dim); }
.compare-card ul { margin: 0 0 26px; padding-left: 0; list-style: none; }
.compare-card li { font-size: 14px; padding: 9px 0 9px 22px; position: relative; }
.compare-card li::before { content: '\2014'; position: absolute; left: 0; color: var(--ink-dim); }
.compare-card--hi li::before { color: var(--paper-dim); }

/* Process */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h4 { font-size: 16px; margin-bottom: 8px; font-family: 'Unbounded', sans-serif; font-weight: 700; }
.step p { font-size: 14px; color: var(--ink-dim); margin: 0; }

/* Portfolio */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 980px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-cards { grid-template-columns: 1fr; } }
.pf-card {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px -18px rgba(22, 23, 27, 0.18);
  display: flex;
  flex-direction: column;
}
.pf-card__img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--hairline-light);
}
.pf-card__top {
  padding: 22px 22px 0;
}
.pf-card__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.pf-card h3 { font-size: 18px; margin: 8px 0 8px; }
.pf-card p { font-size: 13.5px; color: var(--ink-dim); margin: 0 0 18px; flex: 1; }
.pf-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--hairline-light);
  margin-top: auto;
}
.pf-card__price { font-size: 13px; font-weight: 600; }
.pf-card__link { font-size: 13px; font-weight: 600; color: var(--accent); }

/* Pricing */
.price-table {
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  padding: 8px 0;
  margin-top: 24px;
}
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--hairline-light);
  gap: 20px;
}
.price-row:last-child { border-bottom: none; }
.price-row .name { font-weight: 600; font-size: 15px; }
.price-row .desc { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
.price-row .val { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 16px; white-space: nowrap; }
.price-tabs { display: flex; gap: 10px; margin-top: 40px; flex-wrap: wrap; }
.price-tab {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--hairline-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
}
.price-tab.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.price-panel { display: none; }
.price-panel.active { display: block; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--hairline-light);
  padding: 22px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; color: var(--accent); font-weight: 400; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 14px 0 0; color: var(--ink-dim); font-size: 14.5px; max-width: 760px; }

/* Footer / closing dark */
.footer {
  background: var(--dark);
  color: var(--paper);
  padding: 90px 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--hairline-dark);
}
.footer h2 { font-size: clamp(26px, 4vw, 40px); max-width: 560px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-size: 13px;
  color: var(--paper-dim);
}
.footer-bottom a { color: var(--paper-dim); }
.footer-bottom a:hover { color: var(--paper); }

/* Sticky mobile TG button */
.sticky-tg {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 90;
  display: none;
  width: 52px;
  height: 52px;
  padding: 0;
  justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4);
}
@media (max-width: 720px) { .sticky-tg { display: block; } }

/* Modal wizard (detailed TOR) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 19, 0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: 22px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 34px 30px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline-light);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}
.modal-progress {
  height: 4px;
  background: var(--hairline-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 26px;
}
.modal-progress__bar { height: 100%; background: var(--accent); width: 10%; transition: width 0.3s ease; }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
.modal .modal-hint { font-size: 13.5px; color: var(--ink-dim); margin-bottom: 20px; }
.modal input[type=text], .modal input[type=email], .modal textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--hairline-light);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  margin-bottom: 10px;
  background: #fff;
}
.modal textarea { min-height: 90px; resize: vertical; }
.modal-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.modal-choice {
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid var(--hairline-light);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}
.modal-choice.selected, .modal-choice:hover { border-color: var(--accent); color: var(--accent); }
.modal-emoji-scale { display: flex; gap: 10px; margin: 6px 0 10px; }
.modal-emoji-scale button {
  font-size: 24px;
  background: #fff;
  border: 1px solid var(--hairline-light);
  border-radius: 12px;
  width: 48px; height: 48px;
  cursor: pointer;
}
.modal-emoji-scale button.selected { border-color: var(--accent); background: var(--cream-2); }
.modal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.modal-reassure { font-size: 12px; color: var(--ink-dim); margin-top: 14px; text-align: center; }
