/* ==========================================================================
   «Время строить» — Корпоративный сайт
   Стиль: Индустриальный минимализм (Industrial Minimalism)
   ========================================================================== */

/* --- CSS Переменные палитры и типографики --- */
:root {
  --color-anthracite:   #181A1C;
  --color-graphite:     #2D3238;
  --color-steel:        #656C74;
  --color-concrete:     #ECEAE5;
  --color-light-gray:   #F5F4F0;
  --color-white:        #FFFFFF;
  --color-border:       #D8D5CF;
  --color-border-dark:  #333A42;
  
  /* Акцентный строительный цвет: Технический янтарно-оранжевый */
  --color-accent:       #E8750A;
  --color-accent-hover: #D06400;
  --color-accent-light: rgba(232, 117, 10, 0.12);
  --color-accent-glow:  rgba(232, 117, 10, 0.25);

  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', "Roboto Mono", monospace;

  --max-width:    1280px;
  --header-h:     76px;
  --radius:       3px;
  --transition:   0.25s cubic-bezier(0.2, 0, 0, 1);
}

/* --- Локальные шрифты (Inter, JetBrains Mono) --- */
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style:  normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style:  normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style:  normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

/* --- Сброс и базовые настройки --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-graphite);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition);
}

ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* Scroll offset for fixed header */
section, [id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

/* --- Чертёжная фоновая сетка (Blueprint Grid) --- */
.blueprint-bg {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.blueprint-bg-dark {
  background-color: var(--color-anthracite);
  background-image:
    linear-gradient(rgba(232, 117, 10, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 117, 10, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* --- Контейнер --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Инженерные индексы и типографика --- */
.section-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-steel);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.section-index::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-anthracite);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 3.8vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin-bottom: 12px; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p  { margin-bottom: 12px; }

.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 { margin-bottom: 8px; }

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-steel);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow var(--transition), background-color var(--transition);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.98);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header__logo img {
  height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 26px);
  flex-shrink: 1;
}

.header__nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-graphite);
  position: relative;
  white-space: nowrap;
  padding: 6px 0;
  transition: color var(--transition);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-accent);
}
.header__nav a:hover::after,
.header__nav a.active::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Кнопки мессенджеров line-style */
.header__messengers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.messenger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-steel);
  background: var(--color-white);
  cursor: pointer;
  transition: all var(--transition);
}

.messenger-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateY(-1px);
}

.messenger-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Официальный знак MAX (картинка) */
.max-logo-img {
  display: block;
  width: 34px;
  height: 34px;
}

/* Кнопка телефона */
.btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-graphite);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all var(--transition);
  background: var(--color-white);
}

.btn-phone:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.btn-phone svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* Основная кнопка CTA */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-cta:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: 0 4px 14px var(--color-accent-glow);
  transform: translateY(-1px);
}

.btn-cta svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform var(--transition);
}
.btn-cta:hover svg {
  transform: translateX(3px);
}

/* Вторичная контурная кнопка */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-accent);
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px var(--color-accent-glow);
  transform: translateY(-1px);
}

/* Кнопка бургер-меню */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 6px;
  transition: border-color var(--transition);
}
.header__burger:hover {
  border-color: var(--color-accent);
}
.header__burger span {
  width: 20px;
  height: 2px;
  background: var(--color-graphite);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-steel);
}
.breadcrumbs a {
  color: var(--color-steel);
  transition: color var(--transition);
}
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .sep {
  margin: 0 8px;
  opacity: 0.5;
}
.breadcrumbs .current {
  color: var(--color-anthracite);
  font-weight: 600;
}

/* ==========================================================================
   HERO BLOCK
   ========================================================================== */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: var(--color-anthracite);
  color: var(--color-white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: #15181B;
  background-image:
    linear-gradient(135deg, rgba(21, 24, 27, 0.94) 0%, rgba(21, 24, 27, 0.8) 100%),
    linear-gradient(rgba(232, 117, 10, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 117, 10, 0.08) 1px, transparent 1px);
  background-size: cover, 48px 48px, 48px 48px;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.7;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 720px;
  padding: 60px 0 80px;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero__label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--color-accent);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 24px;
}

