/**
 * ============================================================
 *  style.css — Полные стили лендинга aisaas.ru v3.0.0
 *  Mobile-first, адаптив до 4K, тёмная/светлая тема.
 * ============================================================
 */

/* ===== БАЗА ===== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.grad {
  background: var(--c-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== СЕКЦИИ: общие заголовки ===== */
.section-heading {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  text-align: center;
  color: var(--c-muted);
  font-size: 0.925rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .section-heading { font-size: 2rem; }
  .section-sub { font-size: 1rem; margin-bottom: 3rem; }
}

@media (min-width: 1024px) {
  .section-heading { font-size: 2.25rem; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-grad);
  opacity: 0.04;
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem;
  border-radius: 2rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__domain {
  font-size: 2.25rem;
  font-weight: 900;
  background: var(--c-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.hero__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.hero__brand-part--ai {
  background: #7c3aed;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 1rem;
}

.hero__brand-part--saas {
  background: #3b82f6;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 1rem;
}

.hero__brand-plus {
  color: var(--c-muted);
  font-weight: 600;
  margin: 0 0.1rem;
}

.hero__brand-tld {
  color: var(--c-muted);
  font-weight: 600;
}

.hero__sub {
  font-size: 0.95rem;
  color: var(--c-muted);
  max-width: 580px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.hero__btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: var(--c-grad);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 3rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  letter-spacing: -0.01em;
}

.hero__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124,58,237,0.45);
}

.hero__btn:active {
  transform: scale(0.97);
}

.hero__cta-note {
  font-size: 0.78rem;
  color: var(--c-muted);
}

@media (min-width: 480px) {
  .hero { padding: 4rem 0 3rem; }
  .hero__domain { font-size: 3rem; }
  .hero__brand { font-size: 1.5rem; }
  .hero__brand-part--ai,
  .hero__brand-part--saas { font-size: 1.15rem; }
  .hero__sub { font-size: 1rem; }
}

@media (min-width: 768px) {
  .hero { padding: 5rem 0 4rem; }
  .hero__domain { font-size: 4rem; }
  .hero__brand { font-size: 1.75rem; }
  .hero__brand-part--ai,
  .hero__brand-part--saas { font-size: 1.35rem; padding: 0.25rem 0.75rem; }
  .hero__sub { font-size: 1.1rem; }
  .hero__btn { font-size: 1.1rem; padding: 0.95rem 3rem; }
}

@media (min-width: 1024px) {
  .hero { padding: 6rem 0 5rem; }
  .hero__domain { font-size: 5rem; }
}

/* ============================================================
   WHY
   ============================================================ */
.why {
  padding: 3rem 0;
}

.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.why__card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.why__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--c-shadow);
  border-color: var(--c-accent);
}

.why__icon {
  width: 40px;
  height: 40px;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
}

.why__icon svg {
  width: 100%;
  height: 100%;
}

.why__card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.why__card p {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.5;
}

@media (min-width: 480px) {
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .why { padding: 4rem 0; }
  .why__card { padding: 2rem 1.5rem; }
  .why__card h3 { font-size: 1.05rem; }
  .why__card p { font-size: 0.9rem; }
}

@media (min-width: 1024px) {
  .why__grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 2rem 0 3rem;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stats__item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
}

.stats__num {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  background: var(--c-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stats__unit {
  font-size: 0.9rem;
  font-weight: 700;
}

.stats__label {
  display: block;
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .stats__grid { grid-template-columns: repeat(4, 1fr); }
  .stats__num { font-size: 2.25rem; }
}

@media (min-width: 768px) {
  .stats { padding: 3rem 0 4rem; }
  .stats__item { padding: 1.75rem 1rem; }
  .stats__num { font-size: 2.5rem; }
  .stats__label { font-size: 0.85rem; }
}

/* ============================================================
   FOR (Кому подойдёт)
   ============================================================ */
.for {
  padding: 3rem 0;
}

.for__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.for__card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.for__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--c-shadow);
}

.for__icon {
  width: 40px;
  height: 40px;
  color: var(--c-accent);
  margin: 0 auto 0.75rem;
}

.for__card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.for__card p {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.5;
}

@media (min-width: 480px) {
  .for__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .for { padding: 4rem 0; }
  .for__card { padding: 2rem 1.5rem; }
  .for__icon { width: 40px; height: 40px; }
  .for__card h3 { font-size: 1.1rem; }
  .for__card p { font-size: 0.9rem; }
}

@media (min-width: 1024px) {
  .for__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   OFFER (Форма)
   ============================================================ */
.offer {
  padding: 3rem 0 4rem;
}

.offer__card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--c-shadow);
  max-width: 620px;
  margin: 0 auto;
}

