/* ============================================================
   Глобал Еко Ресурс — global styles & design tokens
   Tokens extracted from Figma (file: Argentum).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --bg-main: #0e0e0e;
  --bg-secondary: #191919;
  --bg-muted: #202020;
  --border-gray: #272727;
  --overlay-dark: rgba(14, 14, 14, 0.75);

  --white: #ffffff;
  --text-main: #ffffff;
  --text-secondary: #818181;
  --text-muted: #5d5d5d;
  --text-button-light: #f2f0ec;

  --accent: #ffe14d;            /* yellow brand accent */
  --accent-ink: #0e0e0e;        /* text on accent */
  --red: #ef4a4a;

  /* Typography */
  --font-base: "Montserrat", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-ui: "Inter", var(--font-base);

  --fz-h1: 32px;   /* heading-xl  / Medium / lh ~ 1.1 */
  --fz-h2: 24px;   /* heading-lg  / Medium / lh 36 */
  --fz-h3: 16px;   /* heading-md  / Medium / lh 24 */
  --fz-body: 14px; /* body-base   / Regular / lh 22 */
  --fz-cap: 12px;  /* caption-sm  / Light  */

  --lh-body: 22px;
  --lh-h2: 36px;
  --lh-h3: 24px;

  /* Spacing */
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 40px;          /* Padding/XL */
  --gutter: clamp(20px, 6vw, 100px);   /* section side padding (Figma: 100) */
  --section-y: clamp(56px, 8vw, 100px);/* section vertical padding (Figma: 100) */

  /* Radii */
  --r-card: 32px;
  --r-field: 16px;
  --r-pill: 100px;

  /* Layout */
  --container: 1240px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fz-body);
  line-height: var(--lh-body);
  color: var(--text-main);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

/* Section heading block: label pill + title + optional lead */
.section-head { max-width: 500px; display: flex; flex-direction: column; gap: var(--gap-xs); margin-bottom: 48px; }
.section-head--wide { max-width: none; }
.section-head .lead { margin-top: var(--gap-sm); }

/* Heading row: title block on the left, supporting copy on the right */
.head-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md) var(--gap-lg);
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
}
.head-row .section-head { margin-bottom: 0; }
.head-row__aside { max-width: 500px; align-self: center; }

.table-scroll { width: 100%; }

/* Centered section heading */
.section-head--center { max-width: 900px; margin-inline: auto; align-items: center; text-align: center; }
.section-head--center .lead { text-align: center; }

.subhead { font-size: var(--fz-h3); font-weight: 500; line-height: var(--lh-h3); color: var(--text-main); margin-bottom: var(--gap-sm); }

.badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-secondary);
  color: var(--accent);
  font-size: var(--fz-cap);
  font-weight: 300;
  line-height: 1;
}

.title { font-size: var(--fz-h1); font-weight: 500; line-height: 1.1; }
.title--lg { font-size: var(--fz-h2); line-height: var(--lh-h2); }
.accent { color: var(--accent); }
.muted  { color: var(--text-secondary); }
.lead   { color: var(--text-secondary); font-size: var(--fz-body); line-height: var(--lh-body); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 500;
  line-height: var(--lh-h3);
  text-align: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn--primary {
  padding: 11px 24px;
  font-size: var(--fz-h3);
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: #ffd61f; }
.btn--secondary {
  padding: 8px 16px;
  font-size: var(--fz-body);
  line-height: var(--lh-body);
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.btn--secondary:hover { background: var(--accent); color: var(--accent-ink); }
.btn--sm { padding: 8px 16px; font-size: var(--fz-body); line-height: var(--lh-body); }
.btn--block { display: flex; width: 100%; }

/* Inline text link (footer / contacts) */
.tlink { color: var(--text-button-light); transition: color .2s ease; }
.tlink:hover { color: var(--accent); }

/* ============================================================
   Header (floating glass pill)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding-top: 12px;
  pointer-events: none; /* let the gap above content be click-through */
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 12px;
  border-radius: var(--r-pill);
  background: var(--overlay-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100% - 2 * var(--gutter));
}
.nav__brand {
  font-weight: 700;
  font-size: var(--fz-body);
  line-height: var(--lh-h3);
  letter-spacing: -0.42px;
  white-space: nowrap;
  padding-left: 12px;
}
.nav__menu { display: flex; align-items: center; gap: 16px; }
.nav__link {
  color: var(--text-button-light);
  font-weight: 400;
  line-height: var(--lh-body);
  white-space: nowrap;
  padding: 2px 4px;
  transition: color .2s ease;
}
.nav__link:hover { color: var(--accent); }
.nav__link[aria-current="page"] { color: var(--accent); font-weight: 500; }
.nav__cta { white-space: nowrap; }

/* Burger menu (CSS-only). Desktop: menu + CTA flow inline, burger hidden. */
.nav__toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.nav__burger { display: none; }
.nav__collapse { display: contents; }

/* ============================================================
   Hero / image bands (shared overlay pattern)
   ============================================================ */
/* Image bands are full-bleed; their content is wrapped in `.container`
   so it aligns with every other section at any viewport width. */
.band {
  position: relative;
  isolation: isolate;
  background-size: cover;
  background-position: center;
  padding-block: var(--section-y);
}
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-dark);
  z-index: -1;
}