.hero p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
}

.hero__buttons {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   СЕКЦИИ И СЕТКИ
   ========================================================================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section--gray {
  background: var(--color-light-gray);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--dark {
  background: var(--color-anthracite);
  color: var(--color-white);
  border-top: 1px solid var(--color-border-dark);
  border-bottom: 1px solid var(--color-border-dark);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

/* Карточки услуг */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1E2226;
  position: relative;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__img img {
  transform: scale(1.03);
}

.card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card__body h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.card__body p {
  color: var(--color-steel);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: auto;
  transition: gap var(--transition);
}
.card__link:hover {
  gap: 10px;
}
.card__link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Раскрывающийся аккордеон в карточках услуг */
.card__details {
  border-top: 1px solid var(--color-border);
  margin-top: 12px;
  padding-top: 12px;
}

.card__details summary {
  cursor: pointer;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 13.5px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__details summary::-webkit-details-marker { display: none; }
.card__details summary::after {
  content: '+';
  font-size: 16px;
  font-family: var(--font-mono);
  font-weight: bold;
}
.card__details[open] summary::after {
  content: '−';
}

.card__details-content {
  padding: 12px 0 4px;
  font-size: 13.5px;
  color: var(--color-steel);
  line-height: 1.6;
}
.card__details-content ul {
  margin: 8px 0 16px 18px;
}
.card__details-content li {
  list-style: square;
  margin-bottom: 4px;
}

/* Блок Допуски и стандарты */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-item {
  background: var(--color-white);
  padding: 28px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.trust-item:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.trust-item svg {
  width: 36px;
  height: 36px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.6;
  margin: 0 auto 16px;
}
.trust-item h4 {
  margin-bottom: 8px;
  font-size: 15px;
}
.trust-item p {
  font-size: 13px;
  color: var(--color-steel);
  margin: 0;
}

/* Блок Этапы работы (чертёжный стиль) */
.steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 30px 0 10px;
}

.steps::before {
  content: '';
  position: absolute;
  top: 54px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--color-border-dark);
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 12px;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-anthracite);
  margin-bottom: 16px;
  box-shadow: 0 0 0 6px var(--color-anthracite);
}

.section--gray .step__num {
  background: var(--color-light-gray);
  box-shadow: 0 0 0 6px var(--color-light-gray);
}

.step h4 {
  font-size: 14.5px;
  margin-bottom: 6px;
}
.step p {
  font-size: 12.5px;
  color: var(--color-steel);
  margin: 0;
  font-family: var(--font-mono);
}

/* Портфолио / Проекты */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-graphite);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: #1E2226;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}

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

.project-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-card__img {
  transform: scale(1.03);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 24, 28, 0.95) 0%, rgba(20, 24, 28, 0.3) 60%, transparent 100%);
  z-index: 1;
}

.project-card__content {
  position: relative;
  z-index: 2;
  padding: 24px;
  color: var(--color-white);
}

.project-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid rgba(232, 117, 10, 0.4);
  background: rgba(232, 117, 10, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.project-card__content h3 {
  color: var(--color-white);
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.project-card__content p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Сетка документов и сертификатов */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.doc-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.doc-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.doc-item__preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #F8F8F6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-item__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.doc-item:hover .doc-item__preview img {
  transform: scale(1.02);
}

.doc-item__info {
  padding: 16px;
  border-top: 1px solid var(--color-border);
}
.doc-item__info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}
.doc-item__info p {
  font-size: 12px;
  color: var(--color-steel);
  font-family: var(--font-mono);
  margin: 0;
}

/* Основатели компании */
.founders {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  margin-top: 48px;
}

.founder {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition);
}
.founder:hover {
  border-color: var(--color-accent);
}

