/* =========================================================
   INDIKOM — шапка, навигация, подвал, hero
   ========================================================= */

/* ---------------------------------------------------------
   Верхняя служебная полоса (только десктоп)
   --------------------------------------------------------- */
.topbar {
  display: none;
  background: var(--deeper);
  color: rgba(255, 255, 255, .62);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 36px;
}

/* Слева — адрес и часы работы. Держим как можно уже:
   трекинг минимальный, между фактами разделитель вместо широкого зазора. */
.topbar__meta { display: flex; align-items: center; gap: var(--sp-3); }
.topbar__fact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.topbar__fact + .topbar__fact { padding-left: var(--sp-3); box-shadow: -1px 0 0 rgba(255, 255, 255, .16); }
.topbar__fact svg { width: 13px; height: 13px; color: var(--cta); }
/* Строки короткие, поэтому часы помещаются уже с 1024px — порога скрытия не нужно */

/* Справа — служебное меню и кабинет */
.topbar__right { display: flex; align-items: center; gap: var(--sp-4); }

.topbar__links { display: flex; align-items: center; }
.topbar__links a {
  position: relative;
  padding: 2px var(--sp-3);
  color: rgba(255, 255, 255, .62);
  font-weight: 400;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.topbar__links a + a { box-shadow: -1px 0 0 rgba(255, 255, 255, .16); }
.topbar__links a:first-child { padding-left: 0; }
.topbar__links a::after {
  content: '';
  position: absolute;
  left: var(--sp-3); right: var(--sp-3);
  bottom: -1px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--cta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.topbar__links a:first-child::after { left: 0; }
.topbar__links a:hover { color: #fff; }
.topbar__links a:hover::after { transform: scaleX(1); }

.topbar__lk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px var(--sp-3) 4px 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.topbar__lk svg { width: 14px; height: 14px; }
.topbar__lk:hover {
  background: var(--cta);
  border-color: var(--cta);
  color: #fff;
}

@media (min-width: 1024px) { .topbar { display: block; } }

/* ---------------------------------------------------------
   Шапка
   --------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease);
}
.header.is-scrolled { box-shadow: var(--sh-sm); }

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

/* Логотип */
.logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-right: auto;
}
.logo svg, .logo img { height: 28px; width: auto; }
@media (min-width: 1024px) { .logo svg, .logo img { height: 33px; } }

/* --- Главное меню (десктоп) --- */
.nav { display: none; }

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
  }
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list li { margin: 0; position: relative; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--accent); background: var(--nav-hover-bg); }
.nav__link.is-active { color: var(--accent); }

.nav__link.is-active::after {
  content: '';
  position: absolute;
  left: var(--sp-3); right: var(--sp-3);
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--cta);
}

.nav__caret {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  opacity: .6;
  transition: transform var(--dur) var(--ease);
}
.nav__item--has-children:hover .nav__caret { transform: rotate(-135deg) translate(-1px, -1px); }

/* Выпадающее меню */
.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 228px;
  padding: 6px;
  margin-top: 6px;
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
}
.nav__item--has-children:hover > .nav__dropdown,
.nav__item--has-children:focus-within > .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown a {
  display: block;
  padding: 9px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-soft);
}
.nav__dropdown a:hover { background: var(--nav-hover-bg); color: var(--accent); }
.nav__dropdown a.is-active { background: var(--nav-hover-bg); color: var(--accent); font-weight: 600; }

/* --- Действия в шапке --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
}
/* Отбиваем телефон и кнопку от последнего пункта меню */
@media (min-width: 1024px) {
  .header__actions { margin-left: var(--sp-8); }
}
@media (min-width: 1240px) {
  .header__actions { margin-left: var(--sp-12); }
}

.header__phone { display: none; }
@media (min-width: 1180px) {
  .header__phone {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
    margin-right: var(--sp-2);
  }
  .header__phone a {
    font-family: var(--font-mono);
    font-size: var(--fs-base);
    font-weight: 600;
    /* Моноширинный даёт широкие пробелы и дефисы — поджимаем их,
       иначе номер занимает лишние 20 px в шапке. */
    letter-spacing: -0.06em;
    word-spacing: -0.35em;
    color: var(--text);
  }
  .header__phone a:hover { color: var(--cta); }
  .header__phone span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text-muted);
  }
}

