/* ===== KMB_IT_STUDIO · Куанышбек Мадияр ===== */
:root {
  --bg: #0a0b0d;
  --bg-card: #12141a;
  --bg-card-hover: #181b22;
  --text: #e8eaef;
  --text-muted: #8b90a0;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --accent-glow: rgba(0, 212, 170, 0.25);
  --border: #252830;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Onest', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.2s ease;
}

/* Светлая тема */
[data-theme="light"] {
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f6f8;
  --text: #1a1d24;
  --text-muted: #4e5562;
  --border: #dce0e6;
  --accent: #059669;
  --accent-dim: rgba(5, 150, 105, 0.12);
  --accent-glow: rgba(5, 150, 105, 0.12);
}

[data-theme="light"] .grid-pattern {
  opacity: 0.2;
}

[data-theme="light"] .btn-primary {
  background: #059669;
  color: #fff;
}

[data-theme="light"] .btn-primary:hover {
  background: #047857;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Header ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 11, 13, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

[data-theme="light"] .header {
  background: rgba(244, 245, 247, 0.95);
}

.header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--accent);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.burger span {
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--transition);
}

/* На десктопе блок темы/языка внутри нав скрыт */
.nav-controls-mobile {
  display: none;
}

/* Header: тема и язык (десктоп) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-icon-light { display: none; }
.theme-icon-dark { display: inline; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: inline; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-btn {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

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

/* Header contact button (desktop) */
.btn-header-contact {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-header-contact:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-header-contact:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Адаптив: 900px планшет, 768px меню-гамбургер, 480px телефон, 400px узкий телефон ===== */
@media (max-width: 768px) {
  .btn-header-contact {
    display: none;
  }
}

/* Блок: примечание + подсказка по тарифу */
.pricing-info-block {
  margin-top: 20px;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.pricing-info-block .pricing-note {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: left;
}

.pricing-info-block .pricing-help {
  margin-top: 0;
  font-size: 0.9rem;
  color: var(--text);
  text-align: left;
}

.pricing-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.pricing-help {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text);
  max-width: 560px;
  width: 100%;
  text-align: center;
}

/* Мини-FAQ: аккордеон */
.pricing-mini-faq {
  margin-top: 16px;
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.pricing-faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.pricing-faq-item:last-child {
  margin-bottom: 0;
}

.pricing-faq-item summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
}

.pricing-faq-item summary::-webkit-details-marker {
  display: none;
}

.pricing-faq-item summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-weight: 700;
}

.pricing-faq-item[open] summary::after {
  content: '−';
}

.pricing-faq-item p {
  margin: 0;
  padding: 0 1rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
}

.pricing-mini-faq p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pricing-mini-faq strong {
  color: var(--text);
  font-weight: 600;
}

/* Блок индивидуального проекта */
.pricing-custom-block {
  margin-top: 20px;
  padding: 1rem 1.25rem;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  max-width: 560px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.pricing-custom-block p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}

