/* Hero na panoramie rozwidlenia — arkusz `template-parts/landing-ksiega-hero.php`.
 *
 * Canvas B1/B2 `.b-hero` (v11). Powłoka: gradient od góry (Smoked Tent
 * 70 → 25 → 10 %) plus od lewej pod kolumną tekstu (88 → 72 % → nic na 60 %)
 * — tabela kontrastu r1 §1, „nie rozjaśniać lewej strony" (r1 §4).
 * Na telefonie powłoka idzie z góry w dół (85 → 70 → 15 % → nic).
 *
 * Pozycje okładek są liczone na kolumnę 620 px — stąd próg 1200 px, nie 900.
 */

.szewko-landing-ksiega-hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--color-smoked-tent);

  /* Powłoka NAD panoramą (`<img>` stoi w przepływie przed nią i bez
     `z-index` malowałby się na wierzchu). */
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--color-smoked-tent) 70%, transparent) 0%,
        color-mix(in srgb, var(--color-smoked-tent) 25%, transparent) 55%,
        color-mix(in srgb, var(--color-smoked-tent) 10%, transparent) 100%),
      linear-gradient(90deg,
        color-mix(in srgb, var(--color-smoked-tent) 88%, transparent) 0%,
        color-mix(in srgb, var(--color-smoked-tent) 72%, transparent) 42%,
        transparent 60%);
  }

  @media (max-width: 1199px) {
    min-height: 600px;

    &::before {
      background: linear-gradient(180deg,
        color-mix(in srgb, var(--color-smoked-tent) 85%, transparent) 0%,
        color-mix(in srgb, var(--color-smoked-tent) 70%, transparent) 50%,
        color-mix(in srgb, var(--color-smoked-tent) 15%, transparent) 80%,
        transparent 100%);
    }
  }
}

.szewko-landing-ksiega-hero__panorama {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;

  @media (max-width: 1199px) {
    object-position: 62% 62%;
  }
}

.szewko-landing-ksiega-hero__w {
  position: relative;
  z-index: 2;
  display: grid;
  box-sizing: border-box;
  max-width: 1440px;
  min-height: 640px;
  margin: 0 auto;
  padding: 36px 80px 40px; /* bottom: room under the signed-copy bubble (09.11.2026) */
  grid-template-columns: 620px minmax(0, 1fr);
  gap: 40px;

  @media (max-width: 1199px) {
    display: flex;
    min-height: 600px;
    padding: 20px 24px 32px; /* owner 07.10.2026: the "3 zdjęcia" button sat on the hero's bottom edge */
    flex-direction: column;
    gap: 0;
  }

  @media (min-width: 768px) and (max-width: 1199px) {
    padding-inline: 48px;
  }
}

.szewko-landing-ksiega-hero__tekst {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;

  @media (max-width: 1199px) {
    gap: 10px;
  }

  & p {
    margin: 0;
  }
}

.szewko-landing-ksiega-hero__okruszki {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--color-bleached-linen);
  font-family: var(--font-ui);
  font-size: 13px;

  & a {
    color: var(--color-bleached-linen);
  }
}

.szewko-landing-ksiega-hero__tytul {
  margin: 0;
  color: var(--color-parchment);
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;

  @media (max-width: 1199px) {
    font-size: 28px;
  }
}

.szewko-landing-ksiega-hero__opis {
  max-width: 56ch;
  color: var(--color-bleached-linen);
  font-size: 19px;
  line-height: 1.55;

  & p {
    margin: 0;
  }

  /* Canvas B2: na telefonie opisu krótkiego nie ma. */
  @media (max-width: 1199px) {
    display: none;
  }
}

.szewko-landing-ksiega-hero__cena {
  color: var(--color-sand-gold);
  font-family: var(--font-cena);
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;

  @media (max-width: 1199px) {
    font-size: 28px;
  }
}

.szewko-landing-ksiega-hero__sku {
  color: var(--color-bleached-linen);

  /* Canvas B2: SKU schodzi do punktu zbiegu. */
  @media (max-width: 1199px) {
    display: none;
  }
}

.szewko-landing-ksiega .szewko-landing-ksiega-hero__dalej {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--color-sand-gold);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;

  &:hover {
    color: var(--color-brass-lantern);
  }
}

/* ── okładki dwóch rzeczy, stojące NA panoramie (z cieniem, nie wtopione) ── */

.szewko-landing-ksiega-hero__przedmioty {
  position: relative;

  @media (max-width: 1199px) {
    width: 342px;
    max-width: 100%;
    height: 316px;
    margin-top: 8px;
  }
}

.szewko-landing-ksiega-hero__okladka {
  position: absolute;
  top: 84px;
  left: 292px;
  width: 272px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow:
    0 24px 40px color-mix(in srgb, var(--color-smoked-tent) 60%, transparent),
    0 2px 6px color-mix(in srgb, var(--color-smoked-tent) 50%, transparent);

  @media (max-width: 1199px) {
    top: 38px;
    left: 0;
    width: 150px;
  }
}

/* Mosque portal around the e-book — one finished graphic since 07.10.2026
   (2695 × 4808 at the source, cropped to the opaque box). The frieze starts at
   13.64 % of the height and the body ends at 99.58 %, so the body is 85.94 %
   of it: that body is as tall as the book and starts level with its top edge,
   the dome rises above it. Change these numbers together with the file. */
