/* =============================================================
   ICDF — Фонд розвитку міжнародної співпраці
   Design system v2 — світлий, чистий, м'які градієнти.
   Бренд: #5A7D3D (оливково-зелений) + теплі похідні відтінки.
   Type: Inter (заголовки) + Onest (текст), self-hosted у /assets/fonts.
   ============================================================= */

/* ---------- 0. FONTS (self-hosted) ----------
   Inter і Onest лежать локально в /assets/fonts — жодного запиту до
   fonts.googleapis.com/fonts.gstatic.com, тож IP відвідувача нікуди
   не витікає, а CSS не блокується стороннім доменом.
   Файли — варіативні (одна вага-вісь на підмножину), тому 400/500/600/700
   для Inter і 300–700 для Onest беруться з того самого woff2.
   unicode-range розділяє latin / cyrillic: браузер тягне лише ті
   підмножини, які реально зустрілися на сторінці.
   Ліцензія шрифтів — SIL OFL 1.1, див. /assets/fonts/OFL.txt. */

/* Inter — latin */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") 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;
}

/* Inter — latin-ext */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — cyrillic */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Inter — cyrillic-ext */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* Onest — latin */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/onest-latin.woff2") 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;
}

/* Onest — latin-ext */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Onest — cyrillic */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Onest — cyrillic-ext */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/onest-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---------- 1. TOKENS ---------- */
:root {
  /* нейтральні */
  --paper:      #ffffff;   /* фон сторінки */
  --surface:    #F4F7F0;   /* база карток-фіч */
  --surface-2:  #EAF0E1;   /* вкладений світлий фон */
  --dark:       #191B15;   /* темна секція / мокапи */
  --dark-2:     #25281F;   /* темна картка (вкладена) */
  --dark-3:     #3C4233;
  --ink:        #12170D;   /* заголовки */
  --text:       #1E2617;   /* основний текст */
  --muted:      #55604A;   /* другорядний текст */
  --faint:      #8A9280;   /* приглушений текст */
  --line:       #E8ECE1;   /* межі */
  --line-strong:#D4DAC8;

  /* бренд #5A7D3D + похідні */
  --brand:        #5A7D3D;
  --brand-deep:   #47632F;
  --brand-bright: #7FA84F;
  --brand-light:  #A9CE77;
  --brand-pale:   #EDF3E2;
  --gold:         #E0B44C;  /* теплий супровідний */
  --sand:         #F4EFD6;

  --on-dark:       #F4F6F0;
  --on-dark-muted: rgba(244, 246, 240, 0.66);
  --line-on-dark:  rgba(255, 255, 255, 0.14);

  /* градієнти */
  --grad-cta:     linear-gradient(90deg, #BCDE8B, #7FA84F);
  --grad-eyebrow: linear-gradient(90deg, #C99F35, #8FAE4E, #5A7D3D);
  --grad-number:  linear-gradient(100deg, #D3EBA4, #8FBE5C);

  /* типографіка */
  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Onest замість DM Sans: та сама геометрія, але з повною кирилицею */
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* сітка й ритм: єдиний відступ 120px між блоками */
  --container: 1200px;
  --gutter: 24px;
  --section-y: clamp(64px, 6vw, 88px);

  /* радіуси (єдина шкала) */
  --radius-btn: 14px;    /* кнопки / селектори / інпути */
  --radius-card: 20px;   /* картки-фічі */
  --radius-media: 24px;  /* фото / мокапи */
  --radius-panel: 32px;  /* великі контейнери */
  --radius-pill: 10000px;

  /* тіні */
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
  --shadow-pill: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 10px 22px rgba(0, 0, 0, 0.18);
  --shadow-hero: 0 30px 70px rgba(58, 77, 29, 0.18);

  /* motion — м'яка крива без різкої зупинки в кінці */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 450ms var(--ease);
}

/* ---------- 2. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Перша зупинка Tab. Поза фокусом винесена за екран, а не прихована
   display:none — інакше вона б і у фокус не потрапила. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand-deep);
  border-radius: var(--radius-btn);
  transition: top var(--t);
}
.skip-link:focus { top: 12px; }

/* Заголовок, потрібний для структури сторінки, але зайвий у макеті:
   лишається для читачів екрана й пошуковиків, з екрана прибраний. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 3. TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

/* Стеля 44px — та сама, що в банері головної (.hero-top h1 нижче).
   Доти внутрішні сторінки доростали до 54px і поруч із головною
   виглядали крупнішими без причини. Нижня межа лишається 36px, тож на
   телефоні розмір заголовків не змінився. */
h1 { font-size: clamp(36px, 4.4vw, 44px); }
h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.28; }
h3 { font-size: clamp(18px, 1.4vw, 20px); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

p { text-wrap: pretty; }

.lead {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 56ch;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
}
/* на темній панелі — світлий відтінок бренду */
.process-panel .eyebrow { color: var(--brand-light); }
/* на світло-зеленій панелі базовий --brand дає 4.07:1 при потрібних 4.5:1
   для 12px — беремо темніший відтінок того самого кольору (5.8:1). */
.capacity-panel .eyebrow { color: var(--brand-deep); }

/* ---------- 4. LAYOUT PRIMITIVES ---------- */
/* Ритм Sonarum: кожен блок несе лише нижній відступ 120px,
   тож відстань між будь-якими сусідніми блоками завжди однакова. */
/* main > article — сторінки новини й проєкту загорнуті в <article>,
   без цього селектора вони лишалися без бічних відступів контейнера. */
main > section,
main > article,
.home-hero,
.page-hero,
.about-hero,
.cta-band {
  padding-block: 0 var(--section-y);
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}
/* верх і низ банера рівні — той самий 120px ритм, що й скрізь на сторінці */
.home-hero, .page-hero, .about-hero { padding-top: var(--section-y); }

/* 900px — щоб довгі заголовки секцій лягали у два рядки, а не в три.
   Абзац під заголовком лишається вужчим заради довжини рядка. */
.section-heading { max-width: 900px; margin-bottom: clamp(36px, 4vw, 56px); }
.section-heading.center { margin-inline: auto; text-align: center; }
.section-heading p:not(.eyebrow) {
  margin-top: 16px;
  max-width: 720px;
  color: var(--faint);
  font-size: 1.125rem;
  line-height: 1.5;
}
.section-heading.center p:not(.eyebrow) { margin-inline: auto; }

/* ---------- 5. BUTTONS ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  /* Градієнт має відлічуватися від border-box. Інакше він розмічається
     по padding-box, а фарбується по border-box — і під прозорою 1px
     рамкою браузер повторює плитку, лишаючи темну смужку зліва. */
  background-origin: border-box;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t),
              color var(--t), border-color var(--t), filter var(--t);
}
.button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.button:active { transform: translateY(1px); }

/* первинна градієнтна — фірмовий зелений, темний текст */
.button-accent,
.footer-contact-btn {
  /* background-image, а не скорочене background: скорочення скидало б
     background-origin: border-box із базового правила. */
  background-image: var(--grad-cta);
  color: var(--ink);
}
.button-accent:hover,
.footer-contact-btn:hover { transform: scale(1.04); }

/* первинна темна */
.button-ghost {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.button-ghost:hover { transform: scale(1.04); }

/* вторинна — біла з межею */
.button-outline {
  /* background-color, а не скорочене background — інакше скидається
     background-origin: border-box, і при наведенні градієнт лишає
     смужку під рамкою. */
  background-color: var(--paper);
  color: var(--ink);
  border-color: var(--line-strong);
}
.button-outline:hover {
  background-image: var(--grad-cta);
  border-color: transparent;
}

/* ---------- 6. HEADER (скляний, sticky) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px max(var(--gutter), calc((100% - var(--container)) / 2));
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform var(--t), box-shadow var(--t),
              padding var(--t), background var(--t);
}
.site-header.header-hidden { transform: translateY(-102%); }
/* при скролі хедер стискається і стає щільнішим */
.site-header.scrolled {
  padding-block: 7px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 24px -12px rgba(14, 20, 10, 0.14);
}

.brand { display: flex; align-items: center; gap: 12px; }
/* Емблема без назви — назва поруч набирається текстом, щоб перекладалась.
   align-self: stretch тягне знак рівно на висоту текстового блоку. */
.brand-mark {
  display: block;
  height: 44px;
  aspect-ratio: 762 / 872;
  flex: 0 0 auto;
  color: var(--brand);
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand > span { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.brand strong {
  max-width: 19ch;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--brand-deep);
}
.brand small {
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  transition: background var(--t), color var(--t);
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.active { color: var(--ink); background: var(--surface-2); }

.header-right { display: flex; align-items: center; gap: 10px; }

/* усі елементи хедера — висота 36px, radius 14px */

/* перемикач мов (Google Translate) */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.lang-toggle:hover { border-color: var(--ink); background: var(--surface); }

/* гамбургер (mobile) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: transparent;
}
.nav-toggle span {
  position: relative;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute; left: 0;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.site-header.nav-open .nav-toggle span { background: transparent; }
.site-header.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 7. HOME HERO (світлий банер з анімованим градієнтом) ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
/* crossfade A↔B, 12s — теплий ↔ зелений.
   Еліпс тягнеться до країв екрану, а лінійний шар зверху гарантовано
   розчиняє низ у чистий білий — жодної видимої межі бути не може. */
.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.home-hero::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 45%, #ffffff 92%),
    radial-gradient(ellipse 140% 120% at 50% -20%, #D9E8AC 0%, #F4EFD6 45%, #F4F3E8 100%);
}
.home-hero::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 45%, #ffffff 92%),
    radial-gradient(ellipse 140% 120% at 50% -20%, #F0DCA2 0%, #DCE8C0 45%, #F0F2E6 100%);
  opacity: 0;
  animation: heroCrossfade 12s ease-in-out infinite;
}
@keyframes heroCrossfade {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.hero-top, .hero-figure { position: relative; z-index: 1; }

/* компактний банер: текст стовпчиком зліва, фото справа */
.hero-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.hero-headline { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
/* У заголовку — офіційна назва організації: довша за гасло, тож
   кегль менший, ніж у типового H1. */
.hero-top h1 { font-size: clamp(30px, 3.3vw, 44px); }
/* Підзаголовок — гасло фонду, тому помітніше за звичайний lead. */
.hero-headline .lead {
  max-width: 30ch;
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--brand-deep);
}

/* бейдж-пігулка над H1 */
.hero-org {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--muted);
}
.hero-org::before { content: "✦"; color: var(--brand); font-size: 13px; }

.hero-top h1 { color: var(--ink); }
.hero-top h1 .accent {
  background: linear-gradient(90deg, var(--brand-bright), var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* вхід банера: stagger fade-up */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero-org,
.hero-headline h1,
.hero-headline .lead,
.hero-actions,
.hero-figure { animation: fadeUp 700ms var(--ease) both; }
.hero-headline h1 { animation-delay: 90ms; }
.hero-headline .lead { animation-delay: 180ms; }
.hero-actions       { animation-delay: 270ms; }
.hero-figure        { animation-delay: 360ms; }

.hero-figure {
  margin: 0;
  border-radius: var(--radius-media);
  overflow: hidden;
  box-shadow: var(--shadow-hero);
}
.hero-figure img {
  width: 100%;
  height: clamp(280px, 30vw, 400px);
  object-fit: cover;
}

/* ---------- 10. FOCUS MAP (географія) ---------- */
.focus-map h2 { color: var(--ink); }
/* карта України без картки-контейнера — просто зображення, по центру */
.map-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin-inline: auto;
}
.map-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
/* мітка-піна: біле кільце + брендова крапка, з тінню */
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(18, 23, 13, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-pin::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- 11. CARDS GRID (напрями — картки-фічі з radial-градієнтами) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cards-grid article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  min-height: 300px;
  padding: 26px;
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 50% 0%, #F0DCA2 0%, #F4EFD6 30%, var(--surface) 60%, var(--surface) 100%);
  overflow: hidden;
}
.cards-grid article:nth-child(2) {
  background: radial-gradient(circle at 50% 0%, #D9E8AC 0%, #EFEFD2 30%, var(--surface) 60%, var(--surface) 100%);
}
.cards-grid article:nth-child(3) {
  background: radial-gradient(circle at 50% 0%, #E9E2AE 0%, #DCE8C0 30%, var(--surface) 60%, var(--surface) 100%);
}
.cards-grid h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.cards-grid p { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* ---------- 12. PROCESS (як ми працюємо — темна панель) ---------- */
.process-panel {
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--radius-panel);
  padding: clamp(36px, 5vw, 64px);
}
.process-panel .section-heading { margin-bottom: clamp(28px, 3vw, 44px); }
.process-panel h2 { color: #fff; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: clamp(28px, 3vw, 44px);
}
.process-grid article { display: flex; flex-direction: column; gap: 10px; }
.process-grid span {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(169, 206, 119, 0.14);
  color: var(--brand-light);
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
}
.process-grid h3 { color: #fff; font-size: 20px; font-weight: 600; }
.process-grid p { color: var(--on-dark-muted); font-size: 15px; line-height: 1.45; }
/* Кнопка під темною панеллю — той самий контур, що й «Усі новини»,
   але вивернутий під темний фон: прозорий усередині, світла рамка. */
.process-panel .button-outline {
  background-color: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.28);
}
.process-panel .button-outline:hover {
  background-image: var(--grad-cta);
  color: var(--ink);
  border-color: transparent;
}

/* ---------- Правова інформація: реквізити й політики ---------- */
.legal-page { display: flex; flex-direction: column; }
/* Та сама ширина колонки, що й на сторінці документа звітності: сторінка
   з реквізитами й політиками читається так само підряд, а не проглядається
   сіткою, тож на всю ширину контейнера рядок стає задовгим. */
.legal-inner {
  max-width: 900px;
  margin-inline: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 36px);
}
.legal-reg {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface-2);
  border-radius: var(--radius-card);
}
.legal-reg h2 { font-size: clamp(24px, 2.2vw, 30px); margin-bottom: 16px; }
.legal-reg p { margin-bottom: 10px; color: var(--text); line-height: 1.6; }
.legal-reg-name { font-weight: 600; color: var(--ink); }
.legal-codes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; }
.legal-codes li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.legal-codes span { color: var(--muted); }
.legal-codes b { color: var(--ink); }
.legal-policies-heading { font-size: clamp(24px, 2.2vw, 30px); }

.policy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.policy {
  background: var(--brand-pale);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.policy summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  color: var(--ink);
}
.policy summary::-webkit-details-marker { display: none; }
.policy-title { flex: 1 1 260px; font-weight: 500; }
/* Стрілка, а не підпис: назва політики вже каже, що всередині, а кнопка
   «Дізнатись більше» поруч із нею читалася як окреме посилання. Стрілка
   лишається частиною summary — кнопка всередині клікабельного заголовка
   дала б вкладену інтерактивність. Розвертається, коли картку розкрито. */
.policy-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-deep);
  transition: background-color var(--t), transform var(--t);
}
.policy-toggle svg { width: 18px; height: 18px; }
.policy summary:hover .policy-toggle { background: var(--brand-light); }
.policy[open] .policy-toggle { transform: rotate(180deg); }
.policy-body { padding: 0 22px 22px; display: grid; gap: 16px; }
.policy-body p { color: var(--text); line-height: 1.7; max-width: 62ch; }
.policy-doc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 18px;
  background: #fff;
  border-radius: var(--radius-btn);
  font-weight: 600;
  color: var(--ink);
}
.policy-viewer {
  width: 100%;
  height: min(70vh, 760px);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: #fff;
}
@media (max-width: 600px) {
  /* На телефоні вбудований переглядач PDF майже нечитабельний —
     лишаємо кнопку «Відкрити», вона віддає документ на весь екран. */
  .policy-viewer { display: none; }
}

/* ---------- сторінка одного документа звітності ---------- */
/* Бокові відступи <article> задає загальне правило main > article —
   тут лише вертикальні. Ширину колонки обмежує вкладений .doc-inner:
   max-width на самій <article> віднімався б від тих бокових відступів,
   і що ширший екран, то вужчою ставала б колонка. */
.doc-page {
  padding-block: clamp(28px, 4vw, 48px) var(--section-y);
}
.doc-inner {
  max-width: 900px;
  margin-inline: auto;
}
.doc-page h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
}
.doc-date {
  display: block;
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--muted);
}
/* Смуга з назвою файлу й кнопкою — та сама пара «що це» / «забрати
   собі», що й у переліку, але тут вона над самим документом. */