/* Сетка модулей */
.modules-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text);
  text-align: center;
  width: 100%;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.module-card {
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.module-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.module-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.plan-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-plan {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-plan-secondary {
  padding: 8px 14px;
  font-size: 0.85rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-plan-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 600px) {
  .plan-actions {
    flex-direction: column;
  }

  .plan-actions .btn {
    width: 100%;
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-glow);
  top: -100px;
  right: -100px;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-glow);
  bottom: 20%;
  left: -80px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-label {
  font-size: 0.9rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.hero-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  flex-shrink: 0;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 24px var(--accent-dim);
}

.hero-avatar-initials {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.hero-avatar-initials.visible {
  display: flex;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 720px;
}

.hero-name {
  display: block;
  margin-bottom: 0.2em;
}

.hero-tagline {
  display: block;
  font-size: 0.45em;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-utp {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: -8px 0 20px;
  max-width: 520px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
  justify-content: center;
}

.btn-consultation.contact-consult {
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #00e6b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  justify-content: center;
}

.hero-city {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* Обо мне — одна строка в hero */
.about-inline {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 520px;
  width: 100%;
}

.about-inline-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.about-inline-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.about-inline-text:last-child {
  margin-bottom: 0;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 160px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
}

.stat-label {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ----- Sections ----- */
.section {
  padding: 80px 0;
}

.section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 560px;
  width: 100%;
  text-align: center;
}

/* ----- Services ----- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.card-popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.card-popular-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.plan-title-main {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-title-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-combined .card-for {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ----- Почему со мной работают + кейсы ----- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  margin-bottom: 48px;
}

.reason-card {
  text-align: center;
}

.reason-card .card-icon {
  margin-left: auto;
  margin-right: auto;
}

/* Процесс: визуальный таймлайн на десктопе */
.section-process .section-subtitle {
  margin-bottom: 2rem;
}
.process-timeline {
  position: relative;
}
.process-timeline .process-step {
  position: relative;
}
.process-timeline .process-step .card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.process-timeline .process-step p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.process-timeline .process-step h3 {
  font-size: 1rem;
}
@media (min-width: 900px) {
  .process-timeline.why-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: start;
  }
  .process-timeline .process-step {
    padding: 1rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .process-timeline .process-step p {
    font-size: 0.88rem;
  }
}

.why-cases-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
  width: 100%;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 8px;
}

.case-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.case-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.case-result {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ----- Reveal анимация при скролле ----- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Portfolio ----- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition);
  display: block;
}

.portfolio-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.portfolio-image-wrap {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-card-hover);
  overflow: hidden;
}

.portfolio-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-card-hover);
}

/* Карточка-превью без фото: «браузер» + цветная плашка */
.portfolio-card-visual {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portfolio-card-browser {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card-hover);
  border-bottom: 1px solid var(--border);
}

.portfolio-card-dots {
  display: flex;
  gap: 6px;
}

.portfolio-card-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.6;
}

.portfolio-card-url {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-card-badge {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
}

.portfolio-card-visual--exclusive {
  color: #0d9488;
}

.portfolio-card-visual--exclusive .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.2) 0%, rgba(6, 95, 70, 0.15) 100%);
}

[data-theme="light"] .portfolio-card-visual--exclusive .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(6, 95, 70, 0.08) 100%);
}

.portfolio-card-visual--khans {
  color: #b45309;
}

.portfolio-card-visual--khans .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.2) 0%, rgba(146, 64, 14, 0.15) 100%);
}

[data-theme="light"] .portfolio-card-visual--khans .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12) 0%, rgba(146, 64, 14, 0.08) 100%);
}

.portfolio-card-visual--cyber {
  color: #2563eb;
}

.portfolio-card-visual--cyber .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(30, 64, 175, 0.15) 100%);
}

[data-theme="light"] .portfolio-card-visual--cyber .portfolio-card-badge {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(30, 64, 175, 0.08) 100%);
}

.portfolio-card h3 {
  padding: 16px 20px 0;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.portfolio-card-subtitle {
  padding: 0 20px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.portfolio-card p:not(.portfolio-card-subtitle):not(.proto-desc) {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.portfolio-card p.proto-desc {
  padding: 0 20px 12px;
}

.portfolio-block-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 40px;
  color: var(--text);
  text-align: center;
  width: 100%;
}

.portfolio-block-title:first-of-type {
  margin-top: 0;
}

.portfolio-block-title-prototypes {
  margin-top: 48px;
  font-size: 1.25rem;
  color: var(--text);
}

.portfolio-prototypes {
  margin-top: 24px;
}

/* Прототипы — видимый блок */
.portfolio-prototypes-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 8px auto 24px;
  line-height: 1.5;
}

.proto-links-minimal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.proto-links-minimal a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: center;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.proto-links-minimal a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.portfolio-prototypes-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: -8px auto 28px;
  line-height: 1.5;
}

.portfolio-card-prototype {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 520px;
}

.portfolio-card-prototype:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.portfolio-card-prototype:hover .proto-link {
  color: var(--accent);
}

.proto-sector {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 10px;
  border-radius: 6px;
  width: fit-content;
  z-index: 1;
}

