/* ЕКО-ДІМ — холдингова компанія. One stylesheet, no build step. */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/rubik-cyrillic.woff2?v=1") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/rubik-latin.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-cyrillic.woff2?v=1") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/open-sans-latin.woff2?v=1") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --green: #68982c;
  --green-deep: #4f7720;
  --green-soft: #f3f7ec;
  --orange: #ff8f03;
  --orange-deep: #c15f00;
  --ink: #14141c;
  --ink-2: #1d1d27;
  --text: #4a4a52;
  --muted: #6b6b73;
  --line: #e6e6e1;
  --bg: #ffffff;
  --sidebar: 300px;
  --radius: 6px;
  --head: "Rubik", "Segoe UI", Arial, sans-serif;
  --body: "Open Sans", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 400 15px/1.7 var(--body);
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-weight: 300; font-size: clamp(30px, 4vw, 42px); }
h2 { font-weight: 400; font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-weight: 500; font-size: 18px; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Sidebar (desktop) / top bar (phones) ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  background: var(--green); color: #fff;
  display: flex; flex-direction: column;
  overflow-y: auto; scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.brand {
  display: block; padding: 34px 40px 28px; text-align: center; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.brand img { width: 150px; margin: 0 auto; }
.brand__sub {
  display: block; margin-top: 6px;
  font: 500 12px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase;
}
.nav-toggle { display: none; }
.nav { padding: 26px 0; flex: 1 0 auto; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul > li > a, .nav__row > a {
  display: block; padding: 9px 40px;
  font: 400 13px/1.4 var(--head); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"], .nav .is-section > .nav__row > a { font-weight: 500; }
.nav__row { display: flex; align-items: center; }
.nav__row > a { flex: 1; padding-right: 8px; }
.sub-toggle {
  width: 44px; height: 40px; margin-right: 22px; border: 0; background: transparent; color: #fff;
  cursor: pointer; border-radius: var(--radius); display: grid; place-items: center;
}
.sub-toggle:hover { background: rgba(255, 255, 255, .12); }
.sub-toggle span { width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.sub-toggle[aria-expanded="true"] span { transform: rotate(-135deg) translate(-2px, -2px); }
.nav .sub { display: none; padding: 2px 0 10px; }
.nav .sub.is-open { display: block; }
.nav .sub a {
  display: block; padding: 6px 30px 6px 56px; color: rgba(255, 255, 255, .92);
  font: 400 14px/1.4 var(--body); text-decoration: none; position: relative;
}
.nav .sub a::before { content: ""; position: absolute; left: 40px; top: 50%; width: 7px; height: 1px; background: currentColor; opacity: .7; }
.sidebar__contacts {
  padding: 22px 40px 30px; border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px; line-height: 1.6;
}
.sidebar__contacts a { color: #fff; }
.sidebar__contacts a:hover { color: var(--ink); }

/* ---------- Main column ---------- */
.page { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
.wrap { max-width: 980px; padding: 0 56px; }
.wrap--wide { max-width: 1160px; }

.page-head { padding: 64px 0 28px; }
.page-head h1 { margin-bottom: 12px; }
.crumbs { font: 400 12px/1.5 var(--head); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green-deep); text-decoration: underline; }
.crumbs .sep { margin: 0 8px; opacity: .6; }
.bar { display: block; width: 60px; height: 3px; background: var(--orange); margin-top: 22px; border-radius: 2px; }
.page-body { padding-top: 10px; padding-bottom: 80px; }
.lead { font-size: 16px; max-width: 720px; }

/* ---------- Document lists ---------- */
.docs-section + .docs-section { margin-top: 44px; }
.docs-section h2 { font-size: 20px; font-weight: 500; margin-bottom: 14px; }
.docs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ext {
  flex: 0 0 auto; width: 40px; padding: 3px 0; margin-top: 1px; border-radius: 4px;
  font: 600 10px/1.4 var(--head); letter-spacing: .04em; text-align: center; color: #fff; background: #b33a2b;
}
.ext--doc, .ext--docx, .ext--rtf { background: #2b5797; }
.ext--xml { background: #6b6b73; }
.ext--zip, .ext--p7s { background: #7a5a1f; }
.ext--jpg, .ext--png { background: var(--green-deep); }
.doc__body { flex: 1; min-width: 0; }
.doc__title { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.doc__title:hover { color: var(--green-deep); text-decoration: underline; }
.doc__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  display: inline-block; padding: 1px 9px; border: 1px solid var(--line); border-radius: 20px;
  font: 500 12px/1.6 var(--head); color: var(--green-deep); text-decoration: none; background: #fff;
}
.chip:hover { border-color: var(--green); background: var(--green-soft); color: var(--ink); }
.verify { margin-top: 26px; padding: 14px 18px; background: var(--green-soft); border-radius: var(--radius); font-size: 14px; }
.subhead { font: 500 15px/1.5 var(--head); color: var(--ink); margin: 30px 0 12px; }
.subhead:first-child { margin-top: 0; }
.gallery { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.gallery a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: #fff; }
.gallery a:hover { border-color: var(--green); }
.gallery img { height: 220px; width: auto; }

/* ---------- Section index cards (Акціонерам) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; height: 100%;
  padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--green); box-shadow: 0 8px 24px rgba(20, 20, 28, .08); color: var(--ink); }
.card__title { font: 400 17px/1.35 var(--head); }
.card__meta { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.card__meta::after { content: "→"; color: var(--orange-deep); font-size: 16px; }

/* ---------- Leadership ---------- */
.board { display: grid; gap: 34px; max-width: 760px; }
.board h2 { font-size: 20px; font-weight: 500; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.person__role { display: block; font: 500 12px/1.5 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--orange-deep); }
.person__name { font: 400 17px/1.45 var(--head); color: var(--ink); }
.person__note { color: var(--muted); font-size: 14px; }

/* ---------- News ---------- */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.news-item time, .post-meta { font: 400 13px/1.5 var(--head); color: var(--muted); }
.news-item h2 { font-size: 19px; font-weight: 400; margin: 4px 0 6px; }
.news-item h2 a { color: var(--ink); text-decoration: none; }
.news-item h2 a:hover { color: var(--green-deep); text-decoration: underline; }
.news-item p { margin: 0; color: var(--muted); font-size: 14px; }
.post-meta { margin-top: -2px; }
.post-banner { margin: 22px 0 28px; border-radius: var(--radius); max-width: 480px; }
.prose { max-width: 760px; overflow-wrap: break-word; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: 14px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
.back { display: inline-block; margin-top: 26px; font: 400 14px/1.5 var(--head); text-decoration: none; }
.back:hover { text-decoration: underline; }

/* ---------- Home ---------- */
.hero { position: relative; min-height: min(100vh, 900px); display: flex; align-items: center; color: #e9e9ee; overflow: hidden; background: var(--ink); }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 14, 22, .82) 0%, rgba(14, 14, 22, .62) 55%, rgba(14, 14, 22, .35) 100%); }
.hero__in { position: relative; z-index: 1; padding: 90px 56px; max-width: 860px; }
.hero h1 { color: #fff; margin-bottom: 0; }
.hero .bar { margin: 18px 0 34px; }
.hero h2 { color: #fff; font: 500 13px/1.4 var(--head); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }
.hero p { max-width: 640px; font-size: 15px; color: #dcdce3; margin-bottom: 26px; }

.history { padding: 90px 0; }
.history__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; max-width: 1160px; padding: 0 56px; }
.history__img { position: relative; }
.history__img::before { content: ""; position: absolute; inset: -16px 16px 16px -16px; border: 3px solid var(--orange); border-radius: 2px; }
.history__img::after { content: ""; position: absolute; right: -24px; bottom: -24px; width: 120px; height: 120px; background-image: radial-gradient(var(--line) 2px, transparent 2px); background-size: 12px 12px; z-index: -1; }
.history__img img { position: relative; border-radius: 2px; }
.history .bar { margin: 0 0 26px; }

.band { background: var(--orange); color: var(--ink); }
.band__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 56px; max-width: 1160px; }
.band h2 { color: var(--ink); font-size: 22px; font-weight: 400; margin: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 3px;
  font: 500 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  background: #fff; color: var(--ink); border: 1px solid #fff;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.home-news { padding: 90px 0 100px; }
.home-news .bar { margin: 0 0 34px; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.tile a { display: block; text-decoration: none; color: var(--ink); }
.tile img { border-radius: var(--radius); margin-bottom: 16px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tile h3 { font: 400 19px/1.35 var(--head); margin: 0 0 8px; }
.tile a:hover h3 { color: var(--green-deep); text-decoration: underline; }
.tile time { font: 400 13px/1.4 var(--head); color: var(--muted); }
.more { display: inline-block; margin-top: 34px; font: 500 14px/1.4 var(--head); color: var(--ink); text-decoration: none; }
.more span { color: var(--orange-deep); margin-left: 6px; }
.more:hover { color: var(--green-deep); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #b9b9c3; font-size: 14px; }
.footer__in { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: 56px; max-width: 1160px; }
.footer h2 { color: #fff; font: 500 13px/1.4 var(--head); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.footer a { color: #fff; }
.footer a:hover { color: var(--orange); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 6px; }
.footer address { font-style: normal; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 56px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__bottom a { text-decoration: none; }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; }

/* ---------- Tablets and phones: sidebar becomes a top bar ---------- */
@media (max-width: 1023px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: auto; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border: 0; text-align: left; }
  .brand img { width: 58px; margin: 0; }
  .brand__sub { margin: 0; font-size: 11px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 14px 0 auto; padding: 10px 14px; min-height: 44px;
    background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .45); border-radius: var(--radius);
    font: 500 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  }
  .nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__icon::before { top: -6px; }
  .nav-toggle__icon::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { display: none; width: 100%; padding: 6px 0 14px; border-top: 1px solid rgba(255, 255, 255, .18); max-height: calc(100vh - 84px); overflow-y: auto; }
  .nav.is-open { display: block; }
  .nav > ul > li > a, .nav__row > a { padding: 12px 20px; font-size: 14px; }
  .sub-toggle { margin-right: 8px; }
  .nav .sub a { padding: 10px 20px 10px 40px; font-size: 15px; }
  .nav .sub a::before { left: 22px; }
  .sidebar__contacts { display: none; }
  .page { margin-left: 0; min-height: 0; }
  .wrap, .hero__in, .history__grid, .band__in, .footer__in { padding-left: 24px; padding-right: 24px; }
  .footer__bottom { padding: 18px 24px; }
  .page-head { padding: 40px 0 20px; }
  .hero { min-height: 0; }
  .hero__in { padding-top: 64px; padding-bottom: 56px; }
  .history { padding: 64px 0; }
  .history__grid { grid-template-columns: 1fr; gap: 48px; }
  .history__img { max-width: 560px; margin: 0 16px; }
  .home-news { padding: 64px 0 72px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .footer__in { grid-template-columns: 1fr 1fr; padding-top: 44px; padding-bottom: 44px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .brand__sub { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .tile img { display: none; }
  .tile { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
  .footer__in { grid-template-columns: 1fr; gap: 28px; }
  .doc { gap: 12px; }
  .ext { width: 36px; }
  .gallery img { height: 170px; }
  .band__in { padding-top: 26px; padding-bottom: 26px; }
}

@media print {
  .sidebar, .footer, .skip { display: none !important; }
  .page { margin: 0; }
  a { color: inherit; }
}
