/* BROK IN.UA — стилі сайту */
:root {
  --blue: #0058f0;
  --blue-600: #0047c4;
  --blue-900: #071a3d;
  --accent: #ffc700;
  --accent-600: #f0b400;
  --ink: #0b1220;
  --text: #333d4f;
  --muted: #64708a;
  --line: #e3e8f2;
  --soft: #f3f6fc;
  --white: #fff;
  --tg: #229ed9;
  --viber: #7360f2;
  --wa: #25d366;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .06), 0 8px 24px rgba(11, 18, 32, .06);
  --shadow-lg: 0 20px 50px rgba(0, 40, 120, .16);
  --header-h: 68px;
  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

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

.i { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem/1.2 var(--font); cursor: pointer;
  transition: transform .15s ease, background-color .2s, box-shadow .2s, color .2s;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(0, 88, 240, .25); }
.btn--primary:hover { background: var(--blue-600); }
.btn--accent { background: var(--accent); color: var(--ink); box-shadow: 0 8px 20px rgba(255, 199, 0, .35); }
.btn--accent:hover { background: var(--accent-600); }
.btn--glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn--glass:hover { background: rgba(255, 255, 255, .22); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.link { display: inline-flex; align-items: center; gap: .35em; color: var(--blue); font-weight: 600; }
.link .i { transition: transform .2s; }
.link:hover .i { transform: translateX(3px); }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
/* розмиття на псевдоелементі: backdrop-filter на самій шапці обрізав би фіксоване мобільне меню */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
body.menu-open .header::before { background: #fff; }
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(11, 18, 32, .05); }
.header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.logo img { width: 56px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a { padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--ink); transition: background-color .2s, color .2s; }
.nav > a:hover { background: var(--soft); color: var(--blue); }
.nav__calc { display: inline-flex; align-items: center; gap: 6px; color: var(--blue) !important; }
.nav__calc.is-active { background: var(--soft); }
.nav__mobile-extra { display: none; }
.header__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); padding: 10px 16px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.header__phone:hover { color: var(--blue); }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.burger .i { width: 24px; height: 24px; }
.burger__close { display: none; }

@media (max-width: 1080px) {
  .header__phone span { display: none; }
  .header__phone { padding: 12px; }
  .nav > a { padding: 8px 9px; }
}
@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .header__phone { order: 2; margin-left: auto; }
  .burger { order: 3; margin-left: 0; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
    background: #fff; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav > a { padding: 14px 12px; font-size: 1.2rem; border-radius: 12px; }
  .nav__mobile-extra { display: grid; gap: 14px; margin-top: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  body.menu-open .burger__open { display: none; }
  body.menu-open .burger__close { display: block; }
}

/* ---------- меседжери ---------- */
.messengers { display: flex; flex-wrap: wrap; gap: 10px; }
.msg { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .95rem; color: #fff; transition: transform .15s, filter .2s; }
.msg:hover { transform: translateY(-1px); filter: brightness(1.08); }
.msg .i { width: 20px; height: 20px; }
.msg--tg { background: var(--tg); }
.msg--viber { background: var(--viber); }
.msg--wa { background: var(--wa); }
.nav__mobile-extra .messengers { display: grid; grid-template-columns: repeat(3, 1fr); }
.nav__mobile-extra .msg { justify-content: center; padding: 12px 6px; }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; background: var(--blue-900); }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(0, 88, 240, .35), transparent 60%),
    linear-gradient(115deg, rgba(4, 22, 66, .94) 0%, rgba(0, 70, 200, .86) 55%, rgba(0, 88, 240, .62) 100%);
}
.hero__inner { padding: clamp(56px, 10vw, 120px) 16px clamp(56px, 9vw, 110px); }
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: .35em; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; margin-bottom: 22px;
  border-radius: 999px; background: var(--accent); color: var(--ink);
  font-weight: 700; font-size: .95rem;
}
.hero__lead { max-width: 58ch; font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: rgba(255, 255, 255, .88); margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 620px; margin: 44px 0 0; padding: 0; }
.hero__facts li { padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.hero__facts strong { display: block; font-size: clamp(1.3rem, 3.5vw, 1.9rem); line-height: 1.1; color: var(--accent); }
.hero__facts span { font-size: .9rem; color: rgba(255, 255, 255, .85); line-height: 1.3; display: block; }
@media (max-width: 520px) {
  .hero__cta .btn { width: 100%; }
  .hero__facts { gap: 8px; }
  .hero__facts li { padding: 10px; }
}

/* ---------- секції ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tight { padding: clamp(36px, 5vw, 64px) 0; }
.section--soft { background: var(--soft); }
.section--blue { background: linear-gradient(135deg, var(--blue) 0%, #0a3fb8 100%); color: rgba(255, 255, 255, .9); }
.section--blue h2, .section--blue h3 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.eyebrow { display: inline-block; margin-bottom: 10px; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.eyebrow--light { color: var(--accent); }
.subhead { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: clamp(40px, 6vw, 64px) 0 20px; }
.center { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

/* переваги */
.advantages { margin-top: -1px; border-bottom: 1px solid var(--line); }
.adv { display: flex; gap: 16px; align-items: flex-start; }
.adv h3 { margin-bottom: .25em; }
.adv p { margin: 0; color: var(--muted); font-size: .98rem; }
.adv__icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #e8f0ff; color: var(--blue); }
.adv__icon .i { width: 26px; height: 26px; }

/* послуги */
.service { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cddbfb; }
.service__icon { width: 64px; height: 64px; margin-bottom: 18px; padding: 10px; border-radius: 16px; background: #eef4ff; }
.service p { color: var(--muted); margin-bottom: 14px; }
.service .link { margin-top: auto; }

/* кроки */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
.step p { margin: 0; color: rgba(255, 255, 255, .85); }
.step__num { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; font-size: 1.3rem; }

/* категорії */
.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1100px) { .cats { grid-template-columns: repeat(6, 1fr); } }
.cat { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 10px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-weight: 500; line-height: 1.25; font-size: .98rem; }
.cat img { width: 44px; height: 44px; opacity: .85; }
.cat--link { position: relative; transition: border-color .2s, transform .2s, box-shadow .2s; }
.cat--link::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.cat--link:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--blue); }

