/* ==========================================================================
   МВК Engineering — дизайн-система нового сайту
   Палітра: темно-синій #1F4E79 + світло-синій #EAF1F8 + жовтий CTA #FFC000
   Шрифт: Inter (кирилиця)
   ========================================================================== */

:root {
  --navy: #1F4E79;
  --navy-900: #16385a;      /* глибший синій для hero/футера */
  --navy-800: #1a4269;
  --navy-700: #245a8c;
  --sky: #EAF1F8;           /* фон світлих секцій */
  --sky-200: #d7e6f5;
  --ink: #1c2733;           /* основний текст */
  --muted: #5b6b7b;         /* приглушений текст */
  --line: #e2e8f0;
  --white: #ffffff;
  --accent: #FFC000;        /* жовтий CTA */
  --accent-600: #e6ac00;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(22, 56, 90, .08), 0 1px 2px rgba(22, 56, 90, .06);
  --shadow-md: 0 8px 24px rgba(22, 56, 90, .10);
  --shadow-lg: 0 20px 50px rgba(22, 56, 90, .16);
  --maxw: 1160px;
  --gap: 24px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; color: var(--navy); }
ul { list-style: none; padding: 0; }

/* --- layout helpers --- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--sky { background: var(--sky); }
.section--navy { background: var(--navy-900); color: #dbe6f2; }
.section--tight { padding: 56px 0; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--navy-700); margin-bottom: 14px;
}
.section--navy .eyebrow { color: var(--accent); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.section--navy .section-head h2 { color: #fff; }
.section--navy .section-head p { color: #b9cbe0; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; padding: 14px 26px; border-radius: 10px;
  border: 2px solid transparent; transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #1a1a1a; box-shadow: 0 6px 18px rgba(255,192,0,.30); }
.btn--accent:hover { background: var(--accent-600); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-800); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--outline:hover { border-color: var(--navy); }
.btn--lg { padding: 16px 32px; font-size: 17px; }

/* ========================================================================== */
/* HEADER                                                                     */
/* ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--navy-900);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo__mark { width: 34px; height: 34px; flex: 0 0 34px; }
.logo__text { line-height: 1; }
.logo__text b { display: block; font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.logo__text span { display: block; font-size: 10px; letter-spacing: .28em; color: var(--accent); text-transform: uppercase; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: 20px; }
.nav > a, .nav-drop-btn { color: #cdddf0; font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .15s; }
.nav > a:hover, .nav > a[aria-current="page"] { color: #fff; }

/* випадайка «Рішення» */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0;
  font-family: inherit; padding: 0; line-height: 1;
}
.nav-drop-btn:hover, .nav-has-drop:hover .nav-drop-btn, .nav-has-drop.is-active .nav-drop-btn { color: #fff; }
.nav-drop-btn .chev { width: 15px; height: 15px; transition: transform .2s; }
.nav-has-drop:hover .chev, .nav-has-drop.is-open .chev { transform: rotate(180deg); }
.nav-drop {
  position: absolute; top: calc(100% + 18px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 264px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .16s ease, transform .16s ease; z-index: 60;
}
.nav-drop::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.nav-has-drop:hover .nav-drop, .nav-has-drop.is-open .nav-drop {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav-drop a {
  display: block; padding: 11px 14px; border-radius: 8px;
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.nav-drop a:hover, .nav-drop a[aria-current="page"] { background: var(--sky); color: var(--navy); }

.nav-mobile-only { display: none; }   /* показуємо лише у відкритому мобільному меню */
.header-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.header-phone { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 940px) {
  .nav, .header-phone { display: none; }
  .nav-toggle { display: block; }
  .header-right { margin-left: auto; gap: 12px; }
  .header-right .btn--accent { display: none; }   /* CTA переїжджає в меню, звільняє місце бургеру */
  .nav.is-open .nav-mobile-only { display: flex; }
  .nav.is-open .nav-mobile-only.header-phone {
    justify-content: center; color: #fff; font-size: 18px; padding: 16px 0 8px; border-bottom: 0;
  }
  .nav.is-open .btn--accent.nav-mobile-only { margin-top: 8px; width: 100%; color: #1a1a1a; }
  .nav.is-open {
    display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    background: var(--navy-900); padding: 16px 24px 24px; gap: 0; border-bottom: 1px solid rgba(255,255,255,.1);
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav.is-open { align-items: stretch; }
  .nav.is-open > a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 17px; text-align: left; }
  /* випадайка на мобільному — розгорнута інлайн, без ефектів */
  .nav.is-open .nav-item { display: block; width: 100%; }
  .nav.is-open .nav-drop-btn {
    width: 100%; justify-content: space-between; padding: 12px 0; font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav.is-open .nav-drop {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    box-shadow: none; background: transparent; padding: 4px 0 8px 14px; min-width: 0;
  }
  .nav.is-open .nav-drop::before { display: none; }
  .nav.is-open .nav-drop a {
    color: #b9cbe0; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 16px;
  }
  .nav.is-open .nav-drop a:hover, .nav.is-open .nav-drop a[aria-current="page"] { background: transparent; color: #fff; }
  .nav.is-open .chev { display: none; }
}

/* ========================================================================== */
/* HERO                                                                       */
/* ========================================================================== */
.hero { background: var(--navy-900); color: #fff; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; }
.hero__text { padding: 84px 56px 84px 0; align-self: center; }
.hero__text .eyebrow { color: var(--accent); }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; }
.hero p { color: #bcd0e6; font-size: 19px; margin-top: 20px; max-width: 30em; }
.hero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero__media { position: relative; margin-right: -24px; min-height: 420px; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--inner .hero__grid { grid-template-columns: 1fr; }
.hero--inner .hero__text { padding: 72px 0; max-width: 760px; }
.hero--inner { position: relative; }
.hero--inner .hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero--inner .hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.hero--inner .hero__text { position: relative; z-index: 1; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__text { padding: 56px 0 40px; }
  .hero__media { margin: 0 -24px; min-height: 280px; position: relative; }
  .hero__media img { position: relative; }
}

/* ========================================================================== */
/* CARDS / GRIDS                                                              */
/* ========================================================================== */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--sky);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--navy);
}
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--navy); font-weight: 700; font-size: 15px; }
.card__link:hover { gap: 10px; }
.card--flat { box-shadow: none; }
.card--sky { background: var(--sky); border-color: transparent; }

/* service cards on dark */
.section--navy .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #dbe6f2; }
.section--navy .card h3 { color: #fff; }
.section--navy .card p { color: #a9c0d8; }
.section--navy .card__icon { background: rgba(255,255,255,.10); color: var(--accent); }

/* feature (icon + text, no box) */
.feature { text-align: center; padding: 0 8px; }
.feature__ic { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--navy); }
.feature__ic svg { width: 100%; height: 100%; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15.5px; }

/* numbers band */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; gap: 32px; } }
.stat b { display: block; font-size: clamp(40px, 6vw, 58px); font-weight: 800; color: var(--navy); line-height: 1; }
.section--navy .stat b { color: var(--accent); }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-weight: 600; }
.section--navy .stat span { color: #b9cbe0; }

/* project cards */
.project { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s; }
.project:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project__img { aspect-ratio: 16/10; background: var(--sky-200); overflow: hidden; }
.project__img img { width: 100%; height: 100%; object-fit: cover; }
.project__body { padding: 20px 22px 24px; }
.project__body h3 { font-size: 18px; }
.project__city { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.project__metric { display: inline-block; background: var(--sky); color: var(--navy); font-weight: 700; font-size: 13.5px; padding: 6px 12px; border-radius: 8px; }

/* process steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; padding: 8px; }
.step__n { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.step h4 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); }

/* checklist */
.checklist { display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; }
.checklist svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--navy-700); margin-top: 2px; }
.section--navy .checklist svg { color: var(--accent); }

/* split content block (text + card) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.prose h2 { font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 16px; }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose > *:last-child { margin-bottom: 0; }

/* case card */
.casebox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); }
.casebox .tag { display: inline-block; background: var(--accent); color: #1a1a1a; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 20px; margin-bottom: 16px; }
.casebox h3 { font-size: 24px; margin-bottom: 14px; }
.casebox dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15.5px; }
.casebox dt { color: var(--muted); }
.casebox dd { font-weight: 600; color: var(--ink); }

