/* ===== Токени ===== */
:root {
  --red: #c8102e;        /* контраст на білому ≈ 5.9:1 (WCAG AA) */
  --red-dark: #9f0c24;
  --red-tint: #fdf0f2;
  --ink: #17171a;
  --muted: #5a5a63;      /* контраст на білому ≈ 6.9:1 */
  --line: #ece6e7;
  --white: #ffffff;
  --radius: 14px;
  --wrap: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 0; color: #fff; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 62ch; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.5rem; border-radius: 999px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  border: 2px solid var(--red); background: var(--red); color: #fff;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--red); }
.btn--ghost:hover { background: var(--red-tint); color: var(--red-dark); }
.btn--white { background: #fff; color: var(--red); border-color: #fff; }
.btn--white:hover { background: var(--red-tint); color: var(--red-dark); border-color: var(--red-tint); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* ===== Шапка ===== */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo:hover { color: var(--ink); }
.logo svg { width: 34px; height: 34px; }
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-size: .98rem; }
.nav a:hover { color: var(--red); }
.header-call { display: none; }
.menu-btn { background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; }
.nav.open ul { flex-direction: column; gap: 0; }
.nav.open a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }

@media (min-width: 900px) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .header-call { display: inline-flex; padding: .6rem 1.1rem; }
}

/* ===== Hero ===== */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { max-width: 14ch; }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.big-phone {
  display: inline-block; margin: .5rem 0 1.25rem;
  font-size: clamp(1.9rem, 6.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em;
  color: var(--red); text-decoration: none; line-height: 1.1;
  border-bottom: 4px solid var(--red);
  padding-bottom: .15em;
}
.big-phone:hover { color: var(--red-dark); border-color: var(--red-dark); }
.hero-meta { color: var(--muted); font-size: .98rem; margin: 0 0 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-art img { width: min(100%, 460px); margin-inline: auto; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 4rem; } }

/* ===== Секції ===== */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--red-tint); }
.section-head { margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }

/* Послуги: рядки з лініями, а не однакові картки */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { display: grid; gap: .35rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.services h3 { margin: 0; }
.services p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .services li { grid-template-columns: 1fr 1.6fr; gap: 2rem; align-items: baseline; } }

/* Чому ми */
.points { display: grid; gap: 2rem; }
.points h3 { color: var(--red); }
.points p { color: var(--ink); margin: 0; }
@media (min-width: 760px) { .points { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

/* Як проходить візит (справжня послідовність → нумерація доречна) */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; padding-left: 3.4rem; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.steps h3 { margin-bottom: .2em; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.split { display: grid; gap: 2.5rem; align-items: center; }
.split img { width: min(100%, 380px); margin-inline: auto; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* Термінова смуга */
.urgent { background: var(--red); color: #fff; padding: 2.75rem 0; }
.urgent .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.urgent h2 { margin: 0 0 .3em; font-size: clamp(1.5rem, 3vw, 2rem); }
.urgent p { margin: 0; max-width: 52ch; }

/* FAQ */
.faq { max-width: 780px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 1.2rem; margin: 0; }

/* Контакти + форма */
.contact { display: grid; gap: 3rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.contact dl { margin: 0 0 1.5rem; }
.contact dt { font-weight: 650; margin-top: 1.1rem; }
.contact dd { margin: 0; color: var(--muted); }
.contact dd a { color: var(--ink); }
.placeholder { background: #fff3c4; color: #5b4500; padding: 0 .3em; border-radius: 4px; }

form { display: grid; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field input:not([type="checkbox"]), .field select {
  width: 100%; font: inherit; padding: .8rem .9rem; border: 1.5px solid #cfc6c8; border-radius: 10px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--red); background: var(--red-tint); }
.error { color: var(--red-dark); font-size: .92rem; min-height: 1.2em; margin: .3rem 0 0; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--red); flex: none; }
.form-status { margin: 0; padding: .8rem 1rem; border-radius: 10px; background: var(--red-tint); display: none; }
.form-status.show { display: block; }

/* ===== Футер ===== */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 5.5rem; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (min-width: 900px) { .site-footer { padding-bottom: 2.5rem; } }

/* Липка кнопка дзвінка на мобільному */
.call-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.call-bar .btn { width: 100%; justify-content: center; }
@media (min-width: 900px) { .call-bar { display: none; } }

/* Cookie-банер */
.consent { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.25rem; display: none; gap: 1rem; align-items: center; flex-wrap: wrap; max-width: 760px; margin-inline: auto; }
.consent.show { display: flex; }
.consent p { margin: 0; flex: 1 1 280px; font-size: .95rem; }
.consent a { color: #fff; }
.consent .btn { padding: .6rem 1.2rem; }
.consent .btn--ghost { color: #fff; border-color: #fff; }
.consent .btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.consent .btn:not(.btn--ghost) { background: #fff; color: var(--red); border-color: #fff; }

/* Сторінки тексту (privacy / terms / 404) */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.doc .wrap { max-width: 780px; }
.doc h2 { font-size: 1.4rem; margin-top: 2rem; }
.doc li { margin-bottom: .4em; }
.notfound { text-align: left; min-height: 60vh; display: grid; align-content: center; }
.notfound .code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 800; color: var(--red); line-height: 1; letter-spacing: -0.05em; margin: 0 0 .1em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
