/* ==========================================================
   Home Union — стилі сайту-візитки
   Кольори взяті з логотипа; жовтий — «світло у вікні», колір дії.
   ========================================================== */

:root {
  --ink: #0D1F51;        /* темно-синій з лого: заголовки, текст */
  --blue: #0067C0;       /* синій з лого: посилання */
  --sky: #09A2EE;        /* блакитний з лого */
  --teal: #0DAFBC;       /* бірюзовий з лого */
  --lamp: #FFC940;       /* світло у вікні: головні кнопки */
  --lamp-deep: #F5B316;
  --paper: #FFFFFF;
  --mist: #EDF4FB;       /* світле тло секцій */
  --line: #D3DFEE;
  --text: #24304F;
  --muted: #55617F;

  --font-head: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Golos Text", "Segoe UI", Arial, sans-serif;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.125rem/1.6 var(--font-body);
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }

h1, h2, h3 { color: var(--ink); overflow-wrap: break-word; }
h1, h2 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.1rem); line-height: 1.14; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.2rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

.wrap { width: min(100% - 40px, 1160px); margin-inline: auto; }

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

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: var(--r-m);
  font: 600 1.0625rem/1.2 var(--font-body);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lamp); color: var(--ink); }
.btn--primary:hover { background: var(--lamp-deep); color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: 1rem; white-space: nowrap; }
.btn--big { min-height: 60px; padding: 14px 28px; font-size: 1.125rem; }
.btn--wide { width: 100%; }

.link { font-weight: 600; white-space: nowrap; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 43px; height: 48px; }
.brand__name { font: 700 1.05rem/1.05 var(--font-head); color: var(--ink); letter-spacing: .02em; text-transform: uppercase; display: grid; }
.brand__name span { color: var(--blue); font-weight: 500; letter-spacing: .16em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 10px 12px; white-space: nowrap; border-radius: var(--r-s); color: var(--ink); font-weight: 500; font-size: 1.0625rem; text-decoration: none; }
.nav a:hover { background: var(--mist); }

.header__side { display: flex; align-items: center; gap: 20px; }
.header__phone { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }

.burger { display: none; align-items: center; gap: 10px; min-height: 48px; margin-left: auto; padding: 8px 14px; background: var(--mist); border: 0; border-radius: var(--r-s); color: var(--ink); font: 600 1rem var(--font-body); cursor: pointer; }
.burger__lines, .burger__lines::before, .burger__lines::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; }
.burger__lines { position: relative; }
.burger__lines::before { position: absolute; top: -6px; }
.burger__lines::after { position: absolute; top: 6px; }

/* ---------- Перший екран ---------- */
.hero { background: linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%); padding: 56px 0 72px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hero__lead { margin-top: 22px; max-width: 34em; font-size: 1.25rem; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; color: var(--ink); font-weight: 500; font-size: 1.0625rem; }
.hero__facts li { position: relative; padding-left: 28px; }
.hero__facts li::before { content: ""; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border-radius: 4px; background: var(--lamp); box-shadow: inset 0 0 0 2px var(--ink); }

.hero__art { max-width: 460px; margin-inline: auto; width: 100%; }
.hero__art figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 1rem; }