/* Hero — centered */
.hero { min-height: 620px; display: flex; align-items: center; }
.hero .container { display: flex; justify-content: center; }
.hero__inner {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gap-md);
}
.hero__text { display: flex; flex-direction: column; gap: var(--gap-sm); }
.hero__title { font-size: var(--fz-h1); font-weight: 500; line-height: 1.2; }
.hero__sub { color: var(--white); font-size: var(--fz-body); line-height: var(--lh-body); }

/* Banner — right aligned text only */
.banner-right p {
  max-width: 700px;
  margin-left: auto;
  font-size: var(--fz-h2);
  font-weight: 500;
  line-height: var(--lh-h2);
}

/* Banner — left aligned with cta */
.banner-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--gap-sm);
}
.banner-cta__title { display: flex; flex-direction: column; gap: var(--gap-xs); align-items: flex-start; }
.banner-cta__title h2 { font-size: var(--fz-h1); font-weight: 500; line-height: 1.2; }

/* ============================================================
   Generic card (services) & bordered card (steps, contacts)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap-sm);
}
.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--gap-md);
  min-height: 420px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--bg-secondary);
  overflow: hidden;
}
.card__head { display: flex; flex-direction: column; gap: var(--gap-xs); }
.card__cat { color: var(--text-muted); font-size: var(--fz-cap); font-weight: 300; }
.card__title { color: var(--text-secondary); font-size: var(--fz-h3); font-weight: 500; line-height: var(--lh-h3); }
.card__body { display: flex; flex-direction: column; gap: var(--gap-md); }
.card__text { color: var(--text-main); font-size: var(--fz-body); line-height: var(--lh-body); }

.card-outline {
  border: 1px solid var(--border-gray);
  border-radius: var(--r-card);
  background: transparent;
}

/* ============================================================
   Two-column section scaffold (how-it-works, contacts)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* How it works */
.how__intro { display: flex; flex-direction: column; gap: var(--gap-sm); align-items: flex-start; }
.how__note { color: var(--text-muted); font-size: var(--fz-h2); font-weight: 500; line-height: var(--lh-h2); margin-top: auto; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.step { display: flex; flex-direction: column; gap: var(--gap-sm); padding: 24px; min-height: 234px; }
.step__num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-secondary); color: var(--white);
  font-size: var(--fz-h3); font-weight: 500;
}
.step__title { color: var(--white); font-size: var(--fz-h3); font-weight: 500; line-height: var(--lh-h3); }
.step__text { color: var(--text-secondary); font-size: var(--fz-body); line-height: var(--lh-body); }

/* ============================================================
   Prices table
   ============================================================ */
.price-table { width: 100%; border-collapse: collapse; font-size: var(--fz-body); }
.price-table th,
.price-table td { padding: 12px 16px; text-align: left; }
.price-table thead th {
  background: var(--bg-secondary);
  color: var(--text-main);
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
}
.price-table thead .th-group { border-bottom: 1px solid var(--bg-main); }
.price-table tbody td { color: var(--white); border-bottom: 1px solid var(--border-gray); text-align: center; }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table .num { text-align: center; }
.price-note { margin-top: 24px; text-align: center; color: var(--text-muted); font-size: var(--fz-cap); }

