/* ---------- Tokens ---------- */
:root {
  --bg: #12161d;
  --bg-2: #1a2029;
  --line: #2a313c;
  --text: #e8eaed;
  --muted: #9aa3ae;
  --accent: #3ccf91;      /* zielony akcent = "dane / live" */
  --accent-ink: #12161d;
  --code-str: #f4b860;
  --code-fn: #7cc4ff;
  --radius: 14px;
  --wrap: 1120px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.eyebrow {
  font: 500 .8rem/1 var(--mono);
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  padding: .85em 1.4em;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-sm { padding: .5em 1em; font-size: .9rem; }
.more { color: var(--accent); font-weight: 500; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.logo-dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav a:not(.btn):hover, .nav a.active { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 4rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.proof { list-style: none; padding: 0; margin: 1.6rem 0 2rem; }
.proof li { display: flex; gap: .7em; margin-bottom: .55em; }
.check { color: var(--accent); font-weight: 700; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-side { position: relative; }
.hero-photo {
  display: block; width: 100%; height: auto;
  aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.code-card {
  position: absolute; left: -2.5rem; bottom: -1.5rem;
  margin: 0; padding: 1.1rem 1.3rem;
  background: #0b0e13; border: 1px solid var(--line); border-radius: 12px;
  font: 400 .8rem/1.6 var(--mono);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  overflow-x: auto; max-width: calc(100% + 2.5rem);
}
.code-card .c { color: #5f6b7a; }
.code-card .s { color: var(--code-str); }
.code-card .f { color: var(--code-fn); }
.code-card .n { color: var(--accent); }

/* ---------- Sections & cards ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.page-head { padding-top: clamp(3rem, 7vw, 5rem); }
.cards { display: grid; gap: 1.2rem; margin-top: 2rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .muted { font-size: .95rem; }
.service-card .hook { font-weight: 500; }
.includes { list-style: none; padding: 1rem 0 0; margin: auto 0 0; border-top: 1px solid var(--line); font-size: .9rem; }
.includes li { display: flex; gap: .6em; margin-bottom: .4em; }

/* ---------- CTA ---------- */
.cta-box {
  border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
  background: radial-gradient(circle at 100% 0, rgba(60,207,145,.12), transparent 55%), var(--bg-2);
  padding: clamp(2rem, 5vw, 4rem);
}

/* ---------- Prose ---------- */
.prose { margin-top: 2rem; }
.prose h2 { margin-top: 2.2em; font-size: 1.6rem; }
.prose a { color: var(--accent); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); padding: .15em .4em; border-radius: 5px; }
.prose pre { background: #0b0e13; border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.5em 0; padding-left: 1.2em; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--text); }
.copyright { margin-top: 2.5rem; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .hero-grid, .footer-inner { grid-template-columns: 1fr; }
  .hero-side { max-width: 420px; }
  .code-card { left: 1rem; right: 1rem; max-width: none; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1rem;
    padding: 1.2rem 16px 1.6rem; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
}

/* ---------- Consent banner ---------- */
.cc {
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  position: fixed; inset: 0; z-index: 100; margin: auto; padding: 1.6rem 1.7rem;
  color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.cc:focus { outline: none; }
.cc-docked { inset: auto 16px 16px auto; margin: 0; }
.cc::backdrop { background: rgba(8, 10, 14, .72); backdrop-filter: blur(3px); }
html.cc-open { overflow: hidden; }
.cc h2 { font-size: 1.35rem; margin-bottom: .4em; }
.cc-text { font-size: .92rem; color: var(--muted); margin: 0 0 .8rem; }
.cc-text:last-of-type { margin-bottom: 1.1rem; }
.cc-text a { color: var(--accent); }
.cc-prefs { display: grid; gap: .6rem; margin-bottom: 1rem; }
.cc-cat {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.cc-cat input { margin-top: .3em; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.cc-cat input:disabled { cursor: not-allowed; }
.cc-cat strong { display: block; font-size: .95rem; }
.cc-cat small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.cc-actions .btn { flex: 1 1 auto; text-align: center; }
.cc-actions [data-cc="save"] { order: -2; flex-basis: 100%; }
.cc [hidden] { display: none; }
button.btn { font-family: inherit; line-height: inherit; cursor: pointer; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: .95rem; color: var(--muted);
}
.link-btn:hover { color: var(--text); }
:where(.btn, .link-btn, .cc-cat input):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.link-btn-accent { color: var(--accent); font-size: inherit; text-decoration: underline; }
@media (max-width: 800px) {
  .cc { padding: 1.1rem 1.2rem; }
  .cc-text { font-size: .85rem; }
  .cc-actions .btn { flex-basis: 100%; }
  .cc-actions [data-cc="accept"] { order: -1; }
}

/* ---------- Cookie declaration (polityka prywatności) ---------- */
.prose h3 { margin: 2em 0 .3em; font-size: 1.25rem; }
.cookie-vendor { margin: 1.2rem 0 1.6rem; }
.cookie-vendor-head { margin: 0 0 .3rem; font-size: .95rem; }
.cookie-note { margin: 0 0 .5rem; font-size: .9rem; }
.cookie-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
.cookie-table th { color: var(--muted); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.cookie-table td:first-child { width: 30%; overflow-wrap: anywhere; }
.cookie-table td:last-child { width: 18%; white-space: nowrap; }
@media (max-width: 520px) {
  .cookie-table thead { display: none; }
  .cookie-table tr { display: grid; grid-template-columns: 1fr auto; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .cookie-table td { border: 0; padding: .15rem 0; width: auto !important; }
  .cookie-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); }
}
