/* ============================================
   FlowFrame — Prototype Styles
   Bold Minimalism + Personality
   ============================================ */

:root {
  /* Brand colors */
  --yellow: #ffc94a;
  --yellow-dim: #fff5d6;
  --coral: #fa8669;
  --coral-dim: #ffe8e0;
  --black: #0f172a;
  --black-deep: #06091a;
  --white: #ffffff;
  --bg-soft: #f7f7fb;
  --indigo: #4f46e5;

  /* Grayscale */
  --g-900: #111827;
  --g-700: #374151;
  --g-600: #4b5563;
  --g-500: #6b7280;
  --g-400: #9ca3af;
  --g-300: #d1d5db;
  --g-200: #e5e7eb;
  --g-100: #f3f4f6;

  /* Typography */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-display: 'Manrope', 'Inter', sans-serif;

  /* Spacing */
  --container-max: 1280px;
  --space-section: 120px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ===== Highlight colors ===== */
.hl-yellow {
  background: linear-gradient(180deg, transparent 60%, var(--yellow) 60%);
  padding: 0 4px;
}
.hl-coral {
  color: var(--coral);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn--primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn--primary:hover {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(255, 201, 74, 0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn--ghost:hover {
  background: var(--black);
  color: var(--white);
}
.btn--large {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 14px;
}

/* ===== Section heads ===== */
.section__head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 64px;
}
.section__pill,
.consultant__pill,
.hero__pill {
  display: inline-block;
  background: var(--black);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--black);
}
.section__subtitle {
  font-size: 19px;
  color: var(--g-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--g-200);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
}
.nav__logo img {
  display: block;
}
.nav__menu {
  display: flex;
  gap: 32px;
  font-weight: 500;
  font-size: 15px;
}
.nav__menu a {
  color: var(--g-700);
  transition: color 0.2s;
}
.nav__menu a:hover {
  color: var(--black);
}
.nav__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang {
  display: flex;
  background: var(--g-100);
  border-radius: 100px;
  padding: 4px;
}
.lang__btn {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  color: var(--g-600);
}
.lang__btn--active {
  background: var(--white);
  color: var(--black);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg-soft) 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: var(--black);
}
.hero__subtitle {
  font-size: 21px;
  line-height: 1.5;
  color: var(--g-600);
  margin-bottom: 36px;
  max-width: 560px;
}
.hero__cta {
  display: flex;
  gap: 16px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  gap: 48px;
  border-top: 2px solid var(--black);
  padding-top: 28px;
}
.stat__num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--black);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 14px;
  color: var(--g-500);
  margin-top: 4px;
}
.hero__visual {
  position: relative;
}
.hero__monkey {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 32px 64px -16px rgba(15, 23, 42, 0.25);
  transform: rotate(2deg);
  transition: transform 0.4s var(--ease);
}
.hero__monkey:hover {
  transform: rotate(0deg) scale(1.02);
}
.hero__badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--yellow);
  padding: 16px 22px;
  border-radius: 16px;
  border: 3px solid var(--black);
  font-family: var(--font-display);
  box-shadow: 6px 6px 0 var(--black);
}
.hero__badge-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-700);
}
.hero__badge-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--black);
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust {
  background: var(--black);
  padding: 48px 0;
  color: var(--white);
}
.trust__label {
  text-align: center;
  color: var(--g-400);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.trust__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.trust__logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--g-400);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.trust__logo:hover {
  color: var(--yellow);
}

/* ============================================
   AI CONSULTANT BLOCK
   ============================================ */
.consultant {
  padding: var(--space-section) 0;
  background: var(--bg-soft);
}
.consultant__head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 56px;
}
.consultant__pill {
  background: var(--coral);
  color: var(--white);
}
.consultant__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.consultant__subtitle {
  font-size: 18px;
  color: var(--g-600);
}
.consultant__chat {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 12px 12px 0 var(--black);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.chat__msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.chat__msg--user {
  justify-content: flex-end;
}
.chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.chat__bubble {
  background: var(--g-100);
  padding: 16px 20px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  max-width: 75%;
  font-size: 16px;
  line-height: 1.5;
}
.chat__bubble p + p {
  margin-top: 12px;
}
.chat__msg--user .chat__bubble {
  background: var(--black);
  color: var(--white);
  border-radius: 18px;
  border-top-right-radius: 4px;
}

.chat__input {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--g-200);
  padding-top: 24px;
}
.chat__field {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid var(--g-200);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.chat__field:focus {
  border-color: var(--black);
}
.consultant__hint {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--g-500);
}
.consultant__hint a {
  color: var(--coral);
  font-weight: 600;
}

/* ============================================
   EXPERTISE CARDS
   ============================================ */
.expertise {
  padding: var(--space-section) 0;
  background: var(--white);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  padding: 32px;
  border-radius: 20px;
  border: 2px solid var(--g-200);
  transition: all 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--black);
  box-shadow: 8px 8px 0 var(--black);
}
.card--crm:hover { border-color: var(--yellow); box-shadow: 8px 8px 0 var(--yellow); }
.card--ai:hover { border-color: var(--coral); box-shadow: 8px 8px 0 var(--coral); }
.card--n8n:hover { border-color: var(--black); box-shadow: 8px 8px 0 var(--black); }
.card--dash:hover { border-color: var(--indigo); box-shadow: 8px 8px 0 var(--indigo); }
.card--content:hover { border-color: var(--yellow); box-shadow: 8px 8px 0 var(--yellow); }

