/* Tablet and compact desktop */
@media (max-width: 1100px) {
  :root {
    --pr-container-gutter: 5vw;
    --pr-section-y: 80px;
    --pr-section-y-large: 96px;
    --pr-card-gap: 32px;
    --pr-fs-h1: 50px;
    --pr-fs-h2: 42px;
    --pr-fs-h3: 28px;
  }

  .site-branding :is(a.brand img, .custom-logo) {
    max-width: 170px;
  }

  .main-navigation .primary-menu-container > ul > li.menu-item > a {
    padding-inline: 11px;
    font-size: 14px;
  }

  .main-navigation .primary-menu-container > ul > li.pr-menu-cta > a {
    padding-inline: 15px;
  }

  .pr-hero {
    padding-block: 80px;
  }

  .pr-hero--cover {
    min-height: 700px;
    padding-block: 0;
  }

  .pr-hero--cover .pr-hero__inner {
    min-height: 700px;
    padding-block: 92px;
  }

  .home .pr-hero__title {
    font-size: 52px;
  }

  .home .pr-hero--cover .pr-hero__title {
    max-width: 650px;
    font-size: 54px;
  }

  .pr-hero__grid,
  .pr-hero--context .pr-hero__grid,
  .pr-split,
  .pr-rfq-layout {
    grid-template-columns: 1fr;
  }

  .pr-hero__content {
    max-width: 760px;
  }

  .pr-hero__media {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .pr-hero__media img {
    min-height: 0;
  }

  .pr-rfq-copy {
    position: static;
  }

  .pr-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pr-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pr-featured-project {
    grid-template-columns: 1fr;
  }

  .pr-featured-project__media {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  .home .single-content > .pr-trust-strip {
    margin-top: -40px;
    padding-bottom: 28px;
  }

  .home .pr-trust-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home .pr-trust-strip .pr-stat {
    min-height: 118px;
    padding: 22px 20px;
  }

  .home .pr-trust-strip .pr-stat:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .pr-site-footer__grid {
    grid-template-columns: 1.25fr 1fr 1fr;
  }

  .pr-site-footer__contact {
    grid-column: 1 / -1;
  }

  :where(.pr-page-resources) .pr-resource-card > .wp-block-group__inner-container {
    grid-template-columns: minmax(200px, 0.4fr) minmax(0, 1fr);
  }

  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number),
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number) .pr-icon-card:nth-child(2),
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) .pr-partner-card:nth-child(2) {
    border-right: 0;
  }

  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number) .pr-icon-card:nth-child(-n + 2),
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) .pr-partner-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card {
    border-right: 1px solid var(--pr-context-border, var(--pr-color-border));
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card:nth-child(2n) {
    border-right: 0;
  }
}

