:root {
  --ink: #1d2a36;
  --muted: #64707b;
  --line: #e7eaee;
  --paper: #ffffff;
  --soft: #f5f7f8;
  --yellow: #efd53b;
  --yellow-dark: #c8ad13;
  --green: #2f7d5b;
  --shadow: 0 20px 55px rgba(29, 42, 54, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 84px;
  display: flex;
  align-items: stretch;
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  width: min(360px, 34vw);
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  background: var(--yellow);
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  position: relative;
  width: 62px;
  height: 54px;
  flex: 0 0 62px;
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 1px;
  width: 42px;
  height: 42px;
  border-left: 3px solid var(--ink);
  border-top: 3px solid var(--ink);
  transform: rotate(45deg);
  border-radius: 2px;
}

.brand-icon::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 9px;
  bottom: 0;
  height: 36px;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.brand-text {
  font-weight: 900;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.05;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(18px, 3vw, 54px);
  padding: 0 clamp(24px, 4vw, 72px);
}

.nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.92rem;
  letter-spacing: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--yellow);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  margin: auto 16px auto auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--paper);
}

.hero {
  position: relative;
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/osiedle-sielanka.jpg");
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.74) 42%, rgba(29, 42, 54, 0.18)),
    linear-gradient(180deg, rgba(239, 213, 59, 0.18), rgba(47, 125, 91, 0.12));
}

.hero-content {
  width: min(1120px, calc(100% - 40px));
  padding: clamp(54px, 9vw, 110px) 0;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 5.6rem);
  line-height: 1.02;
}

.hero-content p:not(.eyebrow) {
  max-width: 610px;
  margin: 24px 0 0;
  color: #3f4a53;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(29, 42, 54, 0.18);
}

.button.primary {
  background: var(--yellow);
  color: var(--ink);
}

.button.secondary {
  background: var(--ink);
  color: var(--paper);
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.intro-grid article,
.document-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 35px rgba(29, 42, 54, 0.06);
}

.intro-grid article {
  padding: 28px;
}

.intro-grid h3,
.document-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.intro-grid p,
.split p,
.join p,
address,
.footer {
  color: var(--muted);
}

.news {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - 1120px) / 2));
  padding-right: max(20px, calc((100% - 1120px) / 2));
  background: var(--soft);
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-item:hover,
.news-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.news-item time {
  color: var(--green);
  font-weight: 800;
}

.news-item > span {
  display: grid;
  gap: 6px;
}

.news-item > span strong {
  font-weight: 800;
}

.news-item small {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.48;
}

.news-item > strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(239, 213, 59, 0.28);
  color: #6d5c00;
  font-size: 0.78rem;
}

.news-item.highlight {
  border-color: rgba(239, 213, 59, 0.7);
}

.split,
.join,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
}

.document-card {
  padding: 28px;
}

.file-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}

.file-list a:hover,
.file-list a:focus-visible {
  background: rgba(239, 213, 59, 0.34);
}

.join {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100% - 1120px) / 2));
  padding-right: max(20px, calc((100% - 1120px) / 2));
  background: linear-gradient(135deg, var(--ink), #263948);
}

.join h2,
.join .eyebrow,
.join-content p {
  color: var(--paper);
}

.join .eyebrow {
  color: var(--yellow);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #d8dde2;
  border-radius: var(--radius);
  padding: 12px 13px;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

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

.form-note a {
  color: var(--ink);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-grid {
  align-items: stretch;
}

.contact iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

address {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 30px;
  border-left: 8px solid var(--yellow);
  background: var(--soft);
  font-style: normal;
}

address strong {
  color: var(--ink);
  font-size: 1.35rem;
}

address a {
  color: var(--ink);
  font-weight: 800;
  text-decoration-color: var(--yellow-dark);
  text-decoration-thickness: 2px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px max(20px, calc((100% - 1120px) / 2));
  background: var(--ink);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 940px) {
  .site-header {
    min-height: 72px;
  }

  .brand {
    width: auto;
    min-width: 0;
    padding: 12px 18px;
  }

  .brand-icon {
    width: 48px;
    height: 42px;
    flex-basis: 48px;
  }

  .brand-icon::before {
    left: 7px;
    width: 32px;
    height: 32px;
  }

  .brand-icon::after {
    left: 10px;
    right: 7px;
    height: 28px;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    background: var(--ink);
  }

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

  .nav a {
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero {
    min-height: calc(100vh - 72px);
  }

  .intro-grid,
  .split,
  .join,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand {
    gap: 12px;
  }

  .brand-icon {
    width: 42px;
    height: 38px;
    flex-basis: 42px;
  }

  .brand-icon::before {
    left: 7px;
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .brand-icon::after {
    left: 9px;
    right: 7px;
    height: 25px;
    border-width: 2px;
  }

  .brand-text {
    font-size: 1.02rem;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82) 58%, rgba(29, 42, 54, 0.18)),
      linear-gradient(180deg, rgba(239, 213, 59, 0.18), rgba(47, 125, 91, 0.12));
  }

  .hero-content {
    width: min(100% - 30px, 1120px);
  }

  .hero-actions,
  .footer {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .section {
    width: min(100% - 30px, 1120px);
  }

  .news {
    padding-left: 15px;
    padding-right: 15px;
  }

  .news-item {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }

  .news-item > span {
    grid-column: 1 / -1;
  }

  .contact iframe {
    min-height: 280px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
