/* VIAITEC – main stylesheet. Mobile-first; breakpoints: 600px, 900px, 1200px. */

/* ---------- Tokens ---------- */
:root {
  --bg: #050b18;
  --bg-2: #081226;
  --panel: rgba(14, 28, 56, 0.72);
  --panel-solid: #0c1a34;
  --panel-hi: #11244a;
  --line: rgba(110, 160, 255, 0.18);
  --line-hi: rgba(56, 189, 248, 0.55);
  --text: #e8eef8;
  --muted: #a3b3cc;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --blue-strong: #2563eb;
  --violet: #8b5cf6;
  --green: #34d399;
  --danger: #f87171;
  --grad: linear-gradient(90deg, #22d3ee 0%, #3b82f6 50%, #a78bfa 100%);
  --grad-btn: linear-gradient(135deg, #2563eb 0%, #6d28d9 100%);
  --glow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 10px 40px -10px rgba(59, 130, 246, 0.55);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1200px;
  --gutter: 16px;
  --nav-h: 56px;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, 'Liberation Mono', monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

@media (min-width: 900px) {
  :root { --gutter: 24px; --nav-h: 60px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7dd3fc; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { padding: 0.1em 0.4em; border-radius: 5px; background: rgba(59, 130, 246, 0.16); color: #bfdbfe; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(34, 211, 238, 0.35); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--cyan); color: #04121c; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--line-hi); background: rgba(56, 189, 248, 0.08); }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; vertical-align: middle;
  color: #fde68a; background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.35);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 46px; padding: 0.7em 1.35em;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 650; text-decoration: none; line-height: 1.2;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { color: #fff; background: var(--grad-btn); box-shadow: 0 8px 30px -8px rgba(99, 102, 241, 0.75); }
.btn--primary:hover { color: #fff; box-shadow: 0 12px 38px -8px rgba(99, 102, 241, 0.95); }
.btn--ghost { color: var(--text); border-color: var(--line-hi); background: rgba(8, 18, 38, 0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { color: #fff; background: rgba(34, 211, 238, 0.1); }
.btn--outline { color: var(--cyan); border-color: rgba(34, 211, 238, 0.45); background: transparent; }
.btn--outline:hover { color: #04121c; background: var(--cyan); }
.btn--sm { min-height: 38px; padding: 0.45em 0.9em; font-size: 0.9rem; border-radius: 10px; }

/* ---------- Top bar ---------- */
.topbar { position: relative; z-index: 62; /* above the main menu (61): account menu */ background: #030814; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: #fff; }
.brand__logo { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.45)); }
.brand__name {
  font-weight: 800; font-size: 1.2rem; letter-spacing: 0.14em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.topbar__tools { display: flex; align-items: center; gap: 8px; }
.topbar__contact { display: flex; gap: 4px; list-style: none; }
.topbar__contact a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px;
  border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 0.9rem;
}
.topbar__contact a:hover { color: var(--text); background: rgba(56, 189, 248, 0.08); }
.topbar__contact .icon { color: var(--cyan); }
.topbar__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.lang { display: inline-flex; }
.lang__btn {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.lang__btn:hover { color: var(--cyan); border-color: var(--line-hi); background: rgba(56, 189, 248, 0.08); }

/* Search: icon only; the input panel opens on click. */
.user { position: relative; }
.user [hidden] { display: none !important; }
.user__toggle { position: relative; }
.user__dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--bg, #050b18); }
.user.is-in .user__toggle { color: var(--cyan); }
.user__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 210px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--line-hi); border-radius: 12px; background: var(--panel-solid); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
}
.user__menu a, .user__menu button {
  display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: 0.95rem; text-align: left; text-decoration: none; cursor: pointer;
}
.user__menu a:hover, .user__menu button:hover, .user__menu a:focus-visible, .user__menu button:focus-visible { background: rgba(56, 189, 248, 0.12); }
.user__menu .icon { color: var(--cyan); }
.search { position: static; }
.search__toggle .search__icon-close { display: none; }
.search.is-open .search__toggle { border-color: var(--cyan); color: var(--cyan); }
.search.is-open .search__icon-open { display: none; }
.search.is-open .search__icon-close { display: block; }
.search__form {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 70;
  display: none; align-items: center; gap: 8px;
  padding: 10px var(--gutter); background: #030814; border-bottom: 1px solid var(--line-hi);
  box-shadow: 0 24px 60px -20px #000;
}
.search.is-open .search__form { display: flex; animation: mega-in 0.2s var(--ease); }
.search__input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2);
}
.search__input::placeholder { color: #8093b0; }
.search__input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25); }
.search__input::-webkit-search-cancel-button { filter: invert(0.7); }
.search__submit { flex: none; width: 42px; height: 42px; color: #fff; border: 0; background: var(--grad-btn); }
.search__submit:hover { background: var(--grad-btn); filter: brightness(1.15); }
.search__results {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 6px);
  max-height: min(70vh, 460px); overflow: auto;
  padding: 6px; border: 1px solid var(--line-hi); border-radius: var(--radius);
  background: rgba(8, 18, 38, 0.98); box-shadow: 0 24px 60px -20px #000;
}
@media (min-width: 600px) {
  /* Popover anchored under the search icon. */
  .search { position: relative; }
  .search__form {
    left: auto; right: 0; top: calc(100% + 10px); width: min(420px, calc(100vw - 2 * var(--gutter)));
    padding: 10px; border: 1px solid var(--line-hi); border-radius: var(--radius);
  }
  .search__results { left: 0; right: 0; }
}
.search__results ul { list-style: none; }
.search__results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.search__results a:hover, .search__results a:focus-visible, .search__results a.is-active { background: rgba(56, 189, 248, 0.12); }
.search__results strong { display: block; font-size: 0.95rem; }
.search__results small { display: block; color: var(--muted); font-size: 0.8rem; }
.search__results mark { background: none; color: var(--cyan); font-weight: 700; }
.search__empty { padding: 12px; color: var(--muted); margin: 0; }

@media (min-width: 600px) {
  .topbar__label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}


/* ---------- Main navigation / mega menu ---------- */
.mainnav {
  position: sticky; top: 0; z-index: 61; /* above the cookie banner (60): search panel, mega menu */
  background: rgba(5, 11, 24, 0.82);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.mainnav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--grad); opacity: 0.6;
}
.mainnav__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); }

.mainnav__burger {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; font-weight: 600;
}
.mainnav__burger-close { display: none; }
.mainnav.is-open .mainnav__burger-open { display: none; }
.mainnav.is-open .mainnav__burger-close { display: block; }
.mainnav__context { flex: 1; min-width: 0; margin: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-weight: 700; font-size: 0.95rem; color: var(--cyan); letter-spacing: 0.02em; }

.mainnav__list {
  display: none; list-style: none;
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  padding: 8px var(--gutter) 20px; background: var(--bg); box-shadow: 0 24px 40px -12px rgba(0, 0, 0, 0.8); border-bottom: 1px solid var(--line);
}
.mainnav.is-open .mainnav__list { display: block; }

.mainnav__link {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  width: 100%; min-height: 48px; padding: 0 6px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--text); font-weight: 600; font-size: 1rem; text-decoration: none; text-align: left;
}
.mainnav__link:hover { color: #fff; }
.mainnav__link.is-active, .mainnav__link[aria-current='page'] { color: var(--cyan); }
.mainnav__chevron { transition: transform 0.25s var(--ease); }
.has-mega.is-open .mainnav__chevron { transform: rotate(180deg); }

.mega { display: none; }
.has-mega.is-open .mega { display: block; }
.mega__inner { display: grid; gap: 20px; padding: 14px 0 6px; }
.mega__title { text-align: center; margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mega__products { display: grid; gap: 10px; list-style: none; }
.mega__all { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.mega__all .icon { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.mega__all:hover, .mega__all:focus-visible, .mega__all[aria-current] { color: var(--cyan); }
.mega__all:hover .icon { transform: translateX(3px); }

.mega-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--text); text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
a.mega-card:hover, a.mega-card[aria-current='page'] { border-color: var(--line-hi); box-shadow: var(--glow); color: var(--text); }
a.mega-card:hover { transform: translateY(-2px); }
.mega-card.is-disabled { opacity: 0.65; cursor: default; }
.mega-card__icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  color: var(--cyan); background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.3);
}
.mega-card__icon .icon { width: 24px; height: 24px; }
.mega-card__name { display: block; font-weight: 700; }
.mega-card__text { display: block; font-size: 0.88rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }


@media (min-width: 900px) {
  .mainnav__burger, .mainnav__context { display: none; }
  /* Menu stays centred; the search sits in the right-hand column. */
  .mainnav__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .mainnav__list { grid-column: 2; }
  .mainnav__inner > .search { grid-column: 3; justify-self: end; }
  .mainnav__list, .mainnav.is-open .mainnav__list {
    position: static; display: flex; gap: 6px; max-height: none; overflow: visible;
    padding: 0; background: none; border: 0;
  }
  .mainnav__link {
    width: auto; min-height: var(--nav-h); padding: 0 18px; border: 0;
    font-size: 0.97rem; letter-spacing: 0.01em;
  }
  .mainnav__link::after {
    content: ''; position: absolute; left: 18px; right: 18px; bottom: 10px; height: 2px; border-radius: 2px;
    background: var(--grad); transform: scaleX(0); transition: transform 0.25s var(--ease);
  }
  .mainnav__link:hover::after, .mainnav__link.is-active::after, .mainnav__link[aria-current='page']::after,
  .has-mega.is-open > .mainnav__link::after { transform: scaleX(1); }

  .mega {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #060d1c; border-bottom: 1px solid var(--line-hi);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }
  .has-mega.is-open .mega { animation: mega-in 0.22s var(--ease); }
  .mega__inner { padding: 28px var(--gutter) 32px; }
  .mega__products { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  /* Icon on the left, name on its right, description below both. */
  .mega-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; align-content: start; padding: 18px; min-height: 100%; background: var(--panel-solid); }
  .mega-card__body { display: contents; }
  .mega-card__text { grid-column: 1 / -1; margin-top: 0; }
  /* "Coming soon" in the top-right corner, so every name stays on one line next to its icon. */
  .mega-card { position: relative; }
  .mega-card__name .badge { position: absolute; top: 10px; right: 10px; }
}
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* No-JS fallback: open the mega panel on hover / focus. */
html:not(.js) .has-mega:hover .mega, html:not(.js) .has-mega:focus-within .mega { display: block; }
html:not(.js) .mainnav__list { position: static; display: block; }
@media (min-width: 900px) { html:not(.js) .mainnav__list { display: flex; } }
html:not(.js) .mainnav__burger { display: none; }
html:not(.js) .search__toggle { display: none; }
html:not(.js) .search__form { position: static; display: flex; width: auto; padding: 0; border: 0; box-shadow: none; background: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 48px 0 32px;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(59, 130, 246, 0.28), transparent 60%),
    radial-gradient(700px 480px at 5% 90%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(500px 300px at 50% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    var(--bg);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(110, 160, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
}
.hero__fx { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero__grid { display: grid; gap: 36px; align-items: center; }
.hero__title {
  margin: 8px 0 14px;
  font-size: clamp(2.6rem, 9vw, 4.8rem); font-weight: 850; letter-spacing: -0.035em; line-height: 1.02;
  background: linear-gradient(100deg, #ffffff 10%, #a5f3fc 45%, #93c5fd 70%, #c4b5fd 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Home: a full sentence as the page heading, so a smaller size than the product name. */
.hero__title--home { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.4; letter-spacing: 0; }

/* Product hero: product name on the left, description on the right. */
.hero__split { display: grid; gap: 20px; }
.hero__title--xl { margin-bottom: 0; font-size: clamp(2.8rem, 13vw, 4.6rem); padding-bottom: 0.08em; white-space: nowrap; }
@media (min-width: 900px) {
  .hero__split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
  .hero__title--xl { font-size: clamp(3.4rem, 6.4vw, 5.6rem); }
  .hero__body { position: relative; padding-left: 48px; }
  .hero__body::before {
    content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px;
    background: linear-gradient(var(--cyan), var(--blue) 50%, transparent);
  }
}
/* "LT" after ViAiTracker (src/brand.mjs adds it to every visible ViAiTracker). */
sup.lt { margin-left: 0.08em; font-size: 0.55em; font-weight: 700; line-height: 0; letter-spacing: 0.02em; }
/* In the hero title: a third of the title size. */
.hero__title .lt {
  position: relative; top: -1.15em; margin-left: 0.06em; font-size: 0.333em; font-weight: 700; line-height: 0; letter-spacing: 0.02em; vertical-align: baseline;
  /* Own solid colour: the title is painted with background-clip: text, which would cut off the raised mark. */
  color: #c4b5fd; -webkit-text-fill-color: #c4b5fd; background: none;
}
.hero__subtitle { margin: 6px 0 0; font-size: clamp(0.95rem, 1.6vw, 1.1rem); font-style: italic; font-weight: 350; letter-spacing: 0.02em; color: var(--muted); }
.hero__tagline { font-size: clamp(1.1rem, 2.6vw, 1.4rem); font-weight: 600; color: #dbeafe; line-height: 1.45; }
.hero__intro { color: var(--muted); max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__cta--center { justify-content: center; }
/* Centred submit button of the demo-request form (ViAiTracker). */
.form__submit--center { display: flex; width: fit-content; margin-inline: auto; }

.hero__media { position: relative; margin: 0; }
.hero__media::before {
  content: ''; position: absolute; inset: 8% 6%; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 65%); filter: blur(30px);
}
.hero__media img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--line-hi); box-shadow: 0 30px 80px -30px rgba(34, 211, 238, 0.45);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }

.hero__stats { display: grid; gap: 12px; list-style: none; margin-top: 40px; }
.hero__stats li {
  position: relative; overflow: hidden; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero__stats li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.hero__stats strong {
  display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__stats span { color: var(--muted); font-size: 0.92rem; }

@media (min-width: 600px) { .hero__stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) {
  .hero { padding: 80px 0 56px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 64px 0; }
.section--alt {
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(139, 92, 246, 0.1), transparent 60%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
@media (min-width: 900px) { .section { padding: 96px 0; } }

.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-tag {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px;
  padding: 5px 14px; border-radius: 999px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.35); background: rgba(34, 211, 238, 0.07);
}
/* Numbered tag used as the section heading (product pages). */
.section-tag--heading { margin: 0; padding: 7px 18px; font-size: 0.95rem; line-height: 1.3; }
.section-title { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -0.025em; }
.section-title::after {
  content: ''; display: block; width: 64px; height: 3px; margin: 16px auto 0; border-radius: 3px; background: var(--grad);
}
.section-lead { color: var(--muted); font-size: 1.07rem; margin-top: 16px; }

/* ---------- Features: technology cards ---------- */
.tech-grid { display: grid; gap: 16px; list-style: none; margin-bottom: 56px; }
.tech-card {
  position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(17, 36, 74, 0.8), rgba(8, 18, 38, 0.8));
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.tech-card:hover { border-color: var(--line-hi); transform: translateY(-4px); box-shadow: var(--glow); }
.tech-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tech-card__icon {
  display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 16px;
  background: rgba(8, 18, 38, 0.9); border: 1px solid var(--line-hi); box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.12);
}
.tech-card__icon .icon { width: 40px; height: 40px; }
.tech-card__label { font-family: var(--mono); font-size: 0.72rem !important; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan) !important; }
.tech-card__title { margin: 2px 0 6px; font-size: 1.5rem; font-weight: 800; }
.tech-card--platforms { flex-direction: column; }
.tech-card__head p:last-child { margin-top: 6px; }

.platforms { display: grid; gap: 10px; width: 100%; list-style: none; }
.platforms li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 11, 24, 0.6); font-weight: 650;
}
.platforms__icon { width: 30px; height: 30px; }

@media (min-width: 600px) {
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .tech-card--platforms { grid-column: 1 / -1; }
  .platforms { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .tech-grid { grid-template-columns: 1fr 1fr 1.35fr; }
  .tech-card--platforms { grid-column: auto; }
  .platforms { grid-template-columns: 1fr; }
}

/* ---------- Features: alternating rows ---------- */
.feature-rows { display: grid; gap: 56px; }
.feature-row { display: grid; gap: 24px; align-items: center; }
.feature-row__media { position: relative; margin: 0; }
.feature-row__media::after {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius-lg); pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.6), transparent 40%, transparent 60%, rgba(139, 92, 246, 0.6)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; border: 1px solid transparent;
}
.feature-row__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 30px 70px -35px rgba(59, 130, 246, 0.7); }

/* Feature video: muted looping YouTube clip, poster until it is loaded. */
.feature-video {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); background: #000;
  box-shadow: 0 30px 70px -35px rgba(59, 130, 246, 0.7);
}
/* Frame sized for 720p and scaled to fit (see fitHd in main.js). */
.feature-video iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; transform-origin: 0 0; }
.feature-video__poster { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; transition: opacity 0.5s; }
.feature-video__poster img { position: absolute; inset: 0; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
.feature-video__play {
  position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  color: #fff; background: rgba(37, 99, 235, 0.85); box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
  transition: transform 0.2s var(--ease);
}
.feature-video__play .icon { width: 24px; height: 24px; margin-left: 3px; }
.feature-video__poster:hover .feature-video__play { transform: scale(1.08); }
.feature-video.is-playing .feature-video__poster { opacity: 0; pointer-events: none; }
.feature-row__num {
  margin: 0 0 6px; font-family: var(--mono); font-weight: 700; font-size: 2.6rem; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.9;
}
.feature-row h3 { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 750; }
.feature-row p { color: var(--muted); font-size: 1.04rem; }

@media (min-width: 900px) {
  .feature-rows { gap: 88px; }
  .feature-row { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .feature-row--reverse .feature-row__media { order: 2; }
}

/* ---------- Demo gallery ---------- */
.gallery { max-width: 1040px; margin-inline: auto; }
.gallery__stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 2px solid var(--blue); border-radius: var(--radius-lg); background: #000;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12), 0 40px 90px -30px rgba(59, 130, 246, 0.6);
}
.gallery__stage::before, .gallery__stage::after {
  content: ''; position: absolute; z-index: 2; width: 28px; height: 28px; pointer-events: none;
  border: 3px solid var(--cyan);
}
.gallery__stage::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.gallery__stage::after { right: 12px; bottom: 12px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.gallery__player, .gallery__stage iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; transform-origin: 0 0; }
.gallery__poster {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: #000;
  transition: opacity 0.4s;
}
.gallery__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.gallery__poster-play {
  position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  color: #fff; background: rgba(37, 99, 235, 0.85); box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
  transition: transform 0.2s var(--ease);
}
.gallery__poster-play .icon { width: 30px; height: 30px; margin-left: 4px; }
.gallery__poster:hover .gallery__poster-play { transform: scale(1.08); }
.gallery__stage.is-ready .gallery__poster { opacity: 0; pointer-events: none; }
/* The bottom-right corner ornament would sit on YouTube's fullscreen button. */
.gallery__stage.is-ready::after { display: none; }
.gallery__missing {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); z-index: 3;
  display: none; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; border-radius: 999px;
  font-size: 0.9rem; color: var(--text); background: rgba(5, 11, 24, 0.8); border: 1px solid var(--line-hi); white-space: nowrap;
}
.gallery__stage.is-missing .gallery__missing { display: inline-flex; }
.gallery__caption { margin: 14px 2px 18px; color: var(--muted); font-size: 0.95rem; }
.gallery__caption strong { color: var(--text); }

/* Gallery waiting for its videos: placeholder stage and numbered empty slots. */
.gallery__pending {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  margin: 0; padding: 16px; text-align: center; color: var(--muted); font-weight: 600; font-size: 1.05rem;
  background: radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.22), transparent 60%), #030812;
}
.gallery__pending .icon { width: 44px; height: 44px; color: var(--cyan); opacity: 0.85; }
.gallery__slot { display: block; }
.gallery__slot .gallery__thumb { border-style: dashed; border-color: var(--line-hi); background: rgba(5, 11, 24, 0.6); }

/* Playlist: a single-row carousel (2 / 3 / 5 items visible) with previous / next buttons. */
.gallery__rail { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.gallery__list {
  --gap: 12px; --visible: 2;
  display: grid; grid-auto-flow: column; gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--visible) - 1) * var(--gap)) / var(--visible));
  list-style: none; overflow-x: auto; padding: 6px 0 12px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--blue) transparent;
}
.js .gallery__list { scrollbar-width: none; }
.js .gallery__list::-webkit-scrollbar { display: none; }
.gallery__list li { scroll-snap-align: start; min-width: 0; }
/* Fewer thumbnails than fit in a row: keep them centred under the player ("safe" keeps overflowing rows scrollable). */
.gallery__list { justify-content: safe center; }
@media (min-width: 600px) { .gallery__list { --visible: 3; } }
@media (min-width: 900px) { .gallery__list { --visible: 5; --gap: 16px; } }

