:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --ink: #14212b;
  --muted: #5a6a75;
  --line: #d5dee4;
  --accent: #0b6e4f;
  --accent-dark: #08553c;
  --accent-soft: #e3f2ec;
  --warm: #b45309;
  --focus: #0b6e4f;
  --shadow: 0 10px 30px rgba(20, 33, 43, 0.06);
  --radius: 10px;
  --max: 1100px;
  --header-h: 68px;
  --font-display: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(180deg, #e8eef1 0%, var(--bg) 220px),
    radial-gradient(ellipse at top right, rgba(11, 110, 79, 0.06), transparent 50%);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

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

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand span {
  font-size: 0.98rem;
  line-height: 1.15;
}

.brand small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 560;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.72rem 1.15rem;
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  padding-inline: 0.6rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Hero */
.hero {
  padding: 3.2rem 0 2.4rem;
}

.hero-visual {
  margin: 0 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d9e2e7;
  aspect-ratio: 16 / 7;
}

.hero-visual picture,
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
}

.media-frame {
  margin: 0.85rem 0 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e4ebef;
  aspect-ratio: 16 / 10;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.topic-card {
  display: grid;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  color: inherit;
}

.topic-card .thumb {
  aspect-ratio: 16 / 10;
  background: #e4ebef;
  overflow: hidden;
}

.topic-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card .body {
  padding: 0 1rem 1rem;
}

.topic-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  color: var(--ink);
}

.topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 750;
  max-width: 16ch;
}

.lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.meta-list li {
  display: grid;
  gap: 0.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}

.meta-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.meta-list strong {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sections */
.section {
  padding: 2.4rem 0;
}

.section-head {
  margin-bottom: 1.35rem;
  max-width: 60ch;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* Topic tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.tab-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.tab-panel p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.tab-panel p:last-child {
  margin-bottom: 0;
}

/* Feature list */
.feature-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: 1.35fr 0.85fr;
    align-items: end;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .topic-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 980px) {
  .topic-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .topic-gallery .topic-card:first-child {
    grid-column: span 2;
  }

  .topic-gallery .topic-card:first-child .thumb {
    aspect-ratio: 21 / 9;
  }
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.feature-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Accordion */
.accordion {
  display: grid;
  gap: 0.55rem;
}

.acc-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.95rem 1.05rem;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}

.acc-trigger::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
}

.acc-item[data-open="true"] .acc-trigger::after {
  content: "–";
}

.acc-panel {
  display: none;
  padding: 0 1.05rem 1.05rem;
  color: var(--muted);
}

.acc-item[data-open="true"] .acc-panel {
  display: block;
}

/* Details */
.expand-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
}

.expand-list summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.expand-list summary::-webkit-details-marker {
  display: none;
}

.expand-list summary::after {
  content: "rozwiń";
  float: right;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
}

.expand-list details[open] summary::after {
  content: "zwiń";
}

.expand-list details p {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1rem;
}

.address-block + .address-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.address-block h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.address-block p {
  margin: 0;
  color: var(--muted);
}

.hours {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 8px;
  color: var(--accent-dark);
  font-size: 0.92rem;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
  font-weight: 650;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

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

.form-success {
  display: none;
  margin-top: 0.85rem;
  padding: 0.8rem 0.9rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 8px;
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

/* Legal / content pages */
.page-hero {
  padding: 2.4rem 0 1rem;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}

.prose h2 {
  margin: 1.6rem 0 0.55rem;
  font-size: 1.2rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.2rem 0 0.4rem;
  font-size: 1.02rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.two-col {
  display: grid;
  gap: 1rem;
}

.job-list {
  display: grid;
  gap: 0.75rem;
}

.job {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.15rem;
}

.job h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.job .meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.65rem;
}

.job p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.job details {
  margin: 0 0 0.35rem;
}

.job summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--accent-dark);
}

.job details p {
  margin: 0.55rem 0 0;
}

.hero > .container > .hero-grid > div:first-child {
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero > .container > .hero-grid > div:first-child {
    animation: none;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 43, 0.45);
}

.modal-dialog {
  position: relative;
  width: min(100%, 480px);
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(20, 33, 43, 0.18);
}

.modal-dialog h2 {
  margin: 0 1.5rem 0.75rem 0;
  font-size: 1.2rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}

/* Cookie bar */
.cookie-bar {
  position: fixed;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 150;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  display: none;
  gap: 0.85rem;
  align-items: flex-start;
  max-width: 720px;
  margin-inline: auto;
}

.cookie-bar.is-visible {
  display: grid;
}

.cookie-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-settings {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.cookie-settings.is-open {
  display: block;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.cookie-option input {
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  background: #e6ebef;
  padding: 2rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.site-footer h2 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0.2rem;
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 861px) {
  .header-inner {
    position: relative;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .tab-btn {
    transition: none;
  }
}