.doc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: clamp(22px, 3vw, 32px);
  padding: 18px 22px;
  background: var(--brand-pale);
  border-radius: var(--radius-card);
}
.doc-bar-name {
  font-weight: 600;
  color: var(--ink);
  /* Довга офіційна назва не має виштовхувати кнопку за край смуги. */
  flex: 1 1 260px;
  min-width: 0;
}
.doc-viewer {
  display: block;
  width: 100%;
  height: min(85vh, 1000px);
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: #fff;
}
/* Запасний шлях показуємо лише там, де переглядача немає (нижче). */
.doc-fallback { display: none; }
/* Переглядач ширший за текстову колонку. Ліворуч у ньому панель
   мініатюр сторінок, яка забирає близько сорока відсотків ширини, —
   у колонці на 900px самому документу лишалося менше півтисячі
   пікселів і масштаб близько 50%.
   Розсуваємо його від'ємними полями до ширини контейнера сайту, і лише
   там, де для цього справді є місце: 1200px контейнера плюс два відступи
   по краях. Нижче цієї межі переглядач лишається в колонці. Обраховувати
   через 100vw не можна — у неї входить смуга прокрутки, і на межі
   зʼявлявся б горизонтальний скрол. */
@media (min-width: 1264px) {
  .policy-viewer,
  .doc-viewer {
    width: var(--container);
    margin-inline: calc((900px - var(--container)) / 2);
  }
}