.founder__photo {
  flex-shrink: 0;
  width: 120px;
  height: 154px;
  background: #1E2226;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.founder__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder__info h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.founder__role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.founder__info p {
  font-size: 13.5px;
  color: var(--color-steel);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   КОНТАКТЫ
   ========================================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contacts-info {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
}

.contacts-info h3 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: var(--color-anthracite);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 14.5px;
}
.contact-row svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.6;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-row strong {
  display: block;
  font-size: 13px;
  color: var(--color-steel);
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-row a {
  color: var(--color-anthracite);
  font-weight: 600;
}
.contact-row a:hover {
  color: var(--color-accent);
}

.contacts-map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  min-height: 420px;
  position: relative;
  background: #E8E5E0;
}

.contacts-map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* ==========================================================================
   ФОРМЫ И ИНПУТЫ
   ========================================================================== */
.form-section {
  max-width: 680px;
  margin: 56px auto 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-anthracite);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-graphite);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.file-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  color: var(--color-steel);
  font-size: 13px;
  background: var(--color-light-gray);
  transition: border-color var(--transition), background-color var(--transition);
}
.file-input:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  color: var(--color-accent);
}
.file-input svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
}
.form-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.form-checkbox label {
  font-size: 12.5px;
  color: var(--color-steel);
  line-height: 1.5;
  cursor: pointer;
}
.form-checkbox label a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Honeypot anti-spam */
.ohnohoney {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Form success message */
.form-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
}
.form-success.active { display: block; }
.form-success svg {
  width: 50px;
  height: 50px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.6;
  margin: 0 auto 16px;
}
.form-success h3 {
  margin-bottom: 8px;
  color: var(--color-anthracite);
}
.form-success p {
  color: var(--color-steel);
  font-size: 14px;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--color-steel);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal__close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.modal__close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.modal h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.modal > p {
  font-size: 13.5px;
  color: var(--color-steel);
  margin-bottom: 24px;
}

/* Модальное окно выбора способа связи */
.modal--choice {
  max-width: 400px;
  padding: 48px 32px 28px;
  text-align: center;
}
.modal--choice .modal__close {
  top: 16px;
  right: 16px;
}
.modal--choice h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  padding: 0 32px;
}
.modal--choice > p {
  margin-bottom: 22px;
}

/* Кнопки-иконки выбора способа связи */
.choice-options {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
}
.btn-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  flex: 1;
  max-width: 132px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-graphite);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-choice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: all var(--transition);
}
.btn-choice__icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.btn-choice__label {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
}
.btn-choice:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.btn-choice--phone .btn-choice__icon {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 12px var(--color-accent-glow);
}
.btn-choice--phone:hover .btn-choice__icon {
  background: var(--color-accent-hover);
}
.btn-choice--max .btn-choice__icon {
  background: var(--color-light-gray);
  color: var(--color-accent);
  width: 56px;
  height: 56px;
}
.btn-choice--max:hover .btn-choice__icon {
  background: var(--color-border);
}
.btn-choice--max .max-logo-img {
  width: 34px;
  height: 34px;
}

/* ==========================================================================
   LIGHTBOX (для документов)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 21, 0.92);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }

.lightbox__content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  background: white;
}

.lightbox__caption {
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: 14px;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--color-white);
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition), color var(--transition);
}
.lightbox__close:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-anthracite);
  color: var(--color-white);
  padding: 16px 24px;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13.5px;
  border-top: 1px solid var(--color-border-dark);
}
.cookie-banner.active { display: flex; }
.cookie-banner p { margin: 0; line-height: 1.5; }
.cookie-banner a { color: var(--color-accent); text-decoration: underline; }
.cookie-banner button {
  padding: 7px 22px;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: background-color var(--transition);
}
.cookie-banner button:hover {
  background: var(--color-accent-hover);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--color-anthracite);
  color: rgba(255, 255, 255, 0.65);
  padding: 64px 0 24px;
  border-top: 1px solid var(--color-border-dark);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  gap: 36px;
  margin-bottom: 48px;
}

.footer__brand img {
  height: 52px;
  width: auto;
  max-width: 160px;
  margin-bottom: 16px;
  object-fit: contain;
}

.footer__brand p {
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer__col h4 {
  color: var(--color-white);
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.footer__col a {
  display: block;
  font-size: 13.5px;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer__col a:hover {
  color: var(--color-accent);
}

.footer__messengers {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.footer__messengers .messenger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin-bottom: 0;
  background: #24292E;
  border-color: #384048;
  color: rgba(255, 255, 255, 0.7);
}
.footer__messengers .messenger-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
.footer__messengers .max-logo-img {
  width: 34px;
  height: 34px;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   ВНУТРЕННИЕ СТРАНИЦЫ
   ========================================================================== */
