/* Shared responsive layer for the downloaded site. */
:root {
  --mobile-gutter: clamp(16px, 5vw, 28px);
  --mobile-red: #eb2b23;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

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

img,
video {
  height: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
li,
a {
  overflow-wrap: anywhere;
}

.home-footer__brands,
.home-footer__bottom > div {
  margin-inline: auto;
}

.ck-mobile-menu-toggle,
.ck-mobile-nav,
.ck-mobile-nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  body.ck-mobile-nav-open {
    overflow: hidden;
    touch-action: none;
  }

  .site-header > nav,
  #masthead .elementor-element-66f4283 .elementor-nav-menu--main,
  #masthead .elementor-element-66f4283 > .elementor-widget-container > .elementor-menu-toggle,
  #masthead .elementor-element-66f4283 > .elementor-widget-container > .elementor-nav-menu--dropdown {
    display: none !important;
  }

  .ck-mobile-menu-toggle {
    position: fixed;
    z-index: 30003;
    top: max(14px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    color: #fff;
    background: rgba(5, 6, 6, .9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .ck-mobile-menu-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
  }

  .ck-mobile-menu-toggle__icon,
  .ck-mobile-menu-toggle__icon::before,
  .ck-mobile-menu-toggle__icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: '';
    transition: transform .22s ease, opacity .22s ease;
  }

  .ck-mobile-menu-toggle__icon {
    position: relative;
  }

  .ck-mobile-menu-toggle__icon::before,
  .ck-mobile-menu-toggle__icon::after {
    position: absolute;
    left: 0;
  }

  .ck-mobile-menu-toggle__icon::before { top: -7px; }
  .ck-mobile-menu-toggle__icon::after { top: 7px; }

  .ck-mobile-menu-toggle[aria-expanded="true"] .ck-mobile-menu-toggle__icon {
    background: transparent;
  }

  .ck-mobile-menu-toggle[aria-expanded="true"] .ck-mobile-menu-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .ck-mobile-menu-toggle[aria-expanded="true"] .ck-mobile-menu-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .ck-mobile-nav-backdrop {
    position: fixed;
    z-index: 30000;
    inset: 0;
    background: rgba(0, 0, 0, .64);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility 0s linear .24s;
  }

  .ck-mobile-nav {
    position: fixed;
    z-index: 30002;
    top: 0;
    right: 0;
    display: block;
    width: min(88vw, 390px);
    height: 100dvh;
    padding: calc(84px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    color: #fff;
    background: linear-gradient(155deg, #171717 0%, #050505 68%, #260704 100%);
    box-shadow: -18px 0 45px rgba(0, 0, 0, .42);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
    overscroll-behavior: contain;
  }

  .ck-mobile-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }

  .ck-mobile-nav.is-open + .ck-mobile-nav-backdrop {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  .ck-mobile-nav__label {
    margin: 0 0 18px;
    color: var(--mobile-red);
    font: 700 13px/1.2 Montserrat, Arial, sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  .ck-mobile-nav__links {
    display: grid;
    gap: 4px;
  }

  .ck-mobile-nav a,
  .ck-mobile-nav summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 11px 12px;
    border-radius: 8px;
    color: #fff;
    font: 600 16px/1.35 Montserrat, Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .ck-mobile-nav a:hover,
  .ck-mobile-nav a:focus-visible,
  .ck-mobile-nav a[aria-current="page"],
  .ck-mobile-nav summary:hover,
  .ck-mobile-nav summary:focus-visible {
    color: #fff;
    background: var(--mobile-red);
    outline: none;
  }

  .ck-mobile-nav details {
    margin: 0;
  }

  .ck-mobile-nav summary {
    justify-content: space-between;
    list-style: none;
  }

  .ck-mobile-nav summary::-webkit-details-marker { display: none; }
  .ck-mobile-nav summary::after { content: '+'; font-size: 24px; font-weight: 400; }
  .ck-mobile-nav details[open] summary::after { content: '−'; }

  .ck-mobile-nav__subnav {
    display: grid;
    gap: 2px;
    padding: 5px 0 8px 13px;
    border-left: 1px solid rgba(255, 255, 255, .2);
  }

  .ck-mobile-nav__subnav a {
    min-height: 44px;
    font-size: 14px;
    font-weight: 500;
  }

  .brand-wordmark {
    max-width: calc(100vw - 96px);
  }

  .cursor-1,
  .cursor-2,
  .cursor-3,
  .cursor-6,
  .cursor-icon {
    display: none !important;
  }

  /* Homepage: keep archived full-width Elementor sections inside the viewport. */
  .elementor-7,
  .elementor-7 .e-con,
  .elementor-7 .e-con-inner,
  .footer-width-fixer,
  .elementor-543 {
    max-width: 100%;
  }

  .elementor-7 .elementor-widget-container,
  .elementor-543 .elementor-widget-container {
    min-width: 0;
  }

  .elementor-7 .elementor-button,
  .elementor-543 .elementor-button {
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .site-header {
    min-height: 76px;
  }

  .site-header .brand-wordmark {
    width: 190px;
    height: 34px;
  }

  .site-header .brand-wordmark::after {
    font-size: 26px;
  }

  .home-footer__main,
  .home-footer__brands,
  .home-footer__bottom > div {
    width: min(calc(100% - 32px), 540px) !important;
  }

  .home-footer__main {
    gap: 34px !important;
  }

  .home-footer__brands {
    justify-content: center !important;
  }

  .home-footer__bottom > div {
    align-items: flex-start;
    gap: 8px !important;
  }

  .about-main,
  .service-main,
  .blog-shell,
  .portfolio-grid,
  .career-content,
  .contact-cards,
  .contact-form-section {
    width: min(calc(100% - 32px), 560px) !important;
  }

  .about-hero h1,
  .blog-hero h1,
  .portfolio-hero h1,
  .career-hero h1,
  .contact-hero h1 {
    font-size: clamp(2.55rem, 13vw, 4rem) !important;
  }

  .intro__image {
    min-height: 0 !important;
    aspect-ratio: 4 / 3;
  }

  .intro__image img {
    height: 100% !important;
  }

  .service-hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.8rem) !important;
  }

  .service-hero p,
  .service-main p {
    font-size: 16px !important;
  }

  .service-visual {
    padding: 36px 18px;
  }

  .post__body {
    width: calc(100% - 16px);
    padding: 30px 20px 24px;
  }

  .post__meta span {
    display: block;
    margin: 0 0 3px;
  }

  .project__info {
    inset: auto 14px 22px;
  }

  .project h2 {
    margin-bottom: 16px;
  }

  .vacancy__summary {
    overflow-wrap: anywhere;
  }

  .contact-card p,
  .contact-card a {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .contact-card br {
    display: none;
  }

  .contact-form input,
  .contact-form textarea {
    min-height: 50px;
    font-size: 16px;
  }

  .contact-form button,
  .cta,
  .apply,
  .post__link,
  .project a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Turn the homepage hover-only portfolio into a usable stacked touch layout. */
  #eael-img-accordion-9d177fe.eael-img-accordion {
    display: grid !important;
    height: auto !important;
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  #eael-img-accordion-9d177fe .eael-image-accordion-item {
    width: 100% !important;
    min-height: 260px !important;
    flex: none !important;
    border-radius: 10px;
    overflow: hidden;
  }

  #eael-img-accordion-9d177fe .overlay {
    opacity: 1 !important;
    visibility: visible !important;
    background: linear-gradient(transparent 25%, rgba(0, 0, 0, .82)) !important;
  }

  #eael-img-accordion-9d177fe .overlay-inner,
  #eael-img-accordion-9d177fe .overlay-inner * {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .local-services-card,
  .local-services-card .elementor-element-0fcf846 {
    min-height: 420px !important;
  }

  .elementor-element-c9382a6 .elementor-widget-icon .elementor-icon {
    width: 96px !important;
    height: 96px !important;
  }

  .elementor-element-c9382a6 .elementor-widget-icon .elementor-icon svg {
    width: 58px !important;
    height: 58px !important;
  }
}

@media (max-width: 480px) {
  .ck-mobile-nav {
    width: min(92vw, 370px);
    padding-inline: 18px;
  }

  .ck-mobile-menu-toggle {
    right: 12px;
    width: 46px;
    height: 46px;
  }

  .site-header {
    padding-inline: 16px !important;
  }

  .site-header .brand-wordmark {
    width: 170px;
  }

  .site-header .brand-wordmark::after {
    font-size: 23px;
  }

  .local-hero,
  .local-hero__grid,
  .local-hero__robot-grid,
  .local-hero__rocket-copy {
    min-height: 700px !important;
  }

  .local-hero__grid,
  .local-hero__robot-grid,
  .local-hero__rocket-copy {
    width: min(calc(100% - 34px), 440px) !important;
  }

  .local-hero__headline {
    font-size: clamp(2.65rem, 14vw, 3.75rem) !important;
  }

  .local-hero__art img {
    max-height: 225px !important;
  }

  .local-hero__robot-art {
    height: min(34vh, 280px) !important;
  }

  .local-hero__arrow {
    top: auto !important;
    bottom: 16px;
    transform: none !important;
  }

  .local-hero__dots {
    bottom: 28px !important;
  }

  .why,
  .contact-form,
  .post__body {
    border-radius: 10px;
  }

  .category-list button {
    flex-basis: calc(50% - 5px) !important;
  }

  .project {
    aspect-ratio: 1.12 !important;
  }

  .contact-form {
    padding-inline: 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
