/* ArtX: style sekcji (s-). Tokeny i komponenty wspólne są w core.css. */

/* ---------- Nagłówek ---------- */
.s-header { position: sticky; z-index: 100; top: 0; height: var(--header-height); border-bottom: 1px solid var(--c-line); background: var(--c-white); }
.admin-bar .s-header { top: 32px; }
.s-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 100%; }
.s-header__logo { flex: none; }
.s-header__logo img { width: 150px; }
.s-header__toggle { display: none; }
.s-header__nav ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.s-header__nav li { margin: 0; }
.s-header__nav a { position: relative; display: block; padding: 10px 16px; color: var(--c-ink); font-size: 18px; line-height: 1.3; text-decoration: none; white-space: nowrap; transition: color var(--t); }
.s-header__nav a::after { content: ""; position: absolute; right: 16px; bottom: 3px; left: 16px; height: 3px; border-radius: 3px; background: var(--c-red); opacity: 0; transition: opacity var(--t); }
.s-header__nav a:hover { color: var(--c-red); }
.s-header__nav a.is-current, .s-header__nav .current-menu-item > a { color: var(--c-red); font-weight: 700; }
.s-header__nav a.is-current::after, .s-header__nav .current-menu-item > a::after { opacity: 1; }
.s-header__nav .menu-item--cta { margin-left: 10px; }
.s-header__nav a.s-header__cta { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 8px 24px; border-radius: 999px; background: var(--c-red); color: var(--c-white); font-weight: 700; transition: background-color var(--t), transform var(--t); }
.s-header__nav a.s-header__cta:hover, .s-header__nav a.s-header__cta.is-current, .s-header__nav .current-menu-item > a.s-header__cta { background: var(--c-red-dark); color: var(--c-white); }
.s-header__nav a.s-header__cta:hover { transform: translateY(-2px); }
.s-header__nav a.s-header__cta::after { display: none; }

/* ---------- Początek strony i „Co robimy” ---------- */
.s-about { padding-top: 0; }
.s-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; padding-block: clamp(40px, 7vw, 96px); border-bottom: 1px solid var(--c-line); }
.s-hero__quote { margin: 0 0 40px; }
.s-hero__first { display: block; font-size: clamp(36px, 5.1vw, 74px); line-height: 1.08; letter-spacing: -.01em; }
.s-hero__second { display: block; margin-top: .25em; color: var(--c-text); font-size: clamp(26px, 3.8vw, 50px); font-weight: 400; line-height: 1.25; }
.s-hero__second strong { color: var(--c-red); }
.s-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.s-hero__visual { justify-self: end; width: min(440px, 100%); aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: var(--c-red); }

/* ---------- Animacja żarówki (same linie). Style podstawowe to stan końcowy, ruch dodają animacje niżej. ---------- */
.s-idea { display: block; width: 100%; height: 100%; border-radius: 50%; }
.s-hero__visual:focus-within { outline: 3px solid var(--c-ink); outline-offset: 3px; }
.s-idea:focus-visible { outline: none; }
.s-idea svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.s-idea__bulb { transform-origin: 200px 220px; }
.s-idea__line { fill: none; stroke: var(--c-white); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; }
.s-idea__wire { stroke-width: 6; }
.s-idea__rays path { fill: none; stroke: var(--c-white); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1 2; }

@media (prefers-reduced-motion: no-preference) {
	.s-idea.is-playing .s-idea__line { animation: artxpl-draw var(--len) ease-in-out var(--d) both; }
	.s-idea.is-playing .s-idea__wire { animation: artxpl-draw var(--len) ease-in-out var(--d) both, artxpl-flicker .6s linear 1.95s; }
	.s-idea.is-playing .s-idea__bulb { animation: artxpl-pop .55s ease-out 2.05s both; }
	.s-idea.is-playing .s-idea__rays path { animation: artxpl-draw .35s ease-out 2.15s both, artxpl-beam 2.4s ease-in-out 3s 4; }
}

@keyframes artxpl-draw { 0% { stroke-dashoffset: 1; opacity: 0; } 4% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes artxpl-flicker { 0%, 100% { opacity: 1; } 20% { opacity: .15; } 40% { opacity: 1; } 60% { opacity: .35; } }
@keyframes artxpl-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.09); } 70% { transform: scale(.98); } }
@keyframes artxpl-beam { 0%, 100% { stroke-width: 8; opacity: 1; } 50% { stroke-width: 11; opacity: .6; } }
.s-about__body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; padding-top: var(--section-space); }
.s-about__text { max-width: 760px; }
/* Twarde złamania wierszy z dawnej treści nie pasują do tej szerokości kolumny. */
.s-about__text br { display: none; }
.s-about__text ul { margin-block: 1.6em; padding: 0; list-style: none; }
.s-about__text li { position: relative; margin-bottom: 10px; padding: 14px 20px 14px 52px; border-radius: var(--radius-small); background: var(--c-tint); color: var(--c-ink); line-height: 1.45; }
.s-about__text li::before { content: ""; position: absolute; top: calc(14px + .725em - 6px); left: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-red); }