@media (max-width: 700px) {
  /* На телефоні вбудований переглядач PDF або показує саму лише першу
     сторінку без прокрутки, або лишає сіру пляму на пів екрана — тож
     замість нього даємо посилання, яке відкриє документ на весь екран
     засобами самого пристрою. */
  .doc-viewer { display: none; }
  .doc-fallback {
    display: block;
    margin-top: 16px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--muted);
  }
  .doc-fallback a {
    font-weight: 600;
    color: var(--brand-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* документи звітності — картка з обкладинкою */
.report-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  /* auto-fill: два звіти не розтягуються на всю ширину сітки */
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}
/* Картка — колонка на всю висоту ряду, щоб сусідні картки з різними за
   довжиною назвами лишалися однакового зросту. */
.report-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.report-open {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.report-cover {
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--surface-2);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  transition: border-color var(--t), transform var(--t);
}
.report-cover img {
  width: 100%;
  height: 100%;
  /* Обкладинка — скан документа: показуємо його верх, а не середину */
  object-fit: cover;
  object-position: top center;
}
.report-open:hover .report-cover,
.report-open:focus-visible .report-cover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.report-grid h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  transition: color var(--t);
}
.report-open:hover h2 { color: var(--brand-deep); }
.report-grid time { font-size: 14px; color: var(--muted); }

/* Обкладинка-заглушка. Показується, коли обкладинки в CMS немає: інакше
   на її місці лишався б порожній сірий прямокутник на пів картки.
   Це не зображення, а верстка — рік і назва підставляються з тих самих
   полів картки, тож заглушка не застаріває, важить нуль байтів і не
   вимагає від клієнта графічного редактора. Шаблон один на всі звіти:
   ряд заглушок читається як серія, а не як набір різних картинок. */
