/* Iannello Inox 2.0.1 — cross-template QA hardening.
 * Loaded after every legacy and final stylesheet.
 */

:root {
  --qv-qa-h1-home: clamp(3rem, 5.55vw, 6.15rem);
  --qv-qa-h1-page: clamp(2.8rem, 5.15vw, 5.75rem);
  --qv-qa-h2: clamp(2.3rem, 4.15vw, 4.85rem);
  --qv-qa-h3: clamp(1.3rem, 1.85vw, 1.75rem);
  --qv-qa-body: clamp(1rem, .35vw + .93rem, 1.14rem);
  --qv-type-leading-display: 1;
  --qv-type-leading-heading: 1.06;
  --qv-type-leading-subheading: 1.15;
  --qv-type-leading-body: 1.62;
  --qv-type-leading-ui: 1.28;
  --qv-type-tracking-display: -.045em;
  --qv-type-tracking-heading: -.035em;
  --qv-type-space-eyebrow-heading: clamp(.8rem, 1vw, 1.1rem);
  --qv-type-space-heading-copy: clamp(.85rem, 1.15vw, 1.25rem);
  --qv-type-space-copy-action: clamp(1.25rem, 1.8vw, 1.75rem);
}

/* 1. Header consistency on every template. */
body.qv-site .qv-header.qv-header--compact {
  background: rgb(200 16 34 / 98%) !important;
  color: #fff !important;
}

body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:link,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:visited,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:hover,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:focus,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:focus-visible,
body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a:active,
body.qv-site .qv-header.qv-header--compact .qv-search-toggle,
body.qv-site .qv-header.qv-header--compact .qv-language summary,
body.qv-site .qv-header.qv-header--compact .qv-nav-toggle,
body.qv-site .qv-header.qv-header--compact .qv-nav-toggle__label {
  color: #fff !important;
  opacity: 1 !important;
}

body.qv-site .qv-header.qv-header--compact .qv-navigation--desktop .qv-navigation__list a::after,
body.qv-site .qv-header.qv-header--compact .qv-nav-toggle > span:not(.qv-nav-toggle__label) {
  background-color: #fff !important;
}

body.qv-site .qv-header.qv-header--compact .qv-search-toggle svg,
body.qv-site .qv-header.qv-header--compact .qv-language svg {
  stroke: currentColor !important;
}