/* ---------- Projekty ---------- */
.s-projects { background: var(--c-red); }
.s-projects__layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.s-projects__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.s-projects__item { margin: 0; }
.s-projects__link { position: relative; display: block; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-small); background: var(--c-white); box-shadow: 0 8px 22px rgba(70, 0, 4, .22); transition: transform var(--t), box-shadow var(--t); }
.s-projects__link img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.s-projects__link:hover, .s-projects__link:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(70, 0, 4, .35); }
.s-projects__link:hover img, .s-projects__link:focus-visible img { transform: scale(1.08); }
.s-projects__link:focus-visible { outline-color: var(--c-white); }
.s-projects__name { position: absolute; inset: auto 0 0; padding: 28px 10px 10px; background: linear-gradient(transparent, rgba(20, 12, 13, .9) 70%); color: var(--c-white); font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; opacity: 0; transition: opacity var(--t); }
.s-projects__link:hover .s-projects__name, .s-projects__link:focus-visible .s-projects__name { opacity: 1; }

/* Podgląd projektu */
.s-viewer { width: min(1100px, 100% - 32px); max-width: none; padding: 0; border: 0; border-radius: var(--radius); background: var(--c-white); box-shadow: 0 30px 90px rgba(0, 0, 0, .45); color: var(--c-text); }
.s-viewer::backdrop { background: rgba(24, 14, 15, .82); }
html:has(.s-viewer[open]) { overflow: hidden; }
.s-viewer__box { padding: clamp(16px, 2.6vw, 32px); }
.s-viewer__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.s-viewer__title { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.s-viewer__title:focus { outline: none; }
.s-viewer__image { width: 100%; aspect-ratio: 1200 / 524; border-radius: var(--radius-small); background: var(--c-tint); object-fit: contain; }
.s-viewer__foot { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 18px; }
.s-viewer__count { min-width: 64px; color: var(--c-muted); font-size: 16px; font-variant-numeric: tabular-nums; text-align: center; }
.s-viewer__close { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--c-tint); transition: background-color var(--t), color var(--t); }
.s-viewer__close::before, .s-viewer__close::after { content: ""; position: absolute; top: 21px; left: 13px; width: 18px; height: 2px; background: currentcolor; transform: rotate(45deg); }
.s-viewer__close::after { transform: rotate(-45deg); }
.s-viewer__close:hover { background: var(--c-red); color: var(--c-white); }

/* ---------- Okrągłe strzałki (slajdy i podgląd) ---------- */
.s-arrow { position: relative; flex: none; width: 48px; height: 48px; border: 2px solid var(--c-line); border-radius: 50%; color: var(--c-ink); transition: background-color var(--t), border-color var(--t), color var(--t), opacity var(--t); }
.s-arrow::before { content: ""; position: absolute; top: 17px; left: 19px; width: 10px; height: 10px; border-bottom: 2px solid currentcolor; border-left: 2px solid currentcolor; transform: rotate(45deg); }
.s-arrow--next::before { left: 15px; transform: rotate(225deg); }
.s-arrow:hover:enabled { border-color: var(--c-red); background: var(--c-red); color: var(--c-white); }
.s-arrow:disabled { cursor: default; opacity: .35; }

/* ---------- Oferta ---------- */
.s-offer { background: var(--c-tint); }
.s-offer__nav { display: none; }
.js .s-offer__nav { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-bottom: 32px; padding: 6px; border-radius: 32px; background: var(--c-white); box-shadow: 0 6px 20px rgba(31, 26, 27, .07); }
.s-offer__tab { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 8px 26px; border-radius: 999px; color: var(--c-ink); font-weight: 700; line-height: 1.3; transition: background-color var(--t), color var(--t); }
.s-offer__tab:hover { color: var(--c-red); }
.s-offer__tab[aria-selected="true"] { background: var(--c-red); color: var(--c-white); }
.s-offer__panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; margin-bottom: 32px; }
.s-offer__panel:last-child { margin-bottom: 0; }
.js .s-offer__panel { margin-bottom: 0; }
.js .s-offer__panel:not(.is-active) { display: none; }
.s-offer__text { padding: clamp(24px, 4vw, 52px); border-radius: var(--radius); background: var(--c-white); box-shadow: var(--shadow); }
.s-offer__text strong { font-size: 1.1em; }
.s-offer__media { position: sticky; top: calc(var(--header-height) + 32px); }

