:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #0b1830;
  --ink-2: #3c4a63;
  --muted: #6b778c;
  --line: rgba(11, 24, 48, 0.1);
  --navy: #0b1830;
  --navy-2: #13254a;
  --accent: #0fb3cc;        /* блакитний неон з логотипу, притемнений для світлого фону */
  --accent-soft: rgba(15, 179, 204, 0.12);
  --viber: #7360f2;
  --gold: #e9b949;
  --radius: 22px;
  --gutter: 16px;
  --wrap: 1180px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: 0; }

.ico { width: 22px; height: 22px; flex: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.flag { width: 18px; height: 12px; border-radius: 2px; background: linear-gradient(#fff 50%, #dc143c 50%); box-shadow: 0 0 0 1px var(--line); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn--viber { background: var(--viber); color: #fff; box-shadow: 0 12px 28px -12px rgba(115, 96, 242, 0.8); }
.btn--viber:hover { background: #6450ee; }
.btn--ghost { background: var(--surface); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn--sm .ico { width: 18px; height: 18px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Шапка ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  padding-top: calc(12px + env(safe-area-inset-top));
  transition: background .25s ease, box-shadow .25s ease;
}
.topbar.is-solid {
  background: rgba(245, 243, 238, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.topbar__brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.topbar__brand b { font-weight: 800; }
.topbar:not(.is-solid) .topbar__brand { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.topbar__nav { display: none; }

/* ---------- Hero ---------- */
.hero__media {
  position: relative;
  height: min(68vh, 560px);
  min-height: 420px;
  border-radius: 0 0 32px 32px;
  overflow: hidden;
  background: var(--navy);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 22%; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,24,48,.55) 0%, transparent 22%, transparent 70%, rgba(11,24,48,.35) 100%);
  pointer-events: none;
}
.hero__float {
  position: absolute;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.35);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink-2);
}
.hero__float b { display: block; font-size: 24px; line-height: 1; color: var(--ink); }
.hero__float--a { left: var(--gutter); bottom: 20px; }
.hero__float--b { right: var(--gutter); bottom: 20px; }

.hero__text { padding: 26px var(--gutter) 8px; }
.hero h1 { font-size: clamp(44px, 12vw, 84px); font-weight: 800; line-height: 0.98; }
.hero h1 em { font-weight: 600; }
.hero h1 .eyebrow { display: flex; width: fit-content; line-height: 1.5; }
.hero__name { display: block; }
.lead { margin: 16px 0 22px; font-size: 17px; color: var(--ink-2); max-width: 46ch; }

.hero__cta { display: grid; gap: 10px; }
.hero__cta .btn { width: 100%; }

.socials { list-style: none; display: flex; gap: 10px; margin: 18px 0 0; padding: 0; }
.socials a {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .15s ease, color .15s ease;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Партнери ---------- */
.partners { margin: 36px 0 8px; text-align: center; }
.partners p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 22s linear infinite; }
.marquee__track span {
  padding: 0 22px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(11, 24, 48, 0.28);
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Секції ---------- */
.section { padding: 48px var(--gutter) 0; max-width: var(--wrap); margin: 0 auto; }
.section__head { margin-bottom: 22px; }
.section h2 { font-size: clamp(30px, 8vw, 48px); font-weight: 800; }

/* Про мене */
.about { display: grid; gap: 24px; }
.about__photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--navy); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.about__text p:not(.eyebrow) { color: var(--ink-2); font-size: 16.5px; margin: 16px 0; }
.checks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; font-weight: 600; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230fb3cc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { padding: 14px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stats b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.stats span { font-size: 12px; color: var(--muted); line-height: 1.25; display: block; margin-top: 2px; }

/* Послуги */
.services { display: grid; gap: 10px; }
.service {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.service__num { display: block; margin-bottom: 14px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--accent); }
.service h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.service p { margin: 0; color: var(--ink-2); font-size: 15px; }
.service--main { background: var(--navy); color: #fff; border-color: transparent; }
.service--main p { color: rgba(255, 255, 255, 0.72); }
.service--main .service__num { color: #5ee3f5; }

/* Кроки — темна смуга */
.steps-wrap {
  max-width: none;
  margin-top: 48px;
  padding-bottom: 48px;
  background: var(--navy);
  color: #fff;
}
.steps-wrap > * { max-width: calc(var(--wrap) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.steps-wrap em { color: #5ee3f5; }
.steps-wrap .eyebrow { color: #5ee3f5; }
.steps { list-style: none; margin: 0 auto; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 18px 18px 18px 70px;
  border-radius: 18px;
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #5ee3f5;
  color: var(--navy);
  font-weight: 800;
}
.steps b { display: block; font-size: 17px; }
.steps span { color: rgba(255, 255, 255, 0.68); font-size: 14.5px; }

/* Галереї */
.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 12px;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.thumb {
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.thumb:hover img { transform: scale(1.03); }
.gallery--visas .thumb { width: 58%; aspect-ratio: 3 / 4; background: var(--navy); }
.gallery--reviews { align-items: center; }
.gallery--reviews .thumb img { width: auto; height: auto; max-height: 300px; max-width: 70vw; object-fit: contain; }

/* Відгуки-цитати */
.quotes {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 12px;
  scrollbar-width: none;
}
.quotes::-webkit-scrollbar { display: none; }
.quote {
  flex: none;
  width: 84%;
  margin: 0;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.quote::before { content: "★★★★★"; color: var(--gold); letter-spacing: 2px; font-size: 15px; margin-bottom: 10px; }
.quote blockquote { margin: 0 0 16px; font-size: 16.5px; line-height: 1.5; flex: 1; }
.quote figcaption { font-size: 13px; font-weight: 700; color: var(--muted); }
.reviews__sub { margin: 30px 0 12px; font-size: 16px; font-weight: 700; color: var(--ink-2); }

/* Контакти */
.contacts { padding-bottom: 20px; }
.contacts__card {
  padding: 28px 18px 18px;
  border-radius: 28px;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(94, 227, 245, 0.22), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(115, 96, 242, 0.25), transparent 60%),
    var(--navy);
  color: #fff;
}
.contacts__intro { text-align: center; margin-bottom: 22px; }
.contacts__avatar { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; border: 3px solid #5ee3f5; }
.contacts h2 { font-size: clamp(30px, 8vw, 44px); }
.contacts em { color: #5ee3f5; }
.contacts__intro p { margin: 12px auto 0; color: rgba(255,255,255,.75); max-width: 42ch; }
.contacts__list { display: grid; gap: 10px; }
.clink {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background .15s ease;
}
.clink:hover { background: rgba(255, 255, 255, 0.13); }
.clink span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.clink small { color: rgba(255,255,255,.6); font-size: 13px; }
.clink--viber { background: var(--viber); border-color: transparent; }
.clink--viber:hover { background: #6450ee; }
.clink--viber small { color: rgba(255,255,255,.85); }

.map { margin-top: 12px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; }
.map__link { display: block; padding: 14px 18px; font-weight: 700; }

.footer { padding: 24px var(--gutter) calc(100px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 13px; }
.footer p { margin: 0 0 4px; }
.footer__note { font-size: 12px; max-width: 44ch; margin: 0 auto !important; }

/* ---------- Липка панель (мобільний) ---------- */
.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr 52px 52px;
  gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(245, 243, 238, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform .25s ease;
}
.dock.is-visible { transform: none; }
.dock__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
}
.dock__btn--viber { background: var(--viber); color: #fff; border-color: transparent; }

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 24, 0.97);
  padding: 56px 12px 48px;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; user-select: none; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox__close { top: 10px; right: 10px; width: 44px; height: 44px; font-size: 18px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; line-height: 1; }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
.lightbox__count { position: absolute; bottom: 14px; inset-inline: 0; margin: 0; text-align: center; color: #9fb0c8; font-size: 14px; }
@media (hover: none) { .lightbox__nav { display: none; } }


/* ---------- Підказка «гортайте» під стрічками (лише коли є що гортати) ---------- */
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.scroll-hint[hidden] { display: none; }
.scroll-hint__track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.scroll-hint__thumb {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--accent);
  transition: transform .1s linear;
}
.scroll-hint__label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.scroll-hint__label::after { content: "→"; animation: hint-arrow 1.4s ease-in-out infinite; }
.scroll-hint.is-done .scroll-hint__label::after { animation: none; }
@keyframes hint-arrow { 50% { transform: translateX(4px); } }

/* ---------- Запрошення в Telegram ---------- */
.tg-popup {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom)); /* над липкою панеллю */
  display: flex;
  gap: 14px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -20px rgba(11, 24, 48, 0.45);
  animation: tg-in .35s cubic-bezier(.2, .9, .3, 1.2);
}
.tg-popup[hidden] { display: none; }
.tg-popup.is-leaving { animation: tg-out .25s ease forwards; }
@keyframes tg-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes tg-out { to { opacity: 0; transform: translateY(24px); } }
.tg-popup__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #29a9eb;
  color: #fff;
}
.tg-popup__icon .ico { width: 26px; height: 26px; margin-left: -2px; }
.tg-popup__body { min-width: 0; padding-right: 18px; }
.tg-popup__title { margin: 2px 0 4px; font-size: 17px; font-weight: 800; line-height: 1.25; }
.tg-popup__text { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.tg-popup__actions { display: flex; align-items: center; gap: 8px; }
.tg-popup__btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: #29a9eb;
  color: #fff;
  font-weight: 700;
}
.tg-popup__btn:hover { background: #1f97d6; }
.tg-popup__later {
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.tg-popup__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.tg-popup__close:hover { background: var(--bg); color: var(--ink); }

/* ---------- Планшет ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .hero__cta { display: flex; flex-wrap: wrap; }
  .hero__cta .btn { width: auto; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery--visas .thumb { width: 30%; }
  .quotes { display: grid; grid-template-columns: repeat(2, 1fr); overflow: visible; margin: 0; padding: 0; }
  .quote { width: auto; }
  .contacts__list { grid-template-columns: repeat(2, 1fr); }
  .contacts__card { padding: 40px 32px 32px; }
}

/* ---------- ПК ---------- */
@media (min-width: 1024px) {
  .topbar { padding: 14px 40px; }
  .topbar.is-solid .topbar__nav, .topbar__nav {
    display: flex;
    gap: 28px;
    font-size: 15px;
    font-weight: 600;
  }
  .topbar:not(.is-solid) .topbar__nav { color: var(--ink); }
  .topbar__nav a:hover { color: var(--accent); }
  .topbar:not(.is-solid) .topbar__brand { color: var(--ink); text-shadow: none; }

  .hero {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 100px 40px 0;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
  }
  .hero__media { order: 2; height: min(calc(100vh - 150px), 720px); border-radius: 32px; overflow: visible; background: none; }
  .hero__media img { border-radius: 32px; object-position: 62% 22%; box-shadow: 0 40px 80px -40px rgba(11,24,48,.55); }
  .hero__media::after { border-radius: 32px; background: linear-gradient(180deg, transparent 70%, rgba(11,24,48,.3)); }
  .hero__text { padding: 0; }
  .hero__float--a { left: -28px; bottom: 48px; }
  .hero__float--b { right: -20px; bottom: auto; top: 44px; }
  .lead { font-size: 19px; }

  .section { padding: 96px 40px 0; }
  .about { grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
  .services { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .service { grid-column: span 2; padding: 28px 26px; }
  .service--main { grid-column: span 3; padding: 36px 32px; }
  .service--main h3 { font-size: 26px; }
  .steps-wrap { margin-top: 96px; padding-bottom: 96px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 76px 22px 24px; }
  .quotes { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .gallery--visas { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 0; }
  .gallery--visas .thumb { width: auto; }
  .gallery--reviews { display: block; columns: 4; column-gap: 12px; overflow: visible; margin: 0; padding: 0; }
  .gallery--reviews .thumb { display: block; width: 100%; margin-bottom: 12px; break-inside: avoid; }
  .gallery--reviews .thumb img { width: 100%; height: auto; max-height: none; max-width: none; }
  .contacts__card { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; padding: 56px; }
  .contacts__intro { text-align: left; margin: 0; }
  .contacts__avatar { margin: 0 0 18px; }
  .contacts__intro p { margin-left: 0; }
  .footer { padding: 40px 40px 48px; }
  .dock { display: none; }
  .tg-popup { left: auto; right: 24px; bottom: 24px; width: 400px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .scroll-hint__label::after, .tg-popup, .tg-popup.is-leaving { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