.gallery__nav {
  display: none; place-items: center; width: 40px; height: 40px; padding: 0; margin-bottom: 6px; /* list has 6px top / 12px bottom padding */
  border: 1px solid var(--line-hi); border-radius: 50%; color: var(--cyan); background: rgba(5, 11, 24, 0.85);
  transition: background 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.2s;
}
.js .gallery__nav { display: grid; }
.gallery__nav:hover:not(:disabled) { color: #04121c; background: var(--cyan); box-shadow: 0 0 18px rgba(34, 211, 238, 0.6); }
.gallery__nav:disabled { opacity: 0.3; cursor: default; }
.gallery__nav .icon { width: 22px; height: 22px; }
@media (min-width: 900px) { .gallery__nav { width: 44px; height: 44px; } }
@media (max-width: 420px) { .gallery__nav { width: 32px; height: 32px; } .gallery__rail { gap: 4px; } }

.gallery__item {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: var(--text);
}
.gallery__thumb {
  position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9;
  border: 2px solid var(--blue); border-radius: 10px; background: #000;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease), filter 0.25s; filter: saturate(0.85) brightness(0.85); }
/* Video number: small transparent circle with a red ring; blue ring + glow on hover / preview, blue ring for the playing video. */
.gallery__num {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; line-height: 1; color: #fff;
  background: transparent; border: 2px solid #ef4444;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.gallery__item:hover .gallery__num, .gallery__item:focus-visible .gallery__num, .gallery__item.is-preview .gallery__num {
  border-color: #3b82f6;
  box-shadow: 0 0 10px 2px rgba(59, 130, 246, 0.9), inset 0 0 8px rgba(59, 130, 246, 0.6);
  transform: translate(-50%, -50%) scale(1.12);
}
.gallery__item.is-active .gallery__num { border-color: #3b82f6; }
@media (min-width: 900px) { .gallery__num { width: 28px; height: 28px; font-size: 0.85rem; } }

.gallery__item:hover .gallery__thumb, .gallery__item:focus-visible .gallery__thumb, .gallery__item.is-preview .gallery__thumb {
  transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25), 0 14px 30px -12px rgba(34, 211, 238, 0.7);
}
.gallery__item:hover .gallery__thumb img, .gallery__item.is-preview .gallery__thumb img { transform: scale(1.06); filter: none; }
.gallery__item:focus-visible { outline: none; }
.gallery__item.is-active .gallery__thumb {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.35), 0 0 24px rgba(34, 211, 238, 0.45);
}
.gallery__item.is-active .gallery__thumb img { filter: none; }

/* ---------- Request demo (under the gallery) ---------- */
.request-demo {
  display: grid; gap: 24px; max-width: 1040px; margin: 56px auto 0; padding: 20px;
  border: 1px solid var(--line-hi); border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 260px at 0% 0%, rgba(34, 211, 238, 0.14), transparent 70%),
    linear-gradient(170deg, rgba(17, 36, 74, 0.85), rgba(5, 11, 24, 0.9));
  box-shadow: 0 30px 80px -40px rgba(59, 130, 246, 0.7);
}
.request-demo__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  color: #fff; background: var(--grad-btn); box-shadow: 0 8px 26px -8px rgba(99, 102, 241, 0.9);
}
.request-demo__icon .icon { width: 26px; height: 26px; }
.request-demo__title { margin: 16px 0 10px; font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; }
.request-demo__intro > p { color: var(--muted); }
.request-demo__intro .checklist { margin: 18px 0 22px; }
.request-demo__contact { list-style: none; display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.request-demo__contact li { display: flex; align-items: center; gap: 10px; }
.request-demo__contact .icon { color: var(--cyan); }
.request-demo__form { padding: 20px; background: rgba(3, 8, 20, 0.6); scroll-margin-top: calc(var(--nav-h) + 16px); }
.request-demo__form .btn[type='submit'] { width: 100%; }
@media (min-width: 600px) {
  .request-demo { padding: 32px; }
  .request-demo__form { padding: 28px; }
  .request-demo__form .btn[type='submit'] { width: auto; }
}
@media (min-width: 900px) {
  .request-demo { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr); gap: 36px; padding: 40px; }
}

