:root {
  --ink: #141416;
  --text: #2b2d31;
  --muted: #5d6168;
  --line: #e3e5e8;
  --bg: #ffffff;
  --soft: #f4f6f3;
  --green: #5f830f;
  --green-bright: #8fc516;
  --blue: #0088cb;
  --radius: 10px;
  --wrap: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--green); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 100; }

/* ---------- top bar & header ---------- */
.topbar { background: var(--ink); color: #cfd2d6; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; margin-left: 18px; }
.topbar a:hover { color: var(--green-bright); }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 78px; }
.brand img { width: 110px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; border-radius: 6px; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--green); }
.main-nav .sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.main-nav .sub a { font-weight: 500; padding: 8px 12px; }
.main-nav .sub a:hover { background: var(--soft); }
.main-nav li:hover > .sub, .main-nav li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.nav-toggle, .burger { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; border: 2px solid var(--ink);
  color: var(--ink); background: #fff; text-decoration: none; font-weight: 600; line-height: 1.2;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-cta { background: var(--green-bright); border-color: var(--green-bright); color: var(--ink); }
.btn-cta:hover { background: var(--green); border-color: var(--green); color: #fff; }
.header-cta { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* ---------- sections ---------- */
.band { padding: 56px 0; }
.band + .band:not(.band-bg) { padding-top: 0; }
.band-bg {
  background-size: cover; background-position: center; position: relative; color: #fff;
  padding: 90px 0;
}
.band-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,12,14,.82), rgba(10,12,14,.45)); }
.band-bg > .wrap { position: relative; }
.band-bg .prose, .band-bg .prose h1, .band-bg .prose h2, .band-bg .prose h3, .band-bg .prose h4, .band-bg .prose h5, .band-bg .prose h6 { color: #fff; }
.band-bg a:not(.btn) { color: #fff; }
.band-bg .btn:not(.btn-cta) { background: transparent; color: #fff; border-color: #fff; }
.band-bg .btn:not(.btn-cta):hover { background: #fff; color: var(--ink); }
.band-image { min-height: 260px; }
.band-image::before { background: rgba(10,12,14,.15); }
.hero { padding: 120px 0; min-height: 420px; display: flex; align-items: center; }
.hero > .wrap { width: 100%; }

.page-head { background: var(--soft); padding: 48px 0; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0 0 8px; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.page-head p { margin: 0; color: var(--muted); max-width: 680px; }
.page-head time { color: var(--muted); }
.back { display: inline-block; margin-bottom: 12px; text-decoration: none; font-weight: 600; }

/* ---------- prose ---------- */
.prose { max-width: 860px; }
.prose + .prose { margin-top: 8px; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--ink); line-height: 1.2; margin: 1.4em 0 .5em; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.prose h3 { font-size: 1.4rem; }
.prose h4 { font-size: 1.25rem; }
.prose h5 { font-size: 1.15rem; }
.prose h6 { font-size: 1.05rem; }
.prose p { margin: 0 0 .9em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose strong { color: inherit; }

/* ---------- images ---------- */
.gallery { display: grid; gap: 18px; margin: 28px 0; align-items: center; }
.gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); margin: 0 auto; }

/* ---------- blog ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--green-bright); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.card a { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card time { color: var(--muted); font-size: .85rem; }
.card h3 { margin: 6px 0 8px; color: var(--ink); font-size: 1.15rem; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.post-body .band { padding: 40px 0 0; }
.post-body .wrap { max-width: 860px; }
.post-body .gallery img { max-height: 620px; width: auto; }

/* ---------- form ---------- */
.contact-form { max-width: 680px; display: grid; gap: 14px; margin: 28px 0; background: var(--soft); padding: 26px; border-radius: var(--radius); color: var(--text); }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact-form input, .contact-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #cdd1d5; border-radius: 8px; background: #fff; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--green-bright); border-color: transparent; }
.contact-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.contact-form .consent input { width: auto; margin-top: 4px; }
.contact-form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c4c7cc; margin-top: 64px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--green-bright); }
.footer-logo { background: #fff; border-radius: 8px; padding: 6px; margin-bottom: 12px; }
.badge { background: #fff; border-radius: 8px; padding: 6px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #2c2e33; padding-top: 18px; padding-bottom: 22px; font-size: .85rem; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .header-cta { display: none; }
  .burger { display: flex; flex-direction: column; gap: 5px; margin-left: auto; cursor: pointer; padding: 10px; }
  .burger span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); max-height: calc(100vh - 110px); overflow-y: auto; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; padding: 8px 16px 20px; }
  .main-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; min-width: 0; }
  .main-nav .sub a { padding: 6px 12px; color: var(--muted); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .topbar .wrap > span:first-child { display: none; }
  .topbar a { margin: 0 14px 0 0; }
  .band { padding: 40px 0; }
  .band-bg { padding: 60px 0; }
  .hero { padding: 80px 0; min-height: 320px; }
  .gallery.cols-2, .gallery.cols-3 { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- fixes ---------- */
.gallery > * { min-width: 0; }
.gallery img { width: auto; max-width: 100%; }
.gallery.cols-1 img { max-height: 640px; }
.hero .prose > :first-child { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; letter-spacing: .02em; }
.band-bg .prose > h1:first-child, .band-bg .prose > h2:first-child, .band-bg .prose > h5:first-child, .band-bg .prose > h6:first-child { font-size: clamp(1.6rem, 4vw, 2.4rem); }