/* The conversion button remains white/red; only menu and utility labels become white. */
body.qv-site .qv-header.qv-header--compact .qv-button--header,
body.qv-site .qv-header.qv-header--compact .qv-button--header:visited {
  background: #fff !important;
  border-color: #fff !important;
  color: var(--qv-final-red, #df0a14) !important;
}

/* 2. Consistent, restrained typography on home, listings and detail pages. */
body.qv-site main :where(p, li, address, input, select, textarea, button) {
  line-height: 1.62;
}

body.qv-site :where(
  .qv-home--final .qv-hero--v3 h1
) {
  font-size: var(--qv-qa-h1-home) !important;
  line-height: .98 !important;
  letter-spacing: -.045em !important;
}

body.qv-site :where(
  .qv-internal-hero h1,
  .qv-listing .qv-page-hero h1,
  .qv-detail-hero__content h1,
  .qv-service-hero h1,
  .qv-single-hero h1,
  .qv-error-page h1
) {
  max-width: 14ch;
  font-size: var(--qv-qa-h1-page) !important;
  line-height: 1 !important;
  letter-spacing: -.042em !important;
}

body.qv-site :where(
  .qv-section-heading--editorial h2,
  .qv-process-system__heading h2,
  .qv-evolution__content h2,
  .qv-credibility__headline h2,
  .qv-lead__intro h2,
  .qv-internal-section h2,
  .qv-contact-final-grid h2,
  .qv-detail-section h2,
  .qv-detail-cta h2,
  .qv-single-content h2,
  .qv-prose h2,
  .qv-footer__cta h2
) {
  font-size: var(--qv-qa-h2) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
}

body.qv-site :where(
  .qv-journey h3,
  .qv-services-home__grid h3,
  .qv-detail-grid h3,
  .qv-internal-cards h3,
  .qv-content-card h2,
  .qv-company-values h3
) {
  font-size: var(--qv-qa-h3) !important;
  line-height: 1.15 !important;
  letter-spacing: -.018em !important;
}

body.qv-site :where(
  .qv-hero__intro,
  .qv-page-hero__intro,
  .qv-internal-copy p,
  .qv-detail-copy p,
  .qv-section-heading--editorial > p,
  .qv-services-side > p,
  .qv-lead__intro > p,
  .qv-contact-final-info,
  .qv-prose p
) {
  font-size: var(--qv-qa-body) !important;
}

/* 2.1 Global type rhythm: keep cinematic scale without line collisions. */
body.qv-site main :where(h1, h2, h3, h4),
body.qv-site :where(.qv-mega, .qv-search-panel, .qv-footer) :where(h2, h3, h4) {
  hyphens: manual;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
}

body.qv-site main h1 {
  line-height: var(--qv-type-leading-display) !important;
  letter-spacing: var(--qv-type-tracking-display) !important;
}

body.qv-site main h2,
body.qv-site :where(.qv-mega, .qv-search-panel, .qv-footer) h2 {
  line-height: var(--qv-type-leading-heading) !important;
  letter-spacing: var(--qv-type-tracking-heading) !important;
}

body.qv-site .qv-home--final :where(
  .qv-section-heading--editorial h2,
  .qv-process-system__heading h2,
  .qv-credibility__headline h2,
  .qv-lead__intro h2
) {
  line-height: var(--qv-type-leading-heading) !important;
  letter-spacing: var(--qv-type-tracking-heading) !important;
}

body.qv-site main h3,
body.qv-site :where(.qv-mega, .qv-search-panel, .qv-footer) h3 {
  line-height: var(--qv-type-leading-subheading) !important;
  letter-spacing: -.018em !important;
}

body.qv-site main h4,
body.qv-site :where(.qv-mega, .qv-search-panel, .qv-footer) h4 {
  line-height: 1.2 !important;
  letter-spacing: -.01em !important;
}

body.qv-site main :where(
  p:not(.qv-kicker):not([class*="eyebrow"]):not([class*="number"]),
  li,
  address,
  input,
  select,
  textarea
),
body.qv-site .qv-footer :where(p, li, address) {
  line-height: var(--qv-type-leading-body) !important;
}

body.qv-site :where(
  .qv-kicker,
  .qv-page-hero__eyebrow,
  .qv-evo-kicker,
  .qv-app-eyebrow,
  .qv-co-eyebrow
) {
  line-height: 1.4 !important;
}

body.qv-site :where(.qv-evo-kicker, .qv-app-eyebrow, .qv-co-eyebrow) {
  letter-spacing: .14em !important;
}

body.qv-site :where(.qv-button, button, input[type="submit"], input[type="button"]),
body.qv-site main label {
  line-height: var(--qv-type-leading-ui) !important;
}

body.qv-site main :where(
  .qv-evo-benefits__active,
  .qv-product-card__content strong,
  .qv-app-product-link h3
) {
  line-height: 1.12 !important;
}

body.qv-site :where(.qv-kicker, [class*="eyebrow"]) + :where(h1, h2, h3, h4),
body.qv-site :where(.qv-kicker, [class*="eyebrow"]) + * > :where(h1, h2, h3, h4):first-child {
  margin-top: var(--qv-type-space-eyebrow-heading) !important;
}

body.qv-site main :where(h1, h2, h3, h4) + :where(p, ul, ol),
body.qv-site .qv-footer :where(h2, h3, h4) + :where(p, ul, ol) {
  margin-top: var(--qv-type-space-heading-copy) !important;
}

body.qv-site main :where(p, ul, ol) + :where(.qv-actions, .qv-button),
body.qv-site main :where(p, ul, ol) + * > .qv-button:first-child {
  margin-top: var(--qv-type-space-copy-action) !important;
}

/* 3. Prevent animated media and grid children from invading adjacent text. */
body.qv-site main :where(
  .qv-section-heading--editorial,
  .qv-evolution--v3,
  .qv-process-system,
  .qv-process-card,
  .qv-credibility--v3,
  .qv-services-home--v3,
  .qv-lead--v3,
  .qv-internal-hero__grid,
  .qv-internal-split,
  .qv-company-feature,
  .qv-contact-final-grid,
  .qv-detail-split,
  .qv-detail-cta
) {
  isolation: isolate;
}

body.qv-site main :where(
  .qv-section-heading--editorial,
  .qv-evolution--v3,
  .qv-process-system,
  .qv-process-card,
  .qv-credibility--v3,
  .qv-services-home--v3,
  .qv-lead--v3,
  .qv-internal-hero__grid,
  .qv-internal-split,
  .qv-company-feature,
  .qv-contact-final-grid,
  .qv-detail-split,
  .qv-detail-cta
) > * {
  min-width: 0;
}

.qv-heading-aside,
.qv-services-side,
.qv-footer__cta-side {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow: clip;
}

/* Scaling the whole reveal container caused visual overlap. Animate its opacity only. */
.qv-js .qv-motion-visual[data-qv-image-reveal] {
  opacity: 0;
  transform: none !important;
}
.qv-js .qv-motion-visual[data-qv-image-reveal].is-visible {
  opacity: 1;
  transform: none !important;
}

.qv-motion-visual {
  position: relative !important;
  inset: auto !important;
  z-index: 0;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  contain: layout paint;
}
.qv-motion-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  object-fit: cover;
}