.report-cover-blank {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(14px, 1.8vw, 20px);
  border-color: transparent;
  color: var(--on-dark);
  /* Світлова пляма згори-зліва поверх фірмового градієнта — щоб площина
     не читалася як суцільна заливка. */
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, 0.22), transparent 60%),
    linear-gradient(115deg, var(--brand-deep), var(--brand) 52%, var(--brand-bright));
}
/* У горизонтальному форматі висоти мало, тож блок ділиться на два рядки:
   службовий угорі (хто і що це) і змістовий унизу (рік і назва). */
.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rc-body {
  display: flex;
  align-items: baseline;
  gap: 12px;
  /* Притискає пару «рік + назва» до низу незалежно від того, чи рік є:
     у документа без дати й без року в назві його не буде взагалі. */
  margin-top: auto;
  min-width: 0;
}
.rc-org {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.78);
}
.rc-year {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
/* Назви звітів офіційні й довгі — обрізаємо двома рядками, повна назва
   стоїть під обкладинкою заголовком картки. */
.rc-title {
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-mark {
  flex: 0 0 auto;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.report-note {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--muted);
}
/* Коли списку ще немає, примітка лишається сама — тоді вона по центру. */
.report-note:first-child {
  margin-top: 0;
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
}

/* ---------- 15. PARTNERS (marquee, безкінечна прокрутка) ---------- */
.partners-section .section-heading { margin-bottom: 16px; }
.partner-marquee {
  overflow: hidden;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
/* Статичний рядок замість стрічки, поки партнерів мало (див. index.njk). */
.partner-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px clamp(24px, 5vw, 64px);
}
.partner-track {
  display: flex;
  width: max-content;
  gap: 16px;
  animation: marquee 64s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Без картки-підкладки: знаки йдуть просто по фону секції. */
.partner-logo-card {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 200px;
  padding: 18px 20px;
  color: var(--ink);
  filter: grayscale(1);
  opacity: 0.7;
}
.partner-logo-card svg { width: 100%; height: auto; max-height: 48px; }
.partner-logo-card img { max-width: 100%; max-height: 44px; width: auto; height: auto; object-fit: contain; }
/* Логотип із заповненою адресою стає посиланням. Уся картка приглушена
   й знебарвлена — при наведенні на посилання повертаємо колір, щоб було
   видно, що воно клікабельне. */
.partner-logo-link { display: grid; place-items: center; width: 100%; }
.partner-logo-card:has(.partner-logo-link:hover),
.partner-logo-card:has(.partner-logo-link:focus-visible) { filter: none; opacity: 1; }
.partner-detail-mark .partner-logo-link { transition: transform var(--t); }
.partner-detail-mark .partner-logo-link:hover,
.partner-detail-mark .partner-logo-link:focus-visible { transform: scale(1.04); }
/* На сторінці партнерів картка сама по собі нічого не робить, тож на
   наведення відгукується вся вона — інакше незрозуміло, що логотип
   можна натиснути. Партнер без адреси сайту лишається нерухомим. */
.partner-detail-card:has(.partner-logo-link:hover),
.partner-detail-card:has(.partner-logo-link:focus-visible) {
  border-color: var(--brand);
  box-shadow: var(--shadow-card);
}

/* окрема сторінка /partnery/ — повнокольорові картки з назвою й описом */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
/* Назви партнера в картці немає — її несе сам логотип, тож картка
   тримає однакову висоту через min-height, а знак стоїть по центру. */
.partner-detail-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 148px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.partner-detail-mark { display: grid; place-items: center; color: var(--ink); }
.partner-detail-mark svg { width: 100%; height: auto; max-height: 48px; }
.partner-detail-mark img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.partner-logo-text { font-size: 13px; font-weight: 600; text-align: center; color: var(--muted); }
.partners-note {
  max-width: 80ch;
  margin: clamp(28px, 4vw, 44px) auto 0;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
  line-height: 1.5;
}
.partner-detail-card p { color: var(--muted); font-size: 15px; }

/* ---------- 16. NEWS ---------- */
.news-mini-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-mini-grid article,
.news-grid article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 22px;
}
.news-img-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  background:
    radial-gradient(70% 70% at 30% 20%, rgba(169, 206, 119, 0.28), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--line);
}
.news-mini-grid span,
.news-grid span { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: 0.02em; }
.news-mini-grid h3,
.news-grid h3 { font-size: 18px; line-height: 1.3; }
.news-mini-grid a:last-child,
.news-grid a:last-child {
  /* Самостійне посилання картки, а не слово в реченні, тож на нього
     поширюється мінімальний розмір цілі: 14px тексту дають 22px висоти,
     padding доводить до 24px без зміни кегля й ритму картки. */
  margin-top: auto;
  align-self: flex-start;
  padding-block: 3px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: color var(--t);
}
.news-mini-grid a:last-child:hover,
.news-grid a:last-child:hover { color: var(--brand); }

.news-card-media { display: block; border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 16 / 9; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; }

.news-all-wrap { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }

/* стаття новини */
.news-article { display: flex; flex-direction: column; }
.news-article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius-media);
  margin-bottom: clamp(24px, 3vw, 36px);
}
/* Колонка тексту вужча за обкладинку, тож без центрування праворуч
   лишалася порожнеча на пів екрана. */
.news-article-body { max-width: 720px; margin-inline: auto; }
.news-article-body p { margin-bottom: 18px; color: var(--text); font-size: 17px; line-height: 1.7; }

.news-more .section-heading { margin-bottom: clamp(28px, 3vw, 40px); }

/* ---------- Сторінка проєкту ---------- */
.project-article { display: flex; flex-direction: column; }
.project-article-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 520px;
  object-fit: contain;
  background: var(--surface);
  border-radius: var(--radius-media);
  margin-bottom: clamp(24px, 3vw, 36px);
}
.project-article-body { max-width: 720px; margin-inline: auto; }
.project-article-body p { margin-bottom: 18px; color: var(--text); font-size: 17px; line-height: 1.7; }
.project-article-body h2 { font-size: 24px; margin: 28px 0 12px; color: var(--ink); }
.project-article-body h3 { font-size: 19px; margin: 22px 0 10px; color: var(--ink); }
.project-article-body ul,
.project-article-body ol { margin: 0 0 18px 22px; color: var(--text); font-size: 17px; line-height: 1.7; }
.project-article-body li { margin-bottom: 8px; }
.project-more .section-heading { margin-bottom: clamp(28px, 3vw, 40px); }

/* ---------- Напрями: назва + знімок ----------
   Спільний компонент головної та сторінки «Проєкти». */
.focus-photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1vw, 12px);
}
.focus-photos article { display: flex; }
/* Уся картка — посилання на свою групу проєктів. */
.focus-photos a { display: block; width: 100%; }
/* якір ураховує липкий хедер, щоб заголовок групи не ховався під ним */
[id="gumanitarne"], [id="cyfrova"], [id="energetyka"], [id="viyskova"] { scroll-margin-top: 90px; }

