/* ── Ogrody Działkowe Montinowiec – Garden-inspired theme ── */

:root {
  --bg: #f4f1e8;
  --surface: #fffdf7;
  --surface-muted: #e8e2d2;
  --text: #2c2e1f;
  --muted: #6b6e55;
  --line: #cfc8b4;
  --green: #3d7a2a;
  --green-dark: #2a5a1c;
  --green-light: #6aad4a;
  --green-pale: #d4e6c8;
  --brown: #7a5c3a;
  --brown-dark: #5a3e22;
  --brown-light: #a8885c;
  --earth: #c4a96a;
  --blue: #3a7a8a;
  --amber: #b8782a;
  --alert: #943228;
  --shadow: 0 8px 24px rgba(44, 46, 31, 0.1);
  --radius: 10px;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
}

/* Subtle garden texture on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233d7a2a' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

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

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

code {
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
  background: #e8e2d2;
  color: #3a3c2f;
  font-size: 0.9em;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-150%);
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
}
.skip-link:focus { transform: translateY(0); }

/* ── Header ── */
.site-header {
  background: linear-gradient(180deg, #f9f6ee 0%, var(--bg) 100%);
  border-bottom: 3px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Decorative leaf bar under header */
.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--green-light) 0px,
    var(--green-light) 20px,
    transparent 20px,
    transparent 24px
  );
  opacity: 0.4;
}

.header-inner {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border: 2px solid var(--green-light);
  box-shadow: 0 2px 8px rgba(61, 122, 42, 0.3);
}

.brand-text {
  display: grid;
  line-height: 1.2;
  font-size: 0.9rem;
  font-family: var(--font-heading);
}

.brand-text strong {
  font-size: 1.15rem;
  color: var(--green-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.site-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-family: var(--font-heading);
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

/* ── Eyebrow ── */
.eyebrow {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-heading);
}

/* ── Hero sections ── */
.page-hero {
  padding: 4rem 0;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}

.page-hero--compact { padding: 3.4rem 0; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: end;
}

.hero-grid h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  font-weight: 760;
  font-family: var(--font-heading);
  color: var(--green-dark);
}

.hero-grid .lead {
  max-width: 720px;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-note {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow);
}

.hero-note span {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.hero-note strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--brown-dark);
}

.hero-note p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-with-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 2rem;
  align-items: center;
}

.hero-photo {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
}

/* ── Sections ── */
.section { padding: 3.5rem 0; }
.section--plain { background: var(--surface); }
.section--muted {
  background: var(--surface-muted);
  border-block: 1px solid var(--line);
}

.section-heading { margin-bottom: 1.5rem; }

.section-heading h2,
.callout h2,
.maintainer-note h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  font-family: var(--font-heading);
  color: var(--green-dark);
}

.section-heading p,
.callout p {
  max-width: 760px;
  margin: 0.65rem 0 0;
  color: var(--muted);
}

/* ── Content grid ── */
.content-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
}

.toc {
  position: sticky;
  top: 110px;
  align-self: start;
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--green);
  background: #f5f3ea;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-heading);
}

.toc a { padding: 0.3rem 0; text-decoration: none; }
.toc a:hover { color: var(--green); }

.prose { max-width: 820px; }
.prose h2, .prose h3 { line-height: 1.2; font-family: var(--font-heading); }
.prose > :first-child { margin-top: 0; }

/* ── Notice / Announcement cards ── */
.notice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.notice,
.document-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.notice:hover,
.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(44, 46, 31, 0.14);
}

.notice { padding: 1.1rem; }

.notice--important {
  border-top: 4px solid var(--alert);
  border-left: 4px solid var(--alert);
}

.notice-meta,
.document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: var(--font-heading);
}

.notice-meta span,
.document-meta span {
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

.notice h2,
.notice h3,
.document-card h4 {
  margin: 0.65rem 0 0.45rem;
  font-size: 1.2rem;
  line-height: 1.2;
  font-family: var(--font-heading);
  color: var(--green-dark);
}

.notice p,
.document-card p {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 1rem;
}

/* ── Buttons ── */
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 22px;
  border: 2px solid var(--green-dark);
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-heading);
  transition: background 0.2s, transform 0.15s;
}

.button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.button--small { min-height: 36px; font-size: 0.92rem; padding: 0.4rem 0.8rem; }

.button--muted {
  border-color: var(--line);
  background: #e8e2d2;
  color: var(--muted);
}

.text-link {
  font-weight: 700;
  color: var(--green);
}
.text-link:hover { color: var(--brown); }

/* ── Callout ── */
.callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ── Document sections ── */
.document-sections {
  display: grid;
  gap: 2rem;
}

.document-group { display: grid; gap: 1rem; }

.document-group-heading {
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--green-light);
}

.document-group-heading h3 {
  margin: 0;
  font-size: 1.35rem;
  font-family: var(--font-heading);
  color: var(--green-dark);
}

.document-list { display: grid; gap: 0.8rem; }

.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-left: 3px solid var(--green-light);
}

.document-action { display: flex; justify-content: flex-end; }

.maintainer-note {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.maintainer-note ol { margin: 0; padding-left: 1.25rem; }

/* ── Feature grid (homepage cards) ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  min-height: 190px;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--green);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(44, 46, 31, 0.13);
}

.feature-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  color: var(--green-dark);
}

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

/* ── Hero with parallax background ── */
.hero-parallax {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(42, 90, 28, 0.85) 0%,
    rgba(90, 62, 34, 0.75) 50%,
    rgba(42, 90, 28, 0.8) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-parallax h1 {
  color: #f5f1e6;
  font-family: var(--font-heading);
}

.hero-parallax .lead,
.hero-parallax .eyebrow { color: #f5f1e6; }

.hero-parallax .eyebrow { color: var(--green-light); }
.hero-parallax .lead { color: #d8d2c3; }

.hero-parallax .button {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}

.hero-parallax .button:hover {
  background: rgba(255,255,255,0.28);
}

/* ── Map section ── */
.map-wrapper {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  overflow: hidden;
}

.map-wrapper img {
  width: 100%;
  border-radius: 6px;
}

/* ── Footer ── */
.site-footer {
  padding: 2.5rem 0;
  background: linear-gradient(180deg, #2a3a1e 0%, #1e2a14 100%);
  color: #f5f1e6;
  position: relative;
}

/* Decorative top border */
.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--green-light), var(--earth), var(--green-light), var(--green));
}

.site-footer p { margin: 0.35rem 0 0; color: #c4bfa8; }

.site-footer code { background: #3a4a2e; color: #d4d0b8; }

.site-footer strong { color: var(--green-light); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .header-inner, .callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav { justify-content: flex-start; }

  .hero-grid,
  .hero-with-image,
  .content-grid,
  .maintainer-note,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc { position: static; }

  .notice-list,
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-card { grid-template-columns: 1fr; }
  .document-action { justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { width: min(100% - 24px, 1120px); }

  .page-hero,
  .page-hero--compact,
  .section { padding-block: 2.4rem; }

  .site-nav a { padding-inline: 0.55rem; }

  .notice-list,
  .feature-grid { grid-template-columns: 1fr; }
}
