/* Homepage opening: image and headline first, with the approved copy below. */
body:is(.home-pl,.home-en) .hero-opening {
  display: block !important;
  width: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
}
body:is(.home-pl,.home-en) .hero-opening .hero-visual {
  position: relative;
  min-height: clamp(470px, 43vw, 620px);
  overflow: hidden;
  isolation: isolate;
}
body:is(.home-pl,.home-en) .hero-opening .hero-photo {
  position: absolute !important;
  inset: 0 !important;
  z-index: -1;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  background-image: url("hero-ulica-jesienna-final.png") !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  background-size: auto 100% !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
body:is(.home-pl,.home-en) .hero-opening .hero-photo::before {
  content: none !important;
}
body:is(.home-pl,.home-en) .hero-opening .hero-photo::after {
  content: "" !important;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.98) 24%, rgba(255,255,255,.88) 40%, rgba(255,255,255,.42) 57%, rgba(255,255,255,0) 74%) !important;
  pointer-events: none;
}
body:is(.home-pl,.home-en) .hero-opening .hero-dialogue {
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: min(56%, 700px);
  min-height: inherit;
  margin-left: max(40px, calc((100vw - 1240px) / 2));
  padding: 58px 0 68px;
}
body:is(.home-pl,.home-en) .hero-opening .hero-index {
  max-width: 32ch;
  margin: 0;
  color: #315f80;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 650;
  line-height: 1.4;
}
body:is(.home-pl,.home-en) .hero-opening h1 {
  width: 100%;
  max-width: 11ch;
  margin: 0 !important;
  color: #716247 !important;
  font-size: clamp(3.3rem, 5.3vw, 5.2rem);
  font-weight: 700;
  line-height: 1.04;
  text-wrap: balance;
}
body:is(.home-pl,.home-en) .hero-opening h1 em {
  font-style: italic;
  white-space: nowrap;
}
body:is(.home-pl,.home-en) .hero-opening .hero-body {
  display: grid;
  grid-template-columns: minmax(250px, .82fr) minmax(0, 1.5fr);
  align-items: start;
  gap: clamp(36px, 6vw, 92px);
  width: min(1240px, calc(100% - 80px));
  margin: 0 auto;
  padding: 54px 0 64px;
}
body:is(.home-pl,.home-en) .hero-opening .hero-lead {
  margin: 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid #6289a6;
  color: #233644;
  font-size: clamp(1.22rem, 1.7vw, 1.55rem);
  font-weight: 650;
  line-height: 1.55;
  text-wrap: pretty;
}
body:is(.home-pl,.home-en) .hero-opening .hero-details {
  display: grid;
  gap: 20px;
}
body:is(.home-pl,.home-en) .hero-opening .hero-copy {
  max-width: 65ch;
  margin: 0;
  color: #233644;
  font-size: clamp(1.06rem, 1.35vw, 1.2rem);
  font-weight: 400;
  line-height: 1.75;
  text-wrap: pretty;
}
body:is(.home-pl,.home-en) .hero-opening .hero-materials {
  padding-top: 0;
  border-top: 0;
}
@media (min-width: 601px) and (max-width: 1000px) {
  body:is(.home-pl,.home-en) .hero-opening .hero-visual { min-height: 510px; }
  body:is(.home-pl,.home-en) .hero-opening .hero-dialogue {
    width: 60%;
    margin-left: 36px;
    padding-block: 46px;
    gap: 18px;
  }
  body:is(.home-pl,.home-en) .hero-opening h1 { font-size: clamp(3.1rem, 6.4vw, 4.4rem); }
  body:is(.home-pl,.home-en) .hero-opening .hero-body {
    grid-template-columns: minmax(230px, .9fr) minmax(0, 1.35fr);
    width: calc(100% - 72px);
    gap: 40px;
    padding-block: 42px 50px;
  }
}
@media (max-width: 600px) {
  body:is(.home-pl,.home-en) .hero-opening .hero-visual {
    min-height: 0;
    height: auto;
    aspect-ratio: 1.12 / 1;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-photo {
    background-position: right center !important;
    background-size: auto 100% !important;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-photo::after {
    background: linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.94) 43%, rgba(255,255,255,.68) 66%, rgba(255,255,255,.12) 100%) !important;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-dialogue {
    width: min(76%, 350px);
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 34px 0 34px 22px;
    gap: 15px;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-index {
    max-width: 22ch;
    font-size: clamp(1.12rem, 4.7vw, 1.35rem);
    line-height: 1.38;
  }
  body:is(.home-pl,.home-en) .hero-opening h1 {
    max-width: 9ch;
    font-size: clamp(2.25rem, 9.3vw, 3rem);
    line-height: 1.04;
  }
  body:is(.home-pl,.home-en) .hero-opening h1 em { white-space: normal; }
  body:is(.home-pl,.home-en) .hero-opening .hero-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    width: auto;
    margin: 0;
    padding: 30px 24px 42px;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-lead {
    max-width: 34ch;
    padding-left: 17px;
    font-size: 1.2rem;
    line-height: 1.55;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-details { gap: 18px; }
  body:is(.home-pl,.home-en) .hero-opening .hero-copy {
    font-size: 1rem;
    line-height: 1.72;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-materials {
    padding-top: 0;
  }
}
/* Reset legacy grid placement carried by the previous hero layout. */
body:is(.home-pl,.home-en) .hero-opening .hero-dialogue > * {
  grid-column: auto !important;
  grid-row: auto !important;
}
body:is(.home-pl,.home-en) .hero-opening h1 {
  max-width: 15ch;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
body:is(.home-pl,.home-en) .hero-opening .hero-lead,
body:is(.home-pl,.home-en) .hero-opening .hero-details,
body:is(.home-pl,.home-en) .hero-opening .hero-details > * {
  grid-column: auto !important;
  grid-row: auto !important;
}
@media (max-width: 600px) {
  body:is(.home-pl,.home-en) .hero-opening h1 { max-width: 11ch; }
}

/* Keep the laptop headline and overline from dominating the artwork. */
@media (min-width: 1001px) {
  body:is(.home-pl,.home-en) .hero-opening h1 {
    font-size: clamp(3rem, 4.4vw, 4.5rem);
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-index {
    font-size: clamp(1.15rem, 1.75vw, 1.6rem);
  }
}

/* Keep the full illustration and gently carry the light sage background
   through its pale left edge to avoid a visible seam. */
@media (min-width: 1201px) {
  body:is(.home-pl,.home-en) .hero-opening .hero-photo {
    inset: 0 !important;
    width: 100% !important;
    background-image: url("hero-ulica-jesienna-final.png") !important;
    background-size: auto 108% !important;
    background-position: right center !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-photo::after {
    content: none !important;
    display: none !important;
  }
  body:is(.home-pl,.home-en) .hero-opening .hero-visual::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 0;
    width: calc(29.4vw + 140px);
    pointer-events: none;
    background: linear-gradient(
      90deg,
      #f0f3ed 0,
      #f0f3ed calc(100% - 220px),
      rgba(240,243,237,.86) calc(100% - 165px),
      rgba(240,243,237,.46) calc(100% - 75px),
      rgba(240,243,237,0) 100%
    );
  }
}
@media (min-width: 1441px) {
  body:is(.home-pl,.home-en) .hero-opening .hero-visual::before {
    width: calc(100vw - 879px);
  }
}

/* The selected first column sketch sits beside the lead, cropped only by its transparent canvas. */
body:is(.home-pl,.home-en) .hero-lead-with-sketch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(100px, 10vw, 132px);
  align-items: center;
  gap: 12px;
  min-width: 0;
}
body:is(.home-pl,.home-en) .hero-lead-sketch {
  position: relative;
  width: 100%;
  height: 196px;
  overflow: hidden;
  margin: 0;
  line-height: 0;
}
body:is(.home-pl,.home-en) .hero-lead-sketch img {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: auto;
  height: 196px;
  max-width: none;
  transform: translateX(-50%);
  object-fit: contain;
  opacity: .9;
}
@media (min-width: 601px) and (max-width: 1000px) {
  body:is(.home-pl,.home-en) .hero-lead-sketch { height: 174px; }
  body:is(.home-pl,.home-en) .hero-lead-sketch img { height: 174px; }
}
@media (max-width: 600px) {
  body:is(.home-pl,.home-en) .hero-lead-with-sketch {
    grid-template-columns: minmax(0, 1fr) 98px;
    gap: 8px;
    align-items: center;
  }
  body:is(.home-pl,.home-en) .hero-lead-sketch { height: 148px; }
  body:is(.home-pl,.home-en) .hero-lead-sketch img { height: 148px; }
}