.focus-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-media);
  background: var(--surface-2);
}
.focus-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 900ms var(--ease);
}
/* Підпис лежить на знімку. Градієнтна підкладка знизу тримає контраст
   білого тексту незалежно від того, що на фото. */
.focus-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 38px 18px 18px;
  /* Стан спокою — легке нейтральне затемнення. */
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.42) 22%,
    rgba(0, 0, 0, 0.66) 50%,
    rgba(0, 0, 0, 0.76) 100%);
  text-align: left;
}
/* Фірмовий зелений проявляється поверх чорного при наведенні —
   градієнти самі не анімуються, тож це окремий шар з opacity. */
.focus-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t);
  background: linear-gradient(180deg,
    rgba(26, 43, 14, 0) 0%,
    rgba(26, 43, 14, 0.6) 20%,
    rgba(26, 43, 14, 0.9) 46%,
    rgba(26, 43, 14, 0.97) 100%);
}
.focus-photos a:hover .focus-overlay::before,
.focus-photos a:focus-visible .focus-overlay::before { opacity: 1; }
.focus-overlay h3,
.focus-overlay .focus-cta { position: relative; z-index: 1; }
.focus-overlay h3 {
  font-size: clamp(17px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
/* Кнопка з'являється при наведенні: розгортаємо max-height, а не
   display, щоб перехід був плавним. */
.focus-cta {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  font-size: clamp(14px, 1.1vw, 15.5px);
  font-weight: 600;
  color: var(--brand-light);
  transition: max-height 620ms var(--ease),
              opacity 520ms var(--ease),
              margin-top 620ms var(--ease);
}
.focus-photos a:hover .focus-cta,
.focus-photos a:focus-visible .focus-cta {
  max-height: 44px;
  opacity: 1;
  margin-top: 8px;
}
.focus-photos a:hover .focus-photo img { transform: scale(1.06); }
/* На сенсорних екранах наведення немає — показуємо кнопку одразу. */
@media (hover: none) {
  .focus-cta { max-height: 44px; opacity: 1; margin-top: 8px; }
}
@media (max-width: 900px) {
  .focus-photos { grid-template-columns: repeat(2, 1fr); }
  .focus-photos h3 { min-height: 0; }
}
@media (max-width: 520px) {
  .focus-photos { grid-template-columns: 1fr; }
}

/* ---------- Реєстраційні дані: тонка стрічка над хедером ----------
   Стрічка в загальному потоці, тож при скролі йде вгору, а липкий
   хедер лишається зверху. */
.reg-strip {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}
.reg-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 28px;
  margin: 0;
  padding: 7px 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
}
.reg-strip li { white-space: nowrap; }
.reg-strip span { opacity: 0.75; }
.reg-strip b {
  font-weight: 600;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .reg-strip ul { gap: 4px 16px; font-size: 11px; }
  .reg-strip li { white-space: normal; }
}

/* ---------- 17. CTA BAND (фірмовий градієнт) ---------- */
.cta-band { background: var(--paper); }
.cta-band > div {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px);
  border-radius: var(--radius-panel);
  background: linear-gradient(60deg, #ffffff 0%, rgba(188, 222, 139, 0.92) 30%, #E9F2D8 65%, rgba(127, 168, 79, 0.92) 100%);
}
.cta-band h2 { color: var(--ink); max-width: 28ch; }
.cta-band .button { align-self: center; }
.cta-band .button-accent {
  background: var(--dark);
  color: #fff;
}

/* ---------- 18. PAGE HEROES (внутрішні сторінки — світлий банер) ---------- */
.page-hero,
.about-hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
/* Еліпс до країв екрану + лінійне розчинення низу в чистий білий. */
.page-hero::before,
.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 45%, #ffffff 92%),
    radial-gradient(ellipse 140% 120% at 50% -20%, #D9E8AC 0%, #F4EFD6 45%, #F4F3E8 100%);
}
.page-hero > *,
.about-hero > * { position: relative; z-index: 1; }

/* Банери внутрішніх сторінок — текст по центру. */
.page-hero { text-align: center; }
.page-hero h1 { color: var(--ink); max-width: 26ch; margin-inline: auto; }
.page-hero .lead { color: var(--muted); margin-top: 18px; max-width: 62ch; margin-inline: auto; }
.page-hero .hero-actions { margin-top: 28px; justify-content: center; }
.page-hero .hero-actions:empty { display: none; }

.about-hero {
  display: grid;
  /* Банер широкоформатний (≈2.2:1): йде зверху на всю ширину екрана,
     під ним центрований заголовок. У колонці збоку кроп зрізав би
     крайні прапори, зокрема США.
     Бічні відступи знято з секції й перенесено на текстовий блок —
     так зображення виходить за межі контейнера, а текст лишається в ньому. */
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  padding-inline: 0;
  padding-top: 0;
}
.about-hero > div {
  text-align: center;
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}
/* На широких екранах заголовок лягає на нижню частину банера — там
   зображення майже біле (яскравість 240-255), тож темний текст читкий.
   Нижче 900px банер закороткий для накладання, тому текст іде під ним. */
@media (min-width: 900px) {
  .about-hero { gap: 0; }
  .about-hero img { grid-area: 1 / 1; }
  .about-hero > div {
    grid-area: 1 / 1;
    align-self: end;
    padding-top: clamp(40px, 7vw, 96px);
    padding-bottom: clamp(56px, 8.5vw, 128px);
    /* Світла підкладка з плавним згасанням угору: тримає контраст тексту
       незалежно від того, яке зображення підставлять через CMS. */
    background: linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.72) 16%,
      rgba(255, 255, 255, 0.8) 45%,
      rgba(255, 255, 255, 0.92) 100%);
  }
  /* Мітка — найдрібніший текст на банері, тож бере темніший відтінок
     бренду: світлий зелений на зеленкуватому глобусі давав 2.6:1. */
  .about-hero .eyebrow { color: var(--brand-deep); }
}
.about-hero h1 { color: var(--ink); max-width: 24ch; margin-inline: auto; }
.about-hero .lead {
  color: var(--muted);
  margin: 18px auto 0;
  max-width: 62ch;
}
.about-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- 19. ABOUT PAGE BLOCKS ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.about-note {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px;
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--radius-panel);
  position: sticky;
  top: 96px;
}
/* h2, а не h3: це верхній рівень вмісту сторінки, під h1 не було
   проміжного заголовка. Вигляд лишається той самий. */