.card__icon {
  font-size: 36px;
  margin-bottom: 20px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card__desc {
  color: var(--g-600);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 24px;
  flex: 1;
}
.card__meta {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.card__price,
.card__time {
  background: var(--g-100);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g-700);
}
.card__price {
  background: var(--yellow-dim);
  color: var(--black);
}
.card__link {
  font-weight: 600;
  color: var(--black);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
  align-self: flex-start;
  transition: gap 0.2s;
}
.card__link:hover {
  border-color: var(--coral);
}

/* ============================================
   CASES
   ============================================ */
.cases {
  padding: var(--space-section) 0;
  background: var(--bg-soft);
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.case {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--black);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease);
}
.case:hover {
  transform: translateY(-4px);
}
.case__metric {
  background: var(--yellow);
  padding: 32px;
  border-bottom: 2px solid var(--black);
}
.case__metric--coral {
  background: var(--coral);
  color: var(--white);
}
.case__num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.case__metric--coral .case__num {
  color: var(--white);
}
.case__label {
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--g-700);
}
.case__metric--coral .case__label {
  color: rgba(255, 255, 255, 0.85);
}
.case__body {
  padding: 28px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.case__niche {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
}
.case__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.case__desc {
  color: var(--g-600);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}
.case__link {
  font-weight: 600;
  color: var(--black);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
  align-self: flex-start;
}
.cases__more {
  text-align: center;
}

/* ============================================
   PROCESS
   ============================================ */
.process {
  padding: var(--space-section) 0;
  background: var(--black);
  color: var(--white);
}
.process .section__title {
  color: var(--white);
}
.process .section__subtitle {
  color: var(--g-400);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.step {
  background: var(--black-deep);
  border: 2px solid var(--g-700);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s var(--ease);
}
.step:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
}
.step__num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.step__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--white);
}
.step__desc {
  color: var(--g-400);
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: var(--space-section) 0;
  background: var(--white);
}
.about__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
}
.about__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.about__text {
  font-size: 18px;
  color: var(--g-600);
  line-height: 1.6;
  margin-bottom: 16px;
}
.about__values {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.value {
  display: flex;
  gap: 18px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: 16px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.value:hover {
  border-color: var(--black);
}
.value__icon {
  font-size: 28px;
  flex-shrink: 0;
}
.value__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}
.value__desc {
  color: var(--g-600);
  font-size: 15px;
  line-height: 1.5;
}
.about__monkey {
  width: 100%;
  border-radius: 24px;
  border: 3px solid var(--black);
  box-shadow: 12px 12px 0 var(--yellow);
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: var(--space-section) 0;
  background: var(--bg-soft);
}
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border-radius: 16px;
  border: 2px solid var(--g-200);
  padding: 24px 28px;
  transition: border-color 0.2s;
}
.faq-item:hover {
  border-color: var(--black);
}
.faq-item[open] {
  border-color: var(--black);
}
.faq-item summary {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 400;
  color: var(--g-500);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  margin-top: 16px;
  color: var(--g-600);
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================
   FINAL CTA
   ============================================ */
.cta {
  padding: var(--space-section) 0;
  background: var(--white);
}
.cta__box {
  background: var(--yellow);
  border-radius: 32px;
  padding: 60px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
  border: 3px solid var(--black);
  box-shadow: 16px 16px 0 var(--black);
}
.cta__monkey {
  width: 100%;
  border-radius: 20px;
  border: 3px solid var(--black);
}
.cta__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--black);
}
.cta__text {
  font-size: 19px;
  line-height: 1.5;
  color: var(--g-700);
  margin-bottom: 32px;
}
.cta__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--black);
  color: var(--g-400);
  padding: 80px 0 32px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 80px;
  margin-bottom: 60px;
}
.footer__tagline {
  margin-top: 16px;
  font-size: 15px;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.footer__col h4 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer__col a {
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer__col a:hover {
  color: var(--yellow);
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--g-700);
  font-size: 13px;
  color: var(--g-500);
  flex-wrap: wrap;
  gap: 16px;
}
.footer__legal {
  display: flex;
  gap: 24px;
}
.footer__legal a {
  color: var(--g-500);
}
.footer__legal a:hover {
  color: var(--white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  :root {
    --space-section: 80px;
  }
  .hero__inner,
  .about__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero__visual {
    max-width: 480px;
    margin: 0 auto;
  }
  .case-grid,
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .cta__box {
    grid-template-columns: 1fr;
    padding: 40px;
  }
  .nav__menu {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }
  .hero {
    padding: 48px 0 60px;
  }
  .hero__stats {
    flex-direction: column;
    gap: 20px;
  }
  .stat__num {
    font-size: 32px;
  }
  .consultant__chat {
    padding: 24px;
    box-shadow: 6px 6px 0 var(--black);
  }
  .footer__cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .nav__right .lang {
    display: none;
  }
}

/* ============================================
   ICONS (Lucide SVG sprite)
   ============================================ */
.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon--sm {
  width: 16px;
  height: 16px;
}
.icon--xs {
  width: 14px;
  height: 14px;
}

/* Pill icons inline alignment */
.hero__pill,
.consultant__pill,
.section__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Card icons get colored bg */
.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: var(--bg-soft);
  color: var(--black);
  transition: all 0.3s var(--ease);
}
.card__icon .icon {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}
.card--crm .card__icon { background: var(--yellow-dim); }
.card--ai .card__icon { background: var(--coral-dim); }
.card--n8n .card__icon { background: #f0f4ff; }
.card--dash .card__icon { background: #eef2ff; color: var(--indigo); }
.card--content .card__icon { background: var(--yellow-dim); }
.card:hover .card__icon { transform: scale(1.05) rotate(-3deg); }

/* Value icons (about section) */
.value__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.value__icon .icon {
  width: 22px;
  height: 22px;
}

/* Consultant hint icon */
.consultant__hint .icon {
  color: var(--coral);
  vertical-align: middle;
  margin-right: 4px;
}


/* ============================================
   CHAT — alive interactivity
   ============================================ */
.chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--g-200);
  margin-bottom: 24px;
}
.chat__status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}
.chat__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
  position: relative;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.chat__meta {
  font-size: 13px;
  color: var(--g-500);
}

/* Chat avatar with image */
.chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--black);
}
.chat__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat__small {
  font-size: 13px;
  color: var(--g-500);
  margin-top: 8px;
}

/* Message enter animation */
.chat__msg--enter {
  opacity: 0;
  transform: translateY(8px);
}
.chat__msg {
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

/* Typing dots */
.chat__dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}
.chat__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g-400);
  animation: bounce 1.4s infinite ease-in-out both;
}
.chat__dots span:nth-child(1) { animation-delay: -0.32s; }
.chat__dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Textarea field */
.chat__field {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid var(--g-200);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  line-height: 1.5;
  max-height: 140px;
  font-family: inherit;
}
.chat__field:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}
.chat__field:disabled {
  opacity: 0.6;
}

