/* Portrait tablet viewports and touch tablets only; existing mobile and desktop rules remain intact. */
@media (min-width: 1024px) and (max-width: 1399px) and (orientation: portrait),
       (min-width: 1024px) and (max-width: 1399px) and (hover: none) and (pointer: coarse) {
  :root {
    --qa-gutter: clamp(32px, 4vw, 48px);
    --shell-gutter: var(--qa-gutter);
    --shell-frame-width: calc(100% - 2 * var(--shell-gutter));
  }
  main { min-width: 0; overflow-wrap: anywhere; }
  main :is(input, select, textarea) { font-size: max(1rem, 16px); }
  main :is(button, summary) { touch-action: manipulation; }
  main summary { min-height: 44px; padding-block: 8px; }
  .site-footer .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .site-footer .footer-intro { grid-column: 1 / -1; max-width: 60ch; }
  .site-footer .footer-link-group a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px; }
  .site-footer .footer-link-group ul { gap: 0; }

  /* Anchor the copy's white wash to the viewport; center the wall underneath. */
  .home-v2 .home-v2-opening--media-wall {
    display: block;
    min-height: 0;
    padding-block: calc(var(--shell-header-height) + 64px) 56px;
  }
  .home-v2 .home-v2-opening--media-wall .home-v2-opening__copy {
    width: min(720px, calc(100% - 2 * var(--qa-gutter)));
    max-width: none;
    margin: 0 var(--qa-gutter);
  }
  .home-v2 .home-v2-opening__copy::before { left: calc(-1 * var(--qa-gutter)); right: auto; width: 100vw; }
  .home-v2 .home-v2-opening h1 { max-width: 24ch; font-size: clamp(2.75rem, 4.2vw, 3.5rem); }
  .home-v2 .home-v2-opening__copy > p:not(.home-v2-kicker) { max-width: 62ch; font-weight: 400; }
  .home-v2 .home-hero-wall {
    --wall-curvature: 14deg;
    --wall-depth: 48px;
    --wall-perspective: 1100px;
    --wall-inset: 1cqw;
    --wall-grid-width: 90cqw;
    --wall-column-gap: clamp(24px, 3cqw, 32px);
    position: relative;
    inset: auto;
    width: min(850px, calc(100% - 2 * var(--qa-gutter)));
    margin: 28px auto 0;
    transform: none;
  }
  .home-v2 .home-hero-wall__stage { padding-block: 32px; }
  .home-v2 .home-hero-wall__panel[data-featured="true"] { --panel-depth: var(--wall-depth); }
  .home-v2 .home-hero-wall__panel:nth-child(3n + 2) { --panel-depth: var(--wall-edge-depth); --panel-angle: 0deg; }

  /* Show the product artwork in full instead of stretching it behind a scrim. */
  .home-v2 .home-v2-scene {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: calc(100% - 2 * var(--qa-gutter));
    max-width: 1120px;
    margin: 32px auto;
    scroll-margin-top: calc(var(--shell-header-height) + 64px);
  }
  .home-v2 .home-v2-scene::before { display: none; }
  .home-v2 .home-v2-scene__media { position: relative; inset: auto; z-index: 0; width: 100%; overflow: hidden; }
  .home-v2 .home-v2-scene__media picture { display: block; }
  .home-v2 .home-v2-scene__media img {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: none;
    visibility: visible;
    will-change: auto;
  }
  .home-v2 .home-v2-scene__copy { position: relative; inset: auto; width: auto; margin: 0; padding: 40px; opacity: 1; transform: none; }
  .home-v2 .home-v2-scene__copy h2 { max-width: 32ch; font-size: 2.5rem; line-height: 1.2; }
  .home-v2 .home-v2-scene__copy > p:not(.home-v2-kicker) { max-width: 68ch; font-size: 1.125rem; font-weight: 400; }
  .home-v2 .home-v2-scene-nav { padding-inline: var(--qa-gutter); overscroll-behavior-inline: contain; }
  .home-v2 .home-v2-scene-nav__links { width: max-content; min-width: 100%; margin: 0; gap: 12px; }
  .home-v2 .home-v2-scene-nav a { display: inline-flex; align-items: center; min-height: 52px; padding: 10px 8px; font-size: .9375rem; white-space: nowrap; }
  .home-v2 .home-v2-workflow-closing__layout { grid-template-columns: minmax(0, 1fr); }

  /* Product-page hero artwork retains its complete composition on tall tablets. */
  .apqpv2:not(.trialv2) .apqpv2-hero__scene,
  .ganttv2 .ganttv2-hero__scene,
  .docsv2 .docsv2-hero__scene { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .apqpv2:not(.trialv2) .apqpv2-hero__copy,
  .ganttv2 .ganttv2-hero__copy,
  .docsv2 .docsv2-hero__copy { grid-column: 1; grid-row: 1; max-width: 840px; padding: 40px var(--qa-gutter); }
  .apqpv2:not(.trialv2) .apqpv2-hero__media,
  .ganttv2 .ganttv2-hero__media,
  .docsv2 .docsv2-hero__visual { grid-column: 1; grid-row: 2; aspect-ratio: auto; margin: 0 var(--qa-gutter) 40px; }
  .apqpv2:not(.trialv2) .apqpv2-hero__media img,
  .ganttv2 .ganttv2-hero__media img,
  .docsv2 .docsv2-hero__visual img { position: static; display: block; width: 100%; height: auto; max-width: 100%; max-height: 560px; object-fit: contain; object-position: center; }
  body[data-page-kind="interior"] main:is(.apqpv2, .ganttv2, .docsv2) :is(.apqpv2-hero, .ganttv2-hero, .docsv2-hero) h1 { max-width: 28ch; }
  .apqpv2 .apqpv2-hero__copy > .apqpv2-hero__lede,
  .ganttv2 .ganttv2-hero__copy > .ganttv2-lede,
  .docsv2 .docsv2-hero__copy > .docsv2-lede { max-width: 64ch; font-weight: 400; }
  .trialv2 .apqpv2-hero__scene { min-height: 0; padding-block: 64px; }
  .demov2 .apqpv2-hero .demo-feature-video { grid-column: 1; grid-row: 2; padding: 0 var(--qa-gutter) 40px; }
  .demov2 .demo-feature-video__poster { min-height: clamp(360px, 56cqw, 560px); }
  .demov2 .demo-feature-video__poster::before {
    background-image: image-set(url("../img/home/apqp-process-fmea-document-device-960.webp") 1x, url("../img/home/apqp-process-fmea-document-device-1600.webp") 2x);
  }

  .docsv2 .docsv2-carousel { min-width: 0; max-width: 100%; }
  .docsv2 .docsv2-carousel__stage { overflow: clip; }
  .docsv2 .docsv2-carousel__dots { flex-wrap: wrap; }
  .docsv2 .docsv2-carousel__dots button { min-width: 44px; }
  .news .news-reading { grid-template-columns: minmax(0, 1fr); }
  .news .news-prose { max-width: 70ch; }
  .news .news-sidebar { position: static; }
}

