/* INDEX — design system (final layer, po index-inline.css) */
/* Typografia: base.css :where(main.page-shell); tu tło, hairline, nadpisania konfliktów. */

/* —— Hero ↔ Living Museum: odstęp, bez nachodzenia —— */
section.bpm-fn-landing.page-section.page-section--hero {
  min-height: auto !important;
  overflow: visible !important;
  padding-bottom: clamp(36px, 4.5vw, 64px) !important;
}

section.bpm-fn-landing .bpm-fn-pathways {
  margin-bottom: clamp(8px, 1.5vw, 16px) !important;
}

#living-museum.hm-story-section.page-section {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

@media (min-width: 1081px) {
  section#living-museum.hm-story-section .hm-story-copy,
  section#living-museum.hm-story-section .hm-story-gallery {
    margin-top: 0 !important;
  }
}

/* —— Hero landing: H1 z tokenów, bez clamp —— */
section.bpm-fn-landing .bpm-fn-heading {
  font-family: var(--hero-h1-font-family) !important;
  font-size: var(--hero-h1-font-size) !important;
  font-weight: var(--hero-h1-font-weight) !important;
  line-height: var(--hero-h1-line-height) !important;
  letter-spacing: var(--hero-h1-letter-spacing) !important;
}

section.bpm-fn-landing .bpm-fn-heading span {
  color: var(--gold-main) !important;
}

/* —— #tap-map-card-final: kompaktowa karta w siatce hero (desktop) — layout z index-inline.css —— */
@media (min-width: 981px) {
  #tap-map-card-final {
    width: 560px !important;
    max-width: 560px !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
    overflow: hidden !important;
  }

  #tap-map-card-final .bpm-fn-map-main {
    height: 135px !important;
    min-height: 135px !important;
    max-height: 135px !important;
    grid-template-columns: 210px 1fr !important;
    transform: none !important;
  }

  #tap-map-card-final .page-h2-rule {
    margin: 3px auto 4px !important;
  }
}

/* Mobile / tablet: pełna szerokość — tokeny typografii OK */
@media (max-width: 980px) {
  #tap-map-card-final .bpm-fn-kicker {
    font-family: var(--type-h5-font-family);
    font-size: var(--type-h5-font-size);
    font-weight: var(--type-h5-font-weight);
    letter-spacing: var(--type-h5-letter-spacing);
    text-transform: var(--type-h5-text-transform);
    color: var(--gold-main);
  }

  #tap-map-card-final .bpm-fn-map-title {
    font-family: var(--type-h2-font-family);
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    font-weight: 500;
    line-height: var(--type-h2-line-height);
    color: var(--text-main);
  }

  #tap-map-card-final .bpm-fn-map-lede {
    font-family: var(--type-body-font-family);
    font-size: var(--type-body-font-size);
    line-height: var(--type-body-line-height);
    color: var(--text-soft);
  }
}

/* —— Jasne sekcje: hairline + tokeny powierzchni —— */
#living-museum.hm-story-section.page-section {
  background: var(--surface-cream-a) !important;
  border-top: var(--cream-section-hairline);
  color: #17130d;
}

.hm-story-title {
  margin: 0;
  color: #11100c;
}

.hm-story-title em {
  color: var(--gold-main);
}

.hm-story-lede {
  color: rgba(23, 19, 13, 0.78);
}

section.sense-day-section.page-section {
  border-top: var(--cream-section-hairline);
  background: var(--surface-cream-d) !important;
}

.contact-hub-section.page-section {
  border-top: var(--cream-section-hairline);
  background: var(--surface-cream-b) !important;
  color: #17130e;
}

/* —— Ciemne sekcje: powierzchnie z tokenów —— */
.court-choice-section.page-section {
  background:
    radial-gradient(circle at 50% 16%, rgba(184, 151, 58, 0.12), transparent 28%),
    linear-gradient(180deg, var(--surface-dark-a) 0%, var(--surface-dark-c) 54%, var(--surface-dark-a) 100%) !important;
  color: var(--text-main);
}

.court-choice-kicker,
.court-choice-title span {
  color: var(--gold-main) !important;
}

.bpm-motion-section.page-section {
  background:
    radial-gradient(circle at 18% 18%, rgba(184, 151, 58, 0.13), transparent 30%),
    linear-gradient(180deg, var(--surface-dark-a) 0%, var(--surface-dark-c) 55%, var(--surface-dark-a) 100%) !important;
  color: var(--text-main) !important;
}

