/* ==========================================================================
   SAJDSYSTEM — base + layout
   The design uses no @media queries: every dimension is clamp() and every
   grid is repeat(auto-fit, minmax(N, 1fr)). That is preserved. The only
   media queries in this theme are for the mobile navigation, which the
   design did not account for at all.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-surface-page);
  color: var(--c-body);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-accent-link); }
a:hover { color: var(--c-accent); }

::selection { background: var(--c-accent); color: var(--c-on-accent); }

img { max-width: 100%; height: auto; }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--c-accent-link);
  outline-offset: 2px;
}

/* Skip link — required for keyboard users, absent from the design */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--c-accent);
  color: var(--c-on-accent);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- Layout primitives --------------------------------------------------- */

.container {
  max-width: var(--w-container);
  margin: 0 auto;
  padding-inline: var(--pad-gutter);
}

.section { padding-block: var(--pad-section); }
.section--sm { padding-block: var(--pad-section-sm); }
.section--lg { padding-block: var(--pad-section-lg); }
.section--alt { background: var(--c-surface-alt); }
.section--case { background: var(--c-surface-case); }
.section--line { border-bottom: 1px solid var(--c-line); }

/* The design's hairline-grid idiom: borders drawn as 1px grid gaps, so
   adjacent cells never double up their rules. */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
.hairline-grid > * { background: var(--c-surface-card); }

/* --- Type --------------------------------------------------------------- */

.kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-accent-link);
  margin: 0 0 18px;
}
.kicker--on-case { color: var(--c-accent-kicker); }

.label-mono {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-text-7);
  margin: 0 0 14px;
}

.h1, .h2, .h3 {
  color: var(--c-heading);
  font-weight: 900;
  letter-spacing: -.025em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}
.h1 { font-size: var(--t-h1); line-height: 1; max-width: 18ch; }
.h1--home { font-size: var(--t-h1-home); line-height: .96; max-width: 16ch; }
.h1--post { font-size: var(--t-h1-post); text-transform: none; letter-spacing: -.02em; max-width: 24ch; }
.h2 { font-size: var(--t-h2); line-height: 1.04; }
.h2--sm { font-size: var(--t-h2-sm); }
.h2--cta { font-size: var(--t-h2-cta); line-height: 1.05; }
.h3 { font-size: var(--t-h3); font-weight: 800; letter-spacing: -.02em; text-transform: none; }

.lead {
  font-size: var(--t-lead);
  line-height: 1.7;
  color: var(--c-text-5);
  text-wrap: pretty;
  max-width: 62ch;
  margin: 18px 0 0;
}
.prose p { font-size: 16.5px; line-height: 1.76; color: var(--c-text-3); text-wrap: pretty; max-width: 70ch; }

.section-head { margin-bottom: var(--space-head); }

/* Heading left, supporting lead right — the artboard's two-column section head. */
.section-head--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 60px);
}
.section-head__lead {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--c-text-7);
  max-width: 52ch;
  text-wrap: pretty;
}

/* Polish compounds are long; never let one push a card wider than its column. */
.h2, .h3, .h1 { overflow-wrap: break-word; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 30px;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-hover); color: var(--c-on-accent); }
.btn--dark { background: var(--c-btn-dark); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--c-heading);
  border: 1px solid var(--c-line-strong);
  padding: 16px 26px;
}
.btn--ghost:hover { border-color: var(--c-accent-link); color: var(--c-accent-link); }

/* --- Breadcrumbs --------------------------------------------------------- */

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(26px, 3vw, 36px);
  padding: 0;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.breadcrumb li { color: var(--c-text-4); }
.breadcrumb a { color: var(--c-accent-link); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb [aria-current="page"] { color: var(--c-text-7); }

/* --- Hero ---------------------------------------------------------------- */
/* Values are verbatim from the artboards. The Home hero and the inner-page
   hero differ deliberately: different padding, measure and rule treatment. */

.hero {
  position: relative;
  background: var(--c-surface-page);
  border-bottom: 1px solid var(--c-line);
  overflow: hidden;
}
.hero--home { border-bottom: 0; }

/* The photo carries the filter on its own layer, so the scrim and the text
   above it stay unfiltered. */
.hero__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(.4);
}
.hero__photo--home { filter: grayscale(.3) contrast(1.03); }

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #F4F2EF 0%, rgba(244, 242, 239, .9) 34%, rgba(244, 242, 239, .12) 100%);
}
.hero__scrim--home {
  background: linear-gradient(90deg, rgba(244, 242, 239, .95) 0%, rgba(244, 242, 239, .78) 42%, rgba(244, 242, 239, .1) 100%);
}