.about-note h2 { color: var(--brand-light); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.about-note h2:not(:first-child) { margin-top: 14px; }
.about-note p { color: var(--on-dark-muted); font-size: 15px; }
.about-copy { display: flex; flex-direction: column; gap: 20px; }
.about-copy p { color: var(--text); font-size: 16px; }

/* Врізка-твердження всередині тексту «Про нас» */
.story-highlight {
  font-family: var(--font-head);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  padding-left: 20px;
  border-left: 3px solid var(--brand);
}

/* ---------- Інституційна спроможність ---------- */
.capacity-panel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: clamp(28px, 5vw, 56px);
}
.capacity-intro,
.capacity-note {
  max-width: 78ch;
  margin-inline: auto;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}
.capacity-intro { margin-bottom: clamp(24px, 3vw, 36px); }
.capacity-note { margin-top: clamp(24px, 3vw, 36px); }
.capacity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.capacity-grid article {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 22px 18px 52px;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.capacity-grid article::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 21px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-light);
}
/* Пункт — одне речення клієнта: іменникова частина жирна, пояснення
   тонке, обидві в одному рядку, щоб речення не розривалося. */
.capacity-grid p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.capacity-grid strong { color: var(--text); font-weight: 600; }
/* Перша літера завжди велика — машинний переклад подекуди повертає малу,
   і так це не залежить від мови й від чергового прогону перекладу. */
