/* ==========================================================================
   GOGOOD CANONICAL UNIFIED HEADER (MASTHEAD) SYSTEM
   Absolute invariant: identical geometry, colors, logo and fonts across ALL pages.
   ========================================================================== */

/* Outer sticky frame */
header.masthead,
.masthead {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: 86px !important;
  min-height: 86px !important;
  max-height: 86px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(248, 245, 237, 0.96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(6, 46, 38, 0.08) !important;
  box-shadow: 0 4px 20px rgba(6, 46, 38, 0.04) !important;
  z-index: 1000 !important;
  box-sizing: border-box !important;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

/* Centered content box */
header.masthead .masthead-inner,
.masthead .masthead-inner {
  max-width: 1560px !important;
  width: 100% !important;
  height: 86px !important;
  min-height: 86px !important;
  max-height: 86px !important;
  margin: 0 auto !important;
  padding: 0 clamp(16px, 3vw, 40px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

/* Brand Sticker Logo: pure white text on brand green plate with electric accent drop. */
header.masthead .logo,
.masthead .logo {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  font-style: italic !important;
  letter-spacing: -0.055em !important;
  position: relative !important;
  isolation: isolate !important;
  transform: rotate(-4deg) !important;
  white-space: nowrap !important;
  color: #ffffff !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  margin-left: 10px !important;
  padding: 2px 0 !important;
}

header.masthead .logo:before,
header.masthead .logo:after,
.masthead .logo:before,
.masthead .logo:after {
  content: '' !important;
  position: absolute !important;
  inset: -6px -11px !important;
  border-radius: 9px !important;
  transform: skewX(-10deg) !important;
  z-index: -1 !important;
}

header.masthead .logo:before,
.masthead .logo:before {
  background: var(--pr-accent) !important; /* canonical electric lime */
  transform: translate(5px, 5px) skewX(-10deg) !important;
}

header.masthead .logo:after,
.masthead .logo:after {
  background: var(--pr-brand-forest) !important; /* лого-плашка = лесной (единый с direction-страницами) */
}

header.masthead .logo sup,
.masthead .logo sup {
  font-size: 10px !important;
  vertical-align: top !important;
  margin-left: 2px !important;
  color: var(--pr-accent) !important;
  font-style: normal !important;
}

/* Navigation items */
header.masthead nav,
.masthead nav {
  display: flex !important;
  align-items: center !important;
  gap: clamp(16px, 2vw, 30px) !important;
  margin: 0 !important;
  padding: 0 !important;
}

header.masthead nav a,
.masthead nav a {
  color: var(--pr-ink) !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding-block: 8px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  transition: color 0.15s ease !important;
}

header.masthead nav a:hover {
  color: var(--pr-brand) !important;
  text-decoration: underline !important;
  text-underline-offset: 5px !important;
}

header.masthead nav a[aria-current="page"] {
  color: var(--pr-brand) !important;
  font-weight: 700 !important;
}

/* Header actions (Search, Favs, Discuss CTA) */
header.masthead .header-actions,
.masthead .header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

header.masthead .header-icon-btn,
.masthead .header-icon-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  background: rgba(6, 46, 38, 0.05) !important;
  border: 1px solid rgba(6, 46, 38, 0.08) !important;
  color: var(--pr-ink) !important;
  display: grid !important;
  place-items: center !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

header.masthead .header-icon-btn:hover,
.masthead .header-icon-btn:hover {
  background: rgba(6, 46, 38, 0.1) !important;
  color: var(--pr-brand) !important;
  transform: translateY(-1px) !important;
}

header.masthead .header-icon-btn svg,
.masthead .header-icon-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
}

header.masthead .desktop-cta,
.masthead .desktop-cta,
header.masthead .button,
.masthead .button {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 20px !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 40px !important;
  background: var(--pr-brand) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 85, 62, 0.2) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

header.masthead .desktop-cta:hover,
.masthead .desktop-cta:hover {
  background: var(--pr-brand-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 85, 62, 0.3) !important;
}

header.masthead .desktop-cta svg,
.masthead .desktop-cta svg {
  width: 15px !important;
  height: 15px !important;
  stroke: currentColor !important;
}

/* Mobile toggle button */
header.masthead .menu-toggle,
.masthead .menu-toggle {
  display: none !important;
  background: var(--pr-brand) !important;
  border: 1.5px solid color-mix(in oklch, var(--pr-accent) 45%, transparent) !important;
  border-radius: 12px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  place-items: center !important;
  cursor: pointer !important;
  color: var(--pr-accent) !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 85, 62, 0.22) !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

header.masthead .menu-toggle:active,
.masthead .menu-toggle:active {
  transform: scale(0.94) !important;
  background: var(--pr-brand-press) !important;
}

header.masthead .menu-toggle svg,
.masthead .menu-toggle svg {
  width: 22px !important;
  height: 22px !important;
  stroke: var(--pr-accent) !important;
  stroke-width: 2.4 !important;
  stroke-linecap: round !important;
  fill: none !important;
}

/* Responsive breakpoint: max 900px */
@media (max-width: 900px) {
  header.masthead,
  .masthead {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    padding: 0 !important;
    position: relative !important;
    background: rgba(248, 245, 237, 0.98) !important;
  }
  header.masthead .masthead-inner,
  .masthead .masthead-inner {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    padding: 0 20px !important;
    position: relative !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .masthead-inner::before {
    display: none !important;
    content: none !important;
  }
  header.masthead .masthead-inner > .logo,
  .masthead .masthead-inner > .logo {
    position: static !important;
    transform: rotate(-4deg) !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 10 !important;
  }
  .mobile-menu-head .logo {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: rotate(-4deg) !important;
    margin: 0 !important;
    display: inline-flex !important;
  }
  header.masthead nav,
  .masthead nav {
    display: none !important;
  }
  header.masthead .desktop-cta,
  .masthead .desktop-cta {
    display: none !important;
  }
  header.masthead .favorites-toggle,
  .masthead .favorites-toggle {
    display: none !important;
  }
  header.masthead .header-actions,
  .masthead .header-actions {
    position: static !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 20 !important;
  }
  header.masthead .search-toggle,
  .masthead .search-toggle {
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: transparent !important;
    border: none !important;
    color: #121512 !important;
    padding: 0 !important;
  }
  header.masthead .search-toggle svg,
  .masthead .search-toggle svg {
    width: 22px !important;
    height: 22px !important;
    stroke: #121512 !important;
    stroke-width: 2.2 !important;
  }
  header.masthead .menu-toggle,
  .masthead .menu-toggle {
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #121512 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  header.masthead .menu-toggle svg,
  .masthead .menu-toggle svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #121512 !important;
    stroke-width: 2.4 !important;
  }
}

/* ==========================================================================
   4. Нативная навигация: cross-document View Transitions + Popover API
   Замена самодельного turbo.js. Смена страниц — на @view-transition
   (плавный переход в Chromium, в остальных — обычная мгновенная навигация),
   дровер мобильного меню и модал брифа — на popover="auto" (закрытие по Esc,
   клику мимо и нативный ::backdrop — бесплатно).
   ========================================================================== */
@view-transition {
  navigation: auto;
}

/* Страничные анимации перехода: короткий fade-in нового состояния.
   Найдено в инлайн-стилях внутренних страниц, вынесено сюда, чтобы не
   потерять на страницах с самодельными головами (index, /merch/, /travel/).
   Дубли с page-local правилами одноименны — каскад безопасен. */
@keyframes gg-fade-out{from{opacity:1}to{opacity:0}}
@keyframes gg-fade-in{from{opacity:0}to{opacity:1}}
::view-transition-old(root){animation:90ms cubic-bezier(0.4,0,1,1) both gg-fade-out}
::view-transition-new(root){animation:210ms cubic-bezier(0,0,0.2,1) both gg-fade-in}
/* Шапка склевается между страницами (визуальная перманентность) */
.masthead{view-transition-name:main-masthead}

/* --- Модал брифа (#gg-modal-brief): popover="auto" --- */
/* Оверрайд легаси `.gg-modal` (display:flex и is-open из style.css не действуют) */
#gg-modal-brief[popover] {
  display: none;
  opacity: 0;
  visibility: hidden;
  /* обёртка всегда прозрачна: затемнение даёт ::backdrop (в старой схеме
     бэкдроп-див красил поверх фона обёртки — теперь наоборот, поэтому фон
     держим архитектурно сильным) */
  background: transparent;
  /* обёртка пропускает клики сквозь себя на ::backdrop — лайт-дисмисс нативой */
  pointer-events: none;
  transition: opacity .28s cubic-bezier(.16, 1, .3, 1), visibility .28s,
              display .28s allow-discrete, overlay .28s allow-discrete;
}
#gg-modal-brief:popover-open {
  display: flex;
  opacity: 1;
  visibility: visible;
}
/* Нейтрализация UA-поля popover (fit-content, Canvas, margin:auto). Синоним
   нулевой специфичности: свои правила страниц (padding панели дровера и др.)
   всегда сильнее, UA — всегда слабее. */
:where(#gg-modal-brief[popover]) {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  overflow: visible;
}
#gg-modal-brief[popover] .gg-modal-card {
  pointer-events: auto;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}
/* Легаси анимация карточки ждала класс is-open — теперь состояние даёт popover */
#gg-modal-brief:popover-open .gg-modal-card {
  transform: scale(1) translateY(0);
}
#gg-modal-brief[popover]::backdrop {
  background: rgba(6, 46, 38, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .28s ease, display .28s allow-discrete, overlay .28s allow-discrete;
}
#gg-modal-brief:popover-open::backdrop {
  opacity: 1;
}
@starting-style {
  #gg-modal-brief:popover-open,
  #gg-modal-brief:popover-open::backdrop {
    opacity: 0;
  }
  #gg-modal-brief:popover-open .gg-modal-card {
    transform: scale(0.96) translateY(14px);
  }
}

