/* Skyport on the Impeca platform — additions over the ported theme (theme.css).
   Dark is the brand default (live site); light theme from the Skyport design system. Colors only via tokens. */

:root[data-theme="light"] {
    --surface-primary:    #f8faff;
    --surface-secondary:  #eaedf3;
    --surface-tertiary:   #dbdee4;
    --surface-quaternary: #bec1c7;
    --surface-quinary:    #14161a;
    --surface-glass-1: #14161a0d;
    --surface-glass-2: #14161a08;
    --surface-glass-3: #14161a03;
    --surface-scrim:     #14161a33;
    --surface-separator: #60636a40;
    --label-primary:    #14161a;
    --label-secondary:  #2b2e32;
    --label-tertiary:   #4a4d53;
    --label-quaternary: #60636a;
    --label-quinary:    #696c72; /* was #808389: 3.6:1 on the light page (footer, QA 10.11) -> 5:1 */
    --accent-primary:   #00737a; /* was #007a80: 4.4:1 on light grey -> 4.8:1 */
    --accent-secondary: #d93f00;
    --control-outlined: #2b2e32;
    --control-outlined-hover: #14161a;
    --control-outlined-pressed: #000000;
    color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }
body { background: var(--surface-primary); color: var(--label-secondary); }

/* Text on the orange primary button: graphite gives 6:1 (white on #ff4d00 is 3.3:1) */
.btn--primary, .btn--primary:hover, .btn--primary:focus-visible { color: var(--surface-primary); }
:root[data-theme="light"] .btn--primary { color: #14161a; }

/* 404 */
.nf { max-width: 720px; padding-block: var(--sp-64); }
.nf p:last-child { display: flex; flex-wrap: wrap; gap: var(--sp-12); }

/* Footer additions: cookie settings, theme toggle, studio credit */
.site-footer__bottom { flex-wrap: wrap; }
.sp-footer-extra { flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8) var(--sp-24); font-size: var(--fs-caption); color: var(--label-tertiary); }
.sp-linkbtn { font-family: var(--font-body); font-size: var(--fs-caption); line-height: 1.4; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sp-linkbtn:hover { color: var(--label-primary); }
.sp-footer-extra .impc-credit-row { margin-top: 0; }

/* Cookie consent bar */
.sp-consent { position: fixed; z-index: 90; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 720px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-12) var(--sp-24); padding: var(--sp-16) var(--sp-24); background: var(--surface-secondary); color: var(--label-secondary);
  border: 1px solid var(--surface-separator); border-radius: var(--r-16); font-family: var(--font-body); font-size: var(--fs-body-2); line-height: 1.5; }
.sp-consent[hidden] { display: none; }
.sp-consent p { margin: 0; flex: 1 1 280px; }
.sp-consent a { color: var(--accent-primary); }
.sp-consent__actions { display: flex; gap: var(--sp-8); }

/* "New version" dialog — no way to skip it (standard 2.3) */
.sp-version { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--sp-16); background: var(--surface-scrim); }
.sp-version[hidden] { display: none; }
.sp-version__card { max-width: 420px; padding: var(--sp-32); background: var(--surface-secondary); color: var(--label-secondary); border-radius: var(--r-20);
  font-family: var(--font-body); font-size: var(--fs-body-1); line-height: 1.5; }
.sp-version__title { font-family: var(--font-display); font-size: var(--fs-h5); color: var(--label-primary); margin: 0 0 var(--sp-8); }

/* Copy button next to phone / e-mail */
.sp-copy { margin-left: var(--sp-8); padding: 2px var(--sp-8); font-family: var(--font-body); font-size: var(--fs-caption); line-height: 1.4;
  color: var(--label-tertiary); background: none; border: 1px solid var(--surface-separator); border-radius: var(--r-full); cursor: pointer; vertical-align: middle; }
.sp-copy:hover { color: var(--label-primary); border-color: var(--label-tertiary); }
.sp-copy.is-done { color: var(--accent-primary); border-color: var(--accent-primary); }
/* touch screens: the same look, but a finger-sized hit area (QA 01.11: copy button 87x23, news link 116x20, map dots 2x2 at 375) */
@media (pointer: coarse) {
  .sp-copy { position: relative; }
  .sp-copy::before { content: ""; position: absolute; inset: -11px -4px; }
  .news__actions .news-link { padding-block: 12px; margin-block: -12px; }
  .geo-marker::before { inset: -12px; }
  /* QA 11.11 (160 views): cookie settings 127x17, contacts e-mail 189x22, article back link and previous-article link 20 px high */
  .sp-footer-extra .sp-linkbtn, .contacts__phone > a, .material-back,
  .wp-block-post-navigation-link > a { padding-block: 4px; margin-block: -4px; }
}