/* Vertical timelines */
@media (max-width: 900px) {
  .pr-grid.pr-process-grid {
    overflow: visible;
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pr-process-grid::before {
    inset: 10px auto 10px 14px;
    width: 1px;
    height: auto;
  }

  .pr-process-card {
    min-height: 0;
    padding: 52px 0 32px 72px;
  }

  .pr-process-card::before {
    top: 4px;
    left: 8px;
  }

  .pr-process-card::after {
    top: 0;
    left: 72px;
    font-size: 29px;
  }

  .pr-stage-path {
    grid-template-columns: 1fr;
    border-block: 0;
  }

  .pr-stage-path__item {
    min-height: 0;
    padding: var(--pr-space-6) 0 var(--pr-space-6) 64px;
    border-right: 0;
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  .pr-stage-path__item:first-child {
    border-top: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  .pr-stage-path__item::before {
    top: 0;
    bottom: 0;
    left: 18px;
    width: 1px;
    height: auto;
  }

  .pr-stage-path__number {
    margin-bottom: var(--pr-space-4);
  }

  .pr-section--light .pr-stage-path__item {
    border-bottom-color: var(--pr-color-light-border);
  }

  .pr-section--light .pr-stage-path__item:first-child {
    border-top-color: var(--pr-color-light-border);
  }

  .pr-section--light .pr-document-card .pr-card__body > .wp-block-group__inner-container {
    grid-template-areas:
      "meta title"
      "meta body";
    grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
    gap: var(--pr-space-3) var(--pr-space-5);
  }

  .pr-section--light .pr-document-card .pr-card__meta { grid-area: meta; }
  .pr-section--light .pr-document-card .pr-card__title { grid-area: title; }
  .pr-section--light .pr-document-card .pr-card__body p:not(.pr-card__meta) { grid-area: body; }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --pr-container-gutter: 4vw;
    --pr-section-y: 64px;
    --pr-section-y-large: 64px;
    --pr-card-gap: 24px;
    --pr-fs-h1: 36px;
    --pr-fs-h2: 32px;
    --pr-fs-h3: 26px;
    --pr-fs-body: 16px;
    --pr-fs-small: 14px;
    --pr-header-height: 68px;
  }

  .site-branding :is(a.brand img, .custom-logo) {
    max-width: 175px;
    max-height: 42px;
  }

  .menu-toggle-open {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .pr-hero {
    padding-block: 64px;
  }

  .pr-hero--cover {
    min-height: 720px;
    padding-block: 0;
  }

  .pr-hero--cover::before {
    background:
      linear-gradient(90deg, rgba(5, 8, 11, 0.96) 0%, rgba(5, 8, 11, 0.9) 58%, rgba(5, 8, 11, 0.66) 100%),
      linear-gradient(rgba(5, 8, 11, 0.42) 0%, rgba(5, 8, 11, 0.12) 46%, rgba(5, 8, 11, 0.84) 100%);
  }

  .pr-hero--cover .pr-hero__inner {
    min-height: 720px;
    align-items: flex-end;
    padding-block: 72px 58px;
  }

  .pr-hero__background img {
    object-position: 65% 50%;
  }

  .home .pr-hero__title,
  .home .pr-hero--cover .pr-hero__title {
    max-width: 520px;
    font-size: 38px;
  }

  :is(.pr-hero__grid, .pr-split, .pr-rfq-layout) {
    gap: var(--pr-space-6);
  }

  .pr-hero__description {
    font-size: 17px;
  }

  .pr-section__head {
    margin-bottom: var(--pr-space-6);
  }

  .pr-section__title {
    margin-bottom: var(--pr-space-4);
  }

  .pr-grid,
  .pr-grid--2,
  .pr-grid--3,
  .pr-grid--4,
  .pr-factory-panel__stats {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .pr-actions,
  .wp-block-buttons.pr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pr-actions :is(.wp-block-button, .wp-block-button__link, .pr-btn) {
    width: 100%;
  }

  :is(.pr-card__body, .pr-icon-card, .pr-decision-card, .pr-evidence-card--summary, .pr-factory-panel, .pr-form-shell) {
    padding: var(--pr-space-5);
  }

  .pr-process-card {
    padding: 48px 0 30px 64px;
  }

  .pr-process-card::after {
    left: 64px;
    font-size: 28px;
  }

  .pr-featured-project__content {
    padding: var(--pr-space-5);
  }

  .pr-featured-project__title {
    font-size: 30px;
  }

  .pr-featured-project__summary > .wp-block-group__inner-container,
  .pr-featured-project__detail-row > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  :is(.pr-document-card, .pr-cert-card) .pr-card__body {
    min-height: 0;
  }

  .pr-section--light .pr-document-card .pr-card__body {
    padding: var(--pr-space-5) 0;
  }

  .pr-section--light .pr-document-card .pr-card__body > .wp-block-group__inner-container {
    grid-template-areas:
      "meta"
      "title"
      "body";
    grid-template-columns: 1fr;
    gap: var(--pr-space-3);
  }

  .pr-interface-review__link {
    position: static;
    margin-top: var(--pr-space-4) !important;
    text-align: left;
  }

  .pr-interface-review__outputs {
    grid-template-columns: 1fr;
  }

  .pr-interface-review__outputs::before,
  .pr-interface-review__outputs::after {
    display: none;
  }

  .pr-interface-review__item {
    padding: var(--pr-space-4) 0;
    border-bottom: 1px solid var(--pr-context-border-soft, var(--pr-color-border-soft));
  }

  .pr-interface-review__item:last-child {
    border-bottom: 0;
  }

  .pr-spec-table :is(table, tbody, tr, th, td) {
    display: block;
    width: 100%;
  }

  .pr-spec-table table {
    min-width: 0;
    table-layout: auto;
  }

  .pr-spec-table tr {
    border-bottom: 1px solid var(--pr-context-border-soft, var(--pr-color-border-soft));
  }

  .pr-spec-table tr:last-child {
    border-bottom: 0;
  }

  .pr-spec-table :is(th, td) {
    min-width: 0;
    border: 0;
  }

  .pr-spec-table th {
    padding: var(--pr-space-4) var(--pr-space-5) var(--pr-space-2);
    background: rgba(0, 229, 255, 0.024);
    color: var(--pr-context-accent, var(--pr-color-primary));
    font-size: 14px;
    letter-spacing: 0.025em;
    line-height: 1.45;
  }

  .pr-spec-table td {
    padding: 0 var(--pr-space-5) var(--pr-space-4);
    font-size: var(--pr-fs-small);
    line-height: 1.65;
  }

  .forminator-ui .forminator-pagination-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .forminator-ui .forminator-pagination-footer .forminator-button {
    width: 100% !important;
    margin: 0 !important;
  }

  .forminator-ui .forminator-pagination-steps .forminator-step-label {
    width: 96px !important;
    max-width: 96px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .pr-rfq-modal {
    padding: 16px;
  }

  .pr-rfq-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 28px 20px;
  }

  .pr-rfq-modal__header {
    margin-bottom: 24px;
    padding-right: 36px;
  }

  .pr-rfq-modal__title {
    font-size: 32px;
  }

  .pr-rfq-modal__close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .home .single-content > .pr-trust-strip {
    margin-top: 0;
    padding-bottom: 24px;
  }

  .home .pr-trust-strip__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  }

  .home .pr-trust-strip .pr-stat {
    min-height: 106px;
    padding: 18px 16px;
  }

  .home .pr-trust-strip .pr-stat__value {
    margin-bottom: 10px;
    font-size: clamp(30px, 9vw, 36px);
  }

  .home .pr-trust-strip .pr-stat__label {
    font-size: 12px;
    line-height: 1.4;
  }

  .pr-stat__value {
    font-size: 30px;
  }

  .pr-faq__item summary {
    padding: 19px 52px 19px 18px;
    font-size: 16px;
  }

  .pr-faq__item summary::after {
    right: 18px;
  }

  .pr-faq__item > p,
  .pr-faq__item > .wp-block-group {
    padding: 0 18px 20px;
  }

  .pr-cta {
    padding-block: 64px;
  }

  .pr-site-footer {
    padding-top: 52px;
  }

  .pr-site-footer__grid {
    grid-template-columns: 1fr;
    padding-bottom: 40px;
  }

  .pr-site-footer__contact {
    grid-column: auto;
    order: 2;
  }

  .pr-site-footer__nav--products { order: 3; }
  .pr-site-footer__nav--company { order: 4; }

  .pr-site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  #ht-ctc-chat {
    max-width: calc(100vw - (var(--pr-container-gutter) * 2));
  }

  :where(.pr-page-resources) .pr-resource-card > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }

  :where(.pr-page-resources) .pr-resource-card .pr-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  :where(.pr-page-resources) :is(.pr-resource-card, .pr-document-card) .pr-card__body {
    padding: var(--pr-space-5);
  }

  :where(.pr-product-family--construction) .pr-grid--4:has(.pr-icon-card__number),
  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number),
  :where(.pr-application-family--rollout) .pr-grid--3:has(.pr-icon-card__number),
  :where(.pr-capability-detail) .pr-grid--3:has(.pr-decision-card),
  :where(.pr-capability-mode--manufacturing) .pr-grid--3:has(.pr-icon-card__number),
  :where(.pr-capability-mode--inspection) .pr-grid--3:has(.pr-icon-card__number),
  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number),
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) {
    grid-template-columns: 1fr;
  }

  :where(.pr-product-family--material) .pr-grid--4:has(.pr-icon-card__number) .pr-icon-card > .wp-block-group__inner-container,
  :where(.pr-application-detail) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card > .wp-block-group__inner-container,
  :where(.pr-capability-mode--engineering) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card > .wp-block-group__inner-container,
  :where(.pr-about-page) .pr-evidence-card--summary > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
    gap: var(--pr-space-3);
  }

  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number) .pr-icon-card,
  :where(.pr-application-family--rollout) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card,
  :where(.pr-capability-detail) .pr-grid--3:has(.pr-decision-card) .pr-decision-card,
  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card,
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) .pr-partner-card {
    border-right: 0;
    border-bottom: 1px solid var(--pr-context-border, var(--pr-color-border));
  }

  :where(.pr-product-family--light-form) .pr-grid--4:has(.pr-icon-card__number) .pr-icon-card:last-child,
  :where(.pr-application-family--rollout) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card:last-child,
  :where(.pr-capability-detail) .pr-grid--3:has(.pr-decision-card) .pr-decision-card:last-child,
  :where(.pr-capability-mode--logistics) .pr-grid--3:has(.pr-icon-card__number) .pr-icon-card:last-child,
  :where(.pr-partners-page) .pr-grid--4:has(.pr-partner-card) .pr-partner-card:last-child {
    border-bottom: 0;
  }

  :where(.pr-partners-page) .pr-hero__title {
    font-size: var(--pr-fs-h1);
  }

  :where(.pr-partners-page) .pr-hero__media {
    height: auto;
  }
}

/* Motion guardrail */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