.portfolio-card-prototype .portfolio-image-wrap {
  position: relative;
}

.proto-desc {
  flex-grow: 0;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  margin-bottom: 12px !important;
}

.proto-sectors-label,
.proto-features-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 0 0 4px 0;
  padding: 0 20px;
}

.proto-sectors,
.proto-features-list {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 20px 10px;
  padding: 0;
}

.portfolio-grid.portfolio-prototypes {
  align-items: stretch;
}

.proto-link {
  display: block;
  padding: 12px 20px 20px;
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}

/* ----- Ошибки и решения ----- */
.mistakes-list {
  display: grid;
  gap: 20px;
  max-width: 720px;
  width: 100%;
}

.mistake-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}

.mistake-card:hover {
  border-color: var(--accent);
}

.mistake-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text);
}

.mistake-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.mistake-solution {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--accent) !important;
  font-weight: 500;
}

/* ----- Testimonials ----- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0;
  font-style: normal;
}

.testimonial-card p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.testimonial-card cite {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}

/* ----- FAQ ----- */
.faq-list {
  max-width: 640px;
  width: 100%;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  background: var(--bg-card-hover);
}

.faq-item p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- About ----- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--text);
}

.about-visual {
  display: flex;
  justify-content: center;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  text-align: center;
  min-width: 240px;
}

.about-card-label {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.about-card-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
}

/* ----- For whom ----- */
.for-whom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.audience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition);
}

.audience-card:hover {
  border-color: var(--accent);
}

.audience-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.audience-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ----- Contact ----- */
.contact-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.contact-lead {
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-contact {
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-contact .btn-icon {
  flex-shrink: 0;
}

.contact-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.section.contact .container {
  align-items: center;
}

/* ----- CTA перед футером ----- */
.cta-final {
  padding-top: 60px;
  padding-bottom: 80px;
}

.cta-final .container {
  align-items: center;
}

.cta-final-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  max-width: 560px;
}

.cta-final .section-title {
  text-align: center;
}

.cta-final .cta-final-text {
  text-align: center;
}

.cta-final-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.cta-final .contact-buttons {
  margin-bottom: 0;
}

.contact-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.contact-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-note code {
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ----- Footer ----- */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  width: 100%;
  text-align: center;
}

.footer-tagline {
  width: 100%;
  text-align: center;
  margin: -4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ----- Responsive: шапка и мобильное меню ----- */
@media (max-width: 900px) {
  .nav {
    gap: 14px;
  }
  .nav a {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .header-controls {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
    width: 100%;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 80px 24px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-controls-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav a {
    padding: 14px 0;
    font-size: 1rem;
  }

  .burger {
    display: flex;
    z-index: 101;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    align-items: center;
    justify-content: center;
  }

  .burger span:nth-child(1) {
    transform: translateY(0) rotate(0);
  }
  .burger span:nth-child(2) {
    opacity: 1;
  }
  .burger span:nth-child(3) {
    transform: translateY(0) rotate(0);
  }

  body.nav-open .burger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  body.nav-open .burger span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .burger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-avatar-wrap {
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
  }

  .hero-avatar-initials {
    font-size: 1.65rem;
  }

  .hero-stats {
    gap: 28px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .section {
    padding: 64px 0;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-visual {
    order: -1;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .btn {
    min-height: 44px;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-link {
    justify-content: center;
    min-height: 48px;
  }

  .section {
    padding: 48px 0;
  }

  .card {
    padding: 24px 20px;
  }

  .contact-buttons {
    flex-direction: column;
    width: 100%;
  }

  .contact-buttons .btn {
    width: 100%;
  }
}

/* Узкие экраны: одна колонка, без горизонтального скролла */
@media (max-width: 400px) {
  .container {
    padding: 0 16px;
  }

  .services-grid,
  .why-grid,
  .portfolio-grid,
  .modules-grid {
    grid-template-columns: 1fr;
  }

  .proto-links-minimal {
    grid-template-columns: 1fr;
  }

  .process-timeline.why-grid {
    grid-template-columns: 1fr;
  }
}
