/* Shared product-page hero (Skjutpartier, Räcken).
   Loaded only by pages that use this hero, after the page's inline styles.
   Markup:
   <section class="hero [hero--media-left]" style="--hero-pos: X Y; --hero-pos-mobile: X Y">
     <div class="hero-panel"> breadcrumb, h1, p.hero-tagline, a.btn.hero-cta </div>
     <div class="hero-media"><img …></div>
   </section>
   --hero-pos / --hero-pos-mobile set each page's photo focal point (desktop / <=860px). */

/* ---- Hero: navy text panel (30%) + edge-to-edge photo (70%) ---- */
section.hero{
  padding: 0;
  min-height: clamp(460px, 74vh, 760px);
  display: grid;
  grid-template-columns: minmax(320px, 30%) minmax(0, 1fr);
  background: var(--color-header);
  color: #fff;
}

.hero-panel{
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vh, 72px) clamp(28px, 3.6vw, 64px);
  min-width: 0;
}

.hero-media{
  position: relative;
  min-height: 100%;
}

.hero-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos, 50% 50%);
}

.hero .breadcrumb{
  margin: 0 0 clamp(20px, 3vh, 32px);
  font-size: 0.844rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.62);
}

.hero .breadcrumb a{ color: rgba(255,255,255,0.82); font-weight: 500; }
.hero .breadcrumb a:hover, .hero .breadcrumb a:focus{ color: #fff; }

.hero h1{
  font-size: calc(clamp(2rem, 3.02vw, 3.8rem) * var(--heading-scale));
  line-height: 1.1;
  white-space: nowrap;
  margin: 0 0 22px;
  color: #fff;
}

.hero-tagline{
  margin: 0;
  max-width: 26ch;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
}

.hero-cta{ display: none; }

/* Mobile hero: 4:3 photo under a transparent header, fading into the navy text panel */
@media (max-width: 860px){
  section.hero{
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .hero-media{
    position: relative;
    order: -1;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 55vh;
    max-height: 55svh;
    min-height: 0;
  }
  .hero-media img{ object-position: var(--hero-pos-mobile, 50% 50%); }
  .hero-media::after{
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(11,35,64,0) 0%,
      rgba(11,35,64,0) 52%,
      rgba(11,35,64,0.12) 62%,
      rgba(11,35,64,0.4) 74%,
      rgba(11,35,64,0.78) 88%,
      rgba(11,35,64,1) 100%);
  }
  .hero-panel{
    padding: 8px 24px 44px;
  }
  .hero .breadcrumb{ margin-bottom: 12px; }
  .hero h1{ font-size: calc(clamp(2.2rem, 8.89vw, 3rem) * var(--heading-scale)); margin-bottom: 16px; }
  .hero-tagline{ max-width: 30ch; }
  .hero-cta{
    display: inline-block;
    align-self: flex-start;
    margin-top: 22px;
  }
}

/* Modifier: photo on the left, panel on the right (desktop only; mobile is identical) */
@media (min-width: 861px){
  section.hero.hero--media-left{ grid-template-columns: minmax(0, 1fr) minmax(320px, 30%); }
  .hero--media-left .hero-media{ order: -1; }
}

/* Mobile: compact, transparent header that floats over the hero photo
   and turns solid navy once the page is scrolled. */
@media (max-width: 860px){
  header.site-header{
    position: fixed;
    left: 0;
    right: 0;
    background: transparent;
    transition: background-color 0.3s ease;
  }
  /* Soft scrim behind logo + hamburger, taller than the bar itself */
  header.site-header::before{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 150px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(11,35,64,0.78) 0%, rgba(11,35,64,0.4) 50%, rgba(11,35,64,0) 100%);
    transition: opacity 0.3s ease;
  }
  header.site-header.shrink{ background: var(--color-header); }
  header.site-header.shrink::before{ opacity: 0; }
  header.site-header .nav-wrap,
  header.site-header.shrink .nav-wrap{ padding: 10px 20px; }
  header.site-header .logo-img{ height: 42px; }
  header.site-header.shrink .logo-img{ height: 34px; }
  .hamburger span{ box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
  header.site-header nav.primary-nav,
  header.site-header.shrink nav.primary-nav{
    position: absolute;
    top: 100%;
  }
  section{ scroll-margin-top: 84px; }
}
