@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/*
  Zasady:
  - Dwa kroje: Space Grotesk (cały tekst) i JetBrains Mono (tylko etykiety <tag> i blok kodu).
  - Rozmiary tylko ze skali --fs-*.
  - Kolory wyłącznie ze zmiennych poniżej. Motyw ciemny to domyślny, jasny włącza atrybut
    data-theme="light" na <html> (ustawia go skrypt w <head> i przełącznik w nagłówku).
  - Kolory tekstu: --text (nagłówki, ważne), --muted (opisy i etykiety pomocnicze).
    Pomarańcz tylko dla elementów klikalnych, etykiet <tag>, ikon i logo.
  - --accent to pomarańcz do wypełnień (przyciski), --accent-text do tekstu i linków
    (w motywie jasnym ciemniejszy, żeby był czytelny na jasnym tle).
*/
:root {
  --bg: #0B1D3A;
  --bg-deep: #081630;
  --surface: #102848;
  --surface-2: #0E2340;
  --line: rgba(201, 211, 224, 0.14);
  --border-ui: rgba(201, 211, 224, 0.24);
  --text: #E6EBF3;
  --muted: #A9B7CB;
  --accent: #FF7A1A;
  --accent-hover: #FF9142;
  --accent-ink: #0B1D3A;
  --accent-text: #FF7A1A;
  --accent-text-hover: #FF9142;
  --accent-brand: #FF7A1A;
  --accent-tint: rgba(255, 122, 26, 0.12);
  --accent-glow: rgba(255, 122, 26, 0.16);
  --hero-glow-a: rgba(255, 122, 26, 0.13);
  --hero-glow-b: rgba(74, 120, 200, 0.16);
  --header-bg: rgba(11, 29, 58, 0.82);
  --brand-word: #DDE4EE;
  --chip-bg: #DDE4EE;
  --chip-ink: #0B1D3A;
  --field-bg: #081630;
  --card-shadow: none;
  --code-bg: #071328;
  --code-key: #DDE4EE;
  --code-str: #FFA25E;
  --code-punct: #6F809B;
  --dot: #2B3D5B;
  --ok: #7EE2A8;
  --err: #FF9C9C;
  --radius: 16px;
  --header-h: 72px;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2.3rem, 5.2vw, 3.6rem);
  --fs-h2: clamp(1.8rem, 3.4vw, 2.6rem);
  --fs-h3: 1.25rem;
  --fs-lead: 1.15rem;
  --fs-body: 1.0625rem;
  --fs-ui: 1rem;
  --fs-small: 0.875rem;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F4F7FB;
  --bg-deep: #E8EEF6;
  --surface: #FFFFFF;
  --surface-2: #F5F8FC;
  --line: rgba(11, 29, 58, 0.12);
  --border-ui: rgba(11, 29, 58, 0.28);
  --text: #0B1D3A;
  --muted: #4A5B75;
  --accent-hover: #F26A0D;
  --accent-text: #B7360A;
  --accent-text-hover: #8A2A06;
  --accent-brand: #E25F0B;
  --accent-tint: rgba(226, 95, 11, 0.1);
  --accent-glow: rgba(11, 29, 58, 0.16);
  --hero-glow-a: rgba(255, 122, 26, 0.14);
  --hero-glow-b: rgba(74, 120, 200, 0.14);
  --header-bg: rgba(244, 247, 251, 0.86);
  --brand-word: #0E2247;
  --chip-bg: #0E2247;
  --chip-ink: #F4F7FB;
  --field-bg: #F4F7FB;
  --card-shadow: 0 1px 2px rgba(11, 29, 58, 0.05), 0 10px 28px rgba(11, 29, 58, 0.06);
  --code-bg: #FFFFFF;
  --code-key: #0E2247;
  --code-str: #B7360A;
  --code-punct: #66768F;
  --dot: #CBD5E3;
  --ok: #15803D;
  --err: #B91C1C;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }

img, svg { display: block; max-width: 100%; }

.only-light { display: none; }
[data-theme="light"] .only-light { display: block; }
[data-theme="light"] .only-dark { display: none; }

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent-text-hover); }

h1, h2, h3 { margin: 0; color: var(--text); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: var(--fs-display); line-height: 1.07; letter-spacing: -0.028em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--accent-text);
  letter-spacing: 0.02em;
}

.lead { color: var(--muted); font-size: var(--fs-lead); }

/* header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.bar-right { display: flex; align-items: center; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-word); }
.brand:hover { color: var(--brand-word); }
.brand img { height: 46px; width: auto; }
.brand-name { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; }
.acc { color: var(--accent-brand); }
.brand-chip {
  background: var(--chip-bg); color: var(--chip-ink);
  font-weight: 700; font-size: 0.75rem; line-height: 1;
  padding: 5px 7px; border-radius: 5px;
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: var(--fs-ui); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--text); }

.nav-toggle, .theme-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--border-ui); border-radius: 10px;
  color: var(--text); cursor: pointer; align-items: center; justify-content: center;
  transition: border-color 0.15s ease;
}
.nav-toggle:hover, .theme-toggle:hover { border-color: var(--text); }
.js .theme-toggle { display: inline-flex; }

.theme-toggle svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle .i-moon { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-moon { display: block; }

.bars, .bars::before, .bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

/* buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.5em; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent;
  font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-ui); }
.btn-ghost:hover { background: transparent; color: var(--text); border-color: var(--text); }
.btn-sm { padding: 0.55em 1.1em; font-size: var(--fs-ui); }
.btn:disabled { opacity: 0.65; cursor: progress; transform: none; }

/* hero */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 104px);
  background:
    radial-gradient(60% 55% at 84% 32%, var(--hero-glow-a), transparent 70%),
    radial-gradient(55% 60% at 8% 0%, var(--hero-glow-b), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.45;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 80%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 80%);
}

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
}

