/* ============================================================
   Recraft.bz — светлая креативная тема (стиль recraft.ai)
   Молочный фон, чёрная типографика, красно-оранжевый акцент
   ============================================================ */
:root {
  --bg: #fbf9f6;
  --bg-2: #f4f0ea;
  --bg-3: #ece7df;
  --card: #ffffff;
  --border: #e6e0d6;
  --text: #141210;
  --text-dim: #6b6459;
  --accent-1: #e8410c;
  --accent-2: #ff8a00;
  --accent-grad: linear-gradient(135deg, #e8410c 0%, #ff8a00 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(20, 20, 40, 0.08);
  --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-1); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 24px; max-width: 1180px; margin: 0 auto;
}
.logo {
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text); white-space: nowrap;
}
.logo::before { content: 'R'; color: #fff; background: var(--accent-grad); border-radius: 8px; padding: 1px 8px; margin-right: 8px; font-size: 17px; font-weight: 800; }
.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 6px; list-style: none; align-items: center; }
.main-nav a {
  color: var(--text-dim); font-size: 15px; padding: 8px 14px;
  border-radius: 8px; transition: all .2s; display: inline-block;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--bg-3); }

/* Dropdown — ВЕРТИКАЛЬНЫЙ */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: '▾'; margin-left: 6px; font-size: 11px; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  display: flex; flex-direction: column;
}
.dropdown-menu li { list-style: none; width: 100%; }
.dropdown-menu a { display: block; padding: 10px 14px; white-space: nowrap; }
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* ---------- Модалка ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 20, 30, 0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 36px; max-width: 480px; width: 100%;
  text-align: center; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  transform: translateY(20px) scale(.97); transition: transform .25s;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-dim);
  font-size: 26px; cursor: pointer; line-height: 1; padding: 4px;
  transition: color .2s;
}
.modal-close:hover { color: var(--text); }
.modal-icon {
  width: 64px; height: 64px; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); border-radius: 50%;
}
.modal-icon svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; }
.modal h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.4px; line-height: 1.3; }
.modal p { color: var(--text-dim); font-size: 15.5px; margin-bottom: 12px; line-height: 1.6; }
.modal p strong { color: var(--text); }
.modal .modal-highlight {
  color: var(--text); font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 18px 0 24px;
}
.modal .btn { width: 100%; padding: 16px 32px; font-size: 17px; }

/* Кнопки */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  padding: 14px 32px; border-radius: 12px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary {
  background: var(--text); color: #fff;
  box-shadow: 0 8px 24px rgba(15, 15, 18, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); background: #2a2a32; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); }
.btn-header { padding: 10px 22px; font-size: 15px; }

/* Бургер */
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ---------- Первый экран ---------- */
.hero {
  padding: 90px 24px 70px;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 40% at 50% 0%, rgba(232, 65, 12, 0.08), transparent),
    var(--bg);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 800; letter-spacing: -1.2px; line-height: 1.15;
  max-width: 900px; margin: 0 auto 22px;
}
.hero h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  color: var(--text-dim); font-size: clamp(17px, 2vw, 20px);
  max-width: 680px; margin: 0 auto 40px;
}

/* Блок чата */
.chat-box {
  max-width: 760px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.chat-box textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; font-family: var(--font); font-size: 16px;
  outline: none; transition: border-color .2s;
}
.chat-box textarea:focus { border-color: var(--accent-1); }
.chat-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ---------- Секции ---------- */
.section { padding: 76px 24px; }
.section-alt { background: var(--bg-2); }
.section h2 {
  font-size: clamp(26px, 3.6vw, 38px); font-weight: 800;
  letter-spacing: -0.8px; margin-bottom: 18px; text-align: center;
}
.section-lead {
  color: var(--text-dim); text-align: center;
  max-width: 720px; margin: 0 auto 48px; font-size: 18px;
}
.text-block { max-width: 800px; margin: 0 auto; }
.text-block p { margin-bottom: 16px; color: var(--text-dim); }
.text-block strong { color: var(--text); }

/* Сетка карточек — flex, неполный ряд по центру */
.cards-grid {
  display: flex; flex-wrap: wrap; gap: 22px; justify-content: center;
}
.cards-grid .card { flex: 1 1 250px; max-width: 340px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 48px; height: 48px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad); border-radius: 12px;
}
.card .icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; }
.card h3 { font-size: 19px; margin-bottom: 10px; font-weight: 700; }
.card p { color: var(--text-dim); font-size: 15px; }