.offer__heading {
  margin-bottom: 0.3rem;
}

.offer__sub {
  margin-bottom: 1.75rem;
}

.offer__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 480px) {
  .offer__fields {
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }
}

@media (min-width: 640px) {
  .offer { padding: 4rem 0 5rem; }
  .offer__card { padding: 2.5rem 2rem; }
}

/* ===== Блок успешной отправки ===== */
.offer__success {
  text-align: center;
  padding: 2rem 0;
  animation: fadeInUp 0.4s ease-out both;
}

.offer__success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--c-success);
}

.offer__success-icon svg {
  width: 100%;
  height: 100%;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.5s 0.2s ease-out forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.offer__success-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.offer__success-text {
  font-size: 0.95rem;
  color: var(--c-muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .offer__success-title { font-size: 1.75rem; }
  .offer__success-text { font-size: 1rem; }
}

/* ===== Поля формы ===== */
.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--c-text);
}

.form-group label small {
  font-weight: 400;
  color: var(--c-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--c-border);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--c-muted);
  opacity: 0.5;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 115px;
  line-height: 1.55;
}

@media (min-width: 480px) {
  .form-group input,
  .form-group textarea {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .form-group textarea { min-height: 125px; }
}

/* Чекбокс */
.form-group--checkbox { margin: 1.25rem 0 1.5rem; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-row input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: var(--c-accent);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.checkbox-row label {
  font-size: 0.775rem;
  color: var(--c-muted);
  cursor: pointer;
  line-height: 1.45;
  font-weight: 400;
}

.checkbox-row a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkbox-row a:hover { color: var(--c-accent-hover); }

@media (min-width: 480px) {
  .checkbox-row label { font-size: 0.8rem; }
}

/* Ошибки */
.field-error {
  color: var(--c-error);
  font-size: 0.775rem;
  margin-top: 0.25rem;
  display: none;
  line-height: 1.3;
}

.form-group.error .field-error,
.form-group--checkbox.error .field-error { display: block; }

.form-group.error input,
.form-group.error textarea { border-color: var(--c-error); }

.form-group.error input:focus,
.form-group.error textarea:focus {
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

/* Кнопка */
.btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--c-grad);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  font-family: inherit;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.4);
}

.btn:active { transform: scale(0.98); }

.btn:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (min-width: 480px) {
  .btn { padding: 0.9rem 1.5rem; font-size: 1.05rem; }
}

/* Статус */
.status-msg {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.875rem;
  min-height: 1.4rem;
  transition: color 0.2s, opacity 0.2s;
  line-height: 1.4;
}

.status-msg.success { color: var(--c-success); }
.status-msg.error { color: var(--c-error); }
.status-msg.sending { color: var(--c-accent); }

@media (min-width: 480px) {
  .status-msg { font-size: 0.9rem; margin-top: 1rem; }
}

/* Honeypot */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding: 3rem 0 4rem;
}

.faq__list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq__item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  overflow: hidden;
}

.faq__item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: color 0.15s;
}

.faq__item summary::after {
  content: '▸';
  font-size: 0.85rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  color: var(--c-muted);
}

.faq__item[open] summary::after {
  transform: rotate(90deg);
}

.faq__item summary:hover {
  color: var(--c-accent);
}

.faq__item p {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.55;
}

@media (min-width: 640px) {
  .faq { padding: 4rem 0 5rem; }
  .faq__item summary { padding: 1.1rem 1.5rem; font-size: 1rem; }
  .faq__item p { padding: 0 1.5rem 1.5rem; font-size: 0.9rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--c-border);
  text-align: center;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-bottom: 0.25rem;
}

.footer__note {
  font-size: 0.75rem;
  color: var(--c-muted);
  opacity: 0.7;
}

@media (min-width: 640px) {
  .footer { padding: 2.5rem 0; }
}

/* ============================================================
   Анимации
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero, .why, .stats, .for, .offer, .faq {
  animation: fadeInUp 0.4s ease-out both;
}

.why { animation-delay: 0.1s; }
.stats { animation-delay: 0.15s; }
.for { animation-delay: 0.2s; }
.offer { animation-delay: 0.25s; }
.faq { animation-delay: 0.3s; }

/* ============================================================
   4K / Сверхширокие
   ============================================================ */
@media (min-width: 2560px) {
  html { font-size: 20px; }
  .wrap { max-width: 1300px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Печать
   ============================================================ */
@media print {
  body { background: #fff; color: #000; }
  .btn, .hero__btn, .stats, .for, .offer, .faq { display: none; }
  .hero__domain, .grad { -webkit-text-fill-color: #000; background: none; color: #000; }
  .why__card { border-color: #ccc; box-shadow: none; }
}