/* --- Мобильное меню-дровер (#mobile-menu): popover="auto" --- */
/* Оверрайд легаси `#mobile-menu` и правил [hidden] из style.css */
#mobile-menu[popover] {
  display: none;
  pointer-events: none;
  /* Вид старой схемы: бэкдроп-див красил 75% тьмы ПОВЕРХ бумаги обёртки.
     Красим обёртку тем же готовым миксом (у модала фон честно прозрачный —
     там старая схема затемняла страницу, не фон). */
  background: color-mix(in srgb, var(--paper, #f8f5ed) 25%, rgb(4 28 22) 75%);
}
/* Нейтрализация UA-поля popover — нулевая специфичность (см. модал) */
:where(#mobile-menu[popover]) {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  overflow: visible;
}
#mobile-menu:popover-open {
  display: flex;
}
/* Страницы Codex (gd-page) легаси-правилом body:has(.gd-page) #mobile-menu:not([hidden])
   стилизуют меню под бумажный дропдаун (inset 86px, padding 24, bg paper) —
   это ломает канонический popover-дровер. Гасим контейнер на оба состояния:
   закрыто — display:none, открыто — полный экран без легаси-контейнера. */
html:has(.gd-page) #mobile-menu[popover]:not(:popover-open) {
  display: none !important;
}
html:has(.gd-page) #mobile-menu[popover]:popover-open {
  z-index: 99999 !important;
  inset: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: color-mix(in srgb, #f8f5ed 25%, #041c16 75%) !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
  display: flex !important;
}
#mobile-menu[popover] .mobile-menu-drawer {
  pointer-events: auto;
  transform: translateY(-100%);
  transition: transform .32s cubic-bezier(.16, 1, .3, 1),
              display .32s allow-discrete, overlay .32s allow-discrete;
}
#mobile-menu:popover-open .mobile-menu-drawer {
  transform: translateY(0);
}
#mobile-menu[popover]::backdrop {
  background: rgba(4, 28, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .25s ease, display .25s allow-discrete, overlay .25s allow-discrete;
}
#mobile-menu:popover-open::backdrop {
  opacity: 1;
}
@starting-style {
  #mobile-menu:popover-open .mobile-menu-drawer,
  #mobile-menu:popover-open::backdrop {
    opacity: 0;
  }
  #mobile-menu:popover-open .mobile-menu-drawer {
    transform: translateY(-100%);
  }
}