/* ============================================================
   Contacts
   ============================================================ */
.contacts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-card {
  display: flex; flex-direction: column; gap: var(--gap-md);
  padding: 24px;
  border: 1px solid var(--border-gray);
  border-radius: var(--r-card);
}
.info-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-secondary); color: var(--accent);
}
.info-card__icon svg { width: 16px; height: 16px; }
.info-card__title { font-size: var(--fz-h3); font-weight: 700; line-height: var(--lh-h3); }
.info-card__text { color: var(--text-secondary); font-size: var(--fz-body); line-height: var(--lh-body); }
.info-card__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.info-card__links .tlink { display: block; }

/* Form panel */
.form-panel {
  padding: 32px;
  border-radius: var(--r-card);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }
.field { display: flex; flex-direction: column; gap: var(--gap-xs); }
.field__label { display: flex; gap: 4px; align-items: center; color: var(--text-main); font-size: var(--fz-body); }
.field__label .req { color: var(--red); font-family: var(--font-ui); font-size: var(--fz-h3); line-height: 1; }
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--fz-body);
  line-height: var(--lh-body);
  color: var(--text-main);
  background: var(--bg-muted);
  border: 1px solid transparent;
  padding: 12px 16px;
}
.field input { border-radius: var(--r-pill); }
.field textarea { border-radius: var(--r-field); resize: vertical; min-height: 160px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-secondary); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.form-disclaimer { text-align: center; color: var(--text-muted); font-size: var(--fz-cap); }

/* ============================================================
   About page
   ============================================================ */
.split--stretch { align-items: stretch; }

.media {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  border-radius: var(--r-card);
}

.about-col { display: flex; flex-direction: column; gap: var(--gap-md); }
.about-col .lead { margin: 0; }

/* Inline arrow list (що переробляємо / ми приймаємо) */
.arrow-list { display: flex; flex-direction: column; gap: var(--gap-xs); }
.arrow-list li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fz-body); line-height: var(--lh-body); }
.arrow-list .ico { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }

/* Circle arrow list (наш підхід) */
.check-list { display: flex; flex-direction: column; gap: var(--gap-sm); }
.check-list li { display: flex; gap: var(--gap-sm); align-items: center; }
.check-list .ico-circle {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); color: var(--accent);
}
.check-list .ico-circle img { width: 16px; height: 16px; }
.check-list span { font-size: var(--fz-h3); font-weight: 500; line-height: var(--lh-h3); }

/* "Why us" feature cards (numbered) */
.feature-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap-sm); }
.feature-foot { margin-top: 48px; text-align: center; color: var(--text-muted); font-size: var(--fz-h2); font-weight: 500; line-height: var(--lh-h2); }

/* Icon cards (cooperation) */
.icon-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.icon-card {
  display: flex; flex-direction: column; gap: var(--gap-md);
  min-height: 192px; padding: 24px;
  border: 1px solid var(--border-gray); border-radius: var(--r-card);
}
.icon-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-secondary); color: var(--accent);
}
.icon-card__icon img { width: 16px; height: 16px; }
.icon-card__title { font-size: var(--fz-h3); font-weight: 500; line-height: var(--lh-h3); }

/* Left-aligned image banner */
.banner-left p { max-width: 700px; font-size: var(--fz-h2); font-weight: 500; line-height: var(--lh-h2); }

/* ============================================================
   Reviews page
   ============================================================ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
  gap: var(--gap-md);
  justify-content: center;
}
.review-card {
  display: flex; flex-direction: column; gap: var(--gap-md);
  padding: 24px;
  border: 1px solid var(--border-gray); border-radius: var(--r-card);
}
.review-card__head { display: flex; gap: var(--gap-sm); align-items: center; }
.review-card__logo {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary); color: var(--accent);
}
.review-card__org { font-size: var(--fz-body); font-weight: 500; }
.review-card__city { font-size: var(--fz-body); color: var(--text-secondary); }
.review-card__text { font-size: var(--fz-body); line-height: var(--lh-body); color: var(--text-main); }
.review-card__date { font-size: var(--fz-body); color: var(--text-secondary); }
.review-card hr { width: 100%; height: 1px; background: var(--border-gray); border: 0; margin: 0; }

/* ============================================================
   404 page
   ============================================================ */