/* Send button — better */
.chat__send {
  align-self: flex-end;
}
.chat__send-arrow {
  margin-left: 6px;
  transition: transform 0.2s;
}
.chat__send:hover .chat__send-arrow {
  transform: translateX(3px);
}

/* Chat scrollable on overflow */
.chat {
  max-height: 540px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 8px;
}
.chat::-webkit-scrollbar {
  width: 6px;
}
.chat::-webkit-scrollbar-track {
  background: transparent;
}
.chat::-webkit-scrollbar-thumb {
  background: var(--g-300);
  border-radius: 3px;
}

/* ============================================
   MOBILE NAV TOGGLE
   ============================================ */
.nav__toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--black);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--black);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav__toggle--active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav__toggle--active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle--active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.body--locked {
  overflow: hidden;
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   FOOTER LOGO BIGGER
   ============================================ */
.footer__brand img {
  height: 48px !important;
}

/* ============================================
   HIGHLIGHT YELLOW SOFT (для подсветки в hero subtitle)
   ============================================ */
.hl-yellow-soft {
  background: linear-gradient(180deg, transparent 60%, var(--yellow-dim) 60%);
  padding: 0 4px;
}

/* ============================================
   MOBILE-SPECIFIC OVERRIDES
   ============================================ */
.mob-only { display: none; }

@media (max-width: 968px) {
  .mob-only { display: inline; }
  .nav__menu {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    border-top: 1px solid var(--g-200);
    overflow-y: auto;
    z-index: 99;
  }
  .nav__menu--open {
    transform: translateX(0);
  }
  .nav__menu a {
    font-size: 22px;
    font-weight: 600;
    padding: 18px 0;
    border-bottom: 1px solid var(--g-200);
  }
  .nav__menu a:last-child {
    border-bottom: none;
  }
  .nav__toggle {
    display: flex;
  }
  .nav__cta {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 32px 0 48px;
  }
  .hero__title {
    font-size: clamp(36px, 9vw, 56px);
  }
  .hero__subtitle {
    font-size: 17px;
  }
  .hero__cta {
    flex-direction: column;
    width: 100%;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .hero__badge {
    bottom: -14px;
    left: -10px;
    padding: 12px 16px;
  }
  .hero__badge-name {
    font-size: 15px;
  }
  .consultant__chat {
    padding: 20px;
    box-shadow: 5px 5px 0 var(--black);
    border-radius: 18px;
  }
  .chat__msg .chat__avatar {
    width: 32px;
    height: 32px;
  }
  .chat__bubble {
    font-size: 15px;
    padding: 12px 16px;
    max-width: 80%;
  }
  .chat__input {
    flex-direction: column;
    gap: 10px;
  }
  .chat__send {
    width: 100%;
  }
  .case__metric {
    padding: 24px;
  }
  .case__num {
    font-size: 48px;
  }
  .case__body {
    padding: 22px 24px;
  }
  .case__title {
    font-size: 19px;
  }
  .step {
    padding: 22px;
  }
  .cta__box {
    padding: 28px;
  }
  .nav__inner {
    padding: 14px 20px;
  }
}


/* Chat success badge after lead captured */
.chat__success-badge {
  margin-top: 16px;
  padding: 14px 20px;
  background: var(--yellow);
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  font-size: 15px;
  color: var(--black);
  border: 2px solid var(--black);
}


/* ============================================
   v2 OVERRIDES — clean professional refresh
   ============================================ */

/* === Tighter, more refined palette === */
:root {
  --bg-paper: #fafaf7;        /* warmer off-white */
  --bg-section: #f5f5f0;      /* softer light gray */
  --border-soft: #e6e6e0;
  --text-primary: #0a0e1a;
  --text-secondary: #4a5568;
  --text-tertiary: #6b7280;
}

body {
  background: var(--bg-paper);
  color: var(--text-primary);
}

/* === Refined section heads === */
.section__title {
  font-size: clamp(32px, 4.5vw, 56px);
  letter-spacing: -0.025em;
}
.section__head {
  margin-bottom: 56px;
}
.section__pill {
  background: var(--text-primary);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 12px;
}

/* === Hero refined: bigger logo, no badge, cleaner === */
.nav {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
}
.nav__inner {
  padding: 14px 32px;
  min-height: 72px;
}

.hero {
  padding: 64px 0 96px;
  background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-section) 100%);
}
.hero__inner {
  gap: 64px;
}
.hero__title {
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero__subtitle {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero__monkey-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--text-primary);
  aspect-ratio: 4/5;
  box-shadow: 0 32px 64px -24px rgba(15, 23, 42, 0.35);
}
.hero__monkey {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;  /* фокус на лице */
  border-radius: 0;
  transform: none;
  transition: transform 0.6s var(--ease);
}
.hero__monkey-frame:hover .hero__monkey {
  transform: scale(1.04);
}

/* === Trust bar refined === */
.trust {
  background: var(--text-primary);
  padding: 56px 0;
}
.trust__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
  color: var(--g-500);
}
.trust__logos {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
}
.trust__logo {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.55);
  padding: 22px 12px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s, background 0.2s;
}
.trust__logo:last-child { border-right: none; }
.trust__logo:hover {
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

/* === Consultant block — TIGHTER, fits viewport === */
.consultant {
  padding: 88px 0;
  background: var(--bg-section);
}
.consultant__head {
  max-width: 720px;
  margin-bottom: 40px;
}
.consultant__title {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.consultant__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}
.consultant__pill {
  background: var(--text-primary);
  color: var(--yellow);
  font-size: 12px;
  padding: 5px 12px;
}

.consultant__chat {
  max-width: 680px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.18);
  background: var(--white);
}