/* Контраст надзаголовков секций на светлых страницах (travel/merch):
   легаси-правило красило все .eyebrow в белый с !important; на светлых
   секциях это бледный текст 2.2:1 — тёмный бренд-текст по макету. */
@media (max-width: 700px) {
  .section-title-wrap .eyebrow { color: rgba(6, 46, 38, 0.85) !important; }
}

/* Sticky-шапка по умолчанию: на широких и узких экранах (поздний оверрайд
   отменяет легаси-«relative» и в мобайле). Фон и тень уже в базовом правиле. */
header.masthead, .masthead {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
}

/* ==========================================================================
   DIRECTIONS (мобайл, макет Экран 2): фото справа во всю высоту карточки,
   слева бейдж «НАПРАВЛЕНИЕ» + капсула «Подробнее ↗»; на Travel стикер lime.
   ========================================================================== */
@media (max-width: 680px) {
  .direction {
    height: 248px !important;
    min-height: 248px !important;
    max-height: 248px !important;
  }
  .direction-media-wrap {
    width: 56% !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
  }
  .direction.business .direction-media-wrap img,
  .direction.travel .direction-media-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .direction-body {
    width: 46% !important;
    max-width: 46% !important;
    height: 100% !important;
    padding: 18px 4px 18px 16px !important;
    justify-content: flex-start !important;
  }
  .direction-body h2 {
    font-size: 24px !important;
  }
  .direction-badge {
    display: inline-block !important;
    font-family: 'Golos Text', Arial, sans-serif !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.92) !important;
    margin: 0 0 8px !important;
  }
  /* Круглая стрелка заменяем капсулой «Подробнее ↗» по макету */
  .direction-circle-btn { display: none !important; }
  .direction-btn-more {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin-top: auto !important;
    min-height: 34px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    background: var(--pr-white) !important;
    color: var(--pr-ink-mob) !important;
    font-family: 'Golos Text', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(6, 46, 38, 0.18) !important;
  }
  .direction-btn-more svg { width: 11px !important; height: 11px !important; }
  /* Travel: стикер «ПУТЕШЕСТВИЯ…» lime top-right */
  .direction.travel .note {
    display: inline-block !important;
    position: absolute !important;
    right: -3px !important;
    top: 12px !important;
    z-index: 4 !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
    padding: 8px 11px !important;
    border-radius: 10px !important;
    transform: rotate(-7deg) !important;
  }
  /* дудл-линии над фото (Business), как в макете */
  .business-doodle-rays { top: 10px !important; left: 44% !important; }
  /* пин на пунктире у края фото */
  .trail-pin { left: 40% !important; bottom: 16px !important; }
}