/* кейси */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 860px) { .cases { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.case { position: relative; display: block; overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 2.4; background: var(--soft); }
.case img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.case:hover img { transform: scale(1.06); }
.case::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5, 15, 40, .85)); }
.case__body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; }
.case__body strong { font-size: 1.1rem; line-height: 1.2; }
.case__body span { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; opacity: .85; }
.cases--small .case { aspect-ratio: 3 / 2; }

/* клієнти */
.client { display: flex; flex-direction: column; color: var(--text); transition: transform .2s, box-shadow .2s; }
.client:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.client img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.client h3 { font-size: 1.1rem; }
.client p { font-size: .95rem; color: var(--muted); flex: 1; }
.client__url { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: .92rem; }
.client__url .i { width: 15px; height: 15px; }

/* форма */
.order { background: radial-gradient(900px 500px at 0% 0%, rgba(0, 88, 240, .55), transparent 60%), var(--blue-900); color: rgba(255, 255, 255, .85); }
.order h2 { color: #fff; }
.order__inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .order__inner { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.order__or { margin: 24px 0 12px; font-weight: 600; color: #fff; }
.form { background: #fff; color: var(--text); padding: clamp(22px, 4vw, 36px); border-radius: 22px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--soft); border: 2px solid transparent; border-radius: 12px; transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field.is-invalid input { border-color: #e5484d; background: #fff5f5; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form__note { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }
.form__status { margin: 0; font-weight: 600; text-align: center; }
.form__status:empty { display: none; }
.form__status.is-ok { color: #12805c; }
.form__status.is-err { color: #c62828; }

/* контакти */
.contacts { display: grid; gap: 32px; }
@media (min-width: 900px) { .contacts { grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: stretch; } }
.contact-list { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .i { width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: #e8f0ff; color: var(--blue); }
.contact-list span { display: block; font-size: .85rem; color: var(--muted); }
.contact-list a { color: var(--ink); font-weight: 600; font-size: 1.08rem; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--blue); }
.contact-list small { font-weight: 400; color: var(--muted); font-size: .92rem; }
.map { min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* внутрішні сторінки */
.page-head { padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 3vw, 32px); background: linear-gradient(180deg, var(--soft), #fff); }
.page-head p { max-width: 70ch; color: var(--muted); font-size: 1.08rem; }
.page-head--center { text-align: center; padding-bottom: 80px; }
.page-head--center p { margin-inline: auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; font-size: .92rem; color: var(--muted); }
.crumbs a { color: var(--blue); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.gallery__item { display: block; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 3 / 2; background: var(--soft); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery__item:hover img { transform: scale(1.04); }

.callout { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(22px, 4vw, 36px); border-radius: 22px; background: linear-gradient(135deg, var(--blue), #0a3fb8); color: rgba(255, 255, 255, .88); }
.callout h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .3em; }
.callout p { margin: 0; max-width: 56ch; }

.calc { display: grid; gap: 24px; align-items: start; }
@media (min-width: 980px) { .calc { grid-template-columns: minmax(0, 1fr) 360px; } }
.calc__frame { padding: 8px; overflow: hidden; }
.calc__frame iframe { width: 100%; height: 1150px; border: 0; display: block; }
.calc__aside .card { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; }
.calc__aside h2 { font-size: 1.4rem; margin: 0; }
.calc__aside p { margin: 0; color: var(--muted); }

/* підвал */
.footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: 56px 0 24px; font-size: .96rem; }
.footer__inner { display: grid; gap: 32px; }
@media (min-width: 860px) { .footer__inner { grid-template-columns: 1.3fr 1fr 1.3fr; } }
.footer__brand img { width: 64px; margin-bottom: 14px; }
.footer__brand p { max-width: 34ch; }
.footer__nav, .footer__contacts { display: grid; gap: 10px; align-content: start; }
.footer a:hover { color: #fff; }
.footer__contacts a { display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.footer__contacts .i { margin-top: 4px; color: var(--accent); }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem; }

/* мобільна панель */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mobile-bar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; font-weight: 600; font-size: .95rem; color: #fff; }
  .mobile-bar .i { width: 20px; height: 20px; }
  .mobile-bar__call { background: var(--blue); }
  .mobile-bar__tg { background: var(--tg); }
  .mobile-bar__viber { background: var(--viber); }
}

/* лайтбокс */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 10, 25, .94); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 10, 25, .7); }
.lightbox img { max-width: min(1200px, 94vw); max-height: 86dvh; width: auto; height: auto; border-radius: 10px; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lightbox .i { width: 24px; height: 24px; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 24px; transform: none; } }

/* анімація появи */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}