/* ---------- Docs ---------- */
/* Integration guide on top, downloads below (single column, full width). */
.docs-grid { display: grid; gap: 24px; max-width: 1040px; margin-inline: auto; }
@media (min-width: 900px) { .docs-grid { gap: 32px; } }

.doc-card {
  min-width: 0; padding: 22px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(17, 36, 74, 0.75), rgba(8, 18, 38, 0.85));
}
@media (min-width: 600px) { .doc-card { padding: 30px; } }
.doc-card__head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.doc-card__head h3 { margin: 0; font-size: 1.35rem; }
.doc-card__head p { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
/* "Documents & software": title the same size as the guide section titles, lead half of it */
.doc-card--downloads .doc-card__head h3 { font-size: 1.12rem; font-weight: 700; }
.doc-card--downloads .doc-card__head p { font-size: 0.56rem; }
.doc-card__icon {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px;
  color: #fff; background: var(--grad-btn); box-shadow: 0 8px 26px -8px rgba(99, 102, 241, 0.9);
}
.doc-card__icon .icon { width: 26px; height: 26px; }

/* Developer guide sections (ViAiTracker Docs): 1 always open, 2 and 3 collapsible */
.doc-sec + .doc-sec { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc-sec__title { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 1.12rem; font-weight: 700; }
.doc-sec__num {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-size: 0.85rem; color: #04121c; background: var(--cyan);
}
.doc-sec--fold > summary { margin: 0; cursor: pointer; list-style: none; user-select: none; }
.doc-sec--fold > summary::-webkit-details-marker { display: none; }
.doc-sec--fold > summary:hover { color: var(--cyan); }
.doc-sec__chevron { margin-left: auto; transition: transform 0.2s var(--ease); color: var(--muted); }
.doc-sec--fold[open] > summary { margin-bottom: 16px; }
.doc-sec--fold[open] > summary .doc-sec__chevron { transform: rotate(180deg); }
/* Sub-sections (3.1, 3.2): indented under the section title, each collapsible */
.doc-sub { display: grid; gap: 10px; margin-left: 42px; }
@media (max-width: 600px) { .doc-sub { margin-left: 14px; } }
.doc-subsec { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 11, 24, 0.35); }
.doc-subsec > summary {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; user-select: none;
  font-size: 0.98rem; font-weight: 600;
}
.doc-subsec > summary::-webkit-details-marker { display: none; }
.doc-subsec > summary:hover { color: var(--cyan); }
.doc-subsec__num {
  flex: none; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(34, 211, 238, 0.5);
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--cyan);
}
.doc-subsec[open] > summary .doc-sec__chevron { transform: rotate(180deg); }
.doc-subsec > :not(summary) { margin: 0 14px 14px; }

