/* User-supplied homepage photo. Keep the existing hero layout and text styling. */
.hero .hero-media {
  background-image: url("assets/weavemech-home-hero-deep-workshop-20261018.webp?v=WM-20261020-SEO-01");
  background-size: cover;
  background-position: center center;
}

/* The logo overlay shares the photograph's framing and transforms. */
.hero .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/weavemech-hero-brand-desktop-20261020.svg?v=WM-20261020-PUBLISH-01");
  background-size: inherit;
  background-position: inherit;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* The supplied still photo is the homepage visual on desktop and mobile. */
.hero .hero-mobile-video {
  display: none;
}

/* Keep the approved two-line message compact above the machines. */
html[lang] body .hero h1.hero-title-two-line > .hero-title-tagline {
  margin-top: 0;
  margin-bottom: .32em;
  font-size: .6em;
  line-height: 1.25;
}

html[lang] body .hero .hero-intro {
  max-width: 620px;
  margin: 18px 0 0;
  color: #edf2f6;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
}

@media (min-width: 761px) {
  /* Slight left/down framing adjustment with enough image bleed at every edge. */
  .hero .hero-media {
    transform: translate(-1.5%, 1%) scale(1.04);
  }

  /* Place the heading in the upper background, above the foreground loom. */
  .hero .hero-content {
    align-self: flex-start;
    padding-top: clamp(48px, 8vh, 80px);
    transform: none;
  }
}

@media (max-width: 760px) {
  /* Keep the full machine width; trim only the surplus ground at the bottom. */
  html[lang] body .hero.hero,
  html[lang] body.mobile-language-hidden .hero.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: start;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1279 / 1600;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    background: #172332;
  }

  html[lang] body .hero .hero-content {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    margin: 0;
    padding: 18px 18px;
    transform: none;
    text-shadow: 0 2px 6px rgba(5, 13, 24, .55);
  }

  html[lang] body .hero .hero-intro {
    max-width: 380px;
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
  }

  .hero .hero-copy-scrim::before {
    content: none;
  }

  html[lang] body .hero .hero-lead,
  html[lang] body .hero .hero-content .eyebrow {
    display: none;
  }

  html[lang] body .hero .hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    background-image: url("assets/weavemech-home-mobile-clean-20261018.webp?v=WM-20261020-SEO-01");
    background-size: 100% auto;
    background-position: center top;
    transform: none;
    filter: none;
    z-index: 0;
  }

  .hero .hero-media::after {
    background-image: url("assets/weavemech-hero-brand-mobile-20261020.svg?v=WM-20261020-PUBLISH-01");
  }

  html[lang] body .hero .hero-shade {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
      rgba(6, 17, 31, .78) 0%,
      rgba(6, 17, 31, .64) 24%,
      rgba(6, 17, 31, .18) 43%,
      rgba(6, 17, 31, .02) 66%);
    pointer-events: none;
  }
}
