/* ==========================================================================
   Kadra — public careers portal
   Zero zależności, zero JS. Tokeny spójne z landingiem Kadry.
   ========================================================================== */

:root {
  --ink: #0a1411;
  --ink-soft: #16241f;
  --bg: #ffffff;
  --surface: #f7f9f8;
  --surface-2: #eef3f0;
  --border: #dde5e0;
  --text: #0f1a16;
  --muted: #5a6a64;
  --accent: #2f6f4f;
  --accent-bright: #34d399;
  --accent-ink: #ffffff;
  --sand: #f3ede2;
  --danger: #b3261e;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 20, 17, .06), 0 4px 14px rgba(10, 20, 17, .05);
  --shadow-lg: 0 18px 48px -18px rgba(10, 20, 17, .35);
  --max: 1180px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1211;
    --surface: #101a17;
    --surface-2: #16221e;
    --border: #223029;
    --text: #e9f1ed;
    --muted: #9aa8a2;
    --accent: #34d399;
    --accent-ink: #06231a;
    --sand: #1e2620;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 22px 60px -22px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

/* ---------- header / footer ---------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent) 0%, #1b4636 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.site-nav { display: flex; align-items: center; gap: 1.1rem; font-size: .92rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

.nav-apply {
  padding: .45rem .95rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink) !important;
  font-weight: 600;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .88rem;
}

.site-footer .dot { margin: 0 .4rem; }
.powered { opacity: .7; }

/* ---------- hero --------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  color: #f4faf7;
  isolation: isolate;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 18, 14, .94) 4%, rgba(6, 18, 14, .55) 46%, rgba(6, 18, 14, .28) 100%),
    radial-gradient(120% 90% at 12% 8%, rgba(52, 211, 153, .22), transparent 60%);
  z-index: -1;
}

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) clamp(2.2rem, 5vw, 3.6rem);
}

.eyebrow {
  margin: 0 0 .9rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent-bright);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -.03em;
  font-weight: 760;
  text-wrap: balance;
}

.lede {
  max-width: 58ch;
  margin: 1.15rem 0 0;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: rgba(240, 250, 245, .86);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 1.8rem;
  font-size: .95rem;
  color: rgba(240, 250, 245, .8);
}

.hero-stats strong { color: #fff; font-size: 1.15rem; margin-right: .3rem; }

.hero-cta {
  padding: .7rem 1.3rem;
  border-radius: 999px;
  background: #fff;
  color: #0a1411;
  font-weight: 650;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }

/* ---------- sekcja ofert ------------------------------------------------- */

.positions, .why {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 .35rem; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); }

.job-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}

.job-card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.job-card:hover, .job-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.job-card-link { display: block; color: inherit; text-decoration: none; }

.job-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.job-card:hover .job-thumb img { transform: scale(1.06); }

.job-thumb-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 18, 14, .55), transparent 55%);
}

.job-badge {
  position: absolute;
  left: .85rem;
  top: .85rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #0a1411;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.job-card-link, .job-body { display: flex; flex-direction: column; height: 100%; }
.job-body { padding: 1.1rem 1.25rem 1.35rem; flex: 1; }

.job-title {
  display: block;
  font-size: 1.16rem;
  font-weight: 680;
  letter-spacing: -.01em;
}

.job-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .62rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .79rem;
  color: var(--muted);
  white-space: nowrap;
}

.chip-money { background: var(--sand); color: var(--text); border-color: transparent; font-weight: 600; }
.chip-muted { opacity: .85; }

.job-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  padding-top: .95rem;
  font-size: .88rem;
  font-weight: 650;
  color: var(--accent);
}

.job-card:hover .job-more span { transform: translateX(3px); }
.job-more span { transition: transform .18s ease; }

.job-badge-soft {
  left: auto;
  right: .85rem;
  background: rgba(9, 22, 18, .55);
  color: #eafff5;
  backdrop-filter: blur(6px);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.empty {
  padding: 2.2rem 1.6rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

/* ---------- „jak to wygląda u nas” --------------------------------------- */

.why-card {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}

.why-card h2 { margin: 0 0 1rem; font-size: clamp(1.3rem, 2.6vw, 1.7rem); letter-spacing: -.02em; }
.why-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .85rem; }
.why-list li { padding-left: 1.6rem; position: relative; color: var(--muted); }
.why-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--accent);
}
.why-list strong { color: var(--text); }