.header__actions .header__cta,
.header__actions .header__lk { display: none; }
@media (min-width: 1024px) {
  .header__actions .header__cta,
  .header__actions .header__lk { display: inline-flex; }
}

/* Кнопка-телефон на мобильном */
.header__actions .header__call {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--cta);
}
.header__call svg { width: 20px; height: 20px; }
.header__call:hover { background: var(--cta); color: #fff; border-color: var(--cta); }
@media (min-width: 1024px) { .header__actions .header__call { display: none; } }

/* Бургер */
.burger {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
}
.burger__box { display: block; width: 20px; height: 14px; position: relative; }
.burger__line {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), top var(--dur) var(--ease);
}
.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 6px; }
.burger__line:nth-child(3) { top: 12px; }

.burger[aria-expanded="true"] .burger__line:nth-child(1) { top: 6px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__line:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__line:nth-child(3) { top: 6px; transform: rotate(-45deg); }

@media (min-width: 1024px) { .burger { display: none; } }

/* ---------------------------------------------------------
   Мобильное меню
   --------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease-out),
              visibility var(--dur);
  overscroll-behavior: contain;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

@media (min-width: 1024px) { .mobile-nav { display: none; } }

.mobile-nav__inner {
  padding: var(--sp-4) var(--gutter) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-height: 100%;
}

.mobile-nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.mobile-nav__list li { margin: 0; }

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  width: 100%;
  min-height: 46px;
  padding: 10px var(--sp-3);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.mobile-nav__link:hover,
.mobile-nav__link:active { background: var(--bg-soft); color: var(--text); }
.mobile-nav__link.is-active { color: var(--accent); background: var(--nav-hover-bg); }

.mobile-nav__toggle-icon {
  flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-20%);
  transition: transform var(--dur) var(--ease);
}
.mobile-nav__link[aria-expanded="true"] .mobile-nav__toggle-icon {
  transform: rotate(-135deg) translateY(-20%);
}

.mobile-nav__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--sp-2) var(--sp-4);
  display: none;
}
.mobile-nav__sub.is-open { display: grid; gap: 2px; }

.mobile-nav__sub a {
  display: block;
  min-height: 42px;
  padding: 9px var(--sp-3);
  border-left: 2px solid var(--border);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-soft);
}
.mobile-nav__sub a:hover { color: var(--accent); border-color: var(--accent); }
.mobile-nav__sub a.is-active { color: var(--accent); border-color: var(--cta); font-weight: 600; }

.mobile-nav__footer {
  margin-top: auto;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border-soft);
  display: grid;
  gap: var(--sp-3);
}
.mobile-nav__phone {
  display: block;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mobile-nav__phone span {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-brand);
  color: var(--text-invert);
  padding-block: clamp(2.25rem, 1.4rem + 3.5vw, 4.25rem);
  isolation: isolate;
}

/* Декоративная «сетка-оптика» */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(87,178,224,.3), transparent 45%),
    radial-gradient(circle at 85% 12%, rgba(227,6,19,.22), transparent 42%),
    radial-gradient(circle at 70% 90%, rgba(87,178,224,.18), transparent 50%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, #000 35%, transparent 100%);
}

.hero__grid {
  display: grid;
  gap: var(--sp-8);
  align-items: center;
}
@media (min-width: 992px) {
  .hero__grid { grid-template-columns: 1.08fr .92fr; gap: var(--sp-12); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px var(--sp-3);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
}
.hero__eyebrow svg { width: 16px; height: 16px; color: var(--sky-400); }

.hero__title {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.038em;
  color: #fff;
  margin-bottom: var(--sp-4);
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--sky-400), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__text {
  font-size: var(--fs-md);
  color: var(--text-invert-soft);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
}

.hero__points {
  list-style: none;
  padding: 0;
  margin: var(--sp-6) 0 0;
  display: grid;
  gap: 10px;
}
.hero__points li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-invert-soft);
}
.hero__points svg { flex: none; width: 18px; height: 18px; color: var(--sky-400); }

@media (min-width: 560px) {
  .hero__points { grid-template-columns: 1fr 1fr; }
}