.capacity-grid p::first-letter { text-transform: uppercase; }
.capacity-list-intro {
  max-width: 78ch;
  margin: 0 auto clamp(18px, 2.5vw, 26px);
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  font-size: 16px;
}
@media (max-width: 700px) {
  .capacity-grid { grid-template-columns: 1fr; }
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  counter-reset: principle;
}
.principles-grid article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  counter-increment: principle;
  position: relative;
}
.principles-grid article::before {
  content: "0" counter(principle);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.principles-grid p { color: var(--muted); font-size: 15px; }

/* До п'яти нагород у ряд. Flex замість grid, щоб неповний ряд
   (зараз їх чотири) стояв по центру, а не тулився ліворуч. */
.awards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.awards-grid > * { flex: 0 1 calc(20% - 16px); }
@media (max-width: 1100px) { .awards-grid > * { flex-basis: calc(33.333% - 14px); } }
@media (max-width: 760px)  { .awards-grid > * { flex-basis: calc(50% - 10px); } }
@media (max-width: 460px)  { .awards-grid > * { flex-basis: 100%; } }
.award-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
}
.award-card img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}
.award-card figcaption {
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- 20. GENERIC GRIDS (команда / проєкти / контакти) ---------- */

/* --- Team leads row (2 founders) --- */
.team-leads {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 48px;
}
/* Картка засновника горизонтальна: фото зліва, текст справа. Фото
   тягнеться на всю висоту картки, а картки в ряду вирівнюються по
   найвищій, тож обидва знімки виходять однакові. */
.team-leads article {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.team-leads .team-photo {
  flex: 0 0 44%;
  width: 44%;
  aspect-ratio: auto;
}
.team-leads .team-lead-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px;
}
/* Роль засновника — це фактично заголовок картки, тож помітніша за
   решту тексту. */
.team-leads .team-lead-body > h3 { font-size: 19px; }
.team-leads .team-lead-body > span {
  color: var(--brand-deep);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}
.team-leads h3 { color: var(--ink); }
.team-leads p { color: var(--muted); font-size: 15px; }
@media (max-width: 700px) {
  .team-leads { grid-template-columns: 1fr; }
  .team-leads article { flex-direction: column; min-height: 0; }
  .team-leads .team-photo { flex: 0 0 auto; width: 100%; aspect-ratio: 1 / 1; }
  .team-leads .team-lead-body { justify-content: flex-start; }
}

/* --- Staff grid (4 columns) --- */
.team-grid--staff {
  grid-template-columns: repeat(4, 1fr);
}
/* Портрети співробітників трохи вищі за квадрат */
.team-grid--staff .team-photo { aspect-ratio: 4 / 5; }
@media (max-width: 900px) {
  .team-grid--staff { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .team-grid--staff { grid-template-columns: 1fr; }
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 18px;
}
.team-grid article {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0 0 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.team-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--surface-2);
}
/* object-position: top — портрети кадруються від верху, щоб квадратний
   кроп ніколи не зрізав голову на знімках у повний зріст */
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
/* h2, а не h3: рівень заголовка в розмітці підвищили заради структури
   сторінки, а це правило лишилося зі старим селектором — і імʼя стояло
   впритул до краю картки, тоді як посада під ним мала відступ 26px. */
.team-grid > article > span,
.team-grid > article > h2,
.team-grid > article > p { margin-inline: 26px; }
.team-grid > article > h2 { margin-top: 18px; }
.team-grid > article > span { color: var(--brand-deep); font-size: 14px; font-weight: 600; line-height: 1.4; }
/* Рівень заголовка підвищено заради структури сторінки, а кегль
   лишається h3-івський — вигляд карток не змінюється. */
.team-grid h2,
.team-lead-body h2 {
  font-size: clamp(18px, 1.4vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- сторінка політики: суцільний офіційний текст ---------- */
/* Окремий клас, а не .policy-body: той належить розкривним карткам
   політик на сторінці правової інформації й має власні відступи. */
.legal-text {
  display: grid;
  gap: 26px;
  /* Колонка вужча за контейнер, тож без цього вона тулилася до лівого
     краю, а праворуч лишалася широка порожнеча. */
  margin-inline: auto;
  /* Рядок довжиною в книжкову сторінку: юридичний текст читають підряд,
     а не проглядають, і на всю ширину контейнера око губить рядок. */
  max-width: 74ch;
}
.legal-text p {
  color: var(--text);
  line-height: 1.75;
}
.policy-meta {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--muted);
}
/* Назва частини — єдиний рівень, що ділить документ навпіл, тож помітно
   більший за назви розділів усередині. */
.policy-part {
  margin-top: 12px;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.policy-part:first-of-type { margin-top: 0; }
.policy-section { display: grid; gap: 8px; }
.policy-section h2,
.policy-section h3 {
  font-size: clamp(16.5px, 1.3vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.team-grid h2 { color: var(--ink); }
.team-grid p { color: var(--muted); font-size: 15px; }
.project-list {
  display: grid;
  gap: 14px;
}
/* auto-fill, а не auto-fit: auto-fit схлопує порожні колонки, тож
   єдиний проєкт у напрямі розтягувався на всю ширину сітки й
   виглядав інакше за решту. Тепер картка тримає свою колонку. */
.project-list { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.project-list > * {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: background-color var(--t), border-color var(--t);
}
/* Наведення на картку — той самий світлий фон, що й в активного пункта
   меню; рамка зливається з фоном, тож картка виглядає суцільною. */
.project-list > *:hover,
.project-list > *:focus-within {
  background: var(--surface-2);
  border-color: var(--surface-2);
}
/* Фото проєктів — колажі різних пропорцій: від вузьких смуг 3:1 до
   вертикальних 2:3. Обрізка по 16:9 різала половину колажу, тож
   вписуємо картинку цілком у сталу рамку. */
.project-media {
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.project-media img { width: 100%; height: 100%; object-fit: contain; }
.project-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 26px 26px; }
.project-body span { font-size: 13px; font-weight: 600; color: var(--brand); letter-spacing: 0.02em; }
.project-body h3 { font-size: 18px; line-height: 1.3; }
.project-body p { color: var(--muted); font-size: 15px; }
/* кнопка притискається до низу картки, щоб у ряді вони стояли на одній лінії.
   Власних відступів не додаємо — вони збили б текст із центру кнопки. */
.project-more-link { align-self: flex-start; margin-top: auto; }
/* Тіло картки розтягується на вільну висоту, тож кнопка з margin-top:auto
   стає рівно біля нижнього краю — у ряді вони на одній лінії. */
.project-list > * .project-body { flex: 1 1 auto; }
.project-list > * .project-more-link { margin-top: auto; }
.project-list > * .project-body p { margin-bottom: 8px; }

/* Сторінка «Контакти та зворотній зв'язок» — дві колонки:
   контакти ліворуч, форма праворуч. */
.contacts-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
/* Колонки грід-контейнера за замовчуванням не стискаються менше за
   свій вміст — без цього широкий select тягне сітку за межі екрана. */
.contacts-layout > * { min-width: 0; }
.contacts-layout h2 { font-size: clamp(22px, 2vw, 26px); margin-bottom: 20px; }
@media (max-width: 900px) {
  .contacts-layout { grid-template-columns: 1fr; }
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
/* Без плашки: рядки контактів розділені тонкою лінією. */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  transition: color var(--t);
}
.contact-card:first-child { padding-top: 0; }
.contact-card:last-child { border-bottom: 0; }
.contact-card:hover strong,
.contact-card:focus-visible strong { color: var(--brand-deep); }
/* --muted, а не --faint: на 12,5px приглушений сірий давав контраст 3.2:1
   при потрібних 4.5:1 — підпис «Email/Телефон/Адреса» не проходив WCAG AA. */
.contact-card span {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card strong {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (max-width: 900px) { .contact-cards { grid-template-columns: 1fr; } }

/* форма зворотного зв'язку (/zvyazatis-z-nami/) */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 620px;
  margin-inline: auto;
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.form-row input,
.form-row select,
.form-row textarea {
  /* width/min-width обовʼязкові: у select власна внутрішня ширина від
     найдовшого пункту, і без цього він розпирає колонку на вузьких
     екранах разом із горизонтальним скролом сторінки. */
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  transition: border-color var(--t);
}
/* Стрілка списку. Нативну прибираємо свідомо: браузер малює її впритул
   до рамки й ігнорує наш padding — поле випадало з ритму форми, де в усіх
   інших полях текст починається за 16px від краю. Малюємо свою тим самим
   приглушеним кольором і на тому ж відступі. Фон data: дозволений CSP
   (img-src 'self' data:), зовнішній файл не потрібен. */
.form-row select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355604A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  /* Місце під стрілку: інакше довгий пункт заповзає просто під неї. */
  padding-right: 44px;
  /* На вузьких екранах найдовша причина звернення не вміщається. Без
     цього браузер ріже її просто посеред літери; так само обрізає, але
     ставить трикрапку — видно, що текст продовжується. */
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
/* Firefox лишає пункти списку з власним темним тлом, коли поле у фокусі —
   без цього обраний пункт читається білим по синьому. */
.form-row select option { color: var(--text); background: #fff; }

/* Індикатор фокуса лишається таким самим, як на решті сайту (3px),
   інакше поля форми — єдине місце, де клавіатурник його майже не бачить. */
.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible {
  border-color: var(--brand);
}
.form-row textarea { resize: vertical; }
.form-row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row-pair { grid-template-columns: 1fr; } }
.feedback-form .button { align-self: flex-start; }
/* Пастка для ботів — прибрана з потоку, але не display:none,
   бо частина ботів такі поля ігнорує. */
/* Підпис під формою: показується лише в <noscript> на сторінці контактів. */
.form-note { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.form-note a { font-weight: 600; color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }

.form-honeypot {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-error {
  font-size: 14.5px;
  line-height: 1.5;
  color: #8A2A22;
}
.form-error[hidden] { display: none; }
.form-error a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Модальне вікно (підтвердження надсилання) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 15, 9, 0.55);
  opacity: 0;
  transition: opacity var(--t);
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.in { opacity: 1; }
.modal {
  width: min(440px, 100%);
  padding: 32px 30px 28px;
  background: #fff;
  border-radius: var(--radius-panel);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform var(--t);
}
.modal-backdrop.in .modal { transform: none; }
.modal-mark {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-pale);
  color: var(--brand-deep);
}
.modal h2 { font-size: clamp(22px, 2.2vw, 26px); margin-bottom: 10px; }
.modal p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin-bottom: 24px; }

/* сторінка «Політика» (/polityka/) */
.policy-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin-bottom: 24px;
}
.policy-body h2 { margin-bottom: 8px; }
.policy-body p { color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ---------- 21. FOOTER (темний, з wordmark і mesh-блобами) ---------- */
.footer-big {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark-muted);
  padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
}
/* mesh-блоби */
.footer-big::before,
.footer-big::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}
.footer-big::before {
  left: -8%;
  bottom: -20%;
  background: var(--brand);
  opacity: 0.16;
  animation: blobFloat 9s ease-in-out infinite alternate;
}
.footer-big::after {
  right: -6%;
  top: -10%;
  background: var(--gold);
  opacity: 0.08;
  animation: blobFloat 11s ease-in-out infinite alternate-reverse;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.12); }
}
.footer-big > * { position: relative; z-index: 1; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.footer-brand-mark {
  display: block;
  height: 62px;
  aspect-ratio: 762 / 872;
  flex: 0 0 auto;
  color: var(--brand-light);
}
.footer-brand-mark svg { width: 100%; height: 100%; display: block; }
/* У лого голубка вирізана наскрізь, тож на темному підвалі вона показує
   тло і губиться. CSS-властивість fill перекриває атрибут у самому SVG,
   тому герб тут світлішає, а колір клієнта в шапці лишається як є. */
.footer-brand-mark svg path { fill: var(--brand-light); }
.footer-brand-name { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; max-width: 19ch; }
.footer-brand-name small { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--brand-light); }
.footer-brand-name strong { font-size: 13.5px; font-weight: 700; letter-spacing: 0.01em; color: #fff; }
.footer-nav-cols { display: flex; gap: 48px; }
.footer-nav-col { display: flex; flex-direction: column; gap: 12px; }
/* padding, а не більший кегль: висота цілі росте з 23px до вимог
   WCAG 2.2 (24x24), а вертикальний ритм колонки не змінюється. */
.footer-nav-col a { display: inline-block; padding-block: 3px; font-size: 15px; color: var(--on-dark-muted); transition: color var(--t); }
.footer-nav-col a:hover { color: var(--brand-light); }

.footer-contacts { display: flex; flex-direction: column; gap: 16px; }
.footer-contact-row { display: flex; flex-direction: column; gap: 3px; }
.footer-contact-row span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.4); }
.footer-contact-row a { display: inline-block; padding-block: 3px; font-size: 15px; font-weight: 500; color: #fff; transition: color var(--t); }
.footer-contact-row a:hover { color: var(--brand-light); }

.footer-cta-col { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-social-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.4); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  transition: background var(--t), color var(--t), transform var(--t);
}
.footer-socials a:hover { background: var(--brand-light); color: var(--ink); transform: translateY(-2px); }
/* Заглушка — той самий кружечок, але приглушений і без реакції. */
.footer-socials .is-placeholder {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  cursor: default;
}
.footer-contact-btn { margin-top: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
}
.footer-bottom span { font-size: 13px; color: rgba(255, 255, 255, 0.45); }

/* Посилання на політики в нижньому рядку футера. Окремою групою, а не в
   загальному меню: це не розділи сайту, а обовʼязкові правові документи,
   і вони мають бути на кожній сторінці. */
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 13px;
}
.footer-legal-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t);
}
.footer-legal-links a:hover { color: var(--on-dark); }