@media (max-width: 680px) {
  /* Сброс смещения легаси: body в потоке, без top/left-загибов */
  .direction-body {
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    padding: 16px 4px 16px 16px !important;
  }
}

/* ==========================================================================
   DIRECTIONS (десктоп): img живёт в .direction-media-wrap — легаси-правила
   писались на прямой ребёнок .direction > img и больше не применяются.
   Кадрирование travel каноническое 54% 45% (бренд на рюкзаке).
   ========================================================================== */
@media (min-width: 681px) {
  .direction .direction-media-wrap img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .direction.business .direction-media-wrap img { object-position: center !important; }
  .direction.travel .direction-media-wrap img { object-position: 54% 45% !important; }
  /* градиент читаемости вернуть, если легаси в мобайл-блоке его погасил */
  .direction-overlay { display: block !important; }
}

@media (max-width: 680px) {
  /* Стикер не вылезает за карточку (был right -3px → обрезка радиусом) */
  .direction.travel .note { right: 8px !important; top: 10px !important; }
  /* Тело шире: заголовок «Travel-мерч» не наезжает на фото */
  .direction-body { width: 48% !important; max-width: 48% !important; }
  .direction-media-wrap { width: 52% !important; }
  /* заголовок не уходит под фото вовсе */
  .direction-body h2 { position: relative !important; z-index: 3 !important; max-width: 100% !important; }
}

@media (max-width: 680px) {
  /* Легаси-щели: у media-wrap паддинги 14/38/12/12 → фото в «рамке». Ноль. */
  .direction .direction-media-wrap { padding: 0 !important; }
}

/* Единичные боковые поля секций на мобиле (по макетам: ~16px),
   кроме полн-блид hero. */
@media (max-width: 680px) {
  .directions, .process, .cases, .closing {
    margin-inline: 16px !important;
    width: auto !important;
  }
}

@media (max-width: 680px) {
  .models, .models .wrap { padding-inline: 16px !important; }
}

@media (max-width: 680px) {
  .models { margin-inline: 0 !important; }
  .footer-wrap { padding-inline: 16px !important; margin-inline: 0 !important; }
}

@media (max-width: 680px) {
  .models { width: auto !important; }
}

@media (max-width: 680px) {
  .site-footer { padding-inline: 16px !important; }
}