/* "How ViAiTracker works": description + diagram (scrolls sideways on narrow screens) */
.how__text { margin: 0 0 16px; color: var(--muted); }
.docs-grid > *, .doc-sec { min-width: 0; } /* let the diagram scroll inside instead of widening the page */
.how__figure { margin: 0; min-width: 0; }
.how__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #050b18; }
.how__scroll img { display: block; width: 100%; height: auto; min-width: 820px; }
.how__hint { display: none; margin-top: 6px; font-size: 0.8rem; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .how__hint { display: block; } }

.steps { list-style: none; counter-reset: step; display: grid; gap: 26px; }
.steps > li { position: relative; padding-left: 44px; counter-increment: step; min-width: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-weight: 700; font-size: 0.9rem; color: #04121c; background: var(--cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.6);
}
.steps > li:not(:last-child)::after {
  content: ''; position: absolute; left: 14px; top: 34px; bottom: -20px; width: 2px;
  background: linear-gradient(var(--cyan), transparent);
}
.steps h4 { font-size: 1.05rem; margin-bottom: 12px; }
@media (max-width: 599px) {
  .steps > li { padding-left: 0; }
  .steps > li::after { display: none; }
  .steps h4 { display: flex; align-items: center; min-height: 30px; padding-left: 42px; }
}