/* згода на обробку даних під формою */
.form-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}
.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex: none;
}
.form-consent label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}
.form-consent a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.form-consent a:hover { color: var(--ink); }

/* ---------- Плаваючі кнопки месенджерів ---------- */
/* Праворуч знизу, над контентом. Смуга згоди на cookie теж стоїть унизу,
   тому скрипт у base.njk піднімає док на її висоту, поки вона видима —
   інакше вони накладаються на телефоні. */
.chat-dock {
  position: fixed;
  right: clamp(14px, 3vw, 26px);
  bottom: clamp(14px, 3vw, 26px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-dock-btn {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 6px 20px rgba(18, 23, 13, 0.22);
  transition: transform var(--t), box-shadow var(--t);
}
.chat-dock-btn:hover,
.chat-dock-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(18, 23, 13, 0.3); }
.chat-dock-btn.is-viber { background: #7360F2; }
.chat-dock-btn.is-whatsapp { background: #25D366; }
@media print { .chat-dock { display: none; } }

/* ---------- 22. SCROLL REVEAL ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 23. RESPONSIVE ---------- */
/* Ущільнюємо меню раніше: назви пунктів за ТЗ довгі, і при звичайних
   відступах рядок не вміщається вже на 1280px. */
/* Вісім пунктів меню за ТЗ — рядок ущільнюється, перш ніж піти в бургер. */
@media (max-width: 1560px) {
  .brand small { display: none; }
}
@media (max-width: 1400px) {
  /* :not(.brand-mark) — сама емблема теж <span>, її ховати не можна. */
  .brand > span:not(.brand-mark) { display: none; }
  .nav a { padding: 8px 8px; font-size: 13.5px; }
  .nav { gap: 0; }
}

/* Пункти меню за ТЗ довгі («Юридична інформація та політики»), тож
   рядок перестає вміщатися раніше — бургер вмикаємо з 1240px. */
@media (max-width: 1240px) {
  :root { --section-y: clamp(40px, 7vw, 64px); }

  .nav-toggle { display: inline-flex; order: 3; }
  .site-header { flex-wrap: wrap; gap: 10px; }
  .brand { margin-right: auto; }

  .header-right { order: 2; display: flex; flex-direction: row; align-items: center; gap: 8px; }

  .nav {
    order: 4;
    flex-basis: 100%;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 6px 0 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .site-header.nav-open .nav { display: flex; }
  /* Без JS кнопка-бургер нічим не керує, і меню лишалося б недосяжним —
     тож показуємо його одразу списком, а саму кнопку ховаємо. Клас js
     ставить скрипт у base.njk, тому :not(.js) — це «скрипт не виконався»:
     і коли його вимкнули, і коли корпоративний фільтр його вирізав. */
  html:not(.js) .nav { display: flex; }
  html:not(.js) .nav-toggle { display: none; }
  .site-header.nav-open { box-shadow: var(--shadow-card); }
  .nav a { padding: 13px 14px; font-size: 16px; border-radius: 12px; }
  .site-header.header-hidden { transform: none; }

  .hero-top { grid-template-columns: 1fr; gap: 28px; }
  .hero-headline .lead { max-width: 60ch; }
  .about-hero,
  .about-layout,
  .cta-band > div { grid-template-columns: 1fr; }
  .about-note { position: static; }
  .cards-grid,
  .news-mini-grid,
  .news-grid,
  .partners-grid,
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px 40px; }
  .footer-cta-col { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  /* Нижня межа 44px, а не 32px: відступ під заголовком секції — 36px,
     і при 32-35px відстань МІЖ секціями ставала меншою за відстань
     ВСЕРЕДИНІ секції. Око читало це як зліплені блоки. */
  :root { --section-y: clamp(44px, 9vw, 48px); --radius-panel: 24px; }

  .brand strong { font-size: 13px; }
  .cards-grid,
  .news-mini-grid,
  .news-grid,
  .partners-grid,
  .process-grid { grid-template-columns: 1fr; }
  .cards-grid article { min-height: 240px; }
  .partner-logo-card { width: 160px; padding: 14px 16px; }

  .footer-top { grid-template-columns: 1fr; gap: 34px; }
  .footer-cta-col { grid-column: auto; }
  .footer-nav-cols { gap: 40px; }
  .footer-bottom { flex-direction: column; }
  .hero-actions .button { width: 100%; }
}

/* ---------- 24. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .site-header.header-hidden { transform: none; }
}

/* ---------- 24. COOKIE BAR ---------- */
.cookie-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(760px, calc(100vw - 32px));
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
  transition: transform var(--t), opacity var(--t);
}
/* display: flex вище за браузерне [hidden] { display: none }, тож
   ховаємо явно — інакше смуга лишалася б на екрані після згоди. */
.cookie-bar[hidden] { display: none; }
.cookie-bar.in { transform: translate(-50%, 0); opacity: 1; }
.cookie-bar p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.cookie-bar a { font-weight: 600; color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar .button { flex: 0 0 auto; }
@media (max-width: 620px) {
  .cookie-bar { flex-direction: column; align-items: stretch; gap: 12px; text-align: left; }
  .cookie-bar .button { width: 100%; }
}