/* Design pass 26.11: hit area >= 24 px on every pointer, measurable on the element itself (not only ::before on touch).
   Copy button: 23 -> 25 px high; map dots: transparent padding around the same visible dot (background stays in the content box). */
.sp-copy { padding-block: 3px; }
.geo-marker { box-sizing: content-box; padding: 12px; background-clip: content-box; }
/* /contacts office cards: e-mail and phone links in <dd> were 20 px high (inline padding does not move the text) */
dd > a:is([href^="mailto:"], [href^="tel:"]) { padding-block: 4px; }

/* Openings with a photo look the same in both themes: the photo stays dark in the light theme too, so dark text on it was
   unreadable (/hubs 26.11; home, /quote, /about, /contacts, services, countries 04.12). All colour tokens = theme.css :root (dark).
   A new kind of photo opening goes into BOTH lists below. Lock: _tools/check_photo_hero_light.js */
:root[data-theme="light"] :is(.hero, .page-hero.has-image, .material-hero.has-image, .service-hero, .contacts--page-hero) {
    --surface-primary:    #14161a;
    --surface-secondary:  #2b2e32;
    --surface-tertiary:   #60636a;
    --surface-quaternary: #808389;
    --surface-quinary:    #eaedf3;
    --surface-glass-1: #f8faff1a;
    --surface-glass-2: #f8faff0a;
    --surface-glass-3: #f8faff03;
    --surface-scrim:     #14161a4d;
    --surface-separator: #bec1c799;
    --label-primary:    #f8faff;
    --label-secondary:  #dbdee4;
    --label-tertiary:   #bec1c7;
    --label-quaternary: #a1a5ac;
    --label-quinary:    #808389;
    --accent-primary:   #00fdff;
    --accent-secondary: #ff4d00;
    --control-outlined: #dbdee4;
    --control-outlined-hover: #bec1c7;
    --control-outlined-pressed: #a1a5ac;
    color-scheme: dark;
    color: var(--label-secondary);
}
/* 320 px: the narrow service card cut long titles ("Залізничні перевезення", 05.12) */
@media (max-width: 359px) { .card-service__title { font-size: var(--fs-body-1); overflow-wrap: anywhere; } }
/* Article cards (/insights, home): the glass panel over a dark photo left dark text on dark in the light theme (04.12) -> dense light panel */
:root[data-theme="light"] .card-article__content {
    background: color-mix(in srgb, var(--surface-primary) 92%, transparent);
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
/* Same pages, the header bar while it still sits over that dark photo (top of the page, not .is-scrolled): light labels.
   Its drop-downs keep their light surfaces, so inside them the light-theme labels come back (values = :root light above). */
:root[data-theme="light"] body:has(:is(.hero, .page-hero.has-image, .material-hero.has-image, .service-hero, .contacts--page-hero)) .site-header:not(.is-scrolled) .site-header__bar {
    --label-primary:    #f8faff;
    --label-secondary:  #dbdee4;
    --label-tertiary:   #bec1c7;
    --accent-primary:   #00fdff;
    --surface-separator: #f8faff33;
}
:root[data-theme="light"] body:has(:is(.hero, .page-hero.has-image, .material-hero.has-image, .service-hero, .contacts--page-hero)) .site-header:not(.is-scrolled) :is(.nav-dropdown, .language-switcher__list) {
    --label-primary:    #14161a;
    --label-secondary:  #2b2e32;
    --label-tertiary:   #4a4d53;
    --accent-primary:   #00737a;
    --surface-separator: #60636a40;
}

/* Design UX-UI 4, 01.12 (quality_skyport_01.12-mobile.md): in the light theme the partners strip took --surface-quinary, which the
   light palette inverts to near-black — grey logos on it (LOT) vanished. Strip = light surface in both themes, like the night look.
   «Детальніше» in About sat as dark text on see-through glass over the dark photo — give it a solid light backing. */
:root[data-theme="light"] .spm { background: var(--surface-secondary); }
:root[data-theme="light"] .about__actions .btn--outlined { background: var(--surface-primary); color: var(--label-primary);
  backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Design quality 27.11 (Q8): on phones the homepage was > 9 000 px tall at 375 — every service card was 360 px (featured 540).
   Phones get compact row cards: photo 120 px on the left, title + text on the right, the whole card stays one link. */
@media (max-width: 760px) {
  .card-service,
  .card-service[data-size="featured"],
  .card-service[data-size="wide"],
  .catalog-group[data-width="full"] .card-service[data-size="featured"],
  .catalog-group[data-style="blue"] .card-service {
    display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: stretch;
    height: auto; min-height: 120px;
  }
  .card-service::after { inset: 0 auto 0 0; width: 120px; }
  .card-service__media { position: relative; inset: auto; grid-column: 1; grid-row: 1; min-height: 120px; }
  .card-service__image,
  .card-service__image--with-mobile { inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .card-service__body,
  .card-service[data-size="wide"] .card-service__body,
  .card-service[data-style="dark"]:not([data-size="featured"]) .card-service__body {
    grid-column: 2; grid-row: 1; width: 100%; height: auto; justify-content: center;
    padding: var(--sp-16); border: 0; border-radius: 0; background: transparent;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}

/* Form result line for the ported contact forms */
.sp-form-status { margin-top: var(--sp-12); font-size: var(--fs-body-2); color: var(--label-primary); }
.sp-form-status.is-error { color: var(--accent-secondary); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* ============================================================================
   ПІДПИС СТУДІЇ IMPECA — футер-кредит проєкту. v4, 03.09.2026

   ЧОМУ ПЕРЕРОБЛЕНО. v3 (14.08) робив підпис помітним через ФОРМУ: капсула з
   градієнтним знаком, фіолетовий фірмовий колір, стрілка, підйом на наведення.
   На сайті клієнта це читається як чужа реклама, вставлена в чужий футер, —
   Борис 03.09: «позорисько, воно має бути в стилі інших написів».
   І він правий не лише щодо смаку: капсула кричить «банер», а банери люди
   пропускають очима так само, як пропускали сірий рядок з opacity:.85.

   ЩО ЗАМІСТЬ. Підпис — ЗВИЧАЙНЕ ПОСИЛАННЯ в нижньому рядку футера, набране
   тим самим кеглем і кольором, що й копірайт поруч. Помітність йому дає не
   декор, а МІСЦЕ (окремий рядок під копірайтом) і АНКОР, який щось означає.

   СЕО. Вага беклінка йде за анкорним текстом. «Сайт створено в Impeca» несе
   рівно нуль ключових слів — пошуковик бачить лише бренд. Тому анкор тепер
   починається з послуги: «Розробка сайтів — Impeca». Бренд лишається в <b>,
   але першим стоїть те, за що ми хочемо ранжуватись.

   ЧОМУ САМОДОСТАТНІЙ. Блок їде на 10 чужих сайтів із різними CSS. Свій
   префікс `impc-` не перетнеться з класами господаря. Але, на відміну від
   v3, тепер він не ПРИНОСИТЬ свій вигляд, а ПЕРЕЙМАЄ вигляд господаря:
   `font:inherit; color:inherit`. Саме тому він і виглядає як решта написів
   на будь-якому сайті — і на темному футері, і на світлому, без окремих тем.
   ============================================================================ */

/* Ряд-обгортка. Ставиться під копірайтом, коли у футері немає власного
   нижнього рядка, куди можна вкласти посилання. Ніяких рамок і фонів:
   рядок має бути частиною футера, а не блоком поверх нього. */
.impc-credit-row {
  margin-top: 10px;
}

.impc-credit {
  font: inherit;
  color: inherit;
  /* Підкреслення — справжнє text-decoration, а не рамка знизу. Рамка малює
     суцільну лінію на всю ширину боксу й читається як окремий елемент;
     підкреслення обтікає літери, стоїть на відступі й лишається тим, чим має
     бути, — ознакою посилання. Колір береться з тексту, тому лягає на будь-яке
     тло без підбору, а приглушення дає opacity — гасне разом і текст, і лінія. */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity .15s ease;
  opacity: .78;
  -webkit-tap-highlight-color: transparent;
}

.impc-credit:hover,
.impc-credit:focus-visible {
  opacity: 1;
}

.impc-credit:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Бренд трохи важчий за послугу — так рядок читається як підпис, а не як
   рекламний слоган. Кольором не виділяємо: фірмовий фіолетовий на чужому
   футері дав би непередбачуваний контраст, а на темному тлі просто зник би. */
.impc-credit b {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .impc-credit { transition: none; }
}

/* Hub pages (generated from live facts) */
.hub-page { padding-top: calc(var(--sp-120) + var(--sp-40)); }
.hub-page--after-photo { padding-top: var(--sp-40); }
.hub-page--after-photo .hub-page__grid:first-child { margin-top: 0; }
/* 320 px phones: the cookie bar and the chat button covered the calculator button */
@media (max-width: 359px) { .page-hero.has-image:has(+ .hub-page--after-photo) .page-hero__content { padding-top: 88px; } }
.hub-page__crumbs { color: var(--label-tertiary); margin-bottom: var(--sp-24); }
.hub-page__crumbs a { color: var(--label-secondary); }
.sp-crumbs { position: relative; z-index: 1; margin: 0 0 var(--sp-16); color: inherit; opacity: .8; }
.sp-crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sp-crumbs a:hover { opacity: 1; }
/* Phone: footer links and breadcrumbs were 15–20 px tall (QA 10.11), finger targets need ≥ 24 px. */
@media (max-width: 899px) { .site-footer a, .sp-crumbs a, .hub-page__crumbs a { display: inline-block; padding-block: 5px; } } /* hub/route crumbs 48x15 (QA 11.11) */
/* YouTube embeds in insights come with width="500": the page got 516 px wide on a 375 phone (QA 10.11). */
.wp-block-embed__wrapper iframe { display: block; max-width: 100%; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.hub-page__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-24); margin-top: var(--sp-40); }
.hub-page__card { min-width: 0; padding: var(--sp-32); background: var(--surface-secondary); border-radius: var(--r-20); color: var(--label-secondary); }
.hub-page__card h2 { color: var(--label-primary); margin: 0 0 var(--sp-16); }
.hub-page__services, .hub-page__list { list-style: none; margin: 0 0 var(--sp-24); padding: 0; display: grid; gap: var(--sp-8); }
.hub-page__services a, .hub-page__list a { color: var(--label-primary); text-decoration: none; border-bottom: 1px solid var(--surface-separator); }
.hub-page__services a:hover, .hub-page__list a:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.hub-page__group h3 { color: var(--label-tertiary); margin: 0 0 var(--sp-8); }
.hub-page__office { color: var(--label-secondary); }
.hub-page__office a { color: var(--accent-primary); }
.hub-page__ask { margin-top: var(--sp-40); color: var(--label-secondary); }

/* Live hub map (geo-live.js): real routes as arcs, moving cargo, country labels. Colors only via tokens. */
.geo-arcs { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.geo-arc, .geo-arc-flow { fill: none; stroke-linecap: round; }
.geo-arc { stroke-width: 1.4; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: .55; transition: stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1) calc(var(--i) * 90ms), opacity .3s, stroke-width .3s; }
.geo-live .geo-arc { stroke-dashoffset: 0; }
.geo-arc--air { stroke: var(--accent-primary); }
.geo-arc--sea { stroke: var(--accent-secondary); }
.geo-arc--road { stroke: var(--label-primary); }
.geo-arc.is-on { opacity: .9; }
.geo-arc.is-dim { opacity: .12; }
.geo-arc-flow { stroke-width: 2.6; stroke-dasharray: 3 7; opacity: 0; }
.geo-arc-flow.is-on { opacity: 1; animation: geo-flow 1.4s linear infinite; }
@keyframes geo-flow { to { stroke-dashoffset: -20; } }

.geo-pin { position: absolute; left: var(--x); top: var(--y); width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; background: var(--accent-primary); z-index: 2; transition: opacity .3s; }
.geo-pin::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--accent-primary); opacity: 0; }
.geo-live .geo-pin::after { animation: geo-pulse 2.6s ease-out infinite; }
.geo-pin--to { width: 12px; height: 12px; background: var(--accent-secondary); box-shadow: 0 0 0 3px var(--surface-primary); }
.geo-pin--to::after { border-color: var(--accent-secondary); inset: -8px; }
.geo-pin.is-dim { opacity: .3; }
.geo-pin--sea { background: var(--accent-secondary); }
.geo-pin--sea::after { border-color: var(--accent-secondary); }
@keyframes geo-pulse { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
.geo-pin__label { position: absolute; top: 50%; translate: 0 -50%; white-space: nowrap; font-size: 12px; line-height: 1; letter-spacing: .02em; color: var(--label-primary); background: color-mix(in srgb, var(--surface-primary) 85%, transparent); padding: 4px 6px; border-radius: 4px; pointer-events: none; } /* r3: контраст підпису 2.42 → щільна підкладка */
.geo-pin--r .geo-pin__label { left: calc(100% + 8px); }
.geo-pin--l .geo-pin__label { right: calc(100% + 8px); }
.geo-pin--t .geo-pin__label { left: 50%; top: auto; bottom: calc(100% + 8px); translate: -50% 0; }
.geo-pin--b .geo-pin__label { left: 50%; top: calc(100% + 8px); translate: -50% 0; }
.geo-pin--to .geo-pin__label { color: var(--label-primary); font-weight: 600; }
.geo-pin--from { cursor: pointer; }
.geo-pin__label { white-space: pre; }
.geo-pin--from .geo-pin__label { line-height: 1.3; }
.geo-pin--to .geo-pin__label { opacity: 0; transition: opacity .2s; }
.geo-pin--to.is-show .geo-pin__label { opacity: 1; }
.geo-pin--quiet .geo-pin__label { opacity: 0; transition: opacity .2s; }
.geo-pin--quiet:hover .geo-pin__label, .geo-pin--quiet.is-show .geo-pin__label { opacity: 1; }
.geo-pin.is-show, .geo-pin:hover { z-index: 4; }

.geo-comet { position: absolute; left: 0; top: 0; will-change: transform; width: 6px; height: 6px; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: 3; opacity: 0; }
.geo-comet--air { background: var(--accent-primary); box-shadow: 0 0 10px 2px var(--accent-primary); }
.geo-comet--sea { background: var(--accent-secondary); box-shadow: 0 0 10px 2px var(--accent-secondary); }
.geo-comet--road { background: var(--label-primary); box-shadow: 0 0 8px 1px var(--label-primary); }
/* Рейси (Борис 30.11): у спокої дуги тихі, світиться та, якою йде рейс; хвіст і спалахи — тими ж токенами. */
.geo-arcs:not(.is-focus) .geo-arc.is-on { opacity: .32; }
.geo-arcs .geo-arc.is-on.is-live, .geo-arcs .geo-arc.is-live:not(.is-dim) { opacity: .95; stroke-width: 1.8; }
.geo-comet--express { background: var(--label-primary); box-shadow: 0 0 12px 3px var(--label-primary); }
.geo-trail { fill: none; stroke-linecap: round; stroke-width: 3; opacity: 0; }
.geo-trail--air { stroke: var(--accent-primary); }
.geo-trail--sea { stroke: var(--accent-secondary); }
.geo-trail--express { stroke: var(--label-primary); }
.geo-ping { position: absolute; width: 10px; height: 10px; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--accent-primary); pointer-events: none; z-index: 3; animation: geo-ping 1.4s cubic-bezier(.2,.7,.3,1) forwards; }
.geo-ping--sea { border-color: var(--accent-secondary); }
.geo-ping--express { border-color: var(--label-primary); }
@keyframes geo-ping { 0% { scale: .4; opacity: 1; } 100% { scale: 3.4; opacity: 0; } }
.geo-live .geo-pin::after { animation: none; } /* постійна пульсація 43 точок — монотонно; спалах лише на рейсі (.geo-ping) */

.geo-stat { position: absolute; left: var(--sp-16); bottom: var(--sp-16); z-index: 4; padding: 8px 12px; border-radius: 8px; background: var(--surface-glass-1); backdrop-filter: blur(10px); font-size: 13px; color: var(--label-tertiary); }
.geo-stat b { color: var(--label-primary); font-weight: 600; font-size: 15px; }

.geo-route__btn[data-arc] { transition: background .2s; }
.geo-route__btn[data-arc]:hover { background: var(--surface-glass-1); }

@media (max-width: 900px) {
  .geo__map { position: relative; }
  .geo-pin { width: 6px; height: 6px; }
  .geo-pin--to { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--surface-primary); }
  .geo-pin__label { display: none; }
  .geo-pin__label { font-size: 10px; padding: 2px 4px; }
  .geo-stat { left: 8px; bottom: 8px; padding: 4px 8px; font-size: 12px; }
  .geo-stat b { font-size: 13px; }
  .geo-comet { width: 4px; height: 4px; }
  /* the 600px panel left a blank block under a short list */
  .geo__panel { height: auto; min-height: 0; max-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  .geo-arc { transition: none; stroke-dashoffset: 0; }
  .geo-arc-flow.is-on, .geo-live .geo-pin::after { animation: none; }
}

/* Route pages (/routes/*) */
.route-page .hub-page__group { margin-top: var(--sp-24); }
.route-page .hub-page .t-caption:not(.hub-page__crumbs) { margin-top: var(--sp-16); color: var(--label-tertiary); }

/* Scroll reveal (motion.js): sections and cards rise in once; hero untouched; JS-only state */
.sp-motion .sp-reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms cubic-bezier(0.23, 1, 0.32, 1), transform 600ms cubic-bezier(0.23, 1, 0.32, 1); }
.sp-motion .sp-reveal.is-in { opacity: 1; transform: none; }
.about-stat__value { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .sp-motion .sp-reveal { opacity: 1; transform: none; transition: none; } }

/* h3 -> h2 for heading order (SEO 28.10): the look of h3 stays */
h2.catalog-group__title, .contacts-form__success h2 { font-size: var(--fs-h3); line-height: 1.18; letter-spacing: -.02em; }

/* Літак за прокруткою — лише головна (flight.js). Кольори з токенів, тож день і ніч однакові за логікою. */
.sp-flight { position: fixed; z-index: 40; pointer-events: none; left: 16px; right: 16px; bottom: 10px; height: 30px; color: var(--accent-primary); }
.sp-flight svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-flight__route { fill: none; stroke: var(--label-tertiary); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.sp-flight__done { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .85; }
.sp-flight__plane path { fill: currentColor; }
.sp-flight__from, .sp-flight__to { position: absolute; font-size: 11px; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: var(--label-tertiary); }
.sp-flight__from { left: 0; bottom: -2px; }
.sp-flight__to { right: 0; bottom: -2px; transition: color .3s; }
.sp-flight.is-landed .sp-flight__to { color: currentColor; }
@media (max-width: 899px) { .sp-flight__from, .sp-flight__to { display: none; } }
/* Below 1360 the strip lies across page text (QA 09.11: the dotted route crossed block text on a phone) — give it its own backing. */
@media (max-width: 1359px) {
  .sp-flight::before { content: ""; position: absolute; inset: -4px -16px -10px; background: var(--surface-primary); opacity: .9; border-top: 1px solid var(--surface-tertiary); }
}
@media (min-width: 1360px) {
  .sp-flight { left: auto; right: 12px; bottom: auto; top: 18vh; width: 48px; height: 64vh; }
  .sp-flight__from { left: 50%; top: -20px; bottom: auto; transform: translateX(-50%); }
  .sp-flight__to { left: 50%; right: auto; bottom: -22px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce), print { .sp-flight { display: none; } }

/* Footer column titles are labels, not page headings (SEO 30.10: repeated H2 on every page); keep the heading typeface they had as h2. */
.site-footer__heading { font-family: var(--font-display); }

/* Site chat with the AI assistant (standard §8). Sits above the flight strip and below the consent banner. */
.sp-chat { position: fixed; z-index: 80; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); font-family: var(--font-body); }
.sp-chat__fab { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1px solid var(--surface-separator); border-radius: 999px;
  background: var(--surface-secondary); color: var(--label-primary); font: inherit; font-size: var(--fs-body-2); cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / .28); }
.sp-chat__fab svg { width: 20px; height: 20px; color: var(--accent-primary); }
.sp-chat__fab:hover { border-color: var(--accent-primary); }
body:has(.sp-consent:not([hidden])) .sp-chat:not(.is-open) { bottom: calc(28px + var(--consent-h, 0px) + env(safe-area-inset-bottom, 0px)); } /* banner shown: button stays reachable above it */
.sp-chat.is-open { z-index: 101; } /* open panel goes above the fixed site header (100), else its title and close button hide on phones */
.sp-chat.is-open .sp-chat__fab { display: none; }
.sp-chat__panel { display: flex; flex-direction: column; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px));
  border: 1px solid var(--surface-separator); border-radius: var(--r-8); background: var(--surface-primary); color: var(--label-primary); box-shadow: 0 16px 48px rgb(0 0 0 / .4); overflow: hidden; }