.hero .lead { margin: 24px 0 32px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .mail-line { margin-top: 24px; }

.hero-visual img {
  width: 100%; max-width: 560px; height: auto; margin-inline: auto;
  filter: drop-shadow(0 30px 60px var(--accent-glow));
}
@media (prefers-reduced-motion: no-preference) {
  .hero-visual img { animation: float 7s ease-in-out infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* sections */

.section { padding-block: clamp(64px, 9vw, 112px); scroll-margin-top: var(--header-h); }
.section-alt { background: var(--bg-deep); border-block: 1px solid var(--line); }
section[id] { scroll-margin-top: var(--header-h); }

.section-head { max-width: 44rem; margin-bottom: 48px; }
.section-head .lead { margin: 16px 0 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(255, 122, 26, 0.5); transform: translateY(-3px); }
.icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; background: var(--accent-tint); color: var(--accent-text);
}
.icon svg {
  width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin: 20px 0 10px; }
.card p { color: var(--muted); }
.card ul { list-style: none; margin: 18px 0 0; padding: 0; }
.card li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.card li::before { content: "›"; position: absolute; left: 4px; color: var(--muted); font-weight: 700; }

.offer-note { margin: 36px 0 0; }

.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 28px;
}
.steps li { position: relative; counter-increment: step; padding-top: 24px; border-top: 1px solid var(--line); }
.steps li::before {
  content: "0" counter(step); display: block; margin-bottom: 10px;
  font-size: var(--fs-small); font-weight: 500; color: var(--muted);
}
.steps li::after { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 2px; background: var(--accent); }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); margin: 0; }

.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.about h2, .contact h2 { margin-bottom: 20px; }

.code {
  margin: 0; overflow: hidden;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  font-family: var(--mono); font-size: var(--fs-small); line-height: 1.75;
}
.code-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); color: var(--muted);
}
.dots, .dots::before, .dots::after {
  display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot);
}
.dots { position: relative; margin-right: 22px; }
.dots::before, .dots::after { content: ""; position: absolute; top: 0; }
.dots::before { left: 16px; }
.dots::after { left: 32px; }
.code pre, .code code { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
.code pre { padding: 22px; overflow-x: auto; }
.code .k { color: var(--code-key); }
.code .s { color: var(--code-str); }
.code .p { color: var(--code-punct); }

.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }

.mail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 28px 0 0; }
.mail-line span { color: var(--muted); font-size: var(--fs-small); }
.mail-line a { font-weight: 500; }
.copy {
  display: none; align-items: center; padding: 0.3em 0.8em;
  background: transparent; color: var(--muted); border: 1px solid var(--border-ui); border-radius: 8px;
  font-size: var(--fs-small); line-height: 1.4; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy:hover { color: var(--text); border-color: var(--text); }
.js .copy { display: inline-flex; }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: clamp(20px, 3vw, 32px);
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-ui); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 0.8em 1em;
  background: var(--field-bg); color: var(--text);
  border: 1px solid var(--border-ui); border-radius: 10px;
  line-height: 1.5;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-tint);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { width: 100%; }
.form-note { margin: 16px 0 0; color: var(--muted); font-size: var(--fs-small); }
.form-status { margin: 14px 0 0; min-height: 1.5em; font-size: var(--fs-ui); font-weight: 500; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* footer */

.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; }
.footer-logo { width: 220px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.footer-mail { margin: 0; }
.footer-mail a { font-weight: 500; }
.footer-bottom { padding-block: 32px 36px; color: var(--muted); font-size: var(--fs-small); }
.footer-bottom p { margin: 0; }
.footer-bottom p + p { margin-top: 4px; }
.footer-grid + .footer-bottom { margin-top: 40px; border-top: 1px solid var(--line); }

/* polityka prywatności */

.prose { max-width: 46rem; }
.prose h1 { font-size: var(--fs-h2); margin-bottom: 8px; }
.prose h2 { font-size: var(--fs-h3); margin: 40px 0 12px; letter-spacing: -0.01em; }
.prose p { color: var(--muted); }
.prose .updated { font-size: var(--fs-small); }
.prose .back { margin-top: 48px; }

/* strona prac serwisowych */

.maintenance { display: grid; place-items: center; min-height: calc(100vh - var(--header-h)); text-align: center; }
.maintenance .inner { position: relative; max-width: 40rem; }
.maintenance-mark { width: min(420px, 86%); height: auto; margin: 0 auto 32px; filter: drop-shadow(0 30px 60px var(--accent-glow)); }
.maintenance .lead { margin: 20px auto 0; max-width: 32em; }
.maintenance .cta { justify-content: center; margin: 32px 0 0; }
.maintenance .mail-line { justify-content: center; }

/* animacje wejścia tylko gdy działa JS */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; }
}

/* mobile */

@media (max-width: 860px) {
  .hero-grid, .about, .contact { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual img { max-width: 380px; }
  .footer-grid { grid-template-columns: 1fr; justify-items: start; gap: 24px; }
  .footer-nav { justify-content: flex-start; }
  .code pre { white-space: pre-wrap; overflow-wrap: anywhere; }

  .bar-right { gap: 10px; }
  .js .nav-toggle { display: inline-flex; }
  .nav { flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
  .js .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 24px 20px; background: var(--bg-deep); border-bottom: 1px solid var(--line);
  }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 12px 4px; font-size: var(--fs-body); }
  .js .nav .btn { margin-top: 8px; padding: 0.9em 1em; }
}

@media (max-width: 420px) {
  .brand { gap: 8px; }
  .brand img { height: 38px; }
  .brand-name { font-size: 1.1rem; }
  .cta .btn { width: 100%; }
}