.szewko-landing-ksiega-hero__meczet {
  position: absolute;
  top: 21px; /* 84 − 13.64 % × 461: the frieze sits at the book's top edge */
  left: 0;
  width: 258px; /* 396 / 0.8594 = 461 px tall → body as tall as the 396 px book */
  height: auto;
  filter:
    drop-shadow(0 0 18px color-mix(in srgb, var(--color-brass-lantern) 30%, transparent))
    drop-shadow(0 22px 30px color-mix(in srgb, var(--color-smoked-tent) 65%, transparent));

  @media (max-width: 1199px) {
    top: 3px; /* 38 − 13.64 % × 254 */
    left: 166px;
    width: 142px; /* 218 / 0.8594 = 254 px tall → body as tall as the 150 px book */
  }
}

/* Podpisy „Papier" / „Plik" nad okładkami (r1 p. 1) — tylko 1440. */
.szewko-landing-ksiega-hero__podpis {
  position: absolute;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-smoked-tent) 72%, transparent);
  color: var(--color-parchment);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  @media (max-width: 1199px) {
    display: none;
  }
}

.szewko-landing-ksiega-hero__podpis--papier {
  top: 44px;
  left: 292px;
}

.szewko-landing-ksiega-hero__podpis--plik {
  top: 44px;
  left: 0;
}

.szewko-landing-ksiega-hero__powieksz {
  position: absolute;
  top: 496px;
  left: 0;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--color-parchment) 55%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-smoked-tent) 70%, transparent);
  color: var(--color-parchment);
  font-family: var(--font-ui);
  font-size: 14px;
  cursor: pointer;

  &:hover {
    border-color: var(--color-sand-gold);
  }

  /* Na 390 pod okładkami, przy lewej krawędzi (właściciel 06.10.2026:
     portal wielkości książki; wcześniej r1 p. 5 — pod e-bookiem). */
  @media (max-width: 1199px) {
    top: 272px;
    left: 0;
  }
}

/* Canvas B2: „3 zdjęcia" bez „Powiększ ·" — pełna nazwa idzie do czytnika z tekstu 1440. */
.szewko-landing-ksiega-hero__powieksz-slowo {
  @media (max-width: 1199px) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ── signed-copy bubble under "Do zakupu" ──
   Canvas „Księga — dymek autografu" variant B (owner 09.11.2026: B, frame
   2 px on desktop only). The tail is a rotated square clipped to its outer
   half, centred on the inner border edge, so it covers the frame at its base
   and continues it. Tail fill = the bubble ground over the darkest hero
   overlay, opaque (canvas #2a1a0d). */

.szewko-landing-ksiega-hero__dedykacja {
  position: relative;
  display: flex;
  box-sizing: border-box;
  width: 560px;
  max-width: 100%;
  margin-top: 4px;
  padding: 16px 20px;
  align-items: center;
  gap: 16px;
  border: 2px solid var(--color-sand-gold);
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-smoked-tent) 78%, transparent);
  color: var(--color-parchment);

  &::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -9px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    margin-top: -9px;
    border-top: 2px solid var(--color-sand-gold);
    border-right: 2px solid var(--color-sand-gold);
    background: color-mix(in srgb, var(--color-dark-mahogany) 40%, var(--color-smoked-tent));
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    transform: rotate(45deg);
  }

  @media (max-width: 1199px) {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    align-items: flex-start;
    gap: 12px;
    border-width: 1px;
    background: color-mix(in srgb, var(--color-smoked-tent) 82%, transparent);

    /* Tail points down at the paper book (left edge of the covers row). */
    &::after {
      top: auto;
      right: auto;
      bottom: -8px;
      left: 67px;
      width: 16px;
      height: 16px;
      margin-top: 0;
      border-top: 0;
      border-right: 1px solid var(--color-sand-gold);
      border-bottom: 1px solid var(--color-sand-gold);
      clip-path: polygon(100% 0, 100% 100%, 0 100%);
    }
  }
}

.szewko-landing-ksiega-hero__dedykacja-ikona {
  display: inline-flex;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-sand-gold);
  border-radius: var(--radius-full);
  color: var(--color-brass-lantern);

  @media (max-width: 1199px) {
    width: 40px;
    height: 40px;

    & svg {
      width: 20px;
      height: 20px;
    }
  }
}

.szewko-landing-ksiega-hero__dedykacja-tresc {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.szewko-landing-ksiega-hero__dedykacja-tytul {
  color: var(--color-parchment);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;

  @media (max-width: 1199px) {
    font-size: 16px;
  }
}

.szewko-landing-ksiega-hero__dedykacja-tekst {
  color: var(--color-bleached-linen);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;

  @media (max-width: 1199px) {
    font-size: 15px;
  }
}

/* Inline after the sentence on 1440 (touch target widened by padding);
   on its own 44 px line on 390. */
.szewko-landing-ksiega .szewko-landing-ksiega-hero__dedykacja-adres {
  display: inline-block;
  margin: -10px 0;
  padding: 10px 0;
  color: var(--color-sand-gold);
  font-weight: 600;
  text-underline-offset: 3px;

  &:hover {
    color: var(--color-brass-lantern);
  }

  @media (max-width: 1199px) {
    display: flex;
    min-height: 44px;
    margin: 0;
    padding: 0;
    align-items: center;
    font-size: 16px;
  }
}
