/* ==========================================================================
   Michał Kozłowski – portfolio
   Motyw: „schemat procesu”. Śmiałość tylko w hero, reszta spokojna.
   ========================================================================== */

:root {
  --papier: #EEF1F5;
  --papier-2: #E3E8EF;
  --bialy: #FFFFFF;
  --atrament: #16233B;
  --atrament-2: #1F2F4D;
  --atrament-3: #2A3C5E;
  --kobalt: #2E5BFF;
  --kobalt-ciemny: #1E45D6;
  --bursztyn: #F0A23A;
  --grafit: #5D6879;
  --linia: #C9D1DD;
  --zielen: #3E8A63;
  --noc: #0E1830;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);
  --header-h: 76px;
  --radius: 12px;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); -webkit-text-size-adjust: 100%; }
body {
  background: var(--papier);
  color: var(--atrament);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--kobalt); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--atrament); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Placeholdery do uzupełnienia – usuń atrybut data-todo po wpisaniu treści */
[data-todo] { outline: 1.5px dashed var(--bursztyn); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Przyciski
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary, .btn--accent { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::after, .btn--accent::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn--primary:hover::after, .btn--accent:hover::after { transform: translateX(120%); }
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--primary { background: var(--kobalt); color: #fff; }
.btn--primary:hover { background: var(--kobalt-ciemny); }
.btn--ghost { border-color: var(--atrament); color: var(--atrament); }
.btn--ghost:hover { background: var(--atrament); color: #fff; }
.btn--accent { background: var(--bursztyn); color: var(--atrament); }
.btn--accent:hover { background: #F7B65C; }

/* --------------------------------------------------------------------------
   Nagłówek i nawigacja
   -------------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .3s, box-shadow .3s;
}
.header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); transition: height .3s var(--ease); }
.header.is-scrolled { background: rgba(238, 241, 245, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 1px 0 var(--linia); }
.header.is-scrolled .header__inner { height: 60px; }

.header.on-dark { color: #fff; }
.header.on-dark.is-scrolled { background: rgba(14, 24, 48, .72); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.header.on-dark .nav__link { color: #AEB9CE; }
.header.on-dark .nav__link:hover, .header.on-dark .nav__link.is-active { color: #fff; }
.header.on-dark .nav__link::after { background: var(--bursztyn); }
.js .header { transform: translateY(-100%); }
.is-ready .header { transform: none; transition: transform .8s var(--ease) .15s, background-color .3s, box-shadow .3s; }

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; background: var(--bursztyn); transform: scaleX(var(--p, 0)); transform-origin: left; pointer-events: none; }

/* Logo Probis: fabryka z kodem. Kontur w kolorze tekstu, więc samo dopasowuje się do jasnego i ciemnego nagłówka. */
.logo { --logo-code: var(--kobalt); font: 800 26px/1 var(--display); letter-spacing: -.035em; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo__mark { flex: none; overflow: visible; stroke-linecap: round; stroke-linejoin: round; }
.logo__fg { stroke: currentColor; stroke-width: 2.6; }
.logo__code { stroke: var(--logo-code); stroke-width: 2.4; }
.logo__slash { stroke: var(--bursztyn); stroke-width: 2.4; }
.logo__mark circle { fill: var(--bursztyn); }
.header.on-dark .logo, .footer .logo { --logo-code: #7B96FF; }

/* Animacje logo
   1) wejście (tylko nagłówek, po zjechaniu paska): rysuje się hala, wskakuje kod, spada ukośnik, wjeżdża napis
   2) dym z komina: dwa kłęby unoszą się i znikają, na zmianę, cały czas
   3) hover: nawiasy kodu rozsuwają się, ukośnik się przechyla */
.logo__lt, .logo__gt, .logo__slash, .logo__puff { transform-box: fill-box; transform-origin: center; }
.logo__lt, .logo__gt, .logo__slash { transition: transform .35s var(--ease); }
.logo__puff { animation: logo-puff 3.4s ease-in-out 1.8s infinite both; }
.logo__puff--2 { animation-delay: 3.5s; }
@keyframes logo-puff {
  0%   { transform: translate(-3px, 4px) scale(.3); opacity: 0; }
  25%  { opacity: 1; }
  55%  { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(3px, -4px) scale(1.3); opacity: 0; }
}

/* „backwards”: element jest ukryty tylko w czasie opóźnienia, po animacji wraca do zwykłego stanu (działa hover).
   Zanim strona dostanie .is-ready, cały nagłówek i tak jest poza ekranem. */
.is-ready .header .logo__fg   { stroke-dasharray: 1; animation: logo-draw 1s var(--ease) .55s backwards; }
.is-ready .header .logo__lt   { animation: logo-lt .45s var(--ease) 1.25s backwards; }
.is-ready .header .logo__gt   { animation: logo-gt .45s var(--ease) 1.25s backwards; }
.is-ready .header .logo__slash { animation: logo-slash .5s cubic-bezier(.3, 1.6, .5, 1) 1.5s backwards; }
.is-ready .header .logo__text { animation: logo-text .6s var(--ease) .75s backwards; }
@keyframes logo-draw  { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes logo-lt    { from { opacity: 0; transform: translateX(3px); } to { opacity: 1; transform: none; } }
@keyframes logo-gt    { from { opacity: 0; transform: translateX(-3px); } to { opacity: 1; transform: none; } }
@keyframes logo-slash { from { opacity: 0; transform: translateY(-7px) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes logo-text  { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.logo__text { display: inline-block; }

@media (hover: hover) {
  .logo:hover .logo__lt { transform: translateX(-1.5px); }
  .logo:hover .logo__gt { transform: translateX(1.5px); }
  .logo:hover .logo__slash { transform: rotate(14deg); }
}

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 6px; }
.nav__link {
  position: relative; display: block; padding: 8px 12px; font-size: 15px; font-weight: 500;
  text-decoration: none; color: var(--grafit); transition: color .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--kobalt); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--atrament); }
.nav__link.is-active::after { transform: scaleX(1); }
.nav__mobile-contact { display: none; }

/* „O mnie”: osobny element za listą sekcji, oddzielony kreską – to podstrona, nie sekcja strony */
.nav { display: flex; align-items: center; }
.nav__about {
  position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; padding: 8px 12px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--grafit); transition: color .2s;
}
.nav__about::before { content: ""; position: absolute; left: -8px; top: 50%; width: 1px; height: 18px; transform: translateY(-50%); background: var(--linia); }
.nav__about svg { width: 16px; height: 16px; opacity: .8; }
.nav__about:hover, .nav__about[aria-current="page"] { color: var(--atrament); }
.nav__about[aria-current="page"] svg { color: var(--kobalt); opacity: 1; }
.header.on-dark .nav__about { color: #AEB9CE; }
.header.on-dark .nav__about::before { background: rgba(255, 255, 255, .2); }
.header.on-dark .nav__about:hover, .header.on-dark .nav__about[aria-current="page"] { color: #fff; }
.header.on-dark .nav__about[aria-current="page"] svg { color: var(--bursztyn); }

.burger { display: none; }

@media (max-width: 920px) {
  .header__cta { margin-left: auto; padding: 9px 16px; font-size: 14px; }
  .burger {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    border: 0; background: none; cursor: pointer; position: relative; z-index: 2;
  }
  .burger span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .3s var(--ease); }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0; z-index: 1; margin: 0;
    background: var(--noc); color: #fff; padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
    display: flex; flex-direction: column; justify-content: space-between;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__link, .header.on-dark .nav__link { font: 700 34px/1.2 var(--display); color: #fff; padding: 8px 0; letter-spacing: -.02em; }
  .nav__link::after { display: none; }
  .nav__link.is-active, .header.on-dark .nav__link.is-active { color: var(--bursztyn); }
  .nav__list li { overflow: hidden; }
  .nav__link { transform: translateY(110%); transition: transform .6s var(--ease); }
  .nav.is-open .nav__link { transform: none; }
  .nav.is-open li:nth-child(2) .nav__link { transition-delay: .06s; }
  .nav.is-open li:nth-child(3) .nav__link { transition-delay: .12s; }
  .nav.is-open li:nth-child(4) .nav__link { transition-delay: .18s; }
  .nav { align-items: stretch; }
  .nav__about, .header.on-dark .nav__about {
    align-self: stretch; margin: 20px 0 auto; padding: 20px 0 0; border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 17px; color: #AEB9CE; opacity: 0; transition: opacity .5s var(--ease) .26s, color .2s;
  }
  .nav.is-open .nav__about { opacity: 1; }
  .nav__about::before { display: none; }
  .nav__about[aria-current="page"], .header.on-dark .nav__about[aria-current="page"] { color: var(--bursztyn); }
  .nav__about[aria-current="page"] svg, .header.on-dark .nav__about[aria-current="page"] svg { color: currentColor; }
  .nav__mobile-contact { display: grid; gap: 8px; font-weight: 600; color: #AEB9CE; }
  .nav__mobile-contact a { text-decoration: none; }
  .header__cta, .logo { position: relative; z-index: 2; }
  /* backdrop-filter tworzy blok zawierający – wyłącz, gdy menu jest otwarte, by zajmowało cały ekran */
  .is-locked .header { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 420px) {
  .header__inner { gap: 14px; }
  .header__cta { white-space: nowrap; padding: 8px 14px; font-size: 13px; }
  .header .logo { font-size: 22px; gap: 7px; }
  .header .logo__mark { width: 28px; height: 28px; }
}
@media (max-width: 340px) {
  .header__cta { display: none; }
  .burger { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   Scena: hero (ciemne tło)
   -------------------------------------------------------------------------- */
.stage {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(900px 620px at 80% 28%, rgba(46, 91, 255, .26), transparent 62%),
    radial-gradient(700px 500px at 8% 96%, rgba(240, 162, 58, .10), transparent 60%),
    var(--noc);
}
.circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .circuit { -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }

.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + clamp(28px, 5vw, 64px)) 0 calc(clamp(48px, 6vw, 88px) + 36px); }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__copy { container-type: inline-size; }
.hero__title { font: 800 clamp(34px, 11.4cqi, 104px)/.98 var(--display); letter-spacing: -.04em; }
.line { display: block; overflow: hidden; padding: .06em 0 .14em; margin: -.06em 0 -.14em; }
.line > span { display: block; }
.hero__lead { margin: 30px 0 36px; font-size: clamp(17px, 1.5vw, 19px); color: #B7C2D8; max-width: 50ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stage .btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.stage .btn--ghost:hover { background: #fff; border-color: #fff; color: var(--noc); }
.hero__trust { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: 15px; color: #9FACC6; }
.hero__trust strong { display: block; font: 700 22px/1.2 var(--display); color: #fff; font-variant-numeric: tabular-nums; }

/* Schemat procesu – znak rozpoznawczy */
.flow {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 20px;
  padding: clamp(14px, 2vw, 22px); position: relative; overflow: hidden;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55);
}
.flow__svg { width: 100%; height: auto; overflow: visible; }
.flow__link { fill: none; stroke: #3B4F75; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow__node { cursor: pointer; outline: none; }
.flow__node rect { fill: var(--atrament-2); stroke: #3B4F75; stroke-width: 1.5; transition: stroke .25s, fill .25s; }
.flow__node text { fill: #D3DBEA; font: 500 14px var(--body); text-anchor: middle; pointer-events: none; }
.flow__node--ai rect { fill: var(--kobalt); stroke: var(--kobalt); }
.flow__node--ai text { fill: #fff; font-weight: 600; }
.flow__node--done rect { fill: #1B3A2F; stroke: var(--zielen); }
.flow__node:hover rect, .flow__node:focus-visible rect, .flow__node.is-on rect { stroke: var(--bursztyn); }
.flow__node--ai:hover rect, .flow__node--ai:focus-visible rect { fill: var(--kobalt-ciemny); }
.flow__pulses circle { fill: var(--bursztyn); }
.flow__cap { margin-top: 10px; min-height: 3.2em; color: #AEB9CE; font-size: 14px; line-height: 1.5; padding-inline: 4px; }

/* Pochylenie 3D pod kursorem */
.tilt { transition: transform .25s ease-out; will-change: transform; }
.tilt::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.16), transparent 46%);
  opacity: 0; transition: opacity .3s;
}
.tilt.is-tilting::after { opacity: 1; }

/* Wejście na stronę */
.js .line > span { transform: translateY(115%); }
.js .hero__lead, .js .hero__cta, .js .hero__trust { opacity: 0; transform: translateY(18px); }
.js .flow { opacity: 0; }
.js .flow__node { opacity: 0; }
.is-ready .line > span { transform: none; transition: transform 1.1s var(--ease); }
.is-ready .line:nth-child(2) > span { transition-delay: .09s; }
.is-ready .line:nth-child(3) > span { transition-delay: .18s; }
.is-ready .hero__lead, .is-ready .hero__cta, .is-ready .hero__trust { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-ready .hero__lead { transition-delay: .45s; }
.is-ready .hero__cta { transition-delay: .55s; }
.is-ready .hero__trust { transition-delay: .65s; }
.is-ready .flow { opacity: 1; transition: opacity .9s var(--ease) .35s, transform .25s ease-out; }

@media (min-width: 961px) {
  .hero__grid { opacity: calc(1 - var(--out, 0) * 1.15); transform: translateY(calc(var(--out, 0) * -56px)); }
}

/* --------------------------------------------------------------------------
   Sekcje – wspólne
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--papier-2); }
.section--sheet { position: relative; background: var(--papier); border-radius: 36px 36px 0 0; margin-top: -36px; }
.section__head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 640px; }
.section__title { font: 800 clamp(34px, 5vw, 60px)/1.05 var(--display); letter-spacing: -.03em; }
.section__sub { margin-top: 12px; color: var(--grafit); font-size: 18px; }

/* --------------------------------------------------------------------------
   Usługi – akordeon
   -------------------------------------------------------------------------- */
.services { border-top: 1.5px solid var(--atrament); }
.svc { border-bottom: 1px solid var(--linia); position: relative; }
.svc::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -.5); z-index: 0; background: var(--bialy); border-radius: 16px;
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
}
.svc:hover::before, .svc.is-open::before { transform: scaleY(1); }
.svc > * { position: relative; z-index: 1; }
.svc__head { font: inherit; }
.svc__toggle {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 24px; align-items: center;
  padding: 26px 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.svc__name { font: 700 clamp(21px, 2.3vw, 28px)/1.15 var(--display); letter-spacing: -.02em; transition: color .2s, transform .45s var(--ease); }
.svc__toggle:hover .svc__name { transform: translateX(10px); }
.svc__short { color: var(--grafit); font-size: 16px; }
.svc__toggle:hover .svc__name { color: var(--kobalt); }
.svc__icon { position: relative; width: 32px; height: 32px; border: 1.5px solid var(--linia); border-radius: 50%; transition: background-color .25s, border-color .25s; }
.svc__icon::before, .svc__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--atrament); transform: translate(-50%, -50%); transition: transform .3s var(--ease), background-color .25s; }
.svc__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc__toggle[aria-expanded="true"] .svc__icon { background: var(--kobalt); border-color: var(--kobalt); }
.svc__toggle[aria-expanded="true"] .svc__icon::before, .svc__toggle[aria-expanded="true"] .svc__icon::after { background: #fff; }
.svc__toggle[aria-expanded="true"] .svc__icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.svc__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease); }
.js .svc__body { grid-template-rows: 0fr; }
.svc__body > .svc__inner { overflow: hidden; }
.js .svc.is-open .svc__body { grid-template-rows: 1fr; }
.svc__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 32px; gap: 24px; }
.svc__points { grid-column: 2; display: grid; gap: 10px; padding-bottom: 8px; }
.svc__points li { position: relative; padding-left: 22px; }
.svc__points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--kobalt); }
.svc__meta { grid-column: 1; grid-row: 1; display: grid; gap: 14px; align-content: start; padding-bottom: 30px; font-size: 15px; }
.svc__meta span { display: block; color: var(--grafit); font-size: 13px; }
.svc__meta .btn { justify-self: start; margin-top: 4px; }

@media (max-width: 760px) {
  .svc__toggle { grid-template-columns: minmax(0, 1fr) 32px; gap: 6px 16px; padding: 22px 0; }
  .svc__short { grid-row: 2; grid-column: 1; font-size: 15px; }
  .svc__icon { grid-row: 1 / 3; grid-column: 2; }
  .svc__inner { grid-template-columns: 1fr; gap: 20px; }
  .svc__points, .svc__meta { grid-column: 1; grid-row: auto; }
  .svc__points { padding-top: 4px; }
}

/* --------------------------------------------------------------------------
   Projekty
   -------------------------------------------------------------------------- */
.feature {
  display: grid; gap: clamp(20px, 3vw, 36px);
  background: var(--bialy); border-radius: 18px; padding: clamp(12px, 2vw, 20px);
}
.feature__media { position: relative; }
.feature__switch { position: absolute; left: 14px; bottom: 14px; z-index: 1; }
.feature__media { display: grid; gap: 12px; }
.feature__media { perspective: 1400px; }
.feature__frames.clip { clip-path: inset(10% 8% round 24px); transition: clip-path 1.3s var(--ease), transform .25s ease-out; }
.feature__frames.clip.is-in { clip-path: inset(0 round 12px); }
.feature__frames { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #191D2E; }
.feature__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transform: scale(1.02); transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.feature__img.is-shown { opacity: 1; transform: none; }
.feature__switch { display: flex; flex-wrap: wrap; gap: 6px; }
.feature__btn {
  border: 1.5px solid rgba(255,255,255,.35); background: rgba(22,35,59,.7); color: #fff; backdrop-filter: blur(6px);
  border-radius: 999px; padding: 7px 14px;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s;
}
.feature__btn:hover { border-color: #fff; }
.feature__btn[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--atrament); }
.feature__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 72px); row-gap: 10px;
  padding: 0 clamp(6px, 2vw, 24px) clamp(10px, 2vw, 22px); align-items: start;
}
.feature__body > * { grid-column: 1; }
.feature__body > .feature__points, .feature__body > .project__tags { grid-column: 2; }
.feature__body > .feature__points { grid-row: 1 / 4; margin: 0; }
.feature__body > .project__tags { grid-row: 4; align-self: start; margin-top: 6px; }
.feature__title { font: 800 clamp(32px, 3.6vw, 44px)/1 var(--display); letter-spacing: -.03em; margin-top: 2px; }
.feature__kind { font-weight: 600; color: var(--kobalt-ciemny); font-size: 15px; }
.feature__desc { color: var(--grafit); }
.feature__points { display: grid; gap: 10px; margin: 6px 0 4px; font-size: 15px; color: var(--grafit); }
.feature__points li { position: relative; padding-left: 22px; }
.feature__points li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 2px; background: var(--kobalt); }
.feature__points strong { color: var(--atrament); font-weight: 600; }

.next-project {
  margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  border: 1.5px dashed var(--linia); border-radius: 18px; padding: 22px clamp(18px, 3vw, 32px);
}
.next-project__text { max-width: 62ch; color: var(--grafit); }
.next-project__text strong { color: var(--atrament); font-family: var(--display); font-size: 19px; display: block; margin-bottom: 2px; }

@media (max-width: 860px) {
  .feature__body { grid-template-columns: 1fr; padding: 0 6px 10px; }
  .feature__body > * , .feature__body > .feature__points, .feature__body > .project__tags { grid-column: 1; grid-row: auto; }
  .feature__body > .feature__points { margin: 6px 0 4px; }
  .feature__switch { position: static; margin-top: 10px; }
  .feature__btn { background: none; color: var(--atrament); border-color: var(--linia); backdrop-filter: none; }
  .feature__btn[aria-pressed="true"] { background: var(--atrament); border-color: var(--atrament); color: #fff; }
}

.project__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.project__tags li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--papier); border: 1px solid var(--linia); }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--grafit); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--linia); }
.status--live { color: #8A5507; }
.status--live::before { background: var(--bursztyn); box-shadow: 0 0 0 0 rgba(240, 162, 58, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(240, 162, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 162, 58, 0); } }

/* --------------------------------------------------------------------------
   Doświadczenie – oś czasu
   -------------------------------------------------------------------------- */
.exp { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.exp__head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
.exp__head .btn { margin-top: 28px; }

.year { margin-bottom: 18px; }
.year__digits {
  display: flex; height: 1em; overflow: hidden;
  font: 800 clamp(76px, 9.5vw, 132px)/1 var(--display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--atrament); font-variant-numeric: tabular-nums;
}
.year__col { display: flex; flex-direction: column; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform 1s var(--ease); }
.year__col:nth-child(2) { transition-delay: .04s; } .year__col:nth-child(3) { transition-delay: .08s; } .year__col:nth-child(4) { transition-delay: .12s; }
.year__col span { display: block; height: 1em; }
.year__cap { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--grafit); }
.year__cap::before { content: ""; width: 28px; height: 2px; background: var(--bursztyn); }
@media (max-width: 860px) { .year { display: none; } }

.timeline { position: relative; padding-left: 40px; --progress: 0; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; }
.timeline::before { background: var(--linia); }
.timeline::after { background: var(--kobalt); transform-origin: top; transform: scaleY(var(--progress)); }
.timeline__item { position: relative; padding-bottom: 44px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -38px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--papier); border: 2px solid var(--linia); z-index: 1; transition: border-color .3s, background-color .3s;
}
.timeline__item.is-reached::before { border-color: var(--kobalt); box-shadow: 0 0 0 6px rgba(46, 91, 255, .12); }
.timeline__item > * { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.timeline--anim .timeline__item:not(.is-reached) > * { opacity: .28; transform: translateX(18px); }
.timeline__item--now::before { background: var(--kobalt); border-color: var(--kobalt); }
.timeline__date { font-size: 14px; color: var(--grafit); font-weight: 500; }
.timeline__role { font: 700 24px/1.2 var(--display); letter-spacing: -.01em; margin: 4px 0 2px; }
.timeline__pos { font-weight: 600; font-size: 15px; color: var(--kobalt-ciemny); margin-bottom: 8px; }
.exp__edu { margin-top: 20px; font-size: 15px; }
.exp__edu span { display: block; font-size: 13px; color: var(--grafit); }
.timeline__desc { color: var(--grafit); max-width: 56ch; }

@media (max-width: 860px) {
  .exp { grid-template-columns: 1fr; }
  .exp__head { position: static; }
}

/* Logo firm na osi czasu (podstrona „O mnie”) */
.timeline__logo { height: 26px; width: auto; max-width: 150px; margin-bottom: 12px; filter: grayscale(1); opacity: .55; transition: filter .4s, opacity .4s; }
.timeline__logo--samsung, .timeline__logo--tutlo { height: 30px; }
.timeline__logo--pekao, .timeline__logo--skycash { height: 20px; }
.timeline__item.is-reached .timeline__logo, .timeline:not(.timeline--anim) .timeline__logo { filter: none; opacity: 1; }

/* Doświadczenie na stronie głównej: pasek logo firm */
.brands__cap { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--grafit); margin-bottom: 20px; }
.brands__cap::before { content: ""; width: 28px; height: 2px; background: var(--bursztyn); }
.brands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--linia); border-left: 1px solid var(--linia); }
.brands li {
  display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 148px; padding: 24px 16px;
  border-right: 1px solid var(--linia); border-bottom: 1px solid var(--linia); background: var(--bialy);
}
.brands span { font-size: 13px; color: var(--grafit); font-weight: 500; }
.brands__logo { height: 38px; width: auto; max-width: 100%; filter: grayscale(1); opacity: .6; transition: filter .4s, opacity .4s, transform .4s var(--ease); }
.brands__logo--samsung { height: 46px; }
.brands__logo--pekao, .brands__logo--skycash { height: 24px; }
.brands__logo--dahliamatic { height: 30px; }
.brands li:hover .brands__logo { filter: none; opacity: 1; transform: scale(1.04); }
.brands__more { margin-top: 32px; }
@media (max-width: 860px) {
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brands li { min-height: 120px; }
  .brands li:last-child { grid-column: 1 / -1; }
  .brands__logo { height: 32px; }
  .brands__logo--pekao, .brands__logo--skycash { height: 20px; }
  .brands__logo--dahliamatic { height: 26px; }
}
@media (hover: none) { .brands__logo { filter: none; opacity: 1; } }

/* Podstrona: krótsze wejście zamiast pełnego hero */
.hero--page { min-height: 0; padding-bottom: calc(clamp(56px, 7vw, 96px) + 36px); }
.hero--page .hero__grid { grid-template-columns: minmax(0, 1fr); }
.hero--page .hero__copy { max-width: 820px; }
.hero--page .hero__title { font-size: clamp(44px, 13cqi, 104px); }
.hero__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bursztyn); }
.hero__eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.contact__grid--single { grid-template-columns: minmax(0, 760px); }