/* ---------- strona oferty ------------------------------------------------- */

.job-hero {
  position: relative;
  min-height: min(48vh, 400px);
  display: flex;
  align-items: flex-end;
  background-image: var(--hero);
  background-size: cover;
  background-position: center;
  color: #f4faf7;
  isolation: isolate;
}

.job-hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.6rem) clamp(1rem, 4vw, 2.5rem) clamp(1.8rem, 3vw, 2.4rem);
}

.crumbs { margin: 0 0 .7rem; font-size: .86rem; }
.crumbs a { color: rgba(240, 250, 245, .82); text-decoration: none; }
.crumbs a:hover { color: #fff; }

.job-hero h1 {
  margin: 0 0 .8rem;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-weight: 750;
}

.job-hero .chip {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
  color: #f2fbf6;
  backdrop-filter: blur(6px);
}
.job-hero .chip-money { background: rgba(52, 211, 153, .22); border-color: rgba(52, 211, 153, .4); color: #eafff5; }

.job-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.job-content { min-width: 0; }

/* Sticky header nie może zasłaniać celu kotwicy (#apply). */
.job-section, .apply-card, .positions { scroll-margin-top: 5.5rem; }
.job-section { margin-bottom: 2.4rem; }
.job-section h2 { margin: 0 0 .7rem; font-size: clamp(1.15rem, 2.2vw, 1.4rem); letter-spacing: -.01em; }
.job-content p { margin: 0 0 1rem; color: var(--muted); font-size: 1.02rem; }

.job-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .6rem; color: var(--muted); }
.job-steps strong { color: var(--text); }

.apply-card {
  position: sticky;
  top: 5.2rem;
  padding: 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.apply-card h2 { margin: 0 0 1.1rem; font-size: 1.15rem; letter-spacing: -.01em; }

.apply-form { display: grid; gap: .85rem; }
.apply-form label { display: grid; gap: .38rem; font-size: .86rem; font-weight: 600; color: var(--text); }
.field-label { display: inline-block; }
.optional { font-weight: 400; color: var(--muted); font-size: .8rem; font-style: normal; }

input[type="text"], input[type="email"], input[type="tel"], textarea, input[type="file"] {
  width: 100%;
  padding: .62rem .72rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

textarea { resize: vertical; min-height: 5rem; }

.file-field input { padding: .5rem; background: var(--surface-2); }
.file-field > span { font-weight: 600; }

.consent {
  grid-template-columns: auto 1fr !important;
  align-items: start;
  gap: .55rem !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
  font-size: .82rem !important;
  line-height: 1.5;
}
.consent input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

button[type="submit"] {
  padding: .8rem 1.2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
button[type="submit"]:hover { filter: brightness(1.07); transform: translateY(-1px); }
button[type="submit"]:active { transform: translateY(0); }

.form-note { margin: .2rem 0 0; font-size: .78rem; color: var(--muted); }

.form-errors {
  list-style: none;
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  color: var(--danger);
  font-size: .87rem;
}
.form-errors li + li { margin-top: .3rem; }

.form-ok {
  display: grid;
  gap: .45rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.form-ok strong { font-size: 1.02rem; }
.form-ok span { color: var(--muted); font-size: .9rem; }
.link-quiet { color: var(--accent); font-size: .88rem; font-weight: 650; text-decoration: none; }
.link-quiet:hover { text-decoration: underline; }

/* Honeypot: niewidoczny dla człowieka, łapie boty. */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- responsywność i dostępność ----------------------------------- */

@media (max-width: 900px) {
  .job-layout { grid-template-columns: minmax(0, 1fr); }
  .apply-card { position: static; }
  .hero { min-height: 64vh; }
}

@media (max-width: 560px) {
  .job-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav a:not(.nav-apply) { display: none; }
}

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

@media print {
  .site-header, .site-nav, .apply-card, .site-footer { display: none; }
  .job-hero { min-height: auto; color: #000; background: none; }
  .job-hero .hero-scrim { display: none; }
}