.qv-product-card {
  position: relative;
  isolation: isolate;
}
.qv-product-card > img { z-index: 0; }
.qv-product-card__shade { z-index: 1; }
.qv-product-card__content {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.qv-process-card__media,
.qv-process-card__body,
.qv-evolution__media,
.qv-evolution__content,
.qv-internal-hero__media,
.qv-detail-hero__media,
.qv-detail-hero__content {
  min-width: 0;
}
.qv-process-card__media { z-index: 0; }
.qv-process-card__body { position: relative; z-index: 1; background: #fff; }

/* 4. Video is rendered on mobile instead of being replaced by a static background. */
.qv-home--final .qv-hero__media video {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: 58% center;
}

@media (max-width: 80rem) {
  .qv-home--final .qv-section-heading--editorial,
  .qv-home--final .qv-evolution--v3,
  .qv-home--final .qv-process-system,
  .qv-home--final .qv-credibility--v3,
  .qv-home--final .qv-lead--v3,
  .qv-internal-hero__grid,
  .qv-internal-split,
  .qv-company-feature,
  .qv-contact-final-grid,
  .qv-detail-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .qv-heading-aside,
  .qv-services-side,
  .qv-footer__cta-side {
    max-width: 46rem;
  }
}

@media (max-width: 64rem) {
  :root {
    --qv-type-leading-display: 1.02;
    --qv-type-leading-heading: 1.08;
    --qv-type-tracking-display: -.038em;
    --qv-type-tracking-heading: -.03em;
  }
}

@media (max-width: 56rem) {
  .qv-process-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .qv-process-card__media {
    min-height: clamp(14rem, 52vw, 24rem);
  }
  .qv-process-card__media::after {
    background: linear-gradient(0deg, #fff 0%, transparent 50%) !important;
  }
}

@media (max-width: 48rem) {
  :root {
    --qv-qa-h1-home: clamp(2.55rem, 11.5vw, 3.65rem);
    --qv-qa-h1-page: clamp(2.4rem, 10.8vw, 3.45rem);
    --qv-qa-h2: clamp(2.05rem, 9.2vw, 3.15rem);
    --qv-qa-h3: clamp(1.25rem, 6.2vw, 1.62rem);
    --qv-qa-body: 1rem;
    --qv-type-leading-display: 1.04;
    --qv-type-leading-heading: 1.1;
    --qv-type-leading-subheading: 1.18;
    --qv-type-tracking-display: -.032em;
    --qv-type-tracking-heading: -.025em;
    --qv-type-space-eyebrow-heading: .8rem;
    --qv-type-space-heading-copy: .9rem;
    --qv-type-space-copy-action: 1.25rem;
  }

  .qv-home--final .qv-hero--v3 {
    min-height: max(100svh, 47rem) !important;
  }
  .qv-home--final .qv-hero--v3 .qv-hero__content {
    padding-top: 7.75rem !important;
    padding-bottom: 10.5rem !important;
  }
  .qv-home--final .qv-hero__media video {
    object-position: 61% center;
  }
  .qv-home--final .qv-hero__facts > div:first-child {
    min-height: 5rem;
  }

  .qv-product-card__content,
  .qv-process-card__body,
  .qv-journey,
  .qv-services-home__grid article,
  .qv-detail-grid article,
  .qv-contact-final-info,
  .qv-contact-final-form {
    padding-left: clamp(1.25rem, 5vw, 1.65rem) !important;
    padding-right: clamp(1.25rem, 5vw, 1.65rem) !important;
  }

  .qv-motion-visual {
    aspect-ratio: 4 / 3;
  }

  body.qv-site.qv-company-flagship-page .qv-co-hero h1,
  body.qv-site.qv-applications-flagship-page .qv-app-hero h1,
  body.qv-site.qv-evolution-page .qv-evo-hero h1 {
    font-size: clamp(2.85rem, 12vw, 3.5rem) !important;
  }

  body.qv-site.qv-company-flagship-page main h2,
  body.qv-site.qv-applications-flagship-page main h2,
  body.qv-site.qv-evolution-page main h2 {
    font-size: clamp(2.4rem, 10.8vw, 3.25rem) !important;
  }
}

@media (max-width: 27.5rem) {
  :root {
    --qv-type-leading-display: 1.06;
    --qv-type-leading-heading: 1.12;
    --qv-type-tracking-display: -.025em;
    --qv-type-tracking-heading: -.018em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qv-home--final .qv-hero__media video {
    display: block !important;
  }
}
