/* =====================================================================
   3plains homepage hero text overlay
   Scoped: every selector starts with a tp3hero- class, so nothing here
   can reach existing site elements. Properties are set explicitly so
   the site's own h1 / p / a / img rules can't leak into the overlay.
   Sizes scale with the hero image width (cqw), matching the mockup.
   ===================================================================== */

/* Stage: wraps the hero image and the overlay */
.tp3hero-stage {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  container-type: inline-size;
}
/* #Big is included only to out-rank any existing "#Big img" rules for this
   one image; it still matches nothing but the tp3hero image. */
#Big .tp3hero-stage > img.tp3hero-img,
.tp3hero-stage > img.tp3hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Overlay sits over the left side of the image */
.tp3hero-stage .tp3hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 9.9cqw 0 0 2.1cqw;
  pointer-events: none;
  text-align: left;
  line-height: normal;
}

/* Text block */
.tp3hero-stage .tp3hero-wrap {
  box-sizing: border-box;
  width: 41.5cqw;
  max-width: none;
  margin: 0;
  padding: 0;
  pointer-events: auto;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  color: #ffffff;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.tp3hero-stage .tp3hero-wrap *,
.tp3hero-stage .tp3hero-wrap *::before,
.tp3hero-stage .tp3hero-wrap *::after {
  box-sizing: border-box;
}

/* Headline */
.tp3hero-stage .tp3hero-wrap .tp3hero-title {
  display: block;
  margin: 0 0 2cqw;
  padding: 0;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: 3.48cqw;
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: #ffffff;
  background: none;
  border: 0;
  text-shadow: none;
}

/* Subtext */
.tp3hero-stage .tp3hero-wrap .tp3hero-sub {
  display: block;
  margin: 0 0 3.2cqw;
  padding: 0;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: 1.74cqw;
  font-weight: 400;
  font-style: normal;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: #ffffff;
  background: none;
  border: 0;
}

/* Button + link row */
.tp3hero-stage .tp3hero-wrap .tp3hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4cqw 2.8cqw;
  margin: 0;
  padding: 0;
}

/* Orange button */
.tp3hero-stage .tp3hero-wrap a.tp3hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3em;
  margin: 0;
  padding: 0 2.2em;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: max(13px, 1.07cqw);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: #ffffff;
  background: #c96d3b;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.tp3hero-stage .tp3hero-wrap a.tp3hero-btn:hover,
.tp3hero-stage .tp3hero-wrap a.tp3hero-btn:focus-visible {
  color: #ffffff;
  background: #ad5829;
  text-decoration: none;
}

/* Underlined text link */
.tp3hero-stage .tp3hero-wrap a.tp3hero-link {
  display: inline-block;
  margin: 0;
  padding: 0 0 0.25em;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-size: max(13px, 1.07cqw);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: nowrap;
  color: #ffffff;
  background: none;
  border: 0;
  border-bottom: 2px solid #ffffff;
  box-shadow: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tp3hero-stage .tp3hero-wrap a.tp3hero-link:hover,
.tp3hero-stage .tp3hero-wrap a.tp3hero-link:focus-visible {
  color: #c8c6c6;
  border-bottom-color: #c8c6c6;
  text-decoration: none;
}

/* Phones / small tablets (same 800px breakpoint as the site's mobile.css):
   the text stays over the image. The image becomes taller and is cropped
   to the field side of the photo so the text has room, with a soft dark
   fade behind the text for legibility. */
@media only screen and (max-width: 800px) {
  .tp3hero-stage {
    --tp3hero-mh: 560px;
    --tp3hero-ratio: 1.7768;
    --tp3hero-device: 0.444;
  }
  #Big .tp3hero-stage > img.tp3hero-img,
  .tp3hero-stage > img.tp3hero-img {
    width: 100%;
    height: var(--tp3hero-mh);
    object-fit: cover;
    object-position: left center;
  }
  .tp3hero-stage .tp3hero-overlay {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    background: linear-gradient(90deg, rgba(20,16,12,0.45) 0%, rgba(20,16,12,0.2) 40%, rgba(20,16,12,0) 60%);
  }
  .tp3hero-stage .tp3hero-wrap {
    /* left padding (20px) + 28px gap before the laptop */
    width: min(100%, calc(var(--tp3hero-mh) * var(--tp3hero-ratio) * var(--tp3hero-device) - 48px));
    max-width: none;
  }
  .tp3hero-stage .tp3hero-wrap .tp3hero-title { font-size: 32px; margin-bottom: 14px; }
  .tp3hero-stage .tp3hero-wrap .tp3hero-sub   { font-size: 18px; line-height: 1.35; margin-bottom: 24px; }
  .tp3hero-stage .tp3hero-wrap .tp3hero-actions { gap: 16px 24px; }
  .tp3hero-stage .tp3hero-wrap a.tp3hero-btn,
  .tp3hero-stage .tp3hero-wrap a.tp3hero-link { font-size: 16px; }
}
