:root {
  --bg: #11151f;
  --bg-alt: #161b27;
  --surface: #1c2230;
  --border: #2a3142;
  --text: #f1f3f8;
  --muted: #a3abbd;

  --blue: #4d9de0;
  --violet: #a78bfa;
  --coral: #ff6b6b;
  --mint: #3ddc97;
  --yellow: #ffd23f;
  --orange: #ff9f43;

  --radius: 14px;
  --max: 1120px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --display: "Space Grotesk", system-ui, "Segoe UI", Arial, sans-serif;
}

/* Kolor przypisany do elementu */
.c-blue   { --c: var(--blue); }
.c-violet { --c: var(--violet); }
.c-coral  { --c: var(--coral); }
.c-mint   { --c: var(--mint); }
.c-yellow { --c: var(--yellow); }
.c-orange { --c: var(--orange); }

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

html { scroll-behavior: smooth; scroll-padding-top: 68px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Nagłówek */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--blue); }

.nav { display: flex; gap: 24px; align-items: center; font-family: var(--mono); }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; transition: color .15s; }
.nav a:hover { color: var(--text); }
.nav a.nav-cta {
  color: #11151f;
  background: var(--yellow);
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 600;
}
.nav a.nav-cta:hover { background: #ffe066; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Hero */
.hero {
  overflow: hidden;
  padding: 64px 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mint);
}
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(44px, 6.4vw, 76px); font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 20px; font-weight: 500; }

.lead { font-size: 19px; color: var(--muted); margin: 20px 0 28px; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: #11151f; }
.btn-primary:hover { background: #ffe066; }
.btn-ghost { border: 2px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--mint); }
.btn-lg { padding: 16px 28px; font-size: 18px; margin-top: 8px; font-family: var(--mono); word-break: break-all; }

.tags { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Zdjęcie z płaskimi kształtami */
.hero-photo { position: relative; display: flex; justify-content: center; align-items: center; }
.photo-frame { position: relative; z-index: 1; width: min(360px, 78vw); aspect-ratio: 1; }

/* Kod SQL w tle za zdjęciem */
.sql-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
  opacity: .55;
  white-space: pre;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 80%);
}
.sql-bg .k { color: var(--violet); }
.sql-bg .s { color: var(--mint); }
.sql-bg .n { color: var(--orange); }
.sql-bg .c { color: var(--muted); font-style: italic; }
.photo-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid var(--yellow);
}
.blob { position: absolute; border-radius: 50%; }
.blob-1 { width: 34%; aspect-ratio: 1; background: var(--coral); right: -6%; top: -4%; }
.blob-2 { width: 22%; aspect-ratio: 1; background: var(--mint); left: -4%; bottom: 2%; }

/* Sekcje */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section p { color: var(--muted); }
.section p.eyebrow { color: var(--mint); }

/* O mnie + kod */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.about p { font-size: 18px; }

.code {
  margin: 0;
  background: #0b0e15;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
}
.code-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--coral); }
.code-bar span:nth-child(2) { background: var(--yellow); }
.code-bar span:nth-child(3) { background: var(--mint); }
.code-bar em { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--muted); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.75; color: var(--text); }
.code .k { color: var(--violet); }
.code .v { color: var(--blue); }
.code .p { color: var(--text); }
.code .s { color: var(--mint); }
.code .n { color: var(--orange); }

/* Karty usług */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--c); transform: translateY(-3px); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.card-no { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.card h3 { margin: 16px 0 6px; }
.card p { margin: 0; font-size: 15.5px; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--c);
}
.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #11151f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Statystyki */
.stats {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
.stat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.stat strong { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--c); }
.stat span { color: var(--muted); font-size: 14.5px; }
.stat.partner { align-items: center; justify-content: center; background: #fff; padding: 14px; }
.stat.partner img { max-width: 130px; }

.years { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: 16px; }
.years span { flex: 1; background: var(--c); border-radius: 2px 2px 0 0; opacity: .85; }
.years span:hover { opacity: 1; }
.years-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.stat .years-axis span { font-family: var(--mono); font-size: 12px; }

/* Oś czasu */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px dashed var(--border); }
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--c);
}
.timeline .when { font-family: var(--mono); font-size: 13px; color: var(--c); }
.timeline h3 { margin: 2px 0 4px; }
.timeline p { margin: 0; }

/* Certyfikaty */
.subhead { margin: 40px 0 14px; }
.certs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.certs li {
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 15px;
}
.certs li::before { content: "✓"; color: var(--mint); margin-right: 8px; font-weight: 700; }