.chat__header {
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.chat__status-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.chat__meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.chat {
  max-height: 360px;        /* меньше — помещается на ноуте */
  min-height: 180px;
  margin-bottom: 16px;
  padding-right: 4px;
}
.chat__msg {
  gap: 10px;
  margin-bottom: 14px;
}
.chat__msg:last-child {
  margin-bottom: 0;
}
.chat__avatar {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--text-primary);
}
.chat__bubble {
  font-size: 14.5px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 78%;
  background: var(--bg-section);
}
.chat__bubble p { margin: 0; }
.chat__bubble p + p { margin-top: 8px; }
.chat__msg--user .chat__bubble {
  background: var(--text-primary);
  color: var(--white);
}
.chat__small {
  font-size: 12px;
  color: var(--text-tertiary);
}

.chat__input {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  gap: 8px;
}
.chat__field {
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border-width: 1.5px;
}
.chat__send {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 10px;
  border-width: 1.5px;
}

.consultant__hint {
  margin-top: 12px;
  font-size: 12.5px;
}

/* === Card icons cleaner === */
.card {
  padding: 28px;
  border-width: 1px;
  border-color: var(--border-soft);
  border-radius: 16px;
}
.card:hover,
.card--crm:hover, .card--ai:hover, .card--n8n:hover, .card--dash:hover, .card--content:hover {
  border-color: var(--text-primary);
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.18);
  transform: translateY(-3px);
}
.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.card__icon .icon {
  width: 24px;
  height: 24px;
}
.card__title {
  font-size: 21px;
}
.card__desc {
  font-size: 15px;
  color: var(--text-secondary);
}

/* === Cases — softer === */
.case {
  border-width: 1px;
  border-color: var(--border-soft);
  border-radius: 18px;
}
.case__metric {
  padding: 26px 28px;
  border-bottom: 1px solid var(--border-soft);
}
.case__num {
  font-size: 52px;
}
.case__metric--coral {
  background: var(--coral);
}