/* Full-bleed rule down the left viewport edge — Home only. */
.hero__rule {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--c-accent);
}

.hero__inner {
  position: relative;
  max-width: var(--w-container);
  margin: 0 auto;
  padding: clamp(26px, 3vw, 36px) var(--pad-gutter) clamp(48px, 6vw, 80px);
}
.hero--home .hero__inner { padding: clamp(60px, 9vw, 124px) var(--pad-gutter) 0; }

.hero__kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-accent-link);
  margin: 0 0 22px;
}
.hero--home .hero__kicker { font-size: 13px; margin-bottom: 26px; }

.hero__lead {
  margin: 26px 0 0;
  max-width: 62ch;
  font-size: var(--t-lead);
  line-height: 1.7;
  color: var(--c-text-3);
  text-wrap: pretty;
}
.hero__lead--home {
  margin-top: 30px;
  max-width: 56ch;
  font-size: var(--t-lead-home);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 40px 0 clamp(52px, 7vw, 92px);
}

/* Stats inside the Home hero, over a translucent ground. */
.hero-stats {
  position: relative;
  border-top: 1px solid var(--c-line-input);
  background: rgba(244, 242, 239, .75);
}
.hero-stats__grid {
  max-width: var(--w-container);
  margin: 0 auto;
  padding-inline: var(--pad-gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.hero-stats__cell { padding: 30px 28px 32px 0; border-right: 1px solid var(--c-line); }
.hero-stats__cell:last-child { border-right: 0; }
.hero-stats__value {
  margin: 0;
  font-family: var(--f-mono);
  font-size: var(--t-stat-home);
  font-weight: 600;
  color: var(--c-heading);
  line-height: 1;
  letter-spacing: -.02em;
}
.hero-stats__label {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-5);
  font-weight: 600;
}

/* --- Stats band (Realizacje) --------------------------------------------- */

.stats-band { background: var(--c-surface-alt); border-bottom: 1px solid var(--c-line); }
.stats-band__grid {
  max-width: var(--w-container);
  margin: 0 auto;
  padding-inline: var(--pad-gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stats-band__cell { padding: 28px 24px 30px 0; border-right: 1px solid var(--c-line); }
.stats-band__cell:last-child { border-right: 0; }
.stats-band__value {
  margin: 0;
  font-family: var(--f-mono);
  font-size: var(--t-stat);
  font-weight: 600;
  color: var(--c-heading);
  line-height: 1;
}
.stats-band__label {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-5);
  font-weight: 600;
}

/* --- Chips / filters ----------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 10px 14px;
  background: transparent;
  color: var(--c-text-3);
  border: 1px solid var(--c-line-chip-off);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--c-accent-link); color: var(--c-accent-link); }
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--c-accent);
  color: var(--c-on-accent);
  border-color: var(--c-accent);
}

/* --- CTA band ------------------------------------------------------------ */

.cta-band { background: var(--c-accent); padding-block: var(--pad-cta); }
.cta-band .h2--cta { color: var(--c-on-accent); }
.cta-band__lead {
  font-size: var(--t-lead);
  line-height: 1.7;
  color: var(--c-on-accent-soft);
  max-width: 56ch;
  margin: 16px 0 0;
  text-wrap: pretty;
}
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: clamp(26px, 3vw, 36px); }
.cta-band__tel {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-on-accent);
  text-decoration: none;
  letter-spacing: .06em;
}
.cta-band__tel:hover { color: var(--c-on-accent); text-decoration: underline; }

/* --- Cards --------------------------------------------------------------- */

.card { background: var(--c-surface-card); padding: var(--pad-card); }
.card--flat { background: var(--c-surface-card-2); }
.card__meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text-7);
}
.card__tick { width: 38px; height: 4px; background: var(--c-accent); margin-bottom: 16px; }

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-grid-sm);
}
.grid-auto--wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--gap-grid); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap-grid-lg); align-items: start; }

/* --- Utilities ----------------------------------------------------------- */

.pre-line { white-space: pre-line; }
.mono { font-family: var(--f-mono); }
.measure-sm { max-width: 52ch; }
.grayscale { filter: grayscale(.4); }
.grayscale--soft { filter: grayscale(.25); }

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

[id] { scroll-margin-top: var(--scroll-offset); }

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