.sp-chat__panel[hidden] { display: none; }
.sp-chat__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 12px 16px; background: var(--surface-secondary); font-size: var(--fs-body-2); }
.sp-chat__x { width: 44px; height: 44px; border: 0; background: none; color: var(--label-secondary); font-size: 26px; line-height: 1; cursor: pointer; }
.sp-chat__x:hover { color: var(--accent-primary); }
.sp-chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.sp-chat__msg { margin: 0; max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: var(--fs-body-2); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-chat__msg--assistant { align-self: flex-start; background: var(--surface-secondary); color: var(--label-primary); border-bottom-left-radius: 4px; }
.sp-chat__msg--user { align-self: flex-end; background: var(--surface-tertiary); color: var(--label-primary); border-bottom-right-radius: 4px; }
.sp-chat__msg--note { align-self: center; max-width: 100%; padding: 4px 8px; background: none; color: var(--accent-primary); font-size: var(--fs-caption); }
.sp-chat__msg.is-wait { color: var(--label-tertiary); }
.sp-chat__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--surface-separator); }
.sp-chat__form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 10px 12px; border: 1px solid var(--surface-separator); border-radius: var(--r-8);
  background: var(--surface-secondary); color: var(--label-primary); font: inherit; font-size: 16px; }
.sp-chat__form textarea:focus { outline: 2px solid var(--accent-primary); outline-offset: 0; }
.sp-chat__form .btn { min-height: 44px; }
.sp-chat__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 599px) { .sp-chat__fab span { display: none; } .sp-chat__fab { width: 52px; padding: 0; justify-content: center; } .sp-chat__panel { height: calc(100dvh - 32px); } }
@media print { .sp-chat { display: none; } }