/* --------------------------------------------------------------------------
   Współpraca i technologie
   -------------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: s; border-top: 1.5px solid var(--atrament); position: relative; }
.steps--anim { border-top-color: transparent; }
.steps--anim::before { content: ""; position: absolute; inset: -1.5px 0 auto; height: 1.5px; background: var(--atrament); transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); }
.steps--anim.is-in::before { transform: scaleX(1); }
.steps--anim::after { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--bursztyn); box-shadow: 0 0 14px 2px rgba(240,162,58,.7); opacity: 0; }
.steps--anim.is-in::after { animation: travel 5s 1.8s var(--ease) infinite; }
@keyframes travel { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
.steps--anim .step { opacity: 0; transform: translateY(20px); }
.steps--anim .step::before { transform: scale(0); }
.steps--anim.is-in .step { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * .28s + .15s); }
.steps--anim.is-in .step::before { transform: scale(1); transition: transform .5s var(--ease); transition-delay: calc(var(--i) * .28s + .15s); }
.step:nth-child(1) { --i: 0; } .step:nth-child(2) { --i: 1; } .step:nth-child(3) { --i: 2; } .step:nth-child(4) { --i: 3; }
.step { padding: 24px 28px 0 0; position: relative; }
.step::before { content: ""; position: absolute; left: 0; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--kobalt); }
.step__no { font: 800 44px/1 var(--display); color: var(--kobalt); letter-spacing: -.03em; }
.step__title { font: 700 21px/1.2 var(--display); margin: 14px 0 8px; }
.step p { color: var(--grafit); font-size: 16px; }

.tech { margin-top: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.tech__title { font: 700 21px/1.3 var(--display); }
.tech__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech__list li { transition: transform .3s var(--ease), border-color .3s, color .3s; }
.tech__list li:hover { border-color: var(--kobalt); color: var(--kobalt-ciemny); }
.tech__list li { background: var(--bialy); border: 1px solid var(--linia); border-radius: 8px; padding: 7px 14px; font-size: 15px; font-weight: 500; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; border-top: 0; }
  .steps--anim::before, .steps--anim::after { display: none; }
  .step { border-top: 1.5px solid var(--atrament); }
  .tech { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */
.contact { position: relative; overflow: hidden; background: radial-gradient(800px 560px at 12% 20%, rgba(46, 91, 255, .22), transparent 62%), var(--noc); color: #fff; padding-block: var(--section-y); }
.contact__grid { position: relative; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__title { font: 800 clamp(36px, 5.2vw, 68px)/1.02 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.contact__lead { margin: 20px 0 40px; color: #AEB9CE; font-size: 18px; max-width: 44ch; }
.contact__channels { display: grid; gap: 4px; }
.contact__channels a {
  display: block; position: relative; padding: 16px 0; border-bottom: 1px solid var(--atrament-3);
  font: 700 clamp(20px, 2.2vw, 26px)/1.2 var(--display); text-decoration: none; transition: color .2s;
  overflow-wrap: anywhere;
}
.contact__channels a { transition: color .2s, padding-left .45s var(--ease); }
.contact__channels a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--bursztyn); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.contact__channels a:hover { color: var(--bursztyn); padding-left: 14px; }
.contact__channels a:hover::after { transform: scaleX(1); }
.contact__channels span { display: block; font: 400 13px var(--body); color: #8C99B3; margin-bottom: 4px; }

.form { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); background: rgba(31, 47, 77, .78); border-radius: 16px; padding: clamp(20px, 3vw, 32px); display: grid; gap: 18px; }
.form__chips { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form__chips legend { font-size: 14px; color: #AEB9CE; margin-bottom: 10px; }
.form__chips label { cursor: pointer; }
.form__chips input { position: absolute; opacity: 0; pointer-events: none; }
.form__chips span { display: block; padding: 7px 14px; border-radius: 999px; border: 1.5px solid #3B4F75; font-size: 14px; color: #D3DBEA; transition: background-color .2s, border-color .2s, color .2s; }
.form__chips label:hover span { border-color: #6A7FA8; }
.form__chips input:checked + span { background: var(--kobalt); border-color: var(--kobalt); color: #fff; }
.form__chips input:focus-visible + span { outline: 3px solid var(--bursztyn); outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: #AEB9CE; }
.field input, .field textarea {
  width: 100%; background: var(--atrament-3); border: 1.5px solid transparent; border-radius: 10px;
  padding: 12px 14px; color: #fff; resize: vertical; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--bursztyn); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #FF7B6B; }
.form .btn { justify-self: start; }
.form__status { font-size: 15px; min-height: 1.5em; color: #D3DBEA; }
.form__status.is-error { color: #FFA699; }
.form__status.is-success { color: #9BE3B5; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.cf-turnstile:empty { display: none; }

@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */
.footer { background: var(--noc); color: #8C99B3; border-top: 1px solid var(--atrament-3); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-block: 24px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer .logo { color: #fff; font-size: 23px; }
.footer__name { padding-left: 12px; border-left: 1px solid var(--atrament-3); font-weight: 500; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

/* Przycisk „Wróć na górę”: pływa w prawym dolnym rogu, pojawia się po przewinięciu o jeden ekran */
.to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--kobalt); color: #fff; box-shadow: 0 8px 24px rgba(14, 24, 48, .28);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s var(--ease), background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--kobalt-ciemny); }
.to-top:hover svg { transform: translateY(-2px); }
.to-top svg { transition: transform .25s var(--ease); }
.is-locked .to-top { opacity: 0; visibility: hidden; }

/* --------------------------------------------------------------------------
   Responsywność hero
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; }
  .flow { max-width: 560px; }
}

/* --------------------------------------------------------------------------
   Wejścia przy przewijaniu (klasy dodaje JavaScript)
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * var(--step, 80ms)); }
.tech__list { --step: 35ms; }
.tech__list .reveal { transform: translateY(14px) scale(.92); }
.tech__list .reveal.is-in:hover { transform: translateY(-3px); transition-delay: 0s; transition-duration: .3s; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em 0 .16em; margin: -.06em 0 -.16em; }
.w > span { display: inline-block; transform: translateY(115%); }
.is-in > .w > span { transform: none; transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 55ms); }

/* --------------------------------------------------------------------------
   Ograniczony ruch
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .flow__pulses { display: none; }
  .steps--anim::after { display: none; }
  .logo__puff { animation: none !important; }
}