/* === Process section — refined === */
.step {
  padding: 24px;
  border-radius: 16px;
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.step__num {
  font-size: 38px;
}
.step__title {
  font-size: 18px;
}

/* === About — softer === */
.about__title {
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

/* === FAQ === */
.faq-item {
  padding: 20px 24px;
  border-radius: 12px;
  border-width: 1px;
  border-color: var(--border-soft);
}
.faq-item summary {
  font-size: 17px;
}

/* === Final CTA — cleaner === */
.cta__box {
  padding: 48px;
  border-radius: 24px;
  border-width: 2px;
  box-shadow: 8px 8px 0 var(--text-primary);
}
.cta__title {
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.025em;
}
.cta__text {
  font-size: 17px;
}

/* === Footer — bigger logo, more spacing === */
.footer {
  padding: 72px 0 28px;
}
.footer__brand img {
  height: 56px !important;
}

/* === Hide old hero badge if present === */
.hero__badge {
  display: none !important;
}

/* === Better mobile === */
@media (max-width: 968px) {
  .trust__logos {
    grid-template-columns: repeat(4, 1fr);
  }
  .trust__logo {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .trust__logo:nth-last-child(-n+4) { border-bottom: none; }
}

@media (max-width: 640px) {
  .hero {
    padding: 40px 0 56px;
  }
  .hero__title {
    font-size: clamp(34px, 9vw, 50px);
  }
  .hero__monkey-frame {
    aspect-ratio: 4/5;
    max-width: 380px;
    margin: 0 auto;
  }
  .trust {
    padding: 40px 0;
  }
  .trust__logos {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust__logo {
    padding: 18px 8px;
    font-size: 14px;
  }
  .consultant__chat {
    padding: 16px;
  }
  .chat {
    max-height: 280px;
  }
  .cta__box {
    padding: 24px;
    box-shadow: 5px 5px 0 var(--text-primary);
  }
}


/* === Logo size — explicit, override cache === */
.nav__logo-img {
  height: 64px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
}
.footer__logo-img {
  height: 80px !important;
  width: auto !important;
  display: block;
  object-fit: contain;
}
.nav__inner {
  min-height: 88px !important;
}
@media (max-width: 640px) {
  .nav__logo-img {
    height: 48px !important;
  }
  .nav__inner {
    min-height: 72px !important;
  }
}


/* ============================================
   SUB-PAGES (expertise/cases/blog/about)
   ============================================ */

/* Breadcrumbs */
.breadcrumbs {
  padding: 20px 32px 0;
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-soft);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.breadcrumbs a:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.breadcrumbs__current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Page hero (one-column, narrower) */
.page-hero {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-section) 100%);
}
.page-hero__inner {
  max-width: 920px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.page-hero__subtitle {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 720px;
}
.page-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.page-hero__point {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.page-hero__point .icon {
  width: 16px;
  height: 16px;
  color: var(--coral);
}
.page-hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Pain section — what we solve */
.pain {
  padding: 88px 0;
  background: var(--white);
}
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.pain-item {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--bg-paper);
  transition: border-color 0.2s, transform 0.2s;
}
.pain-item:hover {
  border-color: var(--coral);
  transform: translateY(-2px);
}
.pain-item .icon {
  width: 28px;
  height: 28px;
  color: var(--coral);
  margin-bottom: 14px;
}
.pain-item h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.pain-item p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Included grid — what's inside the service */
.included {
  padding: 88px 0;
  background: var(--bg-section);
}
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.included-item {
  padding: 28px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.included-item:hover {
  border-color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.18);
}
.included-item__icon {
  width: 48px;
  height: 48px;
  background: var(--yellow-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.included-item__icon .icon {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}
.included-item h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
.included-item p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .breadcrumbs {
    padding: 14px 20px 0;
  }
  .page-hero {
    padding: 32px 0 48px;
  }
  .page-hero__cta {
    flex-direction: column;
  }
  .page-hero__cta .btn {
    width: 100%;
  }
  .pain, .included {
    padding: 56px 0;
  }
}


/* Etaps/timeline — for SEO long-form content */
.etaps {
  padding: 88px 0;
  background: var(--white);
}
.timeline {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.timeline__row {
  display: grid;
  grid-template-columns: 56px 100px 1fr 2fr;
  gap: 24px;
  padding: 24px 28px;
  background: var(--bg-paper);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  align-items: start;
  transition: border-color 0.2s, transform 0.2s;
}
.timeline__row:hover {
  border-color: var(--text-primary);
  transform: translateX(4px);
}
.timeline__num {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timeline__time {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 10px;
}
.timeline__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 6px;
}
.timeline__desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  padding-top: 6px;
}
@media (max-width: 768px) {
  .timeline__row {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto auto;
    gap: 12px 16px;
    padding: 20px;
  }
  .timeline__num {
    width: 32px;
    height: 32px;
    font-size: 16px;
    grid-row: 1;
  }
  .timeline__time {
    grid-column: 2;
    grid-row: 1;
    padding-top: 6px;
    font-size: 12px;
  }
  .timeline__name {
    grid-column: 1 / 3;
    grid-row: 2;
    padding-top: 0;
  }
  .timeline__desc {
    grid-column: 1 / 3;
    grid-row: 3;
    padding-top: 0;
  }
}


/* ============================================
   ABOUT PAGE — sections
   ============================================ */

/* Founder section */
.founder {
  padding: 80px 0;
  background: var(--white);
}
.founder__inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.founder__photo {
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid var(--text-primary);
  box-shadow: 12px 12px 0 var(--yellow);
  aspect-ratio: 1;
}
.founder__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.founder__name {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 12px 0 6px;
}
.founder__role {
  font-size: 16px;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 24px;
}
.founder__bio {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.founder__contacts {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.founder__link {
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.founder__link:hover {
  border-color: var(--coral);
}

/* Philosophy grid */
.philosophy {
  padding: 88px 0;
  background: var(--bg-section);
}
.philosophy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.philosophy__card {
  padding: 28px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, transform 0.2s;
}
.philosophy__card:hover {
  border-color: var(--text-primary);
  transform: translateY(-3px);
}
.philosophy__card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
.philosophy__card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Competencies */
.competencies {
  padding: 88px 0;
  background: var(--white);
}
.competency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.competency {
  padding: 32px;
  border-radius: 18px;
  background: var(--bg-paper);
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.competency:hover {
  border-color: var(--yellow);
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 var(--yellow);
}
.competency__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.competency__icon .icon {
  width: 28px;
  height: 28px;
  color: var(--text-primary);
}
.competency h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}
.competency p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.competency__link {
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
}

/* Mascot section */
.mascot {
  padding: 88px 0;
  background: var(--bg-section);
}
.mascot__inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.mascot__visual img {
  width: 100%;
  border-radius: 24px;
  border: 3px solid var(--text-primary);
  box-shadow: 12px 12px 0 var(--coral);
}
.mascot__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 12px 0 20px;
}
.mascot__text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* nav active state */
.nav__menu a.active {
  color: var(--text-primary);
  font-weight: 700;
}

/* responsive */
@media (max-width: 768px) {
  .founder__inner, .mascot__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .founder__photo, .mascot__visual img {
    box-shadow: 6px 6px 0 var(--yellow);
  }
  .mascot__visual img {
    box-shadow: 6px 6px 0 var(--coral);
  }
}


/* ============================================
   CASES PAGE — filters & grid
   ============================================ */
.cases-filters {
  padding: 32px 0 0;
  background: var(--white);
}
.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.filter-pill {
  padding: 10px 18px;
  background: var(--white);
  border: 1.5px solid var(--border-soft);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease);
}
.filter-pill:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}
.filter-pill--active {
  background: var(--text-primary);
  color: var(--white);
  border-color: var(--text-primary);
}
.cases-grid-section {
  padding: 48px 0 88px;
  background: var(--white);
}

/* ============================================
   CONTACTS PAGE
   ============================================ */
.contacts {
  padding: 56px 0 88px;
  background: var(--white);
}
.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.contact-card {
  display: block;
  padding: 32px;
  background: var(--bg-paper);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  transition: all 0.3s var(--ease);
  text-align: center;
}
.contact-card:hover {
  border-color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 var(--yellow);
}
.contact-card__icon {
  width: 56px;
  height: 56px;
  background: var(--text-primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--yellow);
}
.contact-card__icon .icon {
  width: 26px;
  height: 26px;
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.contact-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.contact-card__value {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
}

/* ============================================
   BLOG PAGE — coming soon
   ============================================ */
.blog-soon {
  padding: 56px 0;
  background: var(--white);
}
.blog-soon__box {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 48px;
  background: var(--bg-section);
  border-radius: 20px;
  border: 2px solid var(--border-soft);
}
.blog-soon__icon {
  width: 64px;
  height: 64px;
  background: var(--yellow);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.blog-soon__icon .icon {
  width: 32px;
  height: 32px;
  color: var(--text-primary);
}
.blog-soon h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.blog-soon p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.blog-soon__cta {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.topics {
  padding: 88px 0;
  background: var(--bg-section);
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.topic-stub {
  padding: 28px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  transition: border-color 0.2s, transform 0.2s;
}
.topic-stub:hover {
  border-color: var(--text-primary);
  transform: translateY(-3px);
}
.topic-stub__niche {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 10px;
}
.topic-stub h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}
.topic-stub p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}


/* === Scroll margin для якорей — фикс sticky header overlap === */
section[id], #consultant, #expertise, #cases, #process, #about {
  scroll-margin-top: 100px;
}

/* === Force smooth scroll override === */
html {
  scroll-padding-top: 100px;
}


/* ============================================
   BLOG PAGE — featured + grid with images
   ============================================ */
.blog-hero {
  padding: 60px 0 40px;
}

/* FEATURED article */
.featured {
  padding: 16px 0 56px;
  background: var(--bg-paper);
}
.featured__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
}
.featured__inner:hover {
  border-color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.18);
}
.featured__cover {
  background: var(--bg-section);
  overflow: hidden;
  aspect-ratio: 16/10;
}
.featured__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.featured__inner:hover .featured__cover img {
  transform: scale(1.04);
}
.featured__body {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 16px;
}
.featured__cat {
  display: inline-block;
  padding: 4px 10px;
  background: var(--yellow-dim);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  border-radius: 100px;
  margin-bottom: 16px;
  width: fit-content;
}
.featured__cat--ai { background: var(--coral-dim); color: var(--coral); }
.featured__cat--n8n { background: #eef2ff; color: var(--indigo); }
.featured__cat--case { background: var(--yellow); color: var(--text-primary); }

.featured__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.featured__desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.featured__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
}
.featured__date {
  color: var(--text-tertiary);
}
.featured__cta {
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 2px;
}

/* FILTERS */
.blog-filters {
  padding: 24px 0;
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border-soft);
}
.blog-grid-section {
  padding: 56px 0 88px;
  background: var(--bg-paper);
}

/* POST GRID */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  border-color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(15, 23, 42, 0.18);
}
.post-card__cover {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-section);
}
.post-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.post-card:hover .post-card__cover img {
  transform: scale(1.06);
}
.post-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  background: var(--white);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  border: 1.5px solid var(--text-primary);
}
.post-card__badge--ai { background: var(--coral); color: var(--white); border-color: var(--coral); }
.post-card__badge--n8n { background: var(--yellow); color: var(--text-primary); border-color: var(--text-primary); }
.post-card__badge--case { background: var(--text-primary); color: var(--yellow); border-color: var(--text-primary); }
.post-card__badge--crm { background: var(--white); color: var(--text-primary); }