/* Спецификации */
.spec-grid {
  display: grid; gap: 22px; max-width: 900px; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.spec-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.spec-box h3 { font-size: 17px; margin-bottom: 14px; color: var(--accent-1); font-weight: 700; }
.spec-box ul { list-style: none; }
.spec-box li { padding: 7px 0; color: var(--text-dim); border-bottom: 1px solid var(--border); font-size: 15px; }
.spec-box li:last-child { border-bottom: none; }
.spec-box li b { color: var(--text); font-weight: 600; }

/* Шаги */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 16px;
  background: var(--text); border-radius: 50%;
  font-weight: 800; font-size: 19px; color: #fff;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 15px; }

/* Галерея (masonry) */
.gallery { columns: 3 260px; column-gap: 18px; }
.gallery-item {
  break-inside: avoid; margin-bottom: 18px;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative; display: block;
  transition: transform .3s, box-shadow .3s;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: auto; display: block; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff; font-size: 13px; letter-spacing: .5px;
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover figcaption { opacity: 1; }
.gallery-item .ph-label { color: var(--text-dim); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.7; text-align: center; padding: 12px; }

/* Тарифы */
.pricing { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); max-width: 1000px; margin: 0 auto; }
.price-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 30px; text-align: center;
  position: relative; transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.price-card.popular { border-color: var(--text); box-shadow: 0 0 0 1px var(--text), var(--shadow); }
.badge-popular {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 18px; border-radius: 20px; white-space: nowrap;
}
.price-card .price { font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 8px 0 4px; }
.price-card .price span { font-size: 17px; font-weight: 500; color: var(--text-dim); }
.price-card .tokens { color: var(--accent-1); font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.price-card ul { list-style: none; margin-bottom: 26px; flex: 1; }
.price-card li { padding: 7px 0; color: var(--text-dim); font-size: 15px; }

/* Таблица сравнения */
.compare-table { width: 100%; border-collapse: collapse; max-width: 900px; margin: 0 auto; background: var(--card); }
.compare-table th, .compare-table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid var(--border); font-size: 15px;
}
.compare-table th { background: var(--bg-3); font-weight: 700; }
.compare-table td { color: var(--text-dim); }
.compare-table td:first-child { color: var(--text); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* FAQ / аккордеон */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-family: var(--font); font-size: 17px; font-weight: 600;
  padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q::after { content: '+'; font-size: 24px; color: var(--accent-1); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 24px 20px; color: var(--text-dim); font-size: 15.5px; }

/* CTA */
.cta-final {
  text-align: center; padding: 90px 24px;
  background:
    radial-gradient(ellipse 55% 60% at 50% 110%, rgba(232, 65, 12, 0.1), transparent),
    var(--bg-2);
}
.cta-final h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 18px; }
.cta-final p { color: var(--text-dim); margin-bottom: 34px; font-size: 18px; }

/* Хлебные крошки */
.breadcrumbs { padding: 18px 24px 0; font-size: 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: 1180px; margin: 0 auto; }
.breadcrumbs li { color: var(--text-dim); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--border); }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent-1); }
.breadcrumbs [aria-current] { color: var(--text); }

/* Заголовок внутренней страницы */
.page-hero { padding: 60px 24px 30px; text-align: center; }
.page-hero h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.page-hero .lead { color: var(--text-dim); max-width: 720px; margin: 0 auto; font-size: 18px; }

/* Форма */
.form-box { max-width: 620px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-box label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-box input, .form-box textarea {
  width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; font-family: var(--font); font-size: 15px;
  margin-bottom: 18px; outline: none;
}
.form-box input:focus, .form-box textarea:focus { border-color: var(--accent-1); }
.form-note { font-size: 13px; color: var(--text-dim); margin-top: 10px; }

/* ---------- Футер ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 56px 24px 32px; }
.footer-grid {
  max-width: 1180px; margin: 0 auto 36px;
  display: grid; gap: 36px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-col h4 { font-size: 15px; margin-bottom: 14px; color: var(--text); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-dim); font-size: 14.5px; }
.footer-col a:hover { color: var(--accent-1); }
.footer-disclaimer {
  max-width: 1180px; margin: 0 auto 22px; padding: 18px 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13.5px; line-height: 1.6;
}
.footer-bottom {
  max-width: 1180px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  color: var(--text-dim); font-size: 13.5px;
  border-top: 1px solid var(--border); padding-top: 22px;
}
.footer-bottom a { color: var(--text-dim); font-size: 13.5px; }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .burger { display: block; margin-left: auto; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { display: block; padding: 12px 14px; }
  .dropdown-menu { position: static; box-shadow: none; border: none; background: var(--bg-2); margin: 4px 0 8px; opacity: 1; visibility: visible; transform: none; display: none; }
  .nav-dropdown.open .dropdown-menu { display: flex; }
  .btn-header { margin-left: 0; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .section { padding: 54px 20px; }
  .hero { padding: 60px 20px 50px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