@media (max-width: 680px) {
  /* Направления мобайл: фото во ВСЮ карточку, тёмная плашка слева убрана.
     Текст поверх с градиентом читаемости (как в макете Travel). */
  .direction .direction-media-wrap {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
  .direction-overlay {
    display: block !important;
    /* лёгкое затемнение слева (текстовая зона), к центру фото открыто */
    background: linear-gradient(90deg, rgba(6, 46, 38, 0.48) 0%, rgba(6, 46, 38, 0.15) 40%, transparent 70%) !important;
  }
  /* Единый отступ текста: travel-правило из style.css (0,2,1) перебивает
     короткий селектор — добавляем его в мобильный селектор на равных */
  .direction-body, .direction.travel .direction-body {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    bottom: 16px !important;
    right: 38% !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }
  .direction-body h2, .direction-body p {
    text-shadow: 0 1px 14px rgba(2, 24, 18, 0.55) !important;
  }
  .business-doodle-rays { left: 60% !important; top: 12px !important; }
  .trail-pin { left: 18% !important; }
}

@media (max-width: 680px) {
  /* Направления: скругление со всех четырёх углов */
  .direction { border-radius: 24px !important; }
}

@media (max-width: 680px) {
  /* радиус со всех углов даже у travel (легаси-правило 0,2,0 перекрывало) */
  .direction, .direction.travel, .direction.business {
    border-radius: 24px !important;
  }
}

@media (max-width: 680px) {
  /* Без скошенного правого края (легаси clip-path на плашках): ровные карточки */
  .direction, .direction.travel, .direction.business { clip-path: none !important; }
}


/* ==========================================================================
   МОДАЛ БРИФА — канонические стили для ВСЕХ страниц (header.css подключён
   везде; style.css есть не на всех). Токены уже внутри. Порядок: после
   поповер-механики; page-local оверрайды страниц (если будут) выигрывают.
   ========================================================================== */
.gg-modal { position: fixed; inset: 0px; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s; box-sizing: border-box; z-index: 9999999 !important; }
.gg-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.gg-modal-backdrop { position: absolute; inset: 0px; background: rgba(6, 46, 38, 0.72); backdrop-filter: blur(12px); }
.gg-modal-card { position: relative; z-index: 2; width: 100%; max-width: 520px; background: rgb(255, 255, 255); border-radius: 28px; padding: clamp(24px, 4vw, 36px); box-shadow: rgba(6, 46, 38, 0.45) 0px 24px 64px -12px, rgba(6, 46, 38, 0.1) 0px 0px 0px 1px; transform: scale(0.96) translateY(14px); transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1); max-height: 92vh; overflow-y: auto; font-family: var(--font-sans, "Golos Text", sans-serif); box-sizing: border-box; }
.gg-modal.is-open .gg-modal-card { transform: scale(1) translateY(0px); }
.gg-modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(6, 46, 38, 0.12); background: rgb(248, 245, 237); color: var(--pr-ink); display: grid; place-items: center; cursor: pointer; transition: 0.2s; padding: 0px; }
.gg-modal-close:hover { background: rgb(216, 248, 50); border-color: rgb(216, 248, 50); transform: rotate(90deg) scale(1.05); }
.gg-modal-badge { display: inline-block; padding: 4px 12px; background: rgba(0, 77, 56, 0.08); color: var(--pr-brand-press); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; margin-bottom: 12px; }
.gg-modal-title { font-size: clamp(24px, 3vw, 32px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.12; color: var(--pr-ink); margin: 0px 0px 8px; padding-right: 32px; }
.gg-modal-desc { font-size: 14.5px; line-height: 1.45; color: rgb(74, 92, 84); margin: 0px 0px 22px; }
.gg-form-group { margin-bottom: 16px; text-align: left; }
.gg-form-label { display: block; font-size: 13px; font-weight: 700; color: var(--pr-ink); margin-bottom: 8px; letter-spacing: -0.01em; }
.gg-input { width: 100%; height: 50px; padding: 0px 16px; border-radius: 14px; border: 1.5px solid rgba(6, 46, 38, 0.15); font-size: 15px; color: var(--pr-ink); background: rgb(252, 251, 248); box-sizing: border-box; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.gg-input:focus { outline: none; background: rgb(255, 255, 255); border-color: var(--pr-brand-press); box-shadow: rgba(0, 77, 56, 0.12) 0px 0px 0px 4px; }
textarea.gg-input { height: auto; padding: 12px 16px; resize: vertical; }
.gg-modal-submit { width: 100%; height: 52px; border-radius: 999px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; background: var(--pr-brand-press); color: rgb(255, 255, 255); font-size: 16px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: background 0.2s, transform 0.2s, box-shadow 0.2s; box-shadow: rgba(0, 77, 56, 0.35) 0px 10px 24px -4px; margin-top: 10px; font-family: inherit; }
.gg-modal-submit:hover { background: var(--pr-brand-deep); transform: translateY(-2px); box-shadow: rgba(0, 77, 56, 0.45) 0px 14px 28px -4px; }
.gg-modal-submit:active { transform: scale(0.98); }
.gg-modal-legal { margin: 12px 0px 0px; font-size: 11.5px; line-height: 1.4; color: rgb(140, 144, 138); text-align: center; }
.gg-modal-success { text-align: center; padding: 24px 8px; }
.gg-success-icon { width: 60px; height: 60px; border-radius: 50%; background: rgb(216, 248, 50); color: var(--pr-ink); font-size: 30px; font-weight: 900; display: grid; place-items: center; margin: 0px auto 16px; }
.gg-modal-success h4 { margin: 0px 0px 8px; font-size: 26px; font-weight: 850; color: var(--pr-ink); line-height: 1.15; }
.gg-modal-success p { margin: 0px 0px 20px; font-size: 14.5px; line-height: 1.5; color: rgb(74, 92, 84); }
.gg-modal-close-btn { padding: 13px 28px; border-radius: 999px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; background: var(--pr-ink); color: rgb(255, 255, 255); font-size: 14.5px; font-weight: 750; cursor: pointer; transition: background 0.2s; }
.gg-modal-close-btn:hover { background: var(--pr-brand-press); }
.gg-modal-locked { overflow: hidden !important; }
.gg-modal { padding: 10px; }
.gg-modal-card { border-radius: 22px; padding: 22px 18px 18px; max-height: 94vh; }
.gg-modal-close { top: 14px; right: 14px; width: 32px; height: 32px; }
.gg-modal-title { font-size: 21px; padding-right: 28px; }
.gg-modal-desc { font-size: 13px; margin-bottom: 16px; }
.gg-input { height: 46px; font-size: 14px; }
.gg-modal-submit { height: 48px; font-size: 15px; }
.gg-modal, #gg-modal-brief { z-index: 9999999 !important; }

@media (max-width: 680px) {
  /* Travel не выезжает за поля: легаси отрицательный margin-inline */
  .direction.travel { margin-inline: 0 !important; }
}

/* ==========================================================================
   МОБАЙЛ ПО ФИНАЛЬНОМУ МАКЕТУ (подборка 4)
   ========================================================================== */
@media (max-width: 680px) {
  /* Hero: контент слева, по низу карточки; кнопка почти на всю ширину */
  .hero-copy {
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 0 20px !important;
    width: 100% !important;
    padding-top: 70px !important;
    align-items: flex-start !important;
  }
  .hero-copy > * { text-align: left !important; }
  .hero-actions > .button { width: 100% !important; max-width: 350px !important; }
  .hero-actions { align-items: stretch !important; }
  /* рукописная надпись «Своё производство в Москве» — справа сверху */
  .handwritten {
    display: block !important;
    right: 10px !important;
    top: 46px !important;
    font-size: 15px !important;
    max-width: 130px !important;
    transform: rotate(-8deg) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 12px rgba(4, 28, 22, 0.5) !important;
  }
  .hero { height: 620px !important; }
  .hero-copy { position: relative !important; z-index: 2 !important; }

  /* УТП: 4 колонки в один ряд, иконки сверху */
  .proof {
    grid-template-columns: repeat(4, 1fr) !important;
    padding: 16px 14px !important;
    gap: 6px !important;
  }
  .proof > div {
    flex-direction: column !important;
    text-align: center !important;
    border: 0 !important;
    gap: 6px !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
  }
  .proof svg { width: 24px !important; height: 24px !important; margin: 0 auto !important; }
  .proof .proof-strip-text { display: flex !important; flex-direction: column !important; gap: 1px !important; }

  /* Направления: круглая стрелка справа-центр вместо капсулы «Подробнее» */
  .direction-circle-btn {
    display: grid !important;
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 4 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 50% !important;
    background: var(--pr-white) !important;
    color: var(--pr-ink-mob) !important;
    box-shadow: 0 3px 12px rgba(2, 24, 18, 0.25) !important;
  }
  .direction-btn-more { display: none !important; }
  .direction-body { right: 24% !important; }
  /* лайм-чёрта у заголовка секции */
  .directions-main-title::before {
    content: "" !important;
    display: block !important;
    width: 28px !important;
    height: 4px !important;
    background: var(--pr-accent) !important;
    border-radius: 3px !important;
    margin: 0 0 8px !important;
    transform: rotate(-4deg) !important;
  }

  /* Модели: круглые стрелки в подписях карточек */
  .model .circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #ecead-f2 !important;
    background: rgba(246, 244, 234, 0.92) !important;
    color: var(--pr-ink-mob) !important;
    box-shadow: 0 2px 8px rgba(6, 46, 38, 0.14) !important;
  }
  .model .circle svg { width: 13px !important; height: 13px !important; }

  /* Кейсы: заголовок с чёртой, тёмный круг на карточке справа-центр */
  .cases .wrap > .section-top h2::before {
    content: "" !important;
    display: block !important;
    width: 28px !important;
    height: 4px !important;
    background: var(--pr-accent) !important;
    border-radius: 3px !important;
    margin: 0 0 8px !important;
    transform: rotate(-4deg) !important;
  }
  /* тёмный круг-стрелка убран (решение владельца): наезжал на «Смотреть кейс».
     span-квалификатор — иначе общие span-правила с !important перебивают */
  span.case-go,
  .case .case-info span.case-go { display: none !important; }
  .case-go svg { width: 16px !important; height: 16px !important; }
  .case-link { display: none !important; }

  /* Дравер: лого = каноничная плашка шапки (зелёная + лайм-дроп).
     Отдельная лайм-чёрта удалена: ::after — это зелёная плашка лого,
     её перекраска оставляла белый текст прямо на лайме (1.2:1). */
  .mobile-contacts-list { display: flex !important; gap: 10px !important; justify-content: center !important; }
  .mobile-contact-pill {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
  }
  .mobile-contact-pill span:last-child { display: none !important; }

  /* шапка: сердечко вместо лупы на мобиле */
  .header-actions .icon-link svg { display: none; }
}

/* ==========================================================================
   ФИНАЛЬНЫЙ МАКЕТ (подборка 8): уточнения против промежуточных правок
   ========================================================================== */
@media (max-width: 680px) {
  /* Hero: контент по центру (как в макете), кнопка почти на всю ширину */
  .hero-copy {
    text-align: center !important;
    width: 94% !important;
    margin: 0 auto !important;
    padding: 70px 20px 0 !important;
  }
  .hero-copy > * { text-align: center !important; }
  .hero-actions { align-items: center !important; }
  /* рукпись «Своё производство в Москве» справа сверху, как в макете */
  .handwritten {
    display: block !important;
    right: 12px !important;
    top: 52px !important;
    font-size: 14px !important;
    max-width: 120px !important;
  }
  /* Модели: стрелки в подписях — простые ↗, не в кругах */
  .model .circle {
    width: auto !important;
    height: auto !important;
    background: none !important;
    box-shadow: none !important;
  }
  .model .circle svg { width: 13px !important; height: 13px !important; }
  /* Travel-стикер в финале отсутствует */
  .direction.travel .note { display: none !important; }
  /* Дравер: широкие плитки контактов (не круги), как в макете */
  .mobile-contacts-list { display: block !important; }
  .mobile-contact-pill {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    border-radius: 14px !important;
    padding: 0 16px !important;
    justify-content: flex-start !important;
    display: flex !important;
    gap: 10px !important;
  }
  .mobile-contact-pill span:last-child { display: inline-block !important; font-size: 13px !important; font-weight: 700 !important; }
  /* Пилюля «Весь каталог (34)» в секции моделей — в финале нет */
  .catalog-top-pill { display: none !important; }
  /* Дравер: пункт «Главная» в финале отсутствует */
  .mobile-menu-drawer nav a[href="/"] { display: none !important; }
}

/* Шапка: лупа показывается и на мобиле (в финальном макете лупа, не сердечко) */
@media (max-width: 680px) {
  .header-actions .icon-link svg { display: block !important; }
  .icon-fav { display: none !important; }
}

@media (min-width: 681px) {
  .icon-fav { display: none !important; }
}


/* ==========================================================================
   ПРАВКА ВЛАДЕЛЬЦА (2026-11-13): направления на мобайле — стрелка без круга,
   plain ↗ справа-снизу, одинаково на обеих карточках
   ========================================================================== */
@media (max-width: 680px) {
  .direction-circle-btn {
    display: grid !important;
    position: absolute !important;
    right: 16px !important;
    bottom: 14px !important;
    top: auto !important;
    transform: none !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    margin: 0 !important;
  }
  .direction-circle-btn svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #ffffff !important;
    stroke-width: 2.2 !important;
    fill: none !important;
  }
  /* центрируем hero по вертикали: карточка контента посередине экрана */
  .hero { display: flex !important; align-items: center !important; }
  .hero-copy {
    margin: auto !important;
    padding: 24px 20px !important;
  }
}