/* OS tabs in the integration guide. Without JS every panel is shown with its own title. */
/* 3.1 setup: intro, requirements by hardware, notes */
.setup__intro { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }
.req-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.req-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.88rem; }
.req-table th, .req-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.req-table tr:last-child td { border-bottom: 0; }
.req-table th { color: var(--muted); font-weight: 600; background: rgba(17, 36, 74, 0.5); }
.req-table small { color: var(--cyan); font-family: var(--mono); font-size: 0.75rem; }
.setup__h { margin: 22px 0 10px; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.setup__h:first-of-type { margin-top: 18px; }
.setup__list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
.setup__text { margin: 0 0 10px; font-size: 0.92rem; color: var(--muted); }
.doc-subsec .code + .code, .doc-subsec .code + .os-tabs { margin-top: 12px; }
.req-table--opts td:first-child, .req-table--opts td:nth-child(2) { white-space: nowrap; }
.setup__notes { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.api__items { gap: 10px; font-size: 0.92rem; }
.api__code { margin: 18px 0 8px; }
.os-tabs__list { display: none; }
.os-tabs__panel + .os-tabs__panel { margin-top: 24px; }
.os-tabs__panel .code + .code { margin-top: 12px; }
.os-tabs__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; }
.os-tabs__icon { width: 20px; height: 20px; }
.os-tabs__meta { margin: 0 0 12px; font-size: 0.9rem; color: var(--muted); }
.os-tabs.is-enhanced .os-tabs__title { display: none; }
.os-tabs.is-enhanced .os-tabs__panel + .os-tabs__panel { margin-top: 0; }
.os-tabs.is-enhanced .os-tabs__list {
  display: flex; gap: 6px; margin-bottom: 14px; padding: 4px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 8, 20, 0.6);
}
.os-tabs__tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 0 auto;
  min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); font-weight: 650; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.os-tabs__tab:hover { color: var(--text); background: rgba(56, 189, 248, 0.08); }
.os-tabs__tab[aria-selected='true'] {
  color: var(--text); border-color: var(--line-hi);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(109, 40, 217, 0.35));
  box-shadow: 0 0 18px -6px rgba(59, 130, 246, 0.8);
}
.os-tabs__tab:focus-visible { outline-offset: -2px; }
@media (min-width: 600px) { .os-tabs__tab { flex: 0 0 auto; } }

.code { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #030814; }
.code__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted); background: rgba(17, 36, 74, 0.6); border-bottom: 1px solid var(--line);
}
.code__bar > span::before { content: '●  ●  ●'; margin-right: 12px; letter-spacing: -2px; color: #334766; }
.code__copy {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); font-size: 0.8rem; white-space: nowrap;
}
.code__copy:hover { border-color: var(--line-hi); color: var(--cyan); }
.code__copy .icon { width: 15px; height: 15px; }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font-size: 0.84rem; line-height: 1.6; color: #dbe7ff; tab-size: 4; }
.code pre:focus-visible { outline-offset: -3px; }
.tok-c { color: #6b829e; font-style: italic; }
.tok-k { color: #c4b5fd; }
.tok-s { color: #86efac; }
.tok-n { color: #fca5a5; }
.tok-t { color: #67e8f9; }
.tok-p { color: #f9a8d4; }

.note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }
.note .icon { margin-top: 3px; color: var(--cyan); }

.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; color: var(--muted); }
.checklist .icon { margin-top: 4px; color: var(--green); }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  margin: 0; padding: 40px 16px; text-align: center;
  border: 1px dashed var(--line-hi); border-radius: var(--radius); background: rgba(5, 11, 24, 0.45);
  color: var(--muted); font-weight: 600; font-size: 1.05rem;
}
.empty-state .icon { width: 40px; height: 40px; color: var(--cyan); opacity: 0.8; }
.downloads { list-style: none; display: grid; gap: 10px; }
@media (min-width: 700px) { .downloads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1000px) { .downloads { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.download {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 11, 24, 0.55);
  transition: border-color 0.2s, background 0.2s;
}
.download:hover { border-color: var(--line-hi); background: rgba(17, 36, 74, 0.6); }
.download__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--cyan); background: rgba(34, 211, 238, 0.1); }
.download__name { font-weight: 600; line-height: 1.35; min-width: 0; }
.download__type { display: block; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; }
@media (max-width: 420px) {
  .download .btn span:not(.visually-hidden) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .download .btn { width: 40px; padding: 0; }
}

/* ---------- Home ---------- */
.product-grid { display: grid; gap: 16px; list-style: none; }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(5, 1fr); } }
.product-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 26px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(17, 36, 74, 0.8), rgba(8, 18, 38, 0.85));
  color: var(--text); text-decoration: none;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