@media (min-width: 1100px) and (max-width: 1399px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .home-v2 .home-v2-opening--media-wall { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 24px; min-height: min(840px, 100svh); padding-inline: var(--qa-gutter); }
  .home-v2 .home-v2-opening--media-wall .home-v2-opening__copy { width: auto; margin: 0; }
  .home-v2 .home-hero-wall { width: 100%; margin: 0; --wall-depth: 32px; --wall-column-gap: 24px; }
}

/* A single row of training previews sits above the device heading. */
@media (min-width: 1024px) and (max-width: 1399px) and (orientation: portrait),
       (min-width: 1024px) and (max-width: 1399px) and (hover: none) and (pointer: coarse) {
  .home-v2 .home-v2-training { min-height: 0; padding-block: 32px 56px; }
  .home-v2 .home-v2-training::before { display: none; }
  .home-v2 .home-v2-training__media {
    position: relative;
    inset: auto;
    height: clamp(112px, 30vw, 152px);
    margin-bottom: 24px;
    mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  }
  .home-v2 .home-v2-training__media-track {
    opacity: 1;
    animation-play-state: paused;
  }
  .home-v2 .home-v2-training__media-track img { aspect-ratio: 3480 / 208; }
  .home-v2 .home-v2-training[data-training-motion="running"] .home-v2-training__media-track { animation-play-state: running; }
  .home-v2 .home-v2-training__layout { min-height: 0; grid-template-columns: minmax(0, 1fr); align-items: start; }
}
