/* HASH FLUX — wspólny arkusz stylów (PL + EN) */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ed;
  --border: #e4e0d9;
  --text: #1a1c1f;
  --muted: #565b63;
  --accent: #b7410e;        /* rdza — Rust */
  --accent-hover: #963409;
  --accent-contrast: #ffffff;
  --accent-2: #2f5f8a;      /* błękit — PostgreSQL / Kubernetes */
  --code-bg: #1d2026;
  --code-text: #e6e8eb;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.06);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 12px;
  --max: 1120px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #161920;
    --surface-2: #1c2028;
    --border: #2a2f39;
    --text: #e6e8eb;
    --muted: #a0a7b1;
    --accent: #f0703f;
    --accent-hover: #ff8a5c;
    --accent-contrast: #14161a;
    --accent-2: #7fb2e0;
    --code-bg: #0a0c10;
    --code-text: #e6e8eb;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.35);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand svg { width: 32px; height: 32px; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }

.nav .lang {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  margin-left: 6px;
}

@media (max-width: 640px) {
  .nav .nav-section { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(500px 260px at 10% 90%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 70%);
}

.hero .container {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero { padding: 112px 0 96px; }
  .hero .container { grid-template-columns: 1.15fr 1fr; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }

h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  text-wrap: balance;
}

h1 .hl { color: var(--accent); }

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36em;
  margin: 20px 0 32px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }

.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

.terminal {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow: hidden;
  min-width: 0;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.terminal-bar span {
  width: 11px; height: 11px; border-radius: 50%;
  background: rgb(255 255 255 / 0.18);
}

.terminal pre {
  margin: 0;
  padding: 16px 18px 20px;
  overflow-x: auto;
  white-space: pre;
}

.t-prompt { color: #f0703f; }
.t-ok { color: #7ccf8a; }
.t-dim { color: #8a919c; }
.t-key { color: #7fb2e0; }

/* ---------- Sekcje ---------- */

.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 750; }
.section-head p { color: var(--muted); margin: 12px 0 0; }

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-2px); }

.card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 18px;
}
.card .icon.alt {
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: var(--accent-2);
}
.card .icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0 0 14px; font-size: 0.98rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}

.card.cta-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface-2);
  border-style: dashed;
}
.card.cta-card p { margin-bottom: 18px; }
.card.cta-card .btn { align-self: flex-start; }

/* ---------- O firmie ---------- */

.about {
  display: grid;
  gap: 40px;
}
@media (min-width: 960px) { .about { grid-template-columns: 1fr 1fr; align-items: start; } }

.about-text p { color: var(--muted); margin: 0 0 16px; }

.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.points .num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
}
.points strong { display: block; margin-bottom: 2px; }
.points span.desc { color: var(--muted); font-size: 0.96rem; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
}
.facts b { color: var(--text); font-weight: 600; }

/* ---------- Kontakt ---------- */

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 48px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
@media (min-width: 768px) { .contact-box { padding: 64px 48px; } }

.contact-box h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
.contact-box p { color: var(--muted); max-width: 34em; margin: 14px auto 28px; }

.email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  margin-top: 20px;
  word-break: break-all;
}

/* ---------- Stopka ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.legal { margin: 0; font-style: normal; line-height: 1.8; }
.legal strong { color: var(--text); }
.legal span { font-family: var(--font-mono); }

/* ---------- Ruch ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .card:hover { transform: none; }
}
