/* Sekcje strony głównej. Jawne dziedziczenie kolorów: stary motyw ustawia "* { color }" i "a:hover { color !important }". */
.tpi-home { width: 100%; padding: 0; color: var(--tpi-ink); font-size: 16px; line-height: 1.55; background: #fff; }
.tpi-home section *, .tpi-home section *::before, .tpi-home section *::after { box-sizing: border-box; }
.tpi-home section:not(.tpi-slider) * { color: inherit; }
.tpi-home a, .tpi-home a:hover { text-decoration: none !important; }
.tpi-home section:not(.tpi-slider) a:hover { color: inherit !important; }
.tpi-home section:not(.tpi-slider) button { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; min-height: 0; cursor: pointer; }
.tpi-home :focus-visible { outline: 3px solid var(--tpi-orange); outline-offset: 3px; }
.tpi-home :where(section:not(.tpi-slider)) h2, .tpi-home :where(section:not(.tpi-slider)) h3, .tpi-home :where(section:not(.tpi-slider)) p { margin: 0 !important; }
.tpi-home section:not(.tpi-slider) h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; font-weight: 300; letter-spacing: -.01em; text-wrap: balance; }
.tpi-home h2 b { font-weight: 700; }
.tpi-home.has-no-slider { padding-top: 190px; }
body.home main.tpi-home > section { margin-block: 0 !important; }
body.home #content:has(> main.tpi-home) { margin-bottom: 0 !important; }
.tpi-home__h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tpi-home__sec { padding-block: clamp(44px, 5vw, 72px); }
.tpi-home__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(20px, 2.4vw, 32px); }
.tpi-home__more { font-weight: 600; border-bottom: 2px solid var(--tpi-orange); padding-bottom: 3px; white-space: nowrap; }
.tpi-home section:not(.tpi-slider) a.tpi-btn, .tpi-home section:not(.tpi-slider) a.tpi-btn:hover { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; font-weight: 700; border-radius: var(--tpi-r-btn); background: var(--tpi-orange); color: #14181c !important; transition: background .2s; }
.tpi-home section:not(.tpi-slider) a.tpi-btn:hover { background: #ff9240; }
.tpi-home section:not(.tpi-slider) a.tpi-btn.is-ghost, .tpi-home section:not(.tpi-slider) a.tpi-btn.is-ghost:hover { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 2px #fff; }
.tpi-home section:not(.tpi-slider) a.tpi-btn.is-ghost:hover { background: rgba(255, 255, 255, .16); }

/* Atuty */
.tpi-trust { border-bottom: 1px solid var(--tpi-line); }
.tpi-trust > .tpi-wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.tpi-trust__item { display: flex; gap: 20px; align-items: center; padding: 34px 20px 34px 0; }
.tpi-trust svg { width: 76px; height: 76px; flex: none; fill: none; stroke: var(--tpi-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.tpi-trust .o { stroke: var(--tpi-orange); stroke-width: 3; }
.tpi-trust .w { stroke-width: 5; }
.tpi-trust .f { fill: var(--tpi-orange); stroke: none; }
.tpi-trust .d { stroke: #b9c1c7; stroke-width: 1.4; }
.tpi-trust text { fill: var(--tpi-ink); stroke: none; font-weight: 700; font-family: inherit; }
.tpi-trust b { display: block; font-size: 18px; line-height: 1.3; }
.tpi-home .tpi-trust span { color: var(--tpi-ink-2); }

/* Kategorie */
.tpi-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tpi-cat { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 290px; padding: 22px; background: var(--tpi-fog); border-radius: var(--tpi-r); overflow: hidden; transition: background .2s; }
.tpi-cat:hover { background: #e4e8eb; }
.tpi-cat b { font-size: 20px; line-height: 1.2; position: relative; z-index: 2; }
.tpi-cat.is-small img { width: 100%; height: 190px; object-fit: contain; mix-blend-mode: multiply; transform: scale(1.15); transition: transform .4s; }
.tpi-cat.is-small:hover img { transform: scale(1.22); }
.tpi-home section a.tpi-cat.is-big, .tpi-home section a.tpi-cat.is-big:hover { grid-column: span 2; color: #fff !important; background: var(--tpi-night); }
.tpi-cat.is-big b { font-size: 24px; }
.tpi-cat.is-big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tpi-cat.is-big:hover img { transform: scale(1.04); }
.tpi-cat.is-big::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8, 11, 14, .8), rgba(8, 11, 14, 0) 55%); }
.tpi-home section a.tpi-cat.is-big.is-plain, .tpi-home section a.tpi-cat.is-big.is-plain:hover { color: var(--tpi-ink) !important; background: var(--tpi-fog); }
.tpi-cat.is-big.is-plain::before { content: none; }
.tpi-cat.is-big.is-plain img { object-fit: contain; padding: 52px 24px 16px; mix-blend-mode: multiply; }
.tpi-cat.is-text { min-height: 0; flex-direction: row; align-items: center; padding: 24px 22px; }
.tpi-cat.is-text::after { content: "→"; font-size: 22px; }

/* Zadania */
.tpi-home .tpi-tasks { background: var(--tpi-night); color: #fff; }
.tpi-tasks__stage { display: grid; grid-template-columns: minmax(300px, 5fr) 8fr; gap: clamp(24px, 4vw, 64px); min-height: 560px; }
.tpi-task { border-top: 1px solid rgba(255, 255, 255, .22); padding: 20px 0; }
.tpi-task:last-child { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.tpi-home section .tpi-task button { width: 100%; text-align: left; font-size: clamp(21px, 2vw, 28px); line-height: 1.25; font-weight: 300; color: rgba(255, 255, 255, .78); }
.tpi-home section .tpi-task.is-on button { color: #fff; font-weight: 700; }
.tpi-task__links { display: none; padding-top: 14px; }
.tpi-task.is-on .tpi-task__links { display: block; }
.tpi-task__links a { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.tpi-home .tpi-task__links a::after { content: "→"; color: var(--tpi-orange); }
.tpi-task__links a:hover::after { transform: translateX(4px); }
.tpi-task__links .is-more { font-weight: 700; }
.tpi-tasks__pics { position: relative; overflow: hidden; border-radius: var(--tpi-r); min-height: 320px; background: #1c2227; }
.tpi-tasks__pics > div { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.tpi-tasks__pics > .is-on { opacity: 1; }
.tpi-tasks__pics img { width: 100%; height: 100%; object-fit: cover; }

/* Produkty */
.tpi-products { background: var(--tpi-list); }
.tpi-products__arrows { display: flex; gap: 8px; }
.tpi-home section .tpi-products__arrows button { width: 46px; height: 46px; border: 1px solid #b9c1c7; border-radius: var(--tpi-r-btn); font-size: 20px; }
.tpi-home section .tpi-products__arrows button:hover { border-color: var(--tpi-ink); }
.tpi-home section .tpi-products__arrows button:disabled { opacity: .35; cursor: default; }
.tpi-products__tabs { display: flex; gap: 28px; border-bottom: 1px solid #c3cad0; margin-bottom: 28px; overflow-x: auto; }
.tpi-home section .tpi-products__tabs button { padding: 12px 0; font-weight: 600; font-size: 18px; color: var(--tpi-ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tpi-home section .tpi-products__tabs button[aria-selected="true"] { color: var(--tpi-ink); border-color: var(--tpi-orange); }
.tpi-rail { display: none; }
.tpi-rail.is-on { display: block; }
.tpi-rail__in { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 4); grid-template-rows: repeat(6, auto); gap: 0 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; margin-bottom: 14px; scrollbar-width: thin; scrollbar-color: #aab2b9 transparent; }

/* Pas DJI Dock */
.tpi-dock { position: relative; display: flex; align-items: center; min-height: 600px; background: var(--tpi-night); color: #fff; overflow: hidden; }
.tpi-dock > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.tpi-dock::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 11, 14, .86) 0, rgba(8, 11, 14, .6) 42%, rgba(8, 11, 14, 0) 78%); }
.tpi-dock > .tpi-wrap { z-index: 1; width: 100%; padding-block: 80px; }
.tpi-home .tpi-dock p { max-width: 31em; margin: 18px 0 28px !important; font-size: 18px; }
.tpi-dock__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Instytucje */
.tpi-inst { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.tpi-inst.is-plain { grid-template-columns: 1fr; }
.tpi-inst__img { position: relative; align-self: stretch; min-height: 540px; overflow: hidden; border-radius: var(--tpi-r); }
.tpi-inst__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpi-home section p.tpi-inst__text { font-size: 19px; margin: 18px 0 28px !important; max-width: 34em; color: var(--tpi-ink-2); }
.tpi-inst__cta { display: flex; gap: 14px 36px; flex-wrap: wrap; align-items: center; }
.tpi-inst__tel { font-size: 26px; font-weight: 700; }
.tpi-inst__services { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 40px; }
.tpi-inst__service { display: block; padding: 20px 0; border-top: 1px solid var(--tpi-line); }
.tpi-inst__service b { display: block; font-size: 19px; line-height: 1.3; }
.tpi-home section .tpi-inst__service span { color: var(--tpi-ink-2); }
.tpi-home section a.tpi-inst__service:hover b { color: var(--tpi-orange-dark); }

/* Aktualności */
.tpi-news { background: var(--tpi-fog); }
.tpi-news__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4vw, 56px); }
.tpi-news__grid.is-single { grid-template-columns: 1fr; }
.tpi-news__lead { display: block; }
.tpi-news__lead img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--tpi-r); }
.tpi-home .tpi-news__lead h3 { font-size: clamp(21px, 2vw, 28px); line-height: 1.22; font-weight: 700; margin-top: 18px !important; }
.tpi-news__item { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; padding: 18px 0; border-top: 1px solid #c9d0d5; }
.tpi-news__item:first-child { border-top: 0; padding-top: 0; }
.tpi-news__item img { width: 150px; height: 100px; object-fit: cover; border-radius: var(--tpi-r-btn); }
.tpi-home .tpi-news__item h3 { font-size: 17px; line-height: 1.35; font-weight: 600; }
.tpi-news a:hover h3 { text-decoration: underline; text-decoration-color: var(--tpi-orange); text-underline-offset: 4px; }

@media (max-width: 1024px) {
	.tpi-home.has-no-slider { padding-top: 124px; }
	.tpi-trust > .tpi-wrap { grid-template-columns: 1fr 1fr; }
	.tpi-cats { grid-template-columns: repeat(2, 1fr); }
	.tpi-tasks__stage, .tpi-inst, .tpi-news__grid { grid-template-columns: 1fr; min-height: 0; }
	.tpi-tasks__pics { order: -1; aspect-ratio: 16 / 9; min-height: 0; }
	.tpi-rail__in { grid-auto-columns: calc((100% - 24px) / 2.2); }
	.tpi-inst__img { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
	.tpi-home__head { flex-direction: column; align-items: flex-start; gap: 14px; }
	.tpi-trust__item { flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 12px 22px 0; }
	.tpi-trust svg { width: 62px; height: 62px; }
	.tpi-trust b { font-size: 16px; }
	.tpi-trust span { font-size: 14px; }
	.tpi-cats { gap: 12px; }
	.tpi-cat { min-height: 200px; padding: 16px; }
	.tpi-cat b { font-size: 17px; }
	.tpi-cat.is-small img { height: 120px; }
	.tpi-cat.is-big { min-height: 210px; }
	.tpi-cat.is-text { padding: 18px 14px; gap: 6px; }
	.tpi-cat.is-text b { font-size: 15.5px; }
	.tpi-rail__in { grid-auto-columns: 76%; gap: 0 16px; }
	.tpi-products__arrows { display: none; }
	.tpi-dock { min-height: 640px; align-items: flex-end; }
	.tpi-dock::after { background: linear-gradient(0deg, rgba(8, 11, 14, .95) 0, rgba(8, 11, 14, .75) 48%, rgba(8, 11, 14, 0) 85%); }
	.tpi-dock > .tpi-wrap { padding-block: 40px; }
	.tpi-inst__services { grid-template-columns: 1fr; }
	.tpi-news__item { grid-template-columns: 104px 1fr; gap: 14px; }
	.tpi-news__item img { width: 104px; height: 78px; }
}
@media (prefers-reduced-motion: reduce) { .tpi-home * { transition: none !important; } }