.page-content {
  padding-top: var(--header-h);
}

.page-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 { margin-bottom: 8px; }
.page-hero p {
  color: var(--color-steel);
  font-size: 16px;
  max-width: 680px;
}

.text-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0 80px;
}
.text-page h2 {
  font-size: 1.4rem;
  margin-top: 36px;
  margin-bottom: 12px;
}
.text-page p, .text-page li {
  font-size: 14.5px;
  line-height: 1.7;
}
.text-page ul {
  margin: 8px 0 16px 20px;
}
.text-page li {
  list-style: square;
  margin-bottom: 6px;
}

/* ==========================================================================
   СТРАНИЦА 404
   ========================================================================== */
.page-404 {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
}
.page-404__code {
  font-family: var(--font-mono);
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 700;
  color: var(--color-concrete);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -3px;
}

/* ==========================================================================
   АНИМАЦИИ FADE-IN
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   МОБИЛЬНАЯ ПАНЕЛЬ СВЯЗИ
   ========================================================================== */
.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  z-index: 1500;
  padding: 6px 12px;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.mobile-contact-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--color-steel);
  padding: 4px;
  transition: color var(--transition);
}
.mobile-contact-bar a:hover {
  color: var(--color-accent);
}
.mobile-contact-bar svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}
.mobile-contact-bar .max-logo-img {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ / МЕДИАЗАПРОСЫ
   ========================================================================== */

/* Ноутбуки и планшеты в горизонтальной ориентации */
@media (max-width: 1180px) {
  .header__nav {
    gap: 14px;
  }
  .header__nav a {
    font-size: 13px;
  }
  .btn-phone span {
    display: none;
  }
  .btn-phone {
    padding: 7px 10px;
  }
  .btn-cta {
    padding: 8px 14px;
    font-size: 13px;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Планшеты (до 960px) - активация мобильного меню */
@media (max-width: 960px) {
  .header__burger {
    display: flex;
  }
  
  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform var(--transition);
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
    z-index: 999;
  }
  .header__nav.open {
    transform: translateX(0);
  }

  .header__nav a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-light-gray);
  }

  .header__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .header__burger.active span:nth-child(2) {
    opacity: 0;
  }
  .header__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .header__messengers {
    display: none;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .founders {
    grid-template-columns: 1fr;
  }
}

/* Мобильные экраны (до 767px) */
@media (max-width: 767px) {
  :root {
    --header-h: 64px;
  }

  .header__logo img {
    height: 40px;
  }

  .hero {
    min-height: 75vh;
  }
  .hero__content {
    padding: 40px 0 60px;
  }
  .hero p {
    font-size: 15px;
  }
  .hero__buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__buttons .btn-cta,
  .hero__buttons .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 50px 0;
  }

  .cards-grid,
  .projects-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }

  /* Вертикальные шаги на мобильном */
  .steps {
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
  }
  .steps::before {
    top: 24px;
    bottom: 24px;
    left: 24px;
    right: auto;
    width: 2px;
    height: auto;
  }
  .step {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
  }
  .step__num {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .founder {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .founder__photo {
    width: 140px;
    height: 180px;
  }

  .modal {
    padding: 24px 18px;
  }

  .form-section {
    padding: 24px 18px;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding-bottom: 60px;
  }

  .mobile-contact-bar {
    display: flex;
  }

  body {
    padding-bottom: 54px;
  }
}
