/* Preserve the original video brightness; contrast belongs to the text. */
.hero h1,
.hero p.lead,
.hero .hero-specs .tolerance-tag {
  color: #fff;
  text-shadow:
    -1px -1px 1px rgba(0,0,0,.85),
    1px -1px 1px rgba(0,0,0,.85),
    -1px 1px 1px rgba(0,0,0,.85),
    1px 1px 1px rgba(0,0,0,.85),
    0 2px 5px rgba(0,0,0,.8);
}

/* Prominent certificate links, without changing the video. */
.hero .hero-specs .tolerance-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 6px;
  background: rgba(8,18,26,.28);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero .hero-specs .tolerance-tag::before { display: none; }
.hero .hero-specs .certificate-format { font-size: .8em; }
.hero .hero-specs .tolerance-tag:hover {
  background: #00749e;
  border-color: #fff;
}
.hero .hero-specs .tolerance-tag:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  background: #00749e;
}

/* Certificate buttons: crisp text; shared stainless and lift rules apply. */
html body .hero .hero-specs a.tolerance-tag,
html body .hero .hero-specs a.tolerance-tag *{text-shadow:none!important;-webkit-text-stroke:0}


/* Local, stable contrast behind the message only; the video stays unchanged. */
.hero .hero-text-panel{
 width:fit-content;max-width:100%;box-sizing:border-box;
 padding:18px 24px;background:rgba(13,25,34,.84);border-radius:8px;
 margin-bottom:20px;
}
.hero .hero-text-panel h1{font-weight:600;color:#fff;text-shadow:none}
.hero .hero-text-panel h1 em{color:inherit;text-shadow:none}
.hero .hero-text-panel p.lead{color:#fff;text-shadow:none;margin-bottom:0}
@media(max-width:600px){.hero .hero-text-panel{padding:16px 18px}}

/* Trim the homepage banner: about 10 mm above and 5 mm below. */
.hero:has(.hero-video){
 --hero-trim-top:10mm;--hero-trim-bottom:5mm;
 min-height:calc(clamp(336px,41vh,392px) - var(--hero-trim-top) - var(--hero-trim-bottom));
 padding-top:max(8px,calc(clamp(28px,4vw,52px) - var(--hero-trim-top)));
 padding-bottom:max(8px,calc(clamp(20px,2.5vw,36px) - var(--hero-trim-bottom)));
}
.hero .hero-video{
 top:calc(0px - var(--hero-trim-top));bottom:auto;
 height:calc(100% + var(--hero-trim-top) + var(--hero-trim-bottom));
}

/* Already cropped and graded banner preview. */
.hero .hero-video.hero-video--face-milling,
.hero .hero-video.hero-video--sandvik-drilling,
.hero .hero-video.hero-video--dmg-machining{top:0;height:100%;filter:none}

/* Preload all clips; reveal the next only once playback starts. */
.hero .hero-video[data-hero-clip]{opacity:0;transition:opacity .25s ease}
.hero .hero-video[data-hero-clip].is-active{opacity:1}

/* Mirror the approved Sandvik clip horizontally, including its poster. */
.hero .hero-video.hero-video--sandvik-drilling{transform:scaleX(-1)}