.post-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.post-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 18px;
  flex: 1;
}
.post-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.post-card__date {
  color: var(--text-tertiary);
}
.post-card__read {
  font-weight: 700;
  color: var(--text-primary);
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .featured__inner {
    grid-template-columns: 1fr;
  }
  .featured__body {
    padding: 32px 28px;
  }
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
  .featured__title {
    font-size: 22px;
  }
}


/* ============================================
   ARTICLE PAGE — single blog post
   ============================================ */
.article {
  padding: 32px 0 88px;
  background: var(--bg-paper);
}
.article__container {
  max-width: 800px;
}
.article__header {
  margin-bottom: 40px;
}
.article__cat {
  display: inline-block;
  padding: 6px 14px;
  background: var(--yellow-dim);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 20px;
}
.article__cat--ai { background: var(--coral-dim); color: var(--coral); }
.article__cat--n8n { background: var(--yellow); color: var(--text-primary); }
.article__cat--case { background: var(--text-primary); color: var(--yellow); }
.article__cat--crm { background: #eef2ff; color: var(--indigo); }

.article__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.article__meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}
.article__author {
  font-weight: 600;
  color: var(--text-primary);
}
.article__cover {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  margin-bottom: 32px;
}
.article__cover img {
  width: 100%;
  height: auto;
  display: block;
}

.article__body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-primary);
}
.article__body h1, .article__body h2, .article__body h3, .article__body h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 40px 0 16px;
  color: var(--text-primary);
}
.article__body h2 { font-size: 30px; }
.article__body h3 { font-size: 24px; }
.article__body h4 { font-size: 20px; }
.article__body p {
  margin-bottom: 18px;
  color: var(--text-secondary);
}
.article__body strong { color: var(--text-primary); font-weight: 700; }
.article__body a {
  color: var(--coral);
  border-bottom: 1px solid var(--coral);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.article__body a:hover { color: var(--text-primary); border-color: var(--text-primary); }
.article__body ul, .article__body ol {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--text-secondary);
}
.article__body li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 24px 0;
  border: 1px solid var(--border-soft);
}
.article__body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--bg-section);
  border-left: 4px solid var(--yellow);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-primary);
}
.article__body code {
  background: var(--bg-section);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.92em;
  color: var(--text-primary);
}
.article__body pre {
  background: var(--text-primary);
  color: #f0f0f0;
  padding: 20px 24px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  line-height: 1.6;
}
.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article__body th, .article__body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.article__body th {
  background: var(--bg-section);
  font-weight: 700;
  color: var(--text-primary);
}

.article__footer {
  margin-top: 64px;
}
.article__cta-box {
  padding: 36px 40px;
  background: var(--yellow);
  border-radius: 20px;
  border: 2px solid var(--text-primary);
  box-shadow: 6px 6px 0 var(--text-primary);
  text-align: center;
}
.article__cta-box h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.article__cta-box p {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 20px;
  opacity: 0.85;
}
.article__back {
  margin-top: 32px;
  text-align: center;
}
.article__back-link {
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 2px;
  transition: all 0.2s;
}
.article__back-link:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

@media (max-width: 640px) {
  .article__body { font-size: 16px; }
  .article__body h2 { font-size: 24px; }
  .article__body h3 { font-size: 20px; }
  .article__cta-box { padding: 24px; box-shadow: 4px 4px 0 var(--text-primary); }
  .article__meta { flex-direction: column; gap: 6px; }
}