.house { width: 100%; height: auto; }
.house__sun { fill: #fff; }
.house__front { fill: var(--ink); }
.house__door { fill: var(--lamp); }
.house__ground { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.house__tree { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.house__leaf { fill: var(--teal); }
.house__windows rect { fill: rgba(255, 255, 255, .16); animation: light-on .45s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes light-on { to { fill: var(--c, var(--lamp)); } }

/* ---------- Секції ---------- */
.section { padding: 88px 0; }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: #DCE6F7; }
.section--ink h2 { color: #fff; }
.section__lead { margin-top: 14px; max-width: 38em; color: var(--muted); font-size: 1.1875rem; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.ticks { display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 14px; height: 8px; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(-45deg); }

/* ---------- З чим ви прийшли ---------- */
.paths { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; margin-top: 40px; align-items: start; }
.paths__tabs { display: grid; gap: 12px; }
.paths__tab {
  display: grid; gap: 4px; width: 100%; padding: 18px 20px; text-align: left;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-m);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.paths__tab strong { color: var(--ink); font-size: 1.1875rem; font-weight: 600; }
.paths__tab span { color: var(--muted); font-size: 1rem; }
.paths__tab:hover { border-color: var(--sky); }
.paths__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }
.paths__tab[aria-selected="true"] strong { color: #fff; }
.paths__tab[aria-selected="true"] span { color: #B9C8E6; }

.paths__panel { padding: 36px 40px 40px; background: var(--mist); border-radius: var(--r-l); }
.paths__panel h3 { font-size: 1.5rem; max-width: 22em; }
.paths__panel .ticks { margin: 22px 0 30px; }

/* ---------- Послуги ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin-top: 36px; }
.service { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.service__icon { width: 56px; height: 56px; padding: 13px; background: var(--paper); border-radius: var(--r-m); fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service p { margin-top: 6px; }
.partner-note { margin-top: 12px; padding: 18px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); max-width: none; color: var(--muted); font-size: 1rem; }

/* ---------- Кроки ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 44px; counter-reset: step; }
.step { position: relative; padding-top: 68px; counter-increment: step; }
.step::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  display: grid; place-items: center; width: 48px; height: 48px;
  background: var(--mist); border-radius: var(--r-s); color: var(--ink);
  font: 600 1.125rem var(--font-head);
}
.step::after { content: ""; position: absolute; top: 23px; left: 60px; right: -12px; height: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step--free::before { background: var(--lamp); }
.step p { margin-top: 8px; font-size: 1.0625rem; }

/* ---------- Пакети ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 32px 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); }
.plan h3 { font: 600 1.375rem/1.2 var(--font-head); }
.plan__for { margin-top: 10px; color: var(--muted); font-size: 1.0625rem; min-height: 3.2em; }
.plan__price { margin: 18px 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--ink); font: 600 1.625rem/1.2 var(--font-body); }
.plan__price span { display: block; margin-top: 2px; color: var(--muted); font-size: 1rem; font-weight: 400; }
.plan .ticks { margin-bottom: 28px; font-size: 1.0625rem; }
.plan .btn { margin-top: auto; }

.plan--main { position: relative; background: var(--ink); border-color: var(--ink); color: #DCE6F7; }
.plan--main h3, .plan--main .plan__price { color: #fff; }
.plan--main .plan__for, .plan--main .plan__price span { color: #B9C8E6; }
.plan--main .plan__price { border-color: rgba(255, 255, 255, .2); }
.plan--main .ticks li::before { border-color: var(--lamp); }
.plan__badge { position: absolute; top: -15px; left: 28px; padding: 4px 12px; background: var(--lamp); border-radius: var(--r-s); color: var(--ink); font-size: .9375rem; font-weight: 600; }

.plans__extra { margin-top: 28px; padding: 20px 24px; background: var(--paper); border-radius: var(--r-m); border-left: 6px solid var(--teal); }
.plans__extra strong { color: var(--ink); }

/* ---------- Про нас ---------- */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.about__photo { aspect-ratio: 4 / 3; background: var(--mist); border-radius: var(--r-l); overflow: hidden; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__text > p { margin-top: 18px; max-width: 34em; }
.values { display: grid; gap: 18px; margin-top: 28px; }
.values > div { padding-left: 20px; border-left: 4px solid var(--sky); }
.values dt { color: var(--ink); font-weight: 600; font-size: 1.1875rem; }
.values dd { margin-top: 2px; }

/* ---------- Відгуки ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 44px; }
.review { display: flex; flex-direction: column; padding-top: 22px; border-top: 4px solid var(--lamp); }
.review blockquote { color: #fff; font-size: 1.1875rem; line-height: 1.55; }
.review figcaption { margin-top: 20px; color: #B9C8E6; font-size: 1rem; }
.review figcaption strong { display: block; color: #fff; font-size: 1.0625rem; }

/* ---------- Блог ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.post__img { display: block; aspect-ratio: 3 / 2; background: var(--mist); border-radius: var(--r-m); overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; }
.post__meta { margin-top: 16px; color: var(--muted); font-size: .9375rem; }
.post h3 { margin-top: 6px; }
.post h3 a { color: var(--ink); text-decoration: none; }
.post h3 a:hover { color: var(--blue); text-decoration: underline; }
.post > p:last-child { margin-top: 8px; font-size: 1.0625rem; }

/* ---------- Питання ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 10px; }
.faq details { background: var(--paper); border-radius: var(--r-m); }
.faq summary { position: relative; padding: 20px 60px 20px 24px; color: var(--ink); font-weight: 600; font-size: 1.1875rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 26px; top: 50%; width: 11px; height: 11px; margin-top: -9px; border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details p { padding: 0 24px 22px; max-width: 40em; }

/* ---------- Форма та контакти ---------- */
.contact { background: linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: start; }

.form { display: grid; gap: 22px; margin-top: 32px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { color: var(--ink); font-weight: 600; }
.field legend { margin-bottom: 8px; }
.field small { color: var(--muted); font-size: 1rem; font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%; padding: 15px 16px; background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--r-m);
  color: var(--ink); font: 400 1.125rem/1.4 var(--font-body);
}
.field input::placeholder, .field textarea::placeholder { color: #8490AB; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(9, 162, 238, .2); }
.field input[aria-invalid="true"] { border-color: #C62828; }
.field textarea { resize: vertical; }
.field__error { color: #B3261E; font-weight: 500; font-size: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { position: relative; cursor: pointer; font-weight: 500; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: block; padding: 11px 18px; background: var(--paper); border: 2px solid var(--line); border-radius: 999px; color: var(--ink); }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 3px; }

.form__note { color: var(--muted); font-size: .9375rem; }
.form__done { margin-top: 32px; padding: 32px; background: var(--paper); border-radius: var(--r-l); border-left: 8px solid var(--teal); }
.form__done p { margin-top: 10px; }

.contact__info { padding: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); }
.messengers { display: grid; gap: 10px; margin-top: 18px; }
.messenger { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 18px; border-radius: var(--r-m); color: #fff; font-weight: 600; text-decoration: none; transition: filter .15s; }
.messenger:hover { color: #fff; filter: brightness(.92); }
.messenger--tg { background: #1E96D4; }
.messenger--vb { background: #6B55E8; }
.messenger--wa { background: #128C4B; }
.contacts { display: grid; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.contacts dt { color: var(--muted); font-size: 1rem; }
.contacts dd { color: var(--ink); font-weight: 500; }
.contacts a { color: var(--ink); }

/* ---------- Підвал ---------- */
.footer { padding: 40px 0; background: var(--ink); color: #B9C8E6; font-size: 1rem; }
.footer__row { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.footer .brand img { background: #fff; border-radius: var(--r-s); padding: 5px; width: 48px; height: 52px; object-fit: contain; }
.footer .brand__name { color: #fff; }
.footer .brand__name span { color: var(--sky); }
.footer__tag { justify-self: end; text-align: right; }
.footer__nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); }
.footer__nav a { color: #fff; text-decoration: none; padding: 6px 0; }
.footer__nav a:hover { text-decoration: underline; }
.footer__dev a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.footer__dev a:hover { color: var(--sky); }
.footer__bottom { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* ---------- Нижня панель на телефоні ---------- */
.dock { display: none; }

/* ==========================================================
   Планшет
   ========================================================== */
@media (max-width: 1240px) {
  .header__phone { display: none; }
  .nav a { padding: 10px 8px; }
  .header__row { gap: 16px; }
}

@media (max-width: 960px) {
  .burger { display: inline-flex; }
  .header__side { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 20px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(13, 31, 81, .12);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.1875rem; }

  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__art { max-width: 340px; }
  .paths { grid-template-columns: 1fr; }
  .paths__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .step:nth-child(2)::after { display: none; }
  .plans { grid-template-columns: 1fr; max-width: 560px; }
  .plan__for { min-height: 0; }
  .plan--main { margin-top: 8px; }
  .about, .faq, .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .reviews { grid-template-columns: 1fr; gap: 32px; max-width: 640px; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================
   Телефон
   ========================================================== */
@media (max-width: 680px) {
  :root { --header-h: 64px; }
  body { padding-bottom: 76px; }

  .section { padding: 56px 0; }
  .hero { padding: 32px 0 48px; }
  .hero__lead { font-size: 1.125rem; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { flex-direction: column; }
  .hero__art { max-width: 280px; }

  .brand img { width: 36px; height: 40px; }
  .brand__name { font-size: .95rem; }

  .paths__tabs { grid-template-columns: 1fr; }
  .paths__panel { padding: 26px 20px 28px; }
  .paths__panel h3 { font-size: 1.3125rem; }
  .paths__panel .btn { width: 100%; }

  .services { grid-template-columns: 1fr; }
  .service { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 22px 0; }
  .service__icon { width: 48px; height: 48px; padding: 11px; }

  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding: 0 0 0 68px; min-height: 48px; }
  .step::after { display: none; }

  .plan { padding: 28px 22px; }
  .posts { grid-template-columns: 1fr; }
  .faq summary { padding: 18px 52px 18px 18px; font-size: 1.125rem; }
  .faq summary::after { right: 20px; }
  .faq details p { padding: 0 18px 20px; }
  .contact__info { padding: 24px 20px; }
  .chips span { padding: 11px 16px; }

  .footer__row { grid-template-columns: 1fr; }
  .footer__tag { justify-self: start; text-align: left; }
  .footer__nav { flex-direction: column; }

  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  }
  .dock .btn { min-height: 54px; padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .house__windows rect { animation: none; fill: var(--c, var(--lamp)); }
  * { transition: none !important; }
}