/* ========================================================================== */
/* FAQ                                                                        */
/* ========================================================================== */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--navy-700); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 24px 22px; color: var(--muted); }

/* ========================================================================== */
/* LEAD FORM BAND                                                             */
/* ========================================================================== */
.leadband { background: var(--navy-900); color: #fff; }
.leadband__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .leadband__grid { grid-template-columns: 1fr; gap: 28px; } }
.leadband h2 { color: #fff; font-size: clamp(26px, 3.5vw, 36px); }
.leadband p { color: #b9cbe0; margin-top: 12px; }
.leadform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.leadform .full { grid-column: 1 / -1; }
.leadform input, .leadform textarea, .leadform select {
  width: 100%; padding: 15px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 16px; font-family: inherit;
}
.leadform input::placeholder, .leadform textarea::placeholder { color: #93aac4; }
.leadform input:focus, .leadform textarea:focus, .leadform select:focus { outline: 2px solid var(--accent); border-color: transparent; background: rgba(255,255,255,.12); }
.leadform textarea { min-height: 96px; resize: vertical; }
.form-note { font-size: 13px; color: #93aac4; margin-top: 4px; }
.form-status { grid-column: 1/-1; font-size: 15px; padding: 4px 0; min-height: 22px; }
.form-status.ok { color: #7ee0a5; }
.form-status.err { color: #ffb4a8; }

/* contacts */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }
.contact-list { display: grid; gap: 18px; font-size: 16.5px; }
.contact-list .row { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--navy-700); margin-top: 3px; }
.contact-list b { color: var(--navy); }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 320px; background: var(--sky); }
.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

/* industries / tag grid */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--sky); border-radius: var(--radius); padding: 24px; text-align: center; }
.tile__ic { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--navy); }
.tile h4 { font-size: 17px; color: var(--navy); margin-bottom: 6px; }
.tile p { font-size: 14px; color: var(--muted); }

/* CTA band (compact) */
.ctaband { background: var(--navy); color: #fff; border-radius: var(--radius-lg); padding: 40px 44px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.ctaband h2 { color: #fff; font-size: 26px; }
.ctaband p { color: #bcd0e6; margin-top: 6px; }

/* filters row */
.filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.filters select { padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-family: inherit; color: var(--ink); min-width: 180px; }

/* ========================================================================== */
/* FOOTER                                                                     */
/* ========================================================================== */
.site-footer { background: var(--navy-900); color: #a9c0d8; padding: 60px 0 28px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.10); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 10px; }
.footer-about p { margin-top: 16px; max-width: 32em; color: #93aac4; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; flex-wrap: wrap; color: #7e97b3; font-size: 14px; }
.social { display: flex; gap: 12px; }
.social a { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #cdddf0; }
.social a:hover { background: var(--accent); color: #1a1a1a; }
.social svg { width: 20px; height: 20px; }

/* utility */
.center { text-align: center; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.lead-lg { font-size: 19px; color: var(--muted); }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 20px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.carousel > * { scroll-snap-align: start; }