/* SEO-сторінки «послуга × для кого» (gen_audience.js): відступи між блоками й питання-відповіді */
.audience-page .hub-page__grid + .hub-page__grid, .audience-page__faq { margin-top: 24px; }
.audience-page .section-head .btn { margin-top: 16px; }
.audience-page__faq details { padding: 12px 0; border-bottom: 1px solid var(--label-quinary); }
.audience-page__faq details:last-child { border-bottom: 0; }
.audience-page__faq summary { cursor: pointer; font-weight: 600; }
.audience-page__faq details p { margin: 8px 0 0; color: var(--label-secondary); }

/* Головна на телефоні (дизайн r2, 30.11): коротша сторінка, читабельний заголовок на фото */
@media (max-width: 767px) {
  .about__stats-title {
    align-self: flex-start; padding: 10px 14px; border-radius: var(--r-12, 12px);
    background: color-mix(in srgb, var(--surface-primary) 86%, transparent);
  }
  /* r3 (UX-UI 3, 30.11): абзац «Skyport допомагає імпортерам…» зливався з літерами Skyport на фото вдень */
  .about__title-group {
    padding: 14px 16px; border-radius: var(--r-12, 12px);
    background: color-mix(in srgb, var(--surface-primary) 86%, transparent);
  }
  .about__stats-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16) var(--sp-12); width: 100%; }
  .about__stats-list .about__stat-divider { display: none; }
  .about__stats-list .about-stat { min-height: 0; }
  .about__stats-list .about-stat:last-child { grid-column: 1 / -1; }
  .about__stats-list .about-stat__value { font-size: clamp(28px, 8vw, 36px); }
  .problems__head { grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
  .problems__column-head { font-size: var(--fs-body-1); }
  .problem-row { grid-template-columns: 1fr; gap: var(--sp-12); }
  .problem-row + .problem-row { border-top: .5px solid var(--surface-separator); }
  .problem-row__cell { padding-left: 12px; border-left: 2px solid var(--accent-secondary); }
  .problem-row__cell + .problem-row__cell { border-left-color: var(--accent-primary); }
  /* T3.6 (01.12, довжина 375: 11 328 → ≤ 9 000): «Проблема → рішення» — стрічка пар, як каталог (T3.5); наступна пара виглядає з-за краю */
  .problems__list {
    display: flex; flex-wrap: nowrap; gap: var(--sp-12);
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .problems__list::-webkit-scrollbar { display: none; }
  .problems__list > .problem-row { flex: 0 0 86%; width: 86%; max-width: 340px; scroll-snap-align: start; }
  .problem-row + .problem-row { border-top: 0; }
  /* T3.7 (01.12): каталог — вкладки (site.js catalogTabs); картки всіх груп лишаються в HTML, ховаємо лише неактивні */
  .catalog__tabs { display: flex; gap: var(--sp-8); margin: 0 calc(var(--sp-16) * -1) var(--sp-8); padding: 0 var(--sp-16);
    overflow-x: auto; scrollbar-width: none; }
  .catalog__tabs::-webkit-scrollbar { display: none; }
  .catalog-tab { flex: none; min-height: 44px; padding: var(--sp-8) var(--sp-16); border: 0; border-radius: 999px;
    background: var(--surface-glass-1); box-shadow: inset 0 0 0 .5px var(--surface-separator);
    color: var(--label-secondary); font: inherit; font-size: var(--fs-body-2); font-weight: 500; white-space: nowrap; cursor: pointer; }
  .catalog-tab[aria-selected="true"] { background: var(--accent-primary); box-shadow: none; color: var(--surface-primary); }
  .catalog-tab:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
  .catalog--tabs .catalog-group.is-tab-off { display: none; }
  .catalog--tabs .catalog__row { gap: 0; }
  .catalog--tabs .section-head { margin-bottom: var(--sp-32); }
  /* добір до 9 000: кнопки карти поруч (підпис на телефоні — одне слово), список хабів нижчий (гортається всередині) */
  .geo__actions { flex-direction: row-reverse; }
  .geo__actions .btn { flex: 1 1 0; min-width: 0; }
  .geo__panel { max-height: 360px; }
  .catalog--tabs .catalog-group__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* один ритм розділів на телефоні: 64 px, як у каталогу й карти (було 96 у п'яти розділах) */
  .about.section, .problems.section, .news.section, .faq.section, .contacts.section { padding-block: 64px; }
  .contacts__copy { gap: var(--sp-24); }
  .site-footer__bottom { row-gap: var(--sp-12); }
  .site-footer__legal { flex-wrap: wrap; row-gap: 0; }
  /* підвал: колонки посилань — у дві, а не одна під одною */
  .site-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-24) var(--sp-16); }
  .site-footer__cols > .site-footer__col:last-child { grid-column: 1 / -1; }
  .site-footer__cols .site-footer__col { min-width: 0; }
  .site-footer__cols .site-footer__links a, .site-footer__cols .site-footer__heading { height: auto; white-space: normal; overflow-wrap: break-word; justify-content: flex-start; }
  .site-footer__cols > .site-footer__col:last-child .site-footer__links { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-16); }

  /* T3.5: каталог і новини — стрічка, яку гортають пальцем; наступна картка виглядає з-за краю */
  .catalog-group__cards,
  .news__articles {
    display: flex; flex-wrap: nowrap; gap: var(--sp-12);
    margin-inline: calc(var(--sp-16) * -1); padding: 0 var(--sp-16) var(--sp-4);
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--sp-16);
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .catalog-group__cards::-webkit-scrollbar,
  .news__articles::-webkit-scrollbar { display: none; }
  .catalog-group__cards > .card-service,
  .news__articles > .card-article { flex: 0 0 84%; width: 84%; max-width: 340px; scroll-snap-align: start; }
  .news__articles > .card-article { height: 360px; }
  /* у вузькій картці текст росте вгору, а не налазить на дату; підкладка щільна — читається на будь-якому фото (Lead 4, 30.11) */
  .news__articles .card-article__content {
    height: auto; min-height: 0; gap: var(--sp-12); padding: var(--sp-16);
    background: color-mix(in srgb, var(--surface-primary) 92%, transparent);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .news__articles .card-article__copy { overflow: visible; gap: var(--sp-8); }
  .news__articles .card-article__title { color: var(--label-primary); }
  .news__articles .card-article__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--label-secondary); }
  .news__articles .card-article__footer { height: auto; flex: none; }
}