/* ==========================================================================
   Мобильный дровер — полный визуал (перенос из style.css: он подключён не на всех
   страницах, а компонент шапки — везде). Значения токенов продублированы
   фолбэками: страница без tokens.css не должна оставаться без кожи.
   ========================================================================== */
/* Premium Fullscreen Deep Forest Green Mobile Menu Drawer (Экран 4) */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  visibility: visible;
  opacity: 1;
  transition: visibility 0.25s ease, opacity 0.25s ease;
}
#mobile-menu[hidden] {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 28, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-menu-drawer {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--pr-brand-deep, #013320);
  background: linear-gradient(180deg, var(--pr-brand-abyss, #012b20) 0%, var(--pr-brand-deep, #013320) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px 24px;
  transform: translateY(0);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
#mobile-menu[hidden] .mobile-menu-drawer {
  transform: translateY(-100%);
}

.mobile-menu-topo {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 240px;
  height: 220px;
  pointer-events: none;
  z-index: 1;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 16px;
  position: relative;
  z-index: 2;
}
.mobile-menu-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.mobile-menu-close:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.94);
}
.mobile-menu-close svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0 20px;
  position: relative;
  z-index: 2;
}
.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  text-decoration: none;
  color: #ffffff !important;
  font-family: 'Golos Text', sans-serif;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.025em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: opacity 0.15s ease;
}
.mobile-nav-item:last-child {
  border-bottom: none;
}
.mobile-nav-item:active {
  opacity: 0.8;
}
.mobile-nav-arr {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  position: relative;
  z-index: 2;
  padding-top: 14px;
}
.mobile-btn-main {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 20px !important;
  background: var(--pr-accent, #d1ff39) !important;
  color: var(--color-on-accent, #121512) !important;
  font-family: 'Golos Text', sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
  border-radius: 999px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px color-mix(in oklch, var(--pr-accent, #d1ff39) 35%, transparent) !important;
  transition: transform 0.15s ease !important;
}
.mobile-btn-main:active {
  transform: scale(0.98) !important;
}
.mobile-btn-main svg {
  width: 15px;
  height: 15px;
  stroke: #121512;
  stroke-width: 2.4;
  fill: none;
}

.mobile-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-contact-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
  font-family: 'Golos Text', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.mobile-contact-pill:active {
  background: rgba(255, 255, 255, 0.16);
}
.mobile-contact-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffffff;
}
.mobile-contact-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}
.mobile-contact-icon.tg svg {
  fill: currentColor;
  stroke: none;
}
.mobile-btn-phone svg{width:15px;height:15px;stroke:var(--ink, #062e26);stroke-width:2}
.mobile-btn-tg:active,.mobile-btn-phone:active{transform:scale(0.98)}

.mobile-menu-foot{display:flex;align-items:center;justify-content:space-between;margin-top:14px;padding-top:12px;border-top:1px solid rgba(6,46,38,0.06);font-size:11px;color:rgba(6,46,38,0.5);font-weight:500}

/* Заголовки секций на мобиле: пилюля «Весь каталог/Все кейсы» абсолютом справа,
   заголовок — на всю ширину строки (перебивает более ранние flex-правила) */
@media (max-width: 680px) {
  .models .section-heading-row,
  .cases .section-heading-row { display: block !important; position: relative !important; }
  .models .section-title-wrap,
  .cases .section-title-wrap { width: 100% !important; }
  .models .section-heading-row .catalog-top-pill,
  .cases .section-heading-row .catalog-top-pill {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
  }
}

/* gd-страницы (merch/travel) на мобиле: hero на всю ширину, без радиуса и крошек */
@media (max-width: 700px) {
  .gd-page .gd-hero {
    margin: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    min-height: calc(100svh - 70px) !important;
  }
  /* крошки живут вне .gd-page (прямой ребёнок body) — глушим через :has */
  body:has(.gd-page) .bc { display: none !important; }
}


/* ==========================================================================
   Футер — перенос из style.css: он подключён не на всех страницах (gd-страницы
   живут на бандле), а футер общий. Значения идентичны, дубль безопасен.
   ========================================================================== */
.site-footer{background:var(--pr-brand-abyss);color:#f8f5ed;padding:48px min(5vw,60px) 24px;margin-top:60px;border-top:1px solid rgba(255,255,255,0.08)}
.footer-wrap{display:flex;justify-content:space-between;flex-wrap:wrap;gap:40px;max-width:1400px;margin:0 auto}
.footer-brand{max-width:320px}
.footer-brand .logo{color:#ffffff}
.footer-note{font-size:13px;line-height:1.5;color:rgba(248,245,237,0.7);margin-top:14px}
.footer-links{display:flex;gap:60px}
.footer-col{display:flex;flex-direction:column;gap:10px}
.footer-title{font-size:11px;text-transform:uppercase;letter-spacing:.12em;font-weight:700;color:var(--color-inverse);margin-bottom:6px}
.footer-col a{color:rgba(248,245,237,0.8);text-decoration:none;font-size:13.5px;transition:color .15s ease}
.footer-col a:hover{color:#ffffff}
.footer-bottom{max-width:1400px;margin:36px auto 0;padding-top:20px;border-top:1px solid rgba(255,255,255,0.1);display:flex;justify-content:space-between;flex-wrap:wrap;gap:16px;font-size:12px;color:rgba(248,245,237,0.55)}
.footer-bottom a{color:rgba(248,245,237,0.65);text-decoration:none}
.footer-bottom a:hover{color:#ffffff}
