/* ---------- Tokens ----------
   Palette avoids blue, red and yellow: graphite neutrals + green accent. */
:root {
  --ink: #1e2422;          /* graphite: headings, dark sections */
  --ink-2: #2a322f;
  --paper: #f3f4f3;        /* neutral light gray page background */
  --surface: #ffffff;
  --text: #222826;
  --muted: #5e6763;
  --line: #dde1de;
  --accent: #2f7d5b;       /* forest green: buttons, highlights */
  --accent-hover: #276a4d;
  --accent-ink: #27694c;   /* green text on light backgrounds */
  --accent-soft: #6fc19a;  /* green on dark backgrounds */
  --on-dark: #eef1ef;
  --on-dark-muted: #a9b3ae;

  --radius: 12px;
  --container: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
}
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); overflow-wrap: break-word; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; background: var(--ink); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.env-banner {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, var(--accent-hover) 14px 28px);
  color: #fff; text-align: center; font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: var(--on-dark-muted); font-size: 14px; }
.topbar-inner { display: flex; align-items: center; justify-content: flex-end; gap: 28px; height: 42px; }
.topbar a { color: var(--on-dark-muted); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-email { margin-right: auto; }
.topbar-phone { color: #fff !important; font-weight: 650; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.topbar .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .16); }
.topbar .lang-switch a { padding: 2px 10px; font-size: 12px; color: var(--on-dark-muted); }
.topbar .lang-switch a.is-active { background: #fff; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; font-size: 17px; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-bg { fill: var(--ink); }
.logo-bar { fill: #fff; }
.logo-bar--accent { fill: #3fa477; }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--text); font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--accent-ink); }

.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 22px; height: 22px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; fill: none; }
.mobile-menu[open] summary { background: var(--paper); }
.mobile-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column; padding: 8px 16px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px -20px rgba(30, 36, 34, .4);
}
.mobile-nav a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 550; color: var(--ink); }
.mobile-nav a[aria-current] { color: var(--accent-ink); }
.mobile-nav .btn { margin-top: 16px; }

.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.lang-switch a {
  padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 650;
  text-decoration: none; color: var(--muted);
}
.lang-switch a.is-active { background: var(--ink); color: #fff; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 8px; border: 1.5px solid transparent;
  font-weight: 650; font-size: 15px; letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 112px;
  color: var(--on-dark);
  background:
    url("../img/hero-lines.svg") right -80px center / auto 120% no-repeat,
    radial-gradient(1200px 600px at 85% 20%, rgba(47, 125, 91, .22), transparent 60%),
    linear-gradient(160deg, #252d2a 0%, #1a1f1d 60%, #151917 100%);
}
.hero h1 { color: #fff; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px;
  color: var(--accent-ink); font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 40px; height: 1.5px; background: currentColor; flex: none; }
.hero .eyebrow { color: var(--accent-soft); }
.lead { margin-top: 20px; font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.hero .lead { color: var(--on-dark-muted); font-size: 1.2rem; }

.stages {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius); padding: 28px 28px 20px;
  backdrop-filter: blur(6px);
}
.stages-title { color: var(--on-dark-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.stages-list { list-style: none; margin: 0; padding: 0; }
.stages-list li { display: flex; align-items: center; gap: 16px; padding: 13px 0; font-weight: 550; color: #fff; }
.stages-list li + li { border-top: 1px solid rgba(255, 255, 255, .09); }
.stage-num {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1.5px solid rgba(111, 193, 154, .6); border-radius: 50%;
  color: var(--accent-soft); font-size: 12.5px; font-weight: 700;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 48px; }

.grid { display: grid; gap: 20px; }
.grid--audience { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--services { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; position: relative;
}
.card p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.grid--audience .card { border-top: 3px solid var(--accent); }
.card--service { background: var(--paper); transition: border-color .15s, box-shadow .15s; }
.card--service:hover { border-color: var(--accent); box-shadow: 0 10px 28px -18px rgba(30, 36, 34, .45); }
.card-index { display: block; margin-bottom: 18px; color: var(--accent-ink); font-weight: 700; font-size: 14px; letter-spacing: .08em; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.step { position: relative; padding-top: 66px; }
.step::before {
  content: ""; position: absolute; left: 0; right: -28px; top: 23px;
  border-top: 1.5px dashed #c5ccc8;
}
.step:last-child::before { right: 0; }
.step-num {
  position: absolute; top: 0; left: 0;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--ink); color: #fff; border-radius: 10px; font-weight: 700;
}
.step p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

.section--dark { background: var(--ink); color: var(--on-dark); }
.section--dark h2 { color: #fff; }
.section--dark .lead { color: var(--on-dark-muted); }
.contact { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.notice {
  padding: 22px 24px; border: 1px dashed rgba(111, 193, 154, .55); border-radius: var(--radius);
  background: rgba(255, 255, 255, .04); color: var(--on-dark);
}

.notfound { min-height: 55vh; display: flex; align-items: center; }

.page-head {
  padding: 72px 0 64px; color: var(--on-dark);
  background: linear-gradient(160deg, #252d2a 0%, #1a1f1d 70%);
}
.page-head h1 { color: #fff; }
.page-head .eyebrow { color: var(--accent-soft); }
.stub { min-height: 30vh; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); border-top: 1px solid rgba(255, 255, 255, .08); padding: 26px 0; font-size: 14px; color: var(--on-dark-muted); }
.site-footer .muted { color: var(--on-dark-muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-contacts { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-contacts a { color: var(--on-dark); text-decoration: none; }
.footer-contacts a:hover { color: #fff; text-decoration: underline; }

/* ---------- Contact popover ---------- */
[data-contact] { cursor: pointer; }
.contact-pop {
  position: fixed; z-index: 50; width: 248px; padding: 8px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 40px -12px rgba(30, 36, 34, .35);
}
.contact-pop[hidden] { display: none; }
/* arrow pointing at the link */
.contact-pop::before {
  content: ""; position: absolute; left: var(--arrow-x, 50%); width: 12px; height: 12px;
  background: var(--surface); border: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}
.contact-pop[data-placement="below"]::before { top: -7px; border-right: 0; border-bottom: 0; }
.contact-pop[data-placement="above"]::before { bottom: -7px; border-left: 0; border-top: 0; }
.cp-value {
  position: relative; padding: 8px 10px 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.cp-action, .cp-copy {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: 0; border-radius: 8px; background: none;
  font: inherit; font-size: 15px; font-weight: 550; color: var(--text); text-decoration: none; text-align: left;
  cursor: pointer;
}
.cp-action:hover, .cp-copy:hover, .cp-action:focus-visible, .cp-copy:focus-visible { background: var(--paper); }
.cp-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-pop[data-kind="phone"] .cp-icon--email,
.contact-pop[data-kind="email"] .cp-icon--phone,
.cp-icon--done,
.contact-pop[data-state="copied"] .cp-icon--copy { display: none; }
.contact-pop[data-state="copied"] .cp-icon--done { display: block; }
.contact-pop[data-state="copied"] .cp-copy { color: var(--accent-ink); }
.contact-pop[data-state="failed"] .cp-copy { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .header-inner > .nav, .header-cta { display: none; }
  .mobile-menu { display: block; }
}
@media (max-width: 960px) {
  .hero-inner, .contact { grid-template-columns: 1fr; gap: 44px; }
  .hero { background-position: right -260px center, 0 0, 0 0; }
  .grid--services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .step::before { display: none; }
}
@media (max-width: 600px) {
  .topbar-email { display: none; }
  .topbar-inner { justify-content: space-between; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 64px 0; }
  .grid--services, .steps { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; height: 64px; }
  .logo span { font-size: 15px; }
  .eyebrow::before { width: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