a.product-card:hover { color: var(--text); border-color: var(--line-hi); transform: translateY(-4px); box-shadow: var(--glow); }
.product-card.is-disabled { opacity: 0.7; }
.product-card p { color: var(--muted); margin: 0 0 12px; }
.product-card__name { font-size: 1.4rem; margin: 10px 0 0; }
.product-card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(139, 92, 246, 0.2));
}
.product-card__icon .icon { width: 28px; height: 28px; }
.product-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 650; color: var(--cyan); }
.product-card .badge { align-self: flex-start; margin-top: auto; }

/* ---------- Page hero (contact, 404) ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: 56px 0 40px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(59, 130, 246, 0.25), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(139, 92, 246, 0.2), transparent 60%), var(--bg);
}
.page-hero__title {
  font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 850;
  background: linear-gradient(100deg, #fff 20%, #a5f3fc 60%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-hero__lead { max-width: 65ch; color: var(--muted); font-size: 1.07rem; }
.page-hero--center { text-align: center; padding: 96px 0; }
.page-hero--center .page-hero__lead { margin-inline: auto; }

/* ---------- Editor content: sections, columns and blocks (src/content.mjs) ---------- */
.section-head--left { margin-left: 0; text-align: left; }
.section-head--left .section-title::after { margin-left: 0; }
.cms-title { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.cms-cols { display: grid; gap: 28px; align-items: start; }
.cms-cols--1 { max-width: 820px; margin-inline: auto; }
@media (min-width: 800px) {
  .cms-cols--2, .cms-cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cms-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cms-cols--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .cms-cols--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .cms-cols { gap: 36px; }
}
@media (min-width: 1100px) { .cms-cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.cms-cols--full { max-width: none; }
@media (min-width: 800px) { .cms-cols--2-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }
.cms-section--hero .cms-cols { align-items: center; }
@media (min-width: 900px) { .cms-section--hero .cms-cols--2 { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.cms-heading-wrap > .section-tag { margin-bottom: 4px; }
.cms-heading { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; }
.cms-heading--lg {
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15;
  background: linear-gradient(100deg, #ffffff 15%, #a5f3fc 55%, #c4b5fd 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cms-col .contact-card, .cms-col .form { margin: 0; }
.cms-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cms-col:empty { display: none; }
.cms-col--card {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(17, 36, 74, 0.8), rgba(8, 18, 38, 0.8));
}
.cms-figure, .cms-video { margin: 0; }
.cms-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 30px 70px -40px rgba(59, 130, 246, 0.7); }
.cms-figure figcaption, .cms-video figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.cms-video__frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; border: 1px solid var(--line); }
.cms-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cms-button { margin: 0; }
.cms-col .gallery { width: 100%; }

.prose { color: var(--muted); font-size: 1.04rem; line-height: 1.75; }
.prose > * + * { margin-top: 0.9em; }
.prose h3, .prose h4 { color: var(--text); line-height: 1.3; margin-top: 1.4em; }
.prose h3 { font-size: 1.4rem; }
.prose h4 { font-size: 1.15rem; }
.prose > :first-child { margin-top: 0; }
.prose strong { color: var(--text); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose ul li::marker { color: var(--cyan); }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--cyan); color: var(--text); font-style: italic; }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: rgba(34, 211, 238, 0.1); color: #a5f3fc; }

/* ---------- News (Blog / Press) ---------- */
.news-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0 0 32px; }
.news-tabs a {
  display: inline-block; padding: 7px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  font-weight: 600; text-decoration: none; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.news-tabs a:hover { color: var(--text); border-color: var(--line-hi); }
.news-tabs a[aria-current] { color: #04121c; background: var(--cyan); border-color: var(--cyan); }
.news-grid { display: grid; gap: 20px; list-style: none; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.news-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(17, 36, 74, 0.8), rgba(8, 18, 38, 0.8));
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.news-card:hover { border-color: var(--line-hi); transform: translateY(-4px); box-shadow: var(--glow); }
.news-card__media { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.35), transparent 65%), #050b18; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card__ph .icon { width: 64px; height: 64px; color: var(--cyan); opacity: 0.8; }
.news-card__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.news-card__title { margin: 0; font-size: 1.2rem; line-height: 1.35; }
.news-card__text { color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-weight: 650; color: var(--cyan); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 0.88rem; color: var(--muted); }
.post-meta__cat {
  padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cyan); background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.4); text-decoration: none;
}
.post-hero .post-meta { margin-bottom: 16px; }
.post-hero .page-hero__title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.2; max-width: 22ch; }
.post-cover { margin-top: 40px; }
.post-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.news-more__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; max-width: none; }
.news-more__all { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--cyan); text-decoration: none; }