/* Kawa */
.coffee { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.coffee p { font-size: 18px; }
.motto {
  margin: 0 0 20px;
  padding-left: 18px;
  border-left: 4px solid var(--yellow);
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
}
.flavor { display: grid; gap: 10px; margin: 24px 0 0; font-family: var(--mono); font-size: 13px; }
.flavor div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; }
.flavor span { color: var(--muted); }
.flavor i { display: block; height: 12px; border-radius: 3px; background: linear-gradient(to right, var(--c) var(--v), var(--surface) var(--v)); }
.coffee-side { display: grid; gap: 16px; }
.ab-test {
  margin: 0;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--mono);
}
.ab-title { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 18px; font-size: 13px; color: var(--text); }
.ab-title span { color: var(--mint); white-space: nowrap; }
.ab-circles { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
/* Przerywana linia łącząca oba koła */
.ab-circles::before {
  content: "";
  position: absolute;
  top: 0;
  /* Procent w marginesie liczy się od szerokości: środek koła to 1/4 szerokości bez odstępu */
  margin-top: calc((100% - 28px) / 4);
  left: 25%;
  right: 25%;
  border-top: 3px dashed var(--muted);
}
.ab-variant { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 13px; color: var(--muted); }
.ab-variant img {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 10px;
  object-fit: cover;
  border: 6px solid var(--c);
  border-radius: 50%;
}
.ab-variant strong { color: var(--c); font-weight: 600; }
.ab-cr { margin-top: 4px; padding: 2px 8px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.ab-vs {
  position: absolute;
  z-index: 1;
  top: 0;
  margin-top: calc((100% - 28px) / 4);
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--coral);
  color: #11151f;
  font-size: 14px;
  font-weight: 600;
}
.ab-test figcaption { display: grid; gap: 2px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* Kontakt */
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.contact-actions .btn-lg { margin-top: 0; }
.btn-icon { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); }
.btn-icon svg { width: 20px; height: 20px; fill: currentColor; }

/* Stopka */
.site-footer { padding: 26px 0; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer p { margin: 0; }
.site-footer .dim { font-family: var(--mono); font-size: 12px; opacity: .7; }

.site-footer .footer-links { margin-top: 6px; font-family: var(--mono); font-size: 12px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--text); }

.link-btn.inline { font-family: inherit; font-size: inherit; color: var(--text); }

/* Polityka prywatności */
.policy h1 { font-size: clamp(36px, 5vw, 52px); }
.policy .updated { font-family: var(--mono); font-size: 13px; margin: 8px 0 32px; }
.policy h2 { font-size: 24px; margin: 40px 0 12px; }
.policy h3 { font-size: 18px; margin: 24px 0 6px; }
.policy p, .policy li { color: var(--muted); font-size: 16.5px; }
.policy ul { padding-left: 20px; margin: 0 0 16px; }
.policy li { margin-bottom: 6px; }
.policy a { color: var(--text); }
.policy strong { color: var(--text); font-weight: 600; }
.policy .back { margin-top: 48px; font-family: var(--mono); font-size: 14px; }
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 10px; }
.policy table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.policy th, .policy td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.policy th { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--surface); white-space: nowrap; }
.policy td { color: var(--muted); }
.policy tr:last-child td { border-bottom: 0; }
.policy .note {
  margin: 24px 0 8px;
  padding: 18px 20px;
  background: var(--surface);
  border-left: 4px solid var(--mint);
  border-radius: 10px;
}
.policy .note h3 { margin: 0 0 6px; }
.policy .note p { margin: 0; }
.policy .en { font-style: italic; }
.policy .contact-list { list-style: none; padding: 0; }
.policy .contact-list li { margin-bottom: 2px; }
.policy code { font-family: var(--mono); font-size: 13px; color: var(--mint); }

/* Strona 404 */
.not-found { min-height: calc(100vh - 64px - 100px); display: flex; align-items: center; }
.big-404 {
  font-size: clamp(110px, 22vw, 200px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.big-404 span { color: var(--c); display: inline-block; }
.big-404 span:nth-child(2) { transform: rotate(-8deg); }
.not-found h2 { margin-bottom: 0; }
.not-found .lead { margin: 14px auto 28px; }
.ad-status { text-align: left; margin: 0 auto 32px; max-width: 560px; }
.ad-status pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ad-status .c { color: var(--muted); font-style: italic; }
.ad-status .r { color: var(--coral); }
.center-actions { justify-content: center; }

/* Baner cookies */
.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(420px, calc(100% - 40px));
  background: var(--surface);
  border: 2px solid var(--border);
  border-top: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 20px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 16px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.cookie-banner a { color: var(--text); }
.cookie-banner .cookie-title { margin-bottom: 6px; font-family: var(--mono); font-size: 13px; color: var(--yellow); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; padding: 10px 16px; font-size: 15px; cursor: pointer; font-family: inherit; }
.cookie-actions .btn-ghost { background: none; }

/* Responsywność */
@media (max-width: 900px) {
  .hero { padding: 40px 0 52px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { order: -1; }
  .photo-frame { width: min(240px, 66vw); }
  .sql-bg { font-size: 11px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .coffee { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-wide { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; font-size: 16px; }
  .nav a.nav-cta { text-align: center; margin-top: 8px; padding: 12px; }
  .section { padding: 48px 0; }
  .cards { grid-template-columns: 1fr; }
  .stat strong { font-size: 32px; }
  .code pre { font-size: 12.5px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .contact-actions .btn-lg { width: 100%; justify-content: center; padding: 14px 12px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
