/* benrigear — mobile nav drawer + home density */

body.is-nav-open {
  overflow: hidden;
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  touch-action: none;
}

@media (max-width: 960px) {
  .kk-nav {
    padding-top: max(0.55rem, env(safe-area-inset-top));
    padding-left: max(0.85rem, env(safe-area-inset-left));
    padding-right: max(0.85rem, env(safe-area-inset-right));
  }

  .kk-menubtn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
  }

  .kk-nav__links,
  .kk-nav__tel,
  .kk-nav__actions .kk-btn--heat {
    display: none !important;
  }

  .kk-drawer__panel {
    width: min(100vw - 1rem, 400px);
    padding:
      max(1.1rem, env(safe-area-inset-top))
      1.15rem
      max(1.35rem, env(safe-area-inset-bottom));
    background:
      radial-gradient(420px 220px at 100% 0%, rgba(53, 202, 130, 0.14), transparent 55%),
      linear-gradient(165deg, #f7fcff, #e4f4fb 55%, #d7eef8);
  }

  .kk-drawer__brand {
    font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  }

  .kk-drawer__nav a,
  .kk-drawer__phone,
  .kk-drawer__sos {
    opacity: 0;
    transform: translateX(28px);
    transition:
      opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
      color 0.2s;
  }

  .kk-drawer.is-open .kk-drawer__nav a {
    opacity: 1;
    transform: none;
    transition-delay: calc(90ms + var(--i, 0) * 70ms);
  }

  .kk-drawer.is-open .kk-drawer__sos {
    opacity: 1;
    transform: none;
    transition-delay: 0.38s;
  }

  .kk-drawer.is-open .kk-drawer__phone {
    opacity: 1;
    transform: none;
    transition-delay: 0.44s;
  }

  .kk-drawer__nav a {
    min-height: 54px;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
  }

  .kk-drawer__close {
    width: 48px;
    height: 48px;
  }

  /* Hero: avoid tall empty stack */
  .kk-hero {
    min-height: min(72svh, 560px) !important;
  }

  .kk-hero__copy {
    padding: 1.75rem 1rem 2rem;
  }

  .kk-hero__brand {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
    line-height: 0.92;
  }

  .kk-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .kk-hero__actions .kk-btn {
    width: 100%;
    min-height: 48px;
  }

  /* Console / services density */
  .kk-console {
    grid-template-columns: 1fr;
  }

  .kk-console__panel,
  .kk-console__metrics {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .kk-console__metrics {
    grid-template-columns: 1fr 1fr;
  }

  .kk-console__metrics article {
    min-height: 0;
    padding: 1rem 0.85rem;
  }

  .kk-console__media {
    min-height: 200px;
    aspect-ratio: 16 / 10;
  }

  .kk-board__row {
    grid-template-columns: 32px 72px 1fr;
    gap: 0.55rem;
    padding: 0.85rem 0.25rem;
    min-height: 0;
  }

  .kk-board__meta,
  .kk-board__arrow {
    display: none;
  }

  .kk-board__thumb {
    width: 72px;
    height: 56px;
    overflow: hidden;
    border-radius: 0.35rem;
  }

  .kk-board__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .kk-dispatch {
    min-height: auto;
  }

  .kk-dispatch__copy {
    padding: 2rem 1rem;
  }

  .kk-thermal__media {
    min-height: 180px;
    aspect-ratio: 16 / 11;
  }

  .kk-rail article {
    display: grid;
    gap: 0.85rem;
  }

  .kk-rail__media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .kk-cta {
    min-height: min(52svh, 420px);
  }

  .kk-faqband__media {
    min-height: 220px;
    aspect-ratio: 4 / 5;
  }

  .kk-whyviz {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 0 0 1.25rem;
  }

  .kk-whyviz img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 0.4rem;
  }
}

.kk-whyviz {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

.kk-whyviz img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .kk-hero {
    min-height: min(68svh, 520px) !important;
  }

  .kk-console__metrics {
    grid-template-columns: 1fr 1fr;
  }

  .kk-btn--pulse {
    animation: kkPulseSoft 2.4s ease-in-out infinite;
  }
}

@keyframes kkPulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 92, 57, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(255, 92, 57, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .kk-drawer__nav a,
  .kk-drawer__phone,
  .kk-drawer__sos,
  .kk-btn--pulse {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