/* ---------- Home: hero intro, info cards, services ---------- */
.home-hero__intro { margin-top: 14px; font-size: 1rem; line-height: 1.7; }
/* Animated showcase in the hero: the SVG animates itself, so no floating effect on the frame. */
.home-showcase img { animation: none; aspect-ratio: 800 / 580; height: auto; background: #050b18; }
.info-grid { display: grid; gap: 16px; list-style: none; }
@media (min-width: 700px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.info-card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(17, 36, 74, 0.8), rgba(8, 18, 38, 0.85));
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.info-card:hover { border-color: var(--line-hi); transform: translateY(-4px); box-shadow: var(--glow); }
.info-card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: var(--cyan);
  background: rgba(8, 18, 38, 0.9); border: 1px solid var(--line-hi); box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.12);
}
.info-card__icon .icon { width: 28px; height: 28px; }
.info-card h3 { margin: 4px 0 0; font-size: 1.12rem; line-height: 1.35; }
.info-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.home-services { display: grid; gap: 28px; align-items: start; }
.home-services .cms-heading { margin-top: 14px; }
.home-services__list li { font-size: 1.02rem; }
.home-services__cta { justify-content: center; }
@media (min-width: 960px) { .home-services { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.6fr; gap: 32px; } }
.contact-card, .form {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(17, 36, 74, 0.75), rgba(8, 18, 38, 0.85));
}
@media (min-width: 600px) { .contact-card, .form { padding: 32px; } }
.contact-card h2, .form h2 { font-size: 1.35rem; }
.contact-list { list-style: none; display: grid; gap: 18px; margin-top: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; color: #fff; background: var(--grad-btn); }
.contact-list__label { margin: 0; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-list a { font-weight: 600; word-break: break-word; }

.form__row { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 16px; align-content: start; }
.field label { font-weight: 600; font-size: 0.93rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; line-height: 1.4;
  border: 1px solid var(--line); border-radius: 10px; background-color: rgba(3, 8, 20, 0.8);
}
/* Single-line controls share one fixed height across browsers. */
.field input, .field select { height: 48px; padding-block: 0; }
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.field select option { color: var(--text); background: var(--panel-solid); }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25); }
.field [aria-invalid='true'] { border-color: var(--danger); }
.field__hint { margin: 0; font-size: 0.8rem; color: var(--muted); }
.field__hint:empty { display: none; }
.field__hint.is-error { color: var(--danger); font-weight: 600; }
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 8px; font-size: 0.93rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--cyan); flex: none; }
.req { color: var(--cyan); }
.form__hint { font-size: 0.82rem; color: var(--muted); }
.form__status { margin: 14px 0 0; font-weight: 600; }
.form__status.is-ok { color: var(--green); }
.form__status.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: 0; background: #030814; border-top: 1px solid var(--line); color: var(--muted); }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--grad); opacity: 0.7; }
.footer__grid { display: grid; gap: 36px; padding-block: 56px 40px; }
@media (min-width: 700px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; } }
.footer .brand__logo { width: 44px; height: 44px; }
.footer .brand__name { font-size: 1.4rem; }
.footer__tagline { margin: 12px 0 8px; font-weight: 650; color: var(--text); }
.footer__about p:last-child { font-size: 0.93rem; max-width: 46ch; }
.footer__heading {
  margin-bottom: 16px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
}
.footer__list { list-style: none; display: grid; gap: 10px; }
.footer__list a { color: var(--text); text-decoration: none; }
.footer__list a:hover { color: var(--cyan); }
.footer__contact a { display: inline-flex; align-items: center; gap: 10px; word-break: break-word; }
.footer__contact .icon { color: var(--cyan); }
.badge--dark { font-size: 0.68rem; }
.footer__bottom { padding: 18px 0; border-top: 1px solid var(--line); font-size: 0.85rem; }
.footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__legal a, .footer__cookie { color: var(--muted); text-decoration: none; font: inherit; }
.footer__cookie { padding: 0; border: 0; background: none; cursor: pointer; }
.footer__legal a:hover, .footer__cookie:hover { color: var(--cyan); }

