@import url("/assets/css/cms-extra.css");

@media (max-width: 1120px) {
  .desktop-nav { gap: 0.75rem; }
  .hero-grid { gap: 2.8rem; }
  .product-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .products-grid, .lab-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 920px) {
  .desktop-nav { display: none; }
  .mobile-menu-button { display: inline-grid; }
  .hero { min-height: auto; }
  .hero-grid, .case-hero__grid, .service-hero__grid, .product-hero__grid, .systems-layout, .demo-configurator, .contact-layout, .builder-shell, .process-grid, .about-grid, .lab-hero__grid, .privacy-layout, .insight-article__layout { grid-template-columns: 1fr; }
  .hero-copy { max-width: 43rem; }
  .hero-copy h1 { max-width: 10ch; }
  .hero-orbit { right: -11rem; bottom: -23rem; width: 44rem; height: 44rem; opacity: 0.55; }
  .control-card { width: min(100%, 38rem); }
  .case-hero__media { order: -1; }
  .case-content__layout { grid-template-columns: 1fr; }
  .case-toc { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 0 1rem; }
  .service-system-card { min-height: 310px; }
  .two-column-copy { grid-template-columns: 1fr; gap: 1.4rem; }
  .two-column-copy h2 { max-width: 15ch; }
  .product-hero__visual { min-height: 320px; }
  .insight-article__meta { position: static; }
  .portal-columns { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: auto; height: auto; padding: 1rem 4vw; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-sidebar > p { display: none; }
  .admin-sidebar nav { display: flex; overflow-x: auto; gap: 0.4rem; padding-bottom: 0; }
  .admin-sidebar nav a { white-space: nowrap; }
  .admin-sidebar form { justify-self: end; }
  .admin-main { min-width: 0; }
}

@media (max-width: 680px) {
  :root { --container: min(100% - 32px, 1240px); }
  body { font-size: 15px; }
  .header-inner { min-height: 62px; gap: 0.35rem; }
  .brand img { width: 36px; height: 24px; }
  .brand { gap: 0.3rem; font-size: 0.92rem; }
  .language-switcher, .search-button { display: none; }
  .header-actions .button--compact { min-height: 38px; padding: 0.48rem 0.62rem; font-size: 0.68rem; }
  .header-actions .button--compact svg { display: none; }
  .hero { padding-top: 3.8rem; }
  .hero-copy h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .hero-subtitle { max-width: 15rem; }
  .hero-orbit { right: -19rem; bottom: -25rem; width: 43rem; height: 43rem; }
  .control-card__section, .control-card__header { padding: 0.85rem; }
  .home-project-grid, .work-grid, .products-grid, .lab-grid, .pricing-grid, .portal-projects { grid-template-columns: 1fr; }
  .product-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading, .cta-section__inner, .portal-project__header { align-items: flex-start; flex-direction: column; }
  .section-heading { gap: 0.7rem; }
  .cta-section__inner { gap: 1rem; }
  .number-facts { grid-template-columns: repeat(2, 1fr); }
  .systems-map { min-height: 300px; }
  .systems-map__node { font-size: 0.52rem; }
  .systems-map__node--one { top: 7%; left: 7%; }
  .systems-map__node--two { top: 13%; right: 7%; }
  .systems-map__node--three { right: 2%; bottom: 25%; }
  .systems-map__node--four { bottom: 7%; left: 31%; }
  .systems-map__node--five { bottom: 27%; left: 2%; }
  .project-card__body { align-items: flex-start; flex-direction: column; }
  .project-card__link { align-self: flex-end; }
  .case-copy-grid, .case-feature, .case-technology { grid-template-columns: 1fr; gap: 1rem; }
  .case-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-row { grid-template-columns: 32px 1fr 34px; gap: 0.7rem; }
  .service-row > :nth-child(2) { display: none; }
  .check-list { grid-template-columns: 1fr; }
  .service-system-card__flow { grid-template-columns: repeat(2, 1fr); }
  .product-hero__visual { min-height: 270px; }
  .product-hero__list { right: 0.75rem; bottom: 0.75rem; }
  .demo-configurator { gap: 1.5rem; }
  .configurator-card fieldset { grid-template-columns: 1fr; }
  .configurator-card fieldset legend { grid-column: auto; }
  .builder-progress { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
  .builder-progress small { display: none; }
  .builder-progress li { min-height: 34px; }
  .builder-progress li span { width: 24px; height: 24px; }
  .option-grid, .form-grid { grid-template-columns: 1fr; }
  .builder-actions { position: sticky; bottom: 0.6rem; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 0.5rem; background: color-mix(in srgb, var(--surface-light) 94%, transparent); box-shadow: var(--shadow-sm); }
  .builder-actions .button { flex: 1 1 0; }
  .contact-form { padding: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .footer-brand, .footer-action { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 0.4rem; }
  .command-palette, .consent-dialog { width: calc(100vw - 24px); }
  .consent-banner { right: 0.75rem; bottom: 0.75rem; left: 0.75rem; width: auto; flex-direction: column; align-items: stretch; }
  .consent-banner__actions { justify-content: stretch; }
  .consent-banner__actions .button { flex: 1; }
  .portal-summary { grid-template-columns: 1fr; }
  .portal-project-card { align-items: flex-start; }
  .admin-sidebar { grid-template-columns: 1fr auto; }
  .admin-sidebar nav { grid-column: 1 / -1; grid-row: 2; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .admin-form, .localized-fields { grid-template-columns: 1fr; }
  .table-wrap { margin: 0 -1rem; }
}

@media (max-width: 380px) {
  :root { --container: calc(100vw - 24px); }
  .header-actions .button--compact { display: none; }
  .hero-copy h1 { font-size: 2.85rem; }
  .product-rail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-action { grid-column: auto; }
  .mobile-menu nav a { font-size: 1.25rem; }
}

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