/* PEK Civil Defence responsive screen adapter
   Desktop / tablet / TV safety layer. Mobile layout below 769px is intentionally untouched. */
:root {
  --pcd-vh: 100vh;
  --pcd-vw: 100vw;
  --pcd-safe-x: clamp(28px, 4.2vw, 88px);
  --pcd-wide-max: 1560px;
}

html.pcd-screen-ready {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (min-width: 769px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  img, video, iframe, canvas, svg {
    max-width: 100%;
  }

  /* Prevent mobile-only visuals from leaking into desktop / TV browser modes. */
  .hero-mobile-image,
  .mobile-scroll-cue,
  .hero-machine-mobile,
  .mobile-swipe-cue-right,
  .ffrs-mobile-swipe-cue-right,
  .ffrs-pillars-dots,
  .mobile-products-dots,
  .mobile-products-swipe-cue {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #nav {
    max-width: 100vw;
  }

  #hero {
    min-height: clamp(680px, var(--pcd-vh), 1080px);
  }

  .ffrs-page #hero,
  .deminer-page #hero,
  .lugv-page #hero,
  .vanquisher-page #hero {
    min-height: clamp(700px, var(--pcd-vh), 1080px);
  }

  .hero-bg,
  .hero-photo,
  .d-img,
  .s-img,
  .action-bg,
  .scenario-bg,
  [style*="background-image"] {
    background-repeat: no-repeat !important;
    background-size: cover !important;
  }

  .hero-bg {
    background-position: center center !important;
  }

  .container,
  .ffrs-video-wrap,
  .eng-inner,
  .scen-inner,
  .comp-inner,
  .action-inner,
  .mission-inner,
  .tech-wrap,
  .cap-grid,
  .domain-grid,
  .products-grid {
    max-width: min(var(--pcd-wide-max), calc(100vw - (var(--pcd-safe-x) * 2))) !important;
  }
}

@media (min-width: 769px) and (max-height: 760px) {
  #nav {
    height: 68px !important;
  }

  #hero {
    min-height: 720px !important;
  }

  #hero .hero-content {
    transform: scale(.94);
    transform-origin: left center;
  }

  .ffrs-page #hero .hero-content,
  .deminer-page #hero .hero-content,
  .lugv-page #hero .hero-content,
  .vanquisher-page #hero .hero-content {
    transform: scale(.92);
    transform-origin: left center;
  }
}

@media (min-width: 1280px) and (max-width: 1599px) {
  :root { --pcd-safe-x: clamp(34px, 4vw, 64px); }

  #hero .hero-content {
    max-width: min(760px, calc(100vw - 160px));
  }
}

@media (min-width: 1600px) {
  :root { --pcd-safe-x: clamp(56px, 5vw, 110px); }

  .container,
  .ffrs-video-wrap,
  .eng-inner,
  .scen-inner,
  .comp-inner,
  .action-inner,
  .mission-inner,
  .tech-wrap {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (min-width: 1900px) and (min-height: 900px) {
  #hero .hero-content {
    margin-left: clamp(72px, 5.8vw, 148px);
  }

  .ffrs-page .hero-h1,
  .deminer-page .hero-h1,
  .lugv-page .hero-h1,
  .vanquisher-page .hero-h1 {
    font-size: clamp(68px, 5vw, 108px) !important;
  }

  .ffrs-page .hero-h2,
  .deminer-page .hero-h2,
  .lugv-page .hero-h2,
  .vanquisher-page .hero-h2 {
    font-size: clamp(24px, 2vw, 42px) !important;
  }
}

@media (min-width: 2300px) {
  html.pcd-desktop-screen {
    font-size: clamp(16px, .72vw, 19px);
  }

  .products-grid,
  .domain-grid,
  .cap-grid,
  .reqs-grid,
  .scen-grid {
    gap: clamp(22px, 1.5vw, 34px) !important;
  }
}

html.pcd-tv-screen body {
  overflow-x: hidden !important;
  background: #050505;
}

@media (min-width: 769px) {
  html.pcd-tv-screen #hero {
    min-height: var(--pcd-vh) !important;
    max-height: none !important;
  }

  html.pcd-tv-screen .hero-bg {
    inset: 0 !important;
    transform: none !important;
    filter: brightness(.9);
  }

  html.pcd-tv-screen .hero-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  html.pcd-tv-screen .hero-machine-mobile,
  html.pcd-tv-screen .hero-mobile-image {
    display: none !important;
  }

  html.pcd-tv-screen .container,
  html.pcd-tv-screen .ffrs-video-wrap,
  html.pcd-tv-screen .eng-inner,
  html.pcd-tv-screen .scen-inner,
  html.pcd-tv-screen .comp-inner {
    max-width: min(1480px, calc(100vw - 96px)) !important;
  }
}