.error { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error__inner { max-width: 560px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: var(--gap-md); }
.error__inner .badge { align-self: center; }
.error__code {
  font-size: clamp(96px, 20vw, 200px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--accent);
}
.error__title { font-size: var(--fz-h1); font-weight: 500; line-height: 1.2; }
.error__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--bg-main); padding: var(--gap-lg) var(--gutter); }
.site-footer__inner { max-width: 1400px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--gap-lg); }
.footer-top { display: flex; gap: var(--gap-lg); justify-content: space-between; align-items: flex-start; }
.footer-about { flex: 1; max-width: 500px; display: flex; flex-direction: column; gap: var(--gap-lg); }
.footer-about__lead { font-size: var(--fz-h2); font-weight: 500; line-height: var(--lh-h2); }
.footer-about__brand { font-size: var(--fz-h2); font-weight: 700; letter-spacing: -0.72px; }
.footer-menu { flex: 1; display: flex; justify-content: flex-end; }
.footer-menu ul { display: flex; flex-direction: column; gap: var(--gap-sm); width: 200px; }
.footer-divider { height: 1px; background: var(--border-gray); border: 0; width: 100%; margin: 0; }
.footer-copy { text-align: center; color: var(--text-secondary); font-size: var(--fz-cap); font-weight: 300; }
.footer-copy b { font-weight: 700; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .feature-cards { grid-template-columns: repeat(3, 1fr); }
  .icon-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .how__note { margin-top: var(--gap-md); }
  .split--stretch .media { min-height: 260px; }
  .reviews-grid { grid-template-columns: minmax(0, 460px); }
}
@media (max-width: 768px) {
  /* Header collapses to a burger menu */
  .nav {
    position: relative;
    width: 100%;
    max-width: 440px;
    justify-content: space-between;
    gap: 12px;
  }
  .nav__brand { padding-left: 4px; }
  .nav__burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 13px 11px;
    border-radius: 50%;
    background: var(--bg-secondary);
    cursor: pointer;
  }
  .nav__burger span {
    display: block;
    height: 2px;
    width: 100%;
    border-radius: 2px;
    background: var(--text-button-light);
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav__collapse {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    padding: var(--gap-sm);
    border-radius: 24px;
    background: var(--overlay-dark);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav__menu { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { padding: 10px 12px; border-radius: 12px; }
  .nav__cta { width: 100%; }
  .nav__toggle:checked ~ .nav__collapse { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__toggle:focus-visible ~ .nav__burger { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav__toggle:checked ~ .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle:checked ~ .nav__burger span:nth-child(2) { opacity: 0; }
  .nav__toggle:checked ~ .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 0; }
  .footer-top { flex-direction: column; gap: var(--gap-md); }
  .footer-menu { justify-content: flex-start; }
  .footer-menu ul { width: auto; }
  /* Scrollable table on small screens */
  .table-scroll { overflow-x: auto; }
  .price-table { min-width: 640px; }
}
@media (max-width: 700px) {
  .feature-cards { grid-template-columns: repeat(2, 1fr); }
  .icon-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .banner-right p { margin-left: 0; }
  .feature-cards { grid-template-columns: 1fr; }
  .icon-cards { grid-template-columns: 1fr; }
}

/* ---- Field errors ---- */
.field__error { color: #e74c3c; font-size: .8rem; margin-top: 4px; }
.field__error.hidden { display: none; }

/* ---- Success modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--clr-surface, #fff); border-radius: 16px;
  max-width: 480px; width: 90%; padding: 40px 32px;
  text-align: center; position: relative;
  transform: scale(.92); transition: transform .3s;
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.6rem;
  cursor: pointer; color: var(--clr-muted, #888); line-height: 1;
}
.modal-close:hover { color: var(--clr-text, #222); }
.modal-body { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.modal-icon { margin-bottom: 8px; }
.modal-title { font-size: 1.25rem; font-weight: 600; }
.modal-text { font-size: .95rem; color: var(--clr-muted, #888); }
