/* PMT IT - arkusz stylów. Jedna rodzina kroju (Hanken Grotesk, hostowana lokalnie). */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ffffff;
  --wash: #f2f4f8;
  --ink: #0f1b33;
  --muted: #55607a;
  --line: #d8deea;
  --accent: #1b4dff;
  --accent-ink: #0f36c9;
  --on-accent: #ffffff;
  --top-bg: rgba(255, 255, 255, 0.92);
  --fig-line: #c3cbdf;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --rail: 15rem;
}

/* Motyw ciemny: odwrócona paleta (granat jako tło, jasny tekst) */
[data-theme="dark"] {
  --paper: #0b1326;
  --wash: #111b33;
  --ink: #eef2fb;
  --muted: #9ba8c4;
  --line: #25324f;
  --accent: #7b96ff;
  --accent-ink: #a3b6ff;
  --on-accent: #0b1326;
  --top-bg: rgba(11, 19, 38, 0.9);
  --fig-line: #3d4d75;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.wrap { max-width: 78rem; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* Nagłówek */
.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--top-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4rem;
}
.mark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.mark::before {
  content: ""; width: 0.8rem; height: 0.8rem; background: var(--accent);
}
.mark:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.4vw, 2rem); font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav .lang {
  color: var(--ink); font-weight: 600;
  border: 1px solid var(--line); padding: 0.3rem 0.65rem; border-radius: 999px;
}
.nav .lang:hover { border-color: var(--ink); }
.theme {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.theme:hover { border-color: var(--ink); }
.theme .i-sun { display: none; }
[data-theme="dark"] .theme .i-sun { display: block; }
[data-theme="dark"] .theme .i-moon { display: none; }
@media (max-width: 40rem) { .nav .opt { display: none; } }

/* Hero */
.hero { padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 7vw, 5rem); }
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  max-width: 17ch;
  text-wrap: balance;
}
.hero .lead {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 54ch;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero .act { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.btn {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  padding: 0.85rem 1.4rem; font-weight: 600; text-decoration: none; border-radius: 3px;
}
.btn:hover { background: var(--accent-ink); color: var(--on-accent); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 3rem; align-items: center; }
@media (max-width: 68rem) { .hero-grid { grid-template-columns: 1fr; } .fig { display: none; } }

/* Schemat w hero: linie rysują się raz przy wejściu na stronę */
.fig { width: 100%; height: auto; overflow: visible; }
.fig .ln { fill: none; stroke: var(--fig-line); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 0.7s ease-out forwards; animation-delay: calc(var(--d) * 70ms + 200ms); }
.fig .nd { fill: var(--ink); }
.fig .nd.hub { fill: var(--accent); }
.fig text { fill: var(--muted); font-size: 15px; font-weight: 500; }
.fig text.halo { fill: var(--paper); stroke: var(--paper); stroke-width: 7px; stroke-linejoin: round; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .fig .ln { animation: none; stroke-dashoffset: 0; } }

/* Pas zakresu pod hero */
.scope { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.scope ul { display: grid; grid-template-columns: repeat(6, 1fr); }
.scope li {
  padding: 1rem 1rem 1rem 0; font-weight: 600; font-size: 0.98rem;
  border-left: 1px solid var(--line); padding-left: 1rem;
}
.scope li:first-child { border-left: 0; padding-left: 0; }
.scope a { text-decoration: none; display: block; }
.scope a:hover { color: var(--accent-ink); }
.svc > li { scroll-margin-top: 5.5rem; }
.svc > li:target h3 { color: var(--accent-ink); }
.band { scroll-margin-top: 3.5rem; }
@media (max-width: 62rem) {
  .scope ul { grid-template-columns: repeat(3, 1fr); }
  .scope li:nth-child(4) { border-left: 0; padding-left: 0; }
  .scope li:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 34rem) {
  .scope ul { grid-template-columns: repeat(2, 1fr); }
  .scope li { border-left: 1px solid var(--line); padding-left: 1rem; }
  .scope li:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1rem; }
  .scope li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .scope li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sekcje: szyna z tytułem po lewej, treść po prawej */
.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band + .band { border-top: 1px solid var(--line); }
.band.tint { background: var(--wash); border-top: 0; }
.split { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 5rem); }
.split > h2 {
  font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.015em; font-weight: 600;
  position: sticky; top: 5.5rem; align-self: start;
}
@media (max-width: 56rem) {
  .split { grid-template-columns: 1fr; }
  .split > h2 { position: static; }
}

/* Usługi */
.svc > li {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.5rem 2.5rem;
  padding: 1.75rem 0; border-top: 1px solid var(--line);
}
.svc > li:first-child { border-top: 0; padding-top: 0; }
.svc h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.svc p { max-width: var(--measure); color: var(--muted); }
.svc .tech { margin-top: 0.75rem; font-size: 0.92rem; color: var(--ink); }
@media (max-width: 44rem) { .svc > li { grid-template-columns: 1fr; } }

/* Jak pracujemy: faktyczna kolejność, więc numerujemy */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(s); display: block; font-weight: 600; color: var(--accent);
  font-size: 0.95rem; margin-bottom: 0.5rem; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
.steps p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 62rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30rem) { .steps { grid-template-columns: 1fr; } }

/* Technologie */
.stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.stack div { padding: 1.1rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.stack dt { font-weight: 600; }
.stack dd { color: var(--muted); }
@media (max-width: 62rem) { .stack { grid-template-columns: 1fr; } }
@media (max-width: 30rem) { .stack div { grid-template-columns: 1fr; gap: 0.2rem; } }

/* Kontakt */
.contact .big {
  display: inline-block;
  font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent);
  text-underline-offset: 0.18em; overflow-wrap: anywhere;
}
.contact .note { margin-top: 1.25rem; max-width: 50ch; color: var(--muted); }
.contact .cols { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.contact h3 { font-size: 0.95rem; font-weight: 600; color: var(--muted); margin-bottom: 0.4rem; }
.contact address { font-style: normal; }
@media (max-width: 44rem) { .contact .cols { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Stopka */
.foot { border-top: 1px solid var(--line); padding: 1.75rem 0; font-size: 0.9rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.foot .ver { margin-left: 0.9rem; padding-left: 0.9rem; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* Podejście: trzy zasady, bez numerów (to nie jest kolejność) */
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.points h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.points p { color: var(--muted); }
@media (max-width: 62rem) { .points { grid-template-columns: 1fr; gap: 1.75rem; max-width: var(--measure); } }