/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form-section {
  padding: 88px 0;
  background: var(--bg-section);
}
.contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.18);
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.contact-form__field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}
.contact-form__row .contact-form__field {
  margin-bottom: 0;
}
.contact-form__field label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.contact-form__field .req {
  color: var(--coral);
}
.contact-form__field input,
.contact-form__field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}
.contact-form__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 16px;
}
.contact-form__submit {
  min-width: 220px;
}
.contact-form__arrow {
  margin-left: 6px;
  transition: transform 0.2s;
}
.contact-form__submit:hover .contact-form__arrow {
  transform: translateX(3px);
}
.contact-form__hint {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.contact-form__hint .icon {
  color: var(--coral);
}
.contact-form__success,
.contact-form__error {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.contact-form__success {
  background: var(--yellow-dim);
  color: var(--text-primary);
  border: 1.5px solid var(--yellow);
}
.contact-form__error {
  background: var(--coral-dim);
  color: var(--coral);
  border: 1.5px solid var(--coral);
}

/* CONTACT CARDS — coloured icons */
.contacts__grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.contact-card__icon--blue { background: #2196f3; color: white; }
.contact-card__icon--green { background: #25D366; color: white; }
.contact-card__icon--coral { background: var(--coral); color: white; }
.contact-card__icon--yellow { background: var(--yellow); color: var(--text-primary); }

@media (max-width: 640px) {
  .contact-form { padding: 24px; }
  .contact-form__row { grid-template-columns: 1fr; }
  .contact-form__bottom { flex-direction: column; align-items: stretch; }
  .contact-form__submit { width: 100%; }
}


/* ============================================
   QUICK REQUEST MODAL
   ============================================ */
.ff-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.ff-modal--open {
  display: flex;
}
.ff-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
  animation: ff-fade-in 0.2s ease;
}
@keyframes ff-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ff-modal__panel {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 2px solid var(--text-primary);
  box-shadow: 0 32px 64px -16px rgba(15, 23, 42, 0.45);
  animation: ff-slide-up 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ff-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ff-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-section);
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background 0.2s, transform 0.2s;
}
.ff-modal__close:hover {
  background: var(--text-primary);
  color: var(--white);
  transform: rotate(90deg);
}
.ff-modal__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.ff-modal__sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.ff-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ff-modal__field {
  display: flex;
  flex-direction: column;
}
.ff-modal__field span {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.ff-modal__field span em {
  color: var(--coral);
  font-style: normal;
}
.ff-modal__field input,
.ff-modal__field textarea {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 11px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ff-modal__field input:focus,
.ff-modal__field textarea:focus {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}
.ff-modal__submit {
  margin-top: 6px;
  width: 100%;
}
.ff-modal__hint {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: -2px;
}
.ff-modal__success,
.ff-modal__error {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.ff-modal__success {
  background: var(--yellow-dim);
  border: 1.5px solid var(--yellow);
}
.ff-modal__error {
  background: var(--coral-dim);
  border: 1.5px solid var(--coral);
  color: var(--coral);
}

@media (max-width: 480px) {
  .ff-modal__panel { padding: 28px 20px; }
  .ff-modal__title { font-size: 22px; }
}


/* ============================================
   ARTICLE BODY — bare-div → semantic styling
   ============================================ */
.article__body figure {
  margin: 28px 0;
  padding: 0;
}
.article__body figure img {
  margin: 0;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
}
.article__body figcaption {
  margin-top: 10px;
  padding: 0 8px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
  font-style: italic;
}
.article__body aside {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--bg-section);
  border-left: 4px solid var(--yellow);
  border-radius: 0 12px 12px 0;
}
.article__body aside h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.article__body aside ul {
  margin: 0;
  padding-left: 18px;
}
/* Bare divs and headers */
.article__body header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--yellow);
}
.article__body header span {
  display: inline-block;
  padding: 5px 12px;
  background: var(--yellow);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 14px;
}
.article__body header h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.article__body header p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* Default div → block spacing */
.article__body > div, .article__body div > div {
  margin-bottom: 16px;
}
.article__body div:has(> img) {
  margin: 24px 0;
}
.article__body div:has(> img) img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  margin: 0;
}
.article__body span {
  display: inline;
}
/* Hide redundant H1 inside body — header section already has one */
.article__body header h1:not(:first-of-type),
.article__body > h1:first-of-type ~ h1 {
  display: none;
}


/* ============================================
   LEGAL PAGES (privacy, terms)
   ============================================ */
.legal-page {
  padding: 48px 0 88px;
  background: var(--bg-paper);
}
.legal-page__container {
  max-width: 760px;
}
.legal-page__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.legal-page__date {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 36px;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.legal-page p, .legal-page li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.legal-page ul {
  margin: 8px 0 16px;
  padding-left: 24px;
}
.legal-page strong { color: var(--text-primary); }
.legal-page a {
  color: var(--coral);
  border-bottom: 1px solid var(--coral);
  padding-bottom: 1px;
}
.legal-page a:hover { color: var(--text-primary); border-color: var(--text-primary); }


/* ============================================
   404 ERROR PAGE
   ============================================ */
.error-page {
  padding: 60px 0 96px;
  background: linear-gradient(180deg, var(--bg-paper) 0%, var(--bg-section) 100%);
  min-height: calc(100vh - 88px - 400px);
  display: flex;
  align-items: center;
}
.error-page__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}
.error-page__visual {
  position: relative;
}
.error-page__monkey {
  width: 100%;
  border-radius: 24px;
  border: 3px solid var(--text-primary);
  box-shadow: 12px 12px 0 var(--coral);
  filter: grayscale(20%);
}
.error-page__code {
  position: absolute;
  bottom: -24px;
  right: -24px;
  background: var(--yellow);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  padding: 12px 28px;
  border-radius: 18px;
  border: 3px solid var(--text-primary);
  box-shadow: 6px 6px 0 var(--text-primary);
}
.error-page__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.error-page__text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.error-page__cta {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.error-page__links {
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.error-page__hint {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}
.error-page__links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.error-page__links a {
  color: var(--text-primary);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  display: inline-block;
  transition: border-color 0.2s, color 0.2s;
}
.error-page__links a:hover {
  border-color: var(--yellow);
  color: var(--coral);
}

@media (max-width: 768px) {
  .error-page__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .error-page__visual {
    max-width: 360px;
    margin: 0 auto;
  }
  .error-page__code {
    bottom: -16px;
    right: -16px;
    font-size: 44px;
    padding: 10px 20px;
  }
}


/* ============================================
   MOBILE FIXES (комплексные)
   ============================================ */

/* 1. Защита от горизонтального скролла */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 2. Word-wrap для всех заголовков и текста */
h1, h2, h3, h4, h5, h6, p, li, a, span {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* 3. Длинные URL/code не должны ломать layout */
a, code, pre {
  word-break: break-word;
}
pre {
  overflow-x: auto;
}

/* 4. Картинки никогда не вылезают */
img {
  max-width: 100%;
  height: auto;
}

/* 5. Таблицы — горизонтальный скролл вместо overflow */
.article__body table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* === МОБИЛЬНОЕ МЕНЮ — ИСПРАВЛЕНИЕ === */
@media (max-width: 968px) {
  /* Меню теперь точно ниже nav (nav min-height 88px) */
  .nav__menu {
    position: fixed !important;
    top: 88px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: var(--white) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    padding: 24px 24px 80px !important;
    gap: 0 !important;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    border-top: 1px solid var(--border-soft);
    overflow-y: auto;
    z-index: 95 !important;
    -webkit-overflow-scrolling: touch;
  }
  .nav__menu--open {
    transform: translateX(0) !important;
  }
  .nav__menu a {
    font-size: 20px !important;
    font-weight: 600 !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid var(--border-soft) !important;
    color: var(--text-primary) !important;
  }
  .nav__menu a.active {
    color: var(--coral) !important;
  }
  /* Hamburger toggle ВСЕГДА виден на mobile + поверх меню */
  .nav__toggle {
    display: flex !important;
    z-index: 100;
    position: relative;
  }
  /* Скрыть основные CTA на mobile */
  .nav__cta {
    display: none !important;
  }
  /* Lang switcher остаётся */
  .lang {
    margin-right: 8px;
  }
  /* Когда меню открыто — body не скроллится */
  body.body--locked {
    overflow: hidden !important;
  }

  /* nav padding меньше */
  .nav__inner {
    padding: 12px 16px !important;
    min-height: 88px !important;
  }

  /* Лого чуть меньше на mobile */
  .nav__logo-img {
    height: 44px !important;
  }
}

/* === Дополнительные mobile fixes для overflow === */
@media (max-width: 768px) {
  .container {
    padding: 0 16px !important;
  }
  /* Hero title не вылезает */
  .hero__title, .page-hero__title {
    font-size: clamp(28px, 7vw, 42px) !important;
    word-break: break-word;
  }
  /* Hero subtitle тоже */
  .hero__subtitle, .page-hero__subtitle {
    font-size: 16px !important;
    line-height: 1.5;
  }
  /* Кнопки в hero — full width */
  .hero__cta, .page-hero__cta {
    flex-direction: column;
  }
  .hero__cta .btn, .page-hero__cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  /* Чат bubble — больше ширины */
  .chat__bubble {
    max-width: 86% !important;
    font-size: 14px;
  }
  /* Footer — чище колонки */
  .footer__cols {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .footer__inner {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer__legal {
    justify-content: center;
    flex-wrap: wrap;
  }
  /* Cards — single column */
  .cards, .case-grid, .pain-grid, .included-grid,
  .post-grid, .topics-grid, .competency-grid,
  .philosophy__grid, .contacts__grid {
    grid-template-columns: 1fr !important;
  }
  /* Modal — full width with padding */
  .ff-modal__panel {
    padding: 24px 18px !important;
    max-width: calc(100vw - 32px);
  }
  /* Hero monkey frame — auto centering */
  .hero__monkey-frame {
    margin: 0 auto;
    max-width: 320px;
  }
  /* Founder/mascot — single column */
  .founder__inner, .mascot__inner, .about__inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  /* Timeline — простая верстка на mobile */
  .timeline__row {
    grid-template-columns: 40px 1fr !important;
    grid-template-rows: auto auto auto auto;
    gap: 12px 14px;
    padding: 20px;
  }
  .timeline__num { grid-row: 1; grid-column: 1; }
  .timeline__time { grid-row: 1; grid-column: 2; padding-top: 8px; }
  .timeline__name { grid-row: 2; grid-column: 1 / 3; padding-top: 0; }
  .timeline__desc { grid-row: 3; grid-column: 1 / 3; padding-top: 4px; }

  /* Trust bar — 2 колонки */
  .trust__logos {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .trust__logo {
    padding: 16px 8px !important;
    font-size: 14px !important;
  }

  /* CTA box — меньше padding */
  .cta__box {
    padding: 28px 20px !important;
    box-shadow: 4px 4px 0 var(--text-primary) !important;
  }
  .cta__title {
    font-size: 24px !important;
  }
  .cta__buttons {
    flex-direction: column;
  }
  .cta__buttons .btn {
    width: 100%;
  }

  /* Featured (blog) — single column */
  .featured__inner {
    grid-template-columns: 1fr !important;
  }
  .featured__body {
    padding: 24px 20px !important;
  }
  .featured__title {
    font-size: 22px !important;
  }

  /* Section heads */
  .section__title {
    font-size: clamp(24px, 6vw, 36px) !important;
  }

  /* Article cover */
  .article__cover img,
  .post-card__cover img,
  .featured__cover img {
    max-width: 100%;
    height: auto;
  }

  /* Filter pills — скролл по горизонтали */
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Breadcrumbs не ломаются */
  .breadcrumbs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
  }

  /* Chat input на mobile */
  .chat__input {
    flex-direction: column;
    gap: 8px;
  }
  .chat__send {
    width: 100%;
  }

  /* Forms — full width */
  .contact-form,
  .contact-form__row {
    grid-template-columns: 1fr !important;
  }
  .contact-form {
    padding: 24px 18px !important;
  }
  .contact-form__bottom {
    flex-direction: column;
    align-items: stretch;
  }

  /* Hero stats stack */
  .hero__stats {
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* 404 mobile */
  .error-page__inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .error-page__visual {
    max-width: 280px;
    margin: 0 auto;
  }
  .error-page__cta {
    flex-direction: column;
  }
  .error-page__cta .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(26px, 8vw, 36px) !important;
  }
  .nav__logo-img {
    height: 38px !important;
  }
  .nav__inner {
    min-height: 72px !important;
  }
  .nav__menu {
    top: 72px !important;
  }
}


/* ============================================
   FORCE: lang switcher всегда видим на mobile
   + чёткий hamburger — финальные правила
   ============================================ */
@media (max-width: 968px) {
  /* Lang всегда в nav__right на мобиле */
  .nav__right .lang {
    display: flex !important;
    background: var(--g-100);
    border-radius: 100px;
    padding: 3px;
    margin-right: 8px;
  }
  .nav__right .lang__btn {
    padding: 5px 9px !important;
    font-size: 11px !important;
  }
  /* Hamburger — однозначно поверх всего */
  .nav__toggle {
    display: flex !important;
    width: 40px !important;
    height: 40px !important;
    padding: 11px 9px !important;
    z-index: 102 !important;
    position: relative;
    pointer-events: auto;
    cursor: pointer;
  }
}

/* Очень узкие экраны — компактнее */
@media (max-width: 420px) {
  .nav__right .lang__btn {
    padding: 4px 7px !important;
    font-size: 10px !important;
  }
  .nav__inner {
    padding: 10px 12px !important;
    gap: 6px;
  }
  .nav__logo-img {
    height: 36px !important;
  }
}

