/* JuraCode – arkusz stylów strony */

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

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --text: #0e1726;
  --muted: #4b5768;
  --border: #dde3eb;
  --accent: #0b7a65;
  --accent-strong: #075e4e;
  --accent-soft: #e1f2ec;
  --on-accent: #ffffff;
  --header-bg: rgba(246, 247, 249, 0.86);
  --grid-line: rgba(14, 23, 38, 0.05);
  --glow: rgba(11, 122, 101, 0.16);
  --success: #067647;
  --success-bg: #e3f6ec;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.06);

  --code-bg: #0f1828;
  --code-bar: #172338;
  --code-text: #d3dcea;
  --code-muted: #71819a;
  --tok-keyword: #c792ea;
  --tok-func: #82aaff;
  --tok-string: #b5e48c;

  --radius: 14px;
  --radius-sm: 10px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a111b;
    --surface: #101a28;
    --surface-2: #152234;
    --text: #e6ebf2;
    --muted: #9ba9bc;
    --border: #22324a;
    --accent: #3fcfa6;
    --accent-strong: #74e2c3;
    --accent-soft: #0f2f2a;
    --on-accent: #032219;
    --header-bg: rgba(10, 17, 27, 0.82);
    --grid-line: rgba(230, 235, 242, 0.045);
    --glow: rgba(63, 207, 166, 0.13);
    --success: #5fd49b;
    --success-bg: #0e2b1f;
    --danger: #ff8a80;
    --danger-bg: #331414;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
    --code-bg: #070d16;
    --code-bar: #0f1825;
    color-scheme: dark;
  }
}

/* ---------- Podstawy ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

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

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

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

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Nagłówek ---------- */

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

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-name span { color: var(--accent); }

.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark-bg { fill: var(--accent); }
.brand-mark-fg {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.lang-full { display: none; }

@media (min-width: 761px) {
  .site-nav a.lang-link {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .site-nav a.lang-link:hover { border-color: var(--muted); }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.site-header.is-open .nav-toggle .icon-open { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a:not(.btn) {
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .site-nav .btn { margin-top: 16px; }
  .lang-short { display: none; }
  .lang-full { display: inline; }
}

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

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

.btn-small { padding: 9px 16px; font-size: 0.92rem; }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 104px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  right: -180px;
  top: -240px;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--accent); }

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

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

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

.code-card {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(8, 15, 30, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.code-card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--code-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code-card-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-card-bar i:nth-child(2) { background: #febc2e; }
.code-card-bar i:nth-child(3) { background: #28c840; }
.code-card-bar span {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--code-muted);
}
.code-card pre {
  margin: 0;
  padding: 22px 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
}
.tok-k { color: var(--tok-keyword); }
.tok-f { color: var(--tok-func); }
.tok-s { color: var(--tok-string); }
.tok-c { color: var(--code-muted); font-style: italic; }

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

.section { padding: 96px 0; }
.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 780; }
.section-head p { margin: 0; font-size: 1.08rem; color: var(--muted); }

/* Usługi */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.service {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.service:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.service-icon svg { width: 24px; height: 24px; }

.service h3 { font-size: 1.3rem; margin-bottom: 10px; }
.service p { color: var(--muted); }

.service ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px dashed var(--border);
  font-size: 0.95rem;
}
.service li { display: flex; align-items: baseline; gap: 10px; }
.service li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Proces */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { margin: 0; font-size: 0.96rem; color: var(--muted); }

/* Aplikacje */

.apps {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%);
}
.apps h2 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); font-weight: 780; }
.apps p { color: var(--muted); }
.apps p:last-child { margin-bottom: 0; }

.doc-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.doc-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s;
}
.doc-links a:hover { border-color: var(--accent); color: var(--text); }
.doc-links a::after { content: "→"; color: var(--accent); font-family: var(--font-mono); }
.doc-links small { display: block; font-size: 0.85rem; font-weight: 400; color: var(--muted); }

/* Kontakt */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}
.contact-info h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 780; }
.contact-info > p { font-size: 1.08rem; color: var(--muted); }

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 32px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--accent); }
.contact-mail .icon-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.contact-mail svg { width: 22px; height: 22px; }

.company {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}
.company strong { display: block; margin-bottom: 4px; color: var(--text); }

.form-card {
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field { display: grid; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.92rem; font-weight: 600; }
.field .optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8699' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--danger); }

.form-note {
  margin: 18px 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}
.form-actions { margin-top: 22px; }

.form-status {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-status:empty { display: none; }
.form-status.is-pending { background: var(--surface-2); color: var(--muted); }
.form-status.is-success { background: var(--success-bg); color: var(--success); }
.form-status.is-error { background: var(--danger-bg); color: var(--danger); }

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

.site-footer {
  padding: 56px 0 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.94rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.footer-grid h2 {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-grid ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-about p { max-width: 32em; margin: 14px 0 0; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

/* ---------- Dokumenty (polityki) ---------- */

.legal { padding: 64px 0 96px; }
.prose { max-width: 780px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; }
.prose .lead { font-size: 1.12rem; color: var(--muted); }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 32px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--muted);
}

.toc {
  margin: 0 0 40px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prose .toc h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 32px; font-size: 0.95rem; }
.toc li { break-inside: avoid; }

.prose h2 {
  margin: 48px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 1.45rem;
}
.prose h3 { margin: 28px 0 10px; font-size: 1.12rem; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--accent); }

.table-wrap {
  margin: 0 0 1.5em;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.prose table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.92rem; }
.prose th, .prose td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.prose th { background: var(--surface-2); font-weight: 650; }
.prose tr:last-child td { border-bottom: 0; }

.callout {
  margin: 0 0 1.5em;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout p:last-child { margin-bottom: 0; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch:hover { color: var(--text); border-color: var(--muted); }

/* ---------- 404 ---------- */

.not-found { padding: 120px 0; text-align: center; }
.not-found .code { font-family: var(--font-mono); font-size: 0.9rem; color: var(--accent); }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); }
.not-found p { color: var(--muted); }

/* ---------- Responsywność ---------- */

@media (max-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apps { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 24px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .service { padding: 24px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .legal { padding: 40px 0 72px; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .code-card pre { padding: 18px; font-size: 0.74rem; }
  .form-card { padding: 24px 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .toc ol { columns: 1; }
  .hero-actions .btn { flex: 1 1 auto; }
}