/* ---------- Klienci ---------- */
.s-clients__layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.s-clients__slides { display: grid; }
.s-clients__slide { display: grid; grid-area: 1 / 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2.2vw, 26px); align-content: start; margin: 0; padding: 6px 0; list-style: none; }
.js .s-clients__slide { visibility: hidden; opacity: 0; transition: opacity .4s, visibility .4s; }
.js .s-clients__slide.is-active { visibility: visible; opacity: 1; }
html:not(.js) .s-clients__slides { display: block; }
.s-clients__slide li { display: flex; justify-content: center; margin: 0; }
.s-clients__slide img { width: 130px; max-width: 100%; transition: transform var(--t), filter var(--t); }
.s-clients__slide img:hover { filter: drop-shadow(0 10px 14px rgba(120, 8, 14, .35)); transform: translateY(-4px) scale(1.05); }
.s-clients__controls { display: none; }
.js .s-clients__controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.s-clients__dots { display: flex; gap: 4px; }
.s-clients__dot { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
.s-clients__dot::before { content: ""; width: 10px; height: 10px; border-radius: 10px; background: #d5ced0; transition: width var(--t), background-color var(--t); }
.s-clients__dot:hover::before { background: var(--c-red); }
.s-clients__dot[aria-current="true"]::before { width: 28px; background: var(--c-red); }

/* ---------- Kontakt ---------- */
.s-contact { background: var(--c-ink); color: var(--c-white); }
.s-contact__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.s-contact__list { margin: 0; padding: 0; list-style: none; }
.s-contact__row { display: flex; align-items: center; gap: 18px; margin: 0; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 20px; line-height: 1.5; }
.s-contact__row:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.s-contact__row p { margin: 0; }
.s-contact__icon { flex: none; width: 48px; height: 48px; padding: 12px; border-radius: 50%; background: var(--c-red); fill: none; stroke: var(--c-white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s-contact__data a { color: var(--c-white); text-decoration: none; }
.s-contact__data a:hover { text-decoration: underline; }
.s-contact__data a:focus-visible { outline-color: var(--c-white); }
.s-contact__data .s-contact__phone { font-size: 1.2em; font-weight: 700; }
.s-contact__media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.s-contact__map { display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--c-white); font-size: 16px; text-align: center; text-decoration: none; }
.s-contact__map img { transition: transform var(--t); }
.s-contact__map:hover { color: var(--c-white); }
.s-contact__map:hover img { transform: scale(1.03); }
.s-contact__map span { display: inline-flex; align-items: center; gap: 9px; padding: 8px 20px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; transition: background-color var(--t), border-color var(--t); }
.s-contact__map:hover span { border-color: var(--c-red); background: var(--c-red); }
.s-contact__map:focus-visible { outline-color: var(--c-white); }

/* ---------- Stopka ---------- */
.s-footer { padding: 36px 0; background: var(--c-red); color: var(--c-white); }
.s-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.s-footer__logo { flex: none; width: 150px; mix-blend-mode: screen; transition: transform var(--t); }
/* Logo z nagłówka na biało: czerń i czerwień stają się bielą, białe tło znika (działa też dla pliku z przezroczystym tłem). */
.s-footer__logo img { width: 100%; filter: grayscale(1) brightness(.75) contrast(4) invert(1); }
.s-footer__logo:hover { transform: translateY(-3px); }
.s-footer__copy { margin: 0; font-size: 15px; line-height: 1.5; text-align: center; }
.s-footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.s-footer__link { color: var(--c-white); font-size: 15px; }
.s-footer__link:hover { color: var(--c-white); text-decoration-thickness: 2px; }
.s-footer__link--button { text-decoration: underline; text-underline-offset: 3px; }
.s-footer a:focus-visible, .s-footer button:focus-visible { outline-color: var(--c-white); }

/* ---------- Podstrony ---------- */
.s-page { min-height: calc(100vh - var(--header-height) - 142px); padding-block: clamp(40px, 6vw, 80px); background: var(--c-tint); }
.s-page__narrow { max-width: 900px; margin-inline: auto; }
.s-page__title { margin-bottom: 32px; font-size: clamp(32px, 5vw, 56px); line-height: 1.08; }
.s-page__card { display: flow-root; padding: clamp(22px, 5vw, 60px); border-radius: var(--radius); background: var(--c-white); box-shadow: var(--shadow); }
.s-page__card h2 { margin-top: 1.4em; font-size: clamp(24px, 3vw, 32px); }
.s-page__card > h2:first-child, .s-page__card > div > h2:first-child { margin-top: 0; }
.s-page__card h2:empty { display: none; }
.s-page__card > div + div { margin-top: 40px; }
.s-page__entry { margin-bottom: 24px; }
.s-404 { text-align: center; }
.s-project__back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 700; text-decoration: none; }
.s-project__back::before { content: ""; width: 9px; height: 9px; border-bottom: 2px solid currentcolor; border-left: 2px solid currentcolor; transform: rotate(45deg); }
.s-project__image { width: 100%; border-radius: var(--radius-small); }
.s-project__image + .s-project__content { margin-top: 32px; }

/* ---------- Responsywność ---------- */
@media (max-width: 999px) {
	.s-header__logo img { width: 130px; }
	.s-header__nav a { padding-inline: 10px; font-size: 17px; }
	.s-header__nav a::after { right: 10px; left: 10px; }
	.s-header__nav .menu-item--cta { margin-left: 4px; }
	.s-header__nav a.s-header__cta { padding-inline: 18px; }
	.s-hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.s-hero__visual { justify-self: center; width: min(340px, 82%); }
	.s-about__body { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.s-projects__layout, .s-clients__layout, .s-contact__layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.s-projects__grid, .s-clients__slider { width: min(680px, 100%); margin-inline: auto; }
	.s-projects__media, .s-clients__media { width: min(440px, 100%); margin-inline: auto; }
	.s-offer__panel { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.s-offer__media { position: static; width: min(440px, 100%); margin-inline: auto; }
}

@media (max-width: 860px) {
	.js .s-header__toggle { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c-ink); }
	.s-header__bars, .s-header__bars::before, .s-header__bars::after { display: block; width: 20px; height: 2px; background: var(--c-white); transition: transform var(--t), background-color var(--t); }
	.s-header__bars::before, .s-header__bars::after { content: ""; position: relative; }
	.s-header__bars::before { top: -7px; }
	.s-header__bars::after { top: 5px; }
	.s-header__toggle[aria-expanded="true"] .s-header__bars { background: transparent; }
	.s-header__toggle[aria-expanded="true"] .s-header__bars::before { transform: translateY(7px) rotate(45deg); }
	.s-header__toggle[aria-expanded="true"] .s-header__bars::after { transform: translateY(-7px) rotate(-45deg); }
	.js .s-header__nav { position: absolute; top: 100%; right: 0; left: 0; display: none; max-height: calc(100vh - var(--header-height)); overflow-y: auto; border-bottom: 1px solid var(--c-line); background: var(--c-white); box-shadow: 0 18px 28px rgba(0, 0, 0, .14); }
	.js .s-header__nav.is-open { display: block; }
	.s-header__nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
	.s-header__nav a { padding: 13px 12px; font-size: 19px; }
	.s-header__nav a::after { top: 12px; right: auto; bottom: 12px; left: 0; width: 3px; height: auto; }
	.s-header__nav .menu-item--cta { margin: 10px 0 0; }
	.s-header__nav a.s-header__cta { min-height: 52px; }
	/* Bez JavaScriptu menu zostaje widoczne pod logo. */
	html:not(.js) .s-header { position: static; height: auto; }
	html:not(.js) .s-header__inner { flex-direction: column; padding-block: 12px; }
	html:not(.js) .s-header__nav ul { flex-flow: row wrap; justify-content: center; }
	html:not(.js) .s-header__nav .menu-item--cta { margin-top: 0; }
}

@media (max-width: 782px) {
	.admin-bar .s-header { top: 46px; }
}

@media (max-width: 600px) {
	.admin-bar .s-header { top: 0; }
}

@media (max-width: 767px) {
	.js .s-offer__nav { display: flex; flex-direction: column; border-radius: var(--radius); }
	.s-contact__media { grid-template-columns: minmax(0, 1fr); width: min(300px, 100%); margin-inline: auto; }
	.s-footer__inner { flex-direction: column; text-align: center; }
	.s-footer__links { align-items: center; }
	.s-viewer__box { padding: 16px; }
}

@media (max-width: 479px) {
	.s-hero__actions .c-button { flex: 1 1 140px; }
	.s-projects__grid { gap: 8px; }
	.s-projects__link { border-radius: 10px; }
	.s-projects__name { padding: 18px 5px 5px; font-size: 11px; }
	.s-clients__slide { gap: 10px; }
	.s-contact__row { gap: 14px; font-size: 18px; }
	.s-contact__icon { width: 42px; height: 42px; padding: 10px; }
}