/* Карточка-заявка в hero */
.hero__card {
  padding: clamp(var(--sp-5), 3vw, var(--sp-8));
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  color: var(--text);
}
.hero__card h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-2);
  color: var(--text);
}
.hero__card > p {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  margin-bottom: var(--sp-5);
}

/* ---------------------------------------------------------
   Шапка внутренней страницы
   --------------------------------------------------------- */
.page-head {
  position: relative;
  background: var(--deep);
  color: var(--text-invert);
  padding-block: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  overflow: hidden;
  isolation: isolate;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='22'%3E%3Ccircle cx='400' cy='400' r='120'/%3E%3Ccircle cx='400' cy='400' r='212'/%3E%3Ccircle cx='400' cy='400' r='304'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-repeat: no-repeat, repeat;
  background-position: right -40px bottom -80px, 0 0;
  background-size: 420px 420px, 54px 54px;
}
/* Красная засечка слева — фирменная метка раздела */
.page-head::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cta);
}
.page-head .breadcrumbs { color: var(--text-invert-soft); margin-bottom: var(--sp-3); }
.page-head__title { font-size: var(--fs-3xl); color: #fff; margin-bottom: 0; letter-spacing: var(--ls-display); }
.page-head__subtitle {
  margin-top: var(--sp-2);
  font-size: var(--fs-md);
  color: var(--text-invert-soft);
  max-width: 60ch;
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   Подвал (компактный)
   --------------------------------------------------------- */
.footer {
  background: var(--deeper);
  color: var(--text-invert-soft);
  padding-block: var(--sp-6) var(--sp-3);
  font-size: var(--fs-sm);
}

/* Верхняя строка: логотип + телефон и кнопка */
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer__logo { display: inline-flex; color: #fff; }
.footer__logo svg { height: 26px; width: auto; }

.footer__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.footer__phone {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}
.footer__phone:hover { color: var(--cta); }

/* Колонки ссылок */
.footer__grid {
  display: grid;
  gap: var(--sp-5) var(--sp-8);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-block: var(--sp-5);
}
@media (min-width: 860px) {
  .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.footer__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin: 0; }
.footer__list a {
  display: inline-block;
  padding: 3px 0;
  color: var(--text-invert-soft);
  line-height: 1.45;
}
.footer__list a:hover { color: #fff; }

/* Контакты: иконка + текст в строку */
.footer__list--contacts li {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  padding: 3px 0;
  line-height: 1.45;
}
.footer__list--contacts svg {
  flex: none;
  width: 15px; height: 15px;
  margin-top: 4px;
  color: var(--sky-400);
}
.footer__list--contacts a { padding: 0; }

/* Нижняя строка */
.footer__bottom {
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
}
.footer__bottom a { color: var(--text-invert-soft); }
.footer__bottom a:hover { color: #fff; }

.footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.footer__soc {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: #fff;
  transition: background-color var(--dur-fast) var(--ease);
}
.footer__soc:hover { background: rgba(255, 255, 255, .18); }
.footer__soc svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------
   Плавающая панель звонка (мобильный)
   --------------------------------------------------------- */
.call-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--gutter);
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease-out);
}
.call-bar.is-visible { transform: translateY(0); }
.call-bar .btn { flex: 1; min-height: 44px; font-size: var(--fs-sm); }

@media (min-width: 1024px) { .call-bar { display: none; } }

/* Отступ под плавающую панель, чтобы не перекрывала подвал */
@media (max-width: 1023px) {
  body { padding-bottom: 0; }
  .footer { padding-bottom: calc(var(--sp-3) + 66px); }
}

/* ---------------------------------------------------------
   Недельный график в подвале — семь полосок и часы
   --------------------------------------------------------- */
.footer__hours { align-items: flex-start; }

.week {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-left: var(--sp-1);
  margin-top: -1px;
}

/* Пять синих полосок сверху, две красные снизу */
.week__bars {
  display: grid;
  gap: 2px;
  flex: none;
}
.week__bar {
  width: 26px;
  height: 3px;
  background: var(--sky-500);
}
.week__bar--off { background: var(--cta); }

.week__text {
  display: grid;
  gap: 1px;
  line-height: 1.45;
  white-space: nowrap;
}
.week__off { color: #ff8f96; }