.bpm-sponsor-positions--strong.page-section,
.bpm-sponsor-positions.bpm-sponsor-positions--strong {
  background: var(--surface-dark-b) !important;
}

.score-here-section.score-here-section--strong,
.score-here-section--strong {
  background: var(--surface-dark-c) !important;
}

/* —— H2 sekcji: tylko kolor na ciemnym (waga 500) —— */
.court-choice-title,
.bpm-motion-section .bpm-motion-copy h2,
.bpm-sponsor-positions--strong .bpm-sponsor-title,
.score-here-section--strong .score-here-title {
  font-weight: 500;
  color: var(--text-main);
}

/* —— Kontakt: etykieta formularza jako H5 —— */
.contact-form-title {
  font-family: var(--type-h5-font-family);
  font-size: var(--type-h5-font-size);
  font-weight: var(--type-h5-font-weight);
  letter-spacing: var(--type-h5-letter-spacing);
  text-transform: var(--type-h5-text-transform);
  color: #17130e;
}

/* —— Desktop: spójny padding page-section (nadpisuje ciasne !important z inline) —— */
@media (min-width: 981px) {
  #living-museum.hm-story-section.page-section,
  .court-choice-section.page-section,
  section.sense-day-section.page-section,
  .contact-hub-section.page-section,
  .bpm-motion-section.page-section,
  .bpm-sponsor-positions--strong.page-section,
  .bpm-sponsor-positions.bpm-sponsor-positions--strong,
  .score-here-section.score-here-section--strong,
  .score-here-section--strong {
    --page-section-pad-top: var(--section-pad-y);
    --page-section-pad-bottom: var(--section-pad-y);
    padding-block: var(--page-section-pad-top) var(--page-section-pad-bottom) !important;
  }

  .bpm-motion-section.page-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* —— enter-court-choice @ Full HD: opis na całą szerokość, tytuł w jednej linii —— */
@media (min-width: 1280px) {
  #enter-court-choice.court-choice-section .court-choice-head {
    max-width: none !important;
    width: 100% !important;
  }

  #enter-court-choice.court-choice-section .court-choice-lede {
    max-width: none !important;
    width: 100% !important;
  }

  #enter-court-choice.court-choice-section .court-choice-title {
    white-space: nowrap;
  }
}

/* —— sense-day-feature-cta: dwa przyciski na środek (szerokość + wysokość) —— */
.sense-day-feature-content {
  height: 100% !important;
}

.sense-day-feature-cta {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  align-content: center !important;
  width: 100% !important;
  min-height: 0 !important;
  margin-top: clamp(18px, 2.5vh, 28px) !important;
  gap: 12px !important;
}

/* Desktop hero strip — ≥1280×650; dwa pionowe pasy (góra–dół), jak klasyczny hero */
@media (min-width: 1280px) and (min-height: 650px) {
  section.bpm-fn-landing.page-section--hero .bpm-fn-top {
    grid-template-columns: minmax(0, 0.58fr) minmax(560px, 0.52fr) !important;
    column-gap: 28px !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    height: min(560px, calc(100svh - 220px)) !important;
    max-height: min(560px, calc(100svh - 220px)) !important;
    min-height: 480px !important;
    padding: 0 !important;
    gap: 14px !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 4 !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .bpm-fn-intro,
  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .bpm-fn-map-card {
    position: relative !important;
    z-index: 2 !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 18px !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip--down {
    display: block !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip-track {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    height: max-content !important;
    gap: 16px !important;
    padding: 10px !important;
    animation: none !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip .photo-item,
  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-item {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    border: 1px solid rgba(199, 161, 87, 0.28) !important;
    box-sizing: border-box !important;
    aspect-ratio: 16 / 9 !important;
    background: #070708 !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip .photo-item > img,
  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-item > img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: inherit !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    filter: none !important;
  }

  section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip .photo-item .photo-meta {
    position: absolute !important;
    inset: auto 0 0 0 !important;
    z-index: 2 !important;
  }
}

/* Edge / DPI fallback — pionowe pasy po klasie z JS (gdy MQ zawiedzie) */
html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  height: min(560px, calc(100vh - 220px)) !important;
  max-height: min(560px, calc(100vh - 220px)) !important;
  min-height: 480px !important;
  gap: 14px !important;
  overflow: hidden !important;
}

html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip-track {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100% !important;
  height: max-content !important;
}

html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip .photo-item,
html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-item {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
}

html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-strip .photo-item > img,
html.bpm-hero-fhd section.bpm-fn-landing.page-section--hero .bpm-fn-top > .hero-showcase .photo-item > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}