/* ---------- Cookie / analytics consent banner ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 18px 20px;
  border: 1px solid var(--line-hi); border-radius: var(--radius-lg);
  background: rgba(8, 18, 38, 0.97); box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8), var(--glow);
}
.consent[hidden] { display: none; }
.consent__text { flex: 1 1 380px; font-size: 0.9rem; color: var(--muted); }
.consent__text p { margin: 0; }
.consent__title { color: var(--text) !important; font-weight: 700; margin-bottom: 4px !important; }
.consent__text a { color: var(--cyan); }
.consent__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.consent__actions .btn { min-height: 42px; }
/* Accept stands out; Decline stays clearly visible (same size, readable text and border) - both choices are equal options. */
.consent__accept {
  min-width: 128px; justify-content: center; font-weight: 750;
  box-shadow: 0 0 0 1px rgba(165, 243, 252, 0.35), 0 10px 30px -6px rgba(99, 102, 241, 0.95);
}
.consent__accept:hover { box-shadow: 0 0 0 1px rgba(165, 243, 252, 0.6), 0 14px 36px -6px rgba(99, 102, 241, 1); }
.consent__decline { min-width: 104px; justify-content: center; color: var(--text); border-color: rgba(163, 179, 204, 0.55); background: rgba(255, 255, 255, 0.04); }
.consent__decline:hover { color: #fff; border-color: var(--text); background: rgba(255, 255, 255, 0.1); }
@media (max-width: 520px) { .consent__actions { width: 100%; } .consent__actions .btn { flex: 1; } }

/* ---------- Legal pages ---------- */
.legal { display: grid; gap: 32px; max-width: 1080px; }
@media (min-width: 960px) { .legal { grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; } .legal__toc { position: sticky; top: calc(var(--nav-h) + 24px); } }
.legal__title { font-size: clamp(2rem, 5vw, 3rem); }
.legal__toc { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 0.9rem; }
.legal__toc-title { margin: 0 0 8px; font-weight: 700; color: var(--text); }
.legal__toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.legal__toc a { color: var(--muted); text-decoration: none; }
.legal__toc a:hover { color: var(--cyan); }
.legal__section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.legal__section + .legal__section { margin-top: 36px; }
.legal__section h2 { font-size: 1.3rem; margin: 0 0 12px; }
.legal__num { color: var(--cyan); }
.legal__other { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.legal__other a { color: var(--cyan); }


/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200; max-width: calc(100vw - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; font-weight: 600;
  color: var(--text); background: rgba(8, 18, 38, 0.96); border: 1px solid var(--line-hi); box-shadow: var(--glow);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Motion & print ---------- */
/* ---------- Products page (pages/products.mjs) and links to it ---------- */
.badge--on { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); }
.products-about { max-width: 860px; }
.products-about__text p { margin: 0 0 16px; color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.products-compare table { min-width: 720px; font-size: 0.92rem; }
.products-compare tbody th { color: var(--text); background: none; font-weight: 700; white-space: nowrap; }
.products-compare tbody th a, .products-choose a, .faq__a a { color: var(--cyan); }
.products-compare td { color: var(--muted); }
.products-compare .badge { white-space: nowrap; }
.products-choose li { line-height: 1.65; }
.products-choose b { color: var(--text); }
.faq { display: grid; gap: 10px; }
.faq__item { border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 18, 38, 0.5); }
.faq__q { display: flex; align-items: center; gap: 12px; padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__chevron { margin-left: auto; flex: none; color: var(--muted); transition: transform 0.2s var(--ease); }
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__a { margin: 0; padding: 0 18px 16px; color: var(--muted); line-height: 1.7; }
.section-more { margin: 28px 0 0; text-align: center; }
.footer__heading a { color: inherit; text-decoration: none; }
.footer__heading a:hover { text-decoration: underline; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }

/* ---------- ViAiSteady page (pages/viaisteady.mjs) ---------- */
.axes-panel { display: grid; gap: 22px; align-items: center; padding: 28px; border: 1px solid var(--line-hi); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.08)), rgba(8, 18, 38, 0.7); }
@media (min-width: 900px) { .axes-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.axes-panel h3, .platforms__intro h3 { margin: 0 0 8px; font-size: 1.35rem; }
.axes-panel p, .platforms__intro p { margin: 0; color: var(--muted); }
.axes { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
@media (min-width: 600px) { .axes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.axis { display: grid; justify-items: center; gap: 6px; padding: 18px 14px; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 18, 38, 0.75); }
.axis__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--cyan); border: 1px solid var(--line-hi); box-shadow: inset 0 0 22px rgba(34, 211, 238, 0.15); }
.axis__icon .icon { width: 30px; height: 30px; }
.axis__name { font-weight: 700; font-size: 1.05rem; }
.axis__text { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.steady-feats { margin-top: 20px; }
.feat-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 0.95rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chips li { padding: 4px 12px; border: 1px solid var(--line-hi); border-radius: 999px; font-size: 0.86rem; color: var(--text); background: rgba(34, 211, 238, 0.06); }
.platforms, .accel { margin-top: 48px; }
.platforms { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .platforms { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.platforms__list { display: grid; grid-template-columns: max-content 1fr; gap: 14px 20px; align-items: center; margin: 0; }
.platforms__list dt { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.platforms__list dd { margin: 0; }
@media (max-width: 599px) { .platforms__list { grid-template-columns: 1fr; gap: 6px; } .platforms__list dd { margin-bottom: 10px; } }
.accel .platforms__intro { margin-bottom: 20px; max-width: 760px; }
.flow { list-style: none; display: grid; gap: 14px; margin: 18px 0 0; padding: 0; counter-reset: none; }
@media (min-width: 900px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow__step { position: relative; padding: 16px 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 18, 38, 0.55); }
.flow__num { display: inline-block; margin-bottom: 8px; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.4); }
.flow__step h5 { margin: 0 0 6px; font-size: 1rem; color: var(--text); }
.flow__step p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
@media (min-width: 900px) { .flow__step:not(:last-child)::after { content: '→'; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); color: var(--cyan); font-weight: 700; } }
.doc-pending { margin: 0; font-style: italic; }

/* ---------- Back to top (layout.mjs, main.js initToTop) ---------- */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column; gap: 6px; }
.to-top[hidden], .to-top__btn[hidden] { display: none; }
.to-top__btn {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(5, 11, 24, 0.85); color: var(--muted);
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.to-top__btn:hover, .to-top__btn:focus-visible { color: var(--text); border-color: var(--line-hi); }
.to-top__btn .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero__fx { display: none; }
}

@media print {
  .topbar__tools, .mainnav, .hero__fx, .gallery, .skip-link, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .hero__title, .section-title, .page-hero__title, .brand__name { color: #000; background: none; }
}

/* ---------- Product pages: documents & software groups, download request dialog ---------- */
.dl-group + .dl-group { margin-top: 26px; }
.dl-group [hidden] { display: none !important; }
.dl-group__title { margin: 0 0 12px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.software-list { list-style: none; display: grid; gap: 10px; }
.software {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 11, 24, 0.55);
}
.software:hover { border-color: var(--line-hi); background: rgba(17, 36, 74, 0.6); }
.software__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--cyan); background: rgba(34, 211, 238, 0.1); }
.software__info { display: grid; gap: 2px; min-width: 0; }
.software__name { font-weight: 400; font-size: 1rem; overflow-wrap: anywhere; } /* same size as the "How ViAiTracker works" text */
.software__meta { color: var(--muted); font-size: 0.82rem; }
@media (max-width: 480px) {
  .software { grid-template-columns: auto 1fr; }
  .software .btn { grid-column: 1 / -1; justify-content: center; }
}
.req-dialog {
  width: min(560px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-hi); border-radius: var(--radius-lg);
  color: var(--text); background: var(--panel-solid); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.req-dialog::backdrop { background: rgba(2, 6, 16, 0.72); backdrop-filter: blur(3px); }
.req-dialog__form { padding: 24px; }
.req-dialog__title { margin: 0 0 8px; font-size: 1.2rem; }
.req-dialog__lead { margin: 0 0 16px; color: var(--muted); font-size: 0.93rem; }
.req-dialog textarea { min-height: 110px; }
.req-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.req-dialog__actions [hidden] { display: none; }

/* ---------- Customer account (/account/, assets/js/account.js) ---------- */
.portal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: center; }
.portal > * { width: 100%; }
.portal [hidden] { display: none !important; }
.portal__card { max-width: 480px; }
.portal__card--wide { max-width: 760px; }
.portal__submit { width: 100%; justify-content: center; margin-top: 4px; }
.portal__notice { max-width: 760px; margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; text-align: center; }
.portal__notice.is-ok { color: var(--green); border-color: rgba(52, 211, 153, 0.45); }
.portal__notice.is-error { color: var(--danger); border-color: rgba(248, 113, 113, 0.5); }
.portal__loading { text-align: center; color: var(--muted); }
.portal__text { color: var(--muted); }
.portal__links { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 0.93rem; }
.portal__link { padding: 0; border: 0; background: none; color: var(--cyan); font: inherit; font-weight: 600; cursor: pointer; }
.portal__link:hover { text-decoration: underline; }
.portal__dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 1000px; }
.portal__head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.portal__hello { margin: 0; font-size: 1.1rem; }
.portal__email { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }
.portal__h { margin: 0; font-size: 1.35rem; }
.portal__profile { display: grid; gap: 14px 24px; margin: 0; }
@media (min-width: 640px) { .portal__profile { grid-template-columns: 1fr 1fr; } }
.portal__profile dt { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.portal__profile dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.portal__state { display: block; margin-top: 4px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.portal__state[data-s='ready'], .portal__state[data-s='downloaded'] { color: var(--green); }
.portal__state[data-s='pending'] { color: var(--cyan); }
.portal__state[data-s='rejected'] { color: var(--danger); }
.portal__captcha { min-height: 65px; }
.portal__request { margin-top: 18px; padding: 18px; border: 1px solid var(--line-hi); border-radius: 12px; background: rgba(5, 11, 24, 0.55); }
.portal__request-title { margin: 0 0 12px; font-weight: 700; }
.portal__request textarea { min-height: 90px; }
.portal__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.portal__table-wrap { overflow-x: auto; }
.portal__table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.portal__table th, .portal__table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.portal__table th { color: var(--muted); font-weight: 600; }
.portal__delete { color: var(--muted); }
.portal__delete summary { cursor: pointer; width: fit-content; }
.portal__delete form { max-width: 420px; margin-top: 12px; }
.portal__danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.55); }
.portal__danger:hover { color: #fff; background: var(--danger); }
