/* MTRX design system — the visual layer of mtrx.ge.
   Loaded after style.css / shop.css / glass.css: it sets the look (colour, type,
   depth, spacing) while the structural contracts the geometry tests protect
   (phone hero 16:9, the 58u services row, equal cards, 44 px targets) stay. */

:root {
  --mx-bg: #05080f;
  --mx-bg-soft: #080d18;
  --mx-surface: #0c1422;
  --mx-surface-2: #111c2e;
  --mx-line: #1b2a41;
  --mx-line-strong: #2a3f60;
  --mx-text: #e9f2ff;
  --mx-text-soft: #b3c4da;
  --mx-muted: #7d91ac;
  --mx-accent: #22c8ff;
  --mx-accent-deep: #0a7ea4;
  --mx-accent-soft: rgba(34, 200, 255, 0.12);
  --mx-ok: #38d39f;
  --mx-warn: #ffb648;
  --mx-danger: #ff6172;

  --mx-r-sm: 10px;
  --mx-r-md: 14px;
  --mx-r-lg: 20px;
  --mx-r-pill: 999px;

  --mx-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.45);
  --mx-shadow-2: 0 10px 28px rgba(0, 0, 0, 0.42);
  --mx-shadow-3: 0 22px 50px rgba(0, 0, 0, 0.5);
  --mx-glow: 0 0 0 1px rgba(34, 200, 255, 0.26), 0 14px 36px rgba(34, 200, 255, 0.14);

  --mx-t-fast: 120ms;
  --mx-t-base: 200ms;
  --mx-ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ------------------------------------------------------------- backdrop ---- */
html:not([data-theme="light"]) body.site {
  background:
    radial-gradient(1200px 560px at 10% -10%, rgba(34, 200, 255, 0.08), transparent 60%),
    radial-gradient(900px 480px at 95% 2%, rgba(10, 126, 164, 0.09), transparent 58%),
    var(--mx-bg);
}

html:not([data-theme="light"]) body.site h1,
html:not([data-theme="light"]) body.site h2,
html:not([data-theme="light"]) body.site h3 { letter-spacing: -0.012em; }

/* --------------------------------------------------------------- header ---- */
html:not([data-theme="light"]) body.site .site-header {
  border-bottom: 1px solid var(--mx-line);
  background: rgba(5, 8, 15, 0.86);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html:not([data-theme="light"]) body.site .site-nav a {
  color: var(--mx-text-soft);
  position: relative;
}

html:not([data-theme="light"]) body.site .site-nav a::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--mx-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--mx-t-base) var(--mx-ease);
}

html:not([data-theme="light"]) body.site .site-nav a:hover { color: var(--mx-text); }
html:not([data-theme="light"]) body.site .site-nav a:hover::after,
html:not([data-theme="light"]) body.site .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

html:not([data-theme="light"]) body.site .header-icon:hover { color: var(--mx-accent); }

/* ----------------------------------------------------------------- hero ---- */
html:not([data-theme="light"]) body.site .home-hero-row {
  border-radius: var(--mx-r-lg);
  box-shadow: 0 0 0 1px var(--mx-line), var(--mx-shadow-2);
  overflow: hidden;
}

/* a wide cinematic band on desktop (v3 follows the slides' own height, see home.css --slide-h) */
@media (min-width: 1024px) {
  html:not([data-theme="light"]) body.site .home-hero-row .banner-track:not([style*="--slide-h"]) { aspect-ratio: 7 / 2; }
}

html:not([data-theme="light"]) body.site .banner-slide img { object-position: center 45%; }

html:not([data-theme="light"]) body.site .banner-dot {
  background: rgba(233, 242, 255, 0.32);
  transition: width var(--mx-t-base) var(--mx-ease), background var(--mx-t-base) var(--mx-ease);
}

html:not([data-theme="light"]) body.site .banner-dot.is-active,
html:not([data-theme="light"]) body.site .banner-dot[aria-current="true"] { background: var(--mx-accent); }

html:not([data-theme="light"]) body.site .banner-autoplay:hover {
  background: rgba(34, 200, 255, 0.2);
  border-color: rgba(34, 200, 255, 0.42);
}

/* -------------------------------------------------------------- sections --- */
html:not([data-theme="light"]) body.site .see-all,
html:not([data-theme="light"]) body.site a.see-all {
  color: var(--mx-accent);
  font-weight: 600;
}

html:not([data-theme="light"]) body.site .home-svc h2,
html:not([data-theme="light"]) body.site .home-top h2,
html:not([data-theme="light"]) body.site .section-title {
  letter-spacing: -0.015em;
  font-weight: 700;
}

/* ---------------------------------------------------------------- cards ---- */
html:not([data-theme="light"]) body.site .pc {
  border: 1px solid var(--mx-line);
  border-radius: var(--mx-r-md);
  background: linear-gradient(180deg, var(--mx-surface), var(--mx-bg-soft));
  box-shadow: var(--mx-shadow-1);
  transition: transform var(--mx-t-base) var(--mx-ease),
              border-color var(--mx-t-base) var(--mx-ease),
              box-shadow var(--mx-t-base) var(--mx-ease);
}

html:not([data-theme="light"]) body.site .pc:hover,
html:not([data-theme="light"]) body.site .pc:focus-within {
  transform: translateY(-3px);
  border-color: rgba(34, 200, 255, 0.4);
  box-shadow: var(--mx-shadow-2), 0 0 0 1px rgba(34, 200, 255, 0.14);
}

html:not([data-theme="light"]) body.site .pc-media { border-bottom: 1px solid var(--mx-line); }

html:not([data-theme="light"]) body.site .pc-price {
  color: var(--mx-warn);
  letter-spacing: -0.01em;
}

html:not([data-theme="light"]) body.site .pc-compare,
html:not([data-theme="light"]) body.site .pc-quick {
  background: rgba(5, 8, 15, 0.66);
  border: 1px solid rgba(233, 242, 255, 0.14);
  backdrop-filter: blur(8px);
}

html:not([data-theme="light"]) body.site .pc-badge { border-radius: var(--mx-r-sm); font-weight: 700; }

/* -------------------------------------------------------------- buttons ---- */
html:not([data-theme="light"]) body.site .cat-chip {
  border-color: var(--mx-line);
  background: var(--mx-surface);
  transition: border-color var(--mx-t-fast) var(--mx-ease),
              background var(--mx-t-fast) var(--mx-ease),
              color var(--mx-t-fast) var(--mx-ease);
}

html:not([data-theme="light"]) body.site .cat-chip:hover { border-color: var(--mx-line-strong); }

html:not([data-theme="light"]) body.site .cat-chip.on {
  border-color: rgba(34, 200, 255, 0.55);
  background: var(--mx-accent-soft);
  color: var(--mx-accent);
}

/* ---------------------------------------------------------------- forms ---- */
html:not([data-theme="light"]) body.site input:focus,
html:not([data-theme="light"]) body.site select:focus,
html:not([data-theme="light"]) body.site textarea:focus {
  border-color: rgba(34, 200, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 200, 255, 0.14);
  outline: none;
}

/* --------------------------------------------------------------- footer ---- */
html:not([data-theme="light"]) body.site .site-footer {
  border-top: 1px solid var(--mx-line);
  background: linear-gradient(180deg, var(--mx-bg-soft), #04070d);
}

html:not([data-theme="light"]) body.site .site-footer h3 {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mx-muted);
}

html:not([data-theme="light"]) body.site .footer-links a { color: var(--mx-text-soft); }
html:not([data-theme="light"]) body.site .footer-links a:hover { color: var(--mx-accent); }

/* ------------------------------------------------------------ a11y/motion -- */
body.site :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--mx-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.site *,
  body.site *::before,
  body.site *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html:not([data-theme="light"]) body.site .pc:hover { transform: none; }
}

/* ------------------------------------------------------------ light theme -- */
html[data-theme="light"] body.site .site-header {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] body.site .pc {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: box-shadow var(--mx-t-base) var(--mx-ease);
}

html[data-theme="light"] body.site .pc:hover {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
}

/* ---------------------------------------------------------------- PHASE 2.2 --
   Mobile polish. Every rule here is either mobile-only or paint-only, so the
   desktop layout and the geometry contracts (banner width, equal cards, 44 px
   targets) stay exactly as they were. */
@media (max-width: 767px) {
  /* 1. a little air around the hero, without touching its width or its 16:9 slide */
  body.site .home-hero-row {
    margin-block: 0.35rem 1.15rem;
  }

  /* 2. a soft fade that says "this row scrolls sideways" */
  body.site .home-svc-row {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }

  /* 3. keep the last block clear of the fixed bottom bar and the scroll anchoring */
  /* the app already reserves the bar's height; keep that and add only what was missing:
     an anchor offset, so a jump to a section never lands under the bar */
  body.site {
    scroll-padding-bottom: calc(var(--mx-bnav-h, 5.1rem) + 1rem);
  }

  /* 4. tighter menu items, still at least 44 px tall */
  body.site .site-nav.open a {
    padding-block: 0.6rem;
  }
  body.site .site-nav.open { gap: 0.15rem; }

  /* 5. an open menu can never sit under the bottom bar / the raised middle button */
  body.site .site-nav.open {
    max-height: calc(100dvh - var(--mx-bnav-h, 5.1rem) - 0.25rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ============================================================== PHASE 3 ====
   A visible design pass: bigger type, a real accent, a header that reads as a
   brand bar, cards with depth, and a footer that looks finished. Nothing here
   touches the locked geometry (phone header height, the six-item bottom bar,
   the banner frames, the services row, equal card sizes, 44 px targets). */

html:not([data-theme="light"]) body.site {
  --mx-glow-soft: radial-gradient(900px 420px at 8% 0%, rgba(34, 200, 255, 0.13), transparent 62%),
                  radial-gradient(760px 380px at 96% 4%, rgba(122, 92, 255, 0.12), transparent 60%);
}

/* ---- header: a brand bar, not a strip ---------------------------------- */
html:not([data-theme="light"]) body.site .site-header {
  background: linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(6, 11, 20, 0.92));
  border-bottom: 1px solid rgba(34, 200, 255, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* the brand keeps its exact box in both themes: the header must not move */
html:not([data-theme="light"]) body.site .site-header .brand img,
html:not([data-theme="light"]) body.site .site-header .brand .brand-mark {
  filter: drop-shadow(0 0 12px rgba(34, 200, 255, 0.35));
}

html:not([data-theme="light"]) body.site .site-nav a {
  padding-inline: 0.7rem;
  border-radius: 8px;
  transition: background var(--mx-t-fast) var(--mx-ease), color var(--mx-t-fast) var(--mx-ease);
}

html:not([data-theme="light"]) body.site .site-nav a:hover {
  background: rgba(34, 200, 255, 0.08);
}

html:not([data-theme="light"]) body.site .site-nav a[aria-current="page"] {
  background: rgba(34, 200, 255, 0.12);
  color: #dff6ff;
}

/* ---- typography: a real scale ----------------------------------------- */
html:not([data-theme="light"]) body.site main h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

html:not([data-theme="light"]) body.site main h2 {
  font-size: clamp(1.18rem, 2.1vw, 1.5rem);
  font-weight: 750;
  letter-spacing: -0.015em;
  position: relative;
  padding-left: 0.7rem;
}

html:not([data-theme="light"]) body.site main h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--mx-accent), rgba(34, 200, 255, 0.15));
}

html:not([data-theme="light"]) body.site .see-all,
html:not([data-theme="light"]) body.site a.see-all {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

/* ---- product cards: depth and a price that leads ---------------------- */
html:not([data-theme="light"]) body.site .pc {
  background: linear-gradient(180deg, #101a2b 0%, #0a1220 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 22px rgba(0, 0, 0, 0.38);
}

html:not([data-theme="light"]) body.site .pc:hover,
html:not([data-theme="light"]) body.site .pc:focus-within {
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.06) inset, 0 16px 36px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(34, 200, 255, 0.35);
}

html:not([data-theme="light"]) body.site .pc-media {
  background: radial-gradient(120% 120% at 50% 0%, #16233a 0%, #0d1626 100%);
}

html:not([data-theme="light"]) body.site .pc-price {
  font-size: 1.12rem;
  font-weight: 800;
  text-shadow: 0 0 18px rgba(255, 182, 72, 0.22);
}

html:not([data-theme="light"]) body.site .pc-title,
html:not([data-theme="light"]) body.site .pc-name {
  font-weight: 650;
  letter-spacing: -0.005em;
}

/* ---- buttons: one clear primary --------------------------------------- */
html:not([data-theme="light"]) body.site .add-to-cart-form button[type="submit"] {
  background: linear-gradient(180deg, #34d4ff 0%, #0a84ad 100%);
  border: 1px solid rgba(34, 200, 255, 0.55);
  color: #03131d;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(34, 200, 255, 0.28);
}

html:not([data-theme="light"]) body.site .add-to-cart-form button[type="submit"]:hover:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(34, 200, 255, 0.5), 0 14px 34px rgba(34, 200, 255, 0.34);
}

html:not([data-theme="light"]) body.site .btn-primary {
  background: linear-gradient(180deg, #34d4ff 0%, #0a84ad 100%);
  border-color: rgba(34, 200, 255, 0.55);
  color: #03131d;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(34, 200, 255, 0.25);
}

/* ---- footer: finished, not an afterthought ---------------------------- */
html:not([data-theme="light"]) body.site .site-footer {
  background: linear-gradient(180deg, #070d18 0%, #04070d 100%);
  border-top: 1px solid rgba(34, 200, 255, 0.14);
}

html:not([data-theme="light"]) body.site .site-footer h3 {
  color: #8fb3d9;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

html:not([data-theme="light"]) body.site .footer-links a {
  padding-block: 0.15rem;
}

html:not([data-theme="light"]) body.site .footer-links a:hover {
  color: var(--mx-accent);
  padding-left: 0.2rem;
}

html:not([data-theme="light"]) body.site .footer-legal a {
  color: #7d91ac;
}

html:not([data-theme="light"]) body.site .footer-legal a:hover {
  color: var(--mx-accent);
}

/* ---- breathing room between the home blocks --------------------------- */
html:not([data-theme="light"]) body.site .home-page > section {
  padding-block: clamp(0.9rem, 1.8vw, 1.6rem);
}

html:not([data-theme="light"]) body.site .home-page > section + section {
  border-top: 1px solid rgba(27, 42, 65, 0.55);
}

@media (max-width: 767px) {
  html:not([data-theme="light"]) body.site main h1 { font-size: 1.45rem; }
  html:not([data-theme="light"]) body.site main h2 { font-size: 1.12rem; }
  html:not([data-theme="light"]) body.site .pc-price { font-size: 1.04rem; }
  html:not([data-theme="light"]) body.site .home-page > section + section {
    border-top: 1px solid rgba(27, 42, 65, 0.4);
  }
}

/* the light theme keeps its own, lighter version of the same ideas */
html[data-theme="light"] body.site main h2 {
  position: relative;
  padding-left: 0.7rem;
  font-weight: 750;
}

html[data-theme="light"] body.site main h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

html[data-theme="light"] body.site .pc {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 20px rgba(15, 23, 42, 0.07);
}

html[data-theme="light"] body.site .pc:hover {
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), 0 16px 32px rgba(15, 23, 42, 0.12);
}

/* --------------------------------------------------- menu, collapsed state ---
   Below 1200 px (and on phones) the bar collapses into the hamburger drawer.
   The drawer is grouped, not a flat dump: main links first, then the services
   accordion, then the account block in its own card. The desktop mega popovers
   stay desktop-only — the accordion already lists every service. */
@media (min-width: 768px) {
  /* the drawer is a panel on the right, not a bare strip: it keeps the 400 px the desktop menu was designed at,
     gets its own surface and shadow, and never reaches past the bottom bar's room. Its blocks stretch to it. */
  body.site .site-header.nav-collapsed nav.site-nav.open {
    padding: 0.5rem 0 0.9rem;
    background: rgba(var(--surface-rgb), 0.98);
    border-left: 1px solid rgba(var(--accent-rgb), 0.16);
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.16);
    border-bottom-left-radius: 16px;
    box-shadow: -18px 24px 48px rgba(0, 0, 0, 0.35);
    max-height: calc(100dvh - var(--header-h) - 0.5rem);
  }

  /* the popovers belong to the desktop bar only; in the drawer they used to
     render as anonymous indented lists, which read as chaos */
  body.site .site-header nav.site-nav.open .nav-mega,
  body.site .site-header nav.site-nav.open .nav-mega-toggle {
    display: none !important;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open a,
  body.site .site-header.nav-collapsed nav.site-nav.open summary {
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
  }

  /* the grouped blocks are the panel's width, so their cards line up with the links */
  body.site .site-header.nav-collapsed nav.site-nav.open > .nav-drawer-only {
    width: auto;
    align-self: stretch;
  }

  /* the first link gets a little air from the panel's top edge */
  body.site .site-header.nav-collapsed nav.site-nav.open > a:first-child {
    margin-top: 0.15rem;
  }

  /* the account card: separated from the links, one rounded tinted box */
  body.site .site-header.nav-collapsed nav.site-nav.open .nav-account-block {
    margin: 0.65rem 0.8rem 0;
    padding: 0.3rem 0 0.5rem;
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.06);
  }

  /* the services accordion: its own quiet box, opened by the summary line */
  body.site .site-header.nav-collapsed nav.site-nav.open .nav-sub-wrap {
    margin: 0.45rem 0.8rem 0;
    padding: 0 0.3rem;
    border-top: 1px solid rgba(var(--accent-rgb), 0.14);
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
  }

  body.site .site-header.nav-collapsed nav.site-nav.open .nav-sub-toggle {
    color: var(--accent);
    font-weight: 600;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open .nav-sub-link {
    padding: 0.5rem 0.6rem 0.5rem 1.3rem;
    font-size: 0.9rem;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open .nav-account-block .nav-divider {
    display: none;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open .nav-account-block a {
    width: auto;
    margin: 0 0.4rem;
    border-radius: 8px;
  }
}

@media (max-width: 767px) {
  /* the same grouped account card in the phone menu */
  body.site .site-header nav.site-nav.open .nav-account-block {
    margin: 0.55rem 0.7rem 0;
    padding-bottom: 0.35rem;
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 12px;
    background: rgba(var(--accent-rgb), 0.06);
  }

  body.site .site-header nav.site-nav.open .nav-account-block .nav-divider {
    display: none;
  }

  body.site .site-header nav.site-nav.open .nav-account-block a {
    margin: 0 0.35rem;
    border-radius: 8px;
  }

  /* v3.3 polish: the numbers fit in one row from the tablet width up (a narrow phone keeps the 2x2 the home.css
     mockup scale gives it), and the last of an odd few service tiles keeps the row's own width instead of hanging
     half-finished under it */
  body.site .home-svc-row { justify-content: center; }
  body.site .home-svc--grid .home-svc-row { justify-content: normal; }
}
@media (min-width: 768px) {
  body.site .home-kpi {
    display: flex; flex-wrap: nowrap; gap: calc(8 * var(--u)); margin-top: calc(10 * var(--u));
  }
  body.site .home-kpi-item { flex: 1 1 0; min-width: 0; padding: calc(9 * var(--u)) calc(10 * var(--u)); }
}

/* ------------------------------------------------------------ shop grid -----
   Four very large cards on a desktop read as a landing page, not a catalogue. */
@media (min-width: 1200px) {
  body.site #shopGrid.pgrid,
  body.site .shop-layout .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr));
    gap: 0.85rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  body.site .shop-layout .pgrid,
  body.site #shopGrid.pgrid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr));
    gap: 0.75rem;
  }
}
@media (min-width: 1500px) {
  body.site #shopGrid.pgrid,
  body.site .shop-layout .pgrid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
  }
}

/* a slightly calmer card at that density: the photo keeps its square, the text shrinks a touch */
@media (min-width: 1200px) {
  body.site #shopGrid .pc-name,
  body.site .shop-layout .pc-name { font-size: 0.86rem; }
  body.site #shopGrid .pc-price,
  body.site .shop-layout .pc-price { font-size: 0.98rem; }
}

/* ------------------------------------------- collapsed menu: right drawer ----
   When the links do not fit, the three lines used to flood the whole window.
   They now slide a comfortable panel in from the right corner (≤ 400 px), with
   the same links, the same Escape and the same outside-click close. */
@media (min-width: 768px) {
  /* Closed: a zero-width box. A fixed panel parked at translateX(102%) still counts in the
     document's scroll width, which gave every 768–1199 px tablet a sideways scroll. */
  body.site .site-header.nav-collapsed nav.site-nav {
    left: auto;
    right: 0;
    width: 0;
    min-width: 0;
    max-width: 400px;
    overflow: hidden;
    border: 0;
    visibility: hidden;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open {
    width: min(90vw, 400px);
    visibility: visible;
    border-left: 1px solid rgba(34, 200, 255, 0.16);
    border-bottom: 1px solid rgba(34, 200, 255, 0.16);
    border-bottom-left-radius: 16px;
    box-shadow: -18px 24px 48px rgba(0, 0, 0, 0.55);
    max-height: calc(100dvh - var(--header-h) - 0.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem 0 0.75rem;
    animation: v31-drawer-in 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
  }
  @keyframes v31-drawer-in {
    from { opacity: 0; transform: translateX(24px); }
  }
  @media (prefers-reduced-motion: reduce) {
    body.site .site-header.nav-collapsed nav.site-nav.open { animation: none; }
  }

  body.site .site-header.nav-collapsed nav.site-nav.open a {
    width: 100%;
    padding: 0.6rem 1.1rem;
  }

  body.site .site-header.nav-collapsed nav.site-nav.open::-webkit-scrollbar { width: 8px; }
  body.site .site-header.nav-collapsed nav.site-nav.open::-webkit-scrollbar-thumb {
    background: rgba(34, 200, 255, 0.25);
    border-radius: 8px;
  }
}
/* ------------------------------------------------- home: drop the sale strip -
   The red "-10%" bar above the hero is a campaign strip the owner does not want
   on the front page. The promo itself stays: it still prices products and still
   shows on the shop, only this band is hidden here. */
body.home-v2 .home-page .home-sale {
  display: none !important;
}

/* a little more air under the header, so the hero reads as the first thing */
body.home-v2 .home-page > .home-hero-row,
body.home-v2 .home-page > .home-intro {
  margin-top: 0.35rem;
}
/* --------------------------------------------------- no menu flash on load --
   The bar collapses when the links do not fit, and that measurement runs after the
   first paint: the full menu used to appear and then vanish. Until main.js marks
   the header as measured, the links stay invisible, so nothing flashes. */
@media (min-width: 768px) {
  body.site .site-header:not(.nav-ready) nav.site-nav {
    visibility: hidden;
  }
}
/* ============================================================== v3.1 BANNERS ====
   The picture is the background and the words stand on it (no panel under the frame), the
   dots become one segmented progress line, and the text keeps its own colour in both themes
   because the artwork is dark either way. Phone sizes follow the mockup (--u). */
body.site .home-hero-row .banner-slider .banner-text {
  pointer-events: none;
}
body.site .home-hero-row .banner-slider .banner-title { color: #ffffff; }
body.site .home-hero-row .banner-slider .banner-subtitle { color: #c3d4e6; }
body.site .home-hero-row .banner-slider .banner-cta {
  border-color: #22c8ff; background: #22c8ff; color: #04121c;
}
/* the dots: 44/32 px of invisible tap area with a short line inside; no frosted pill */
body.site .home-hero-row .banner-slider .banner-dots {
  left: 4.2%; right: auto; bottom: 10px; transform: none;
  padding: 0; gap: 0; border: 0; border-radius: 0; background: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
/* the button is only the tap area; the line is drawn by ::after (no filled square on the active slide) */
body.site .home-hero-row .banner-slider .banner-dot,
body.site .home-hero-row .banner-slider .banner-dot.active,
body.site .home-hero-row .banner-slider .banner-dot.is-active,
body.site .home-hero-row .banner-slider .banner-dot[aria-current="true"] {
  width: 32px; height: 32px; border: 0; border-radius: 0; background: none;
}
body.site .home-hero-row .banner-slider .banner-dot::after {
  width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.34);
  transition: background 160ms ease, box-shadow 160ms ease;
}
body.site .home-hero-row .banner-slider .banner-dot.active::after,
body.site .home-hero-row .banner-slider .banner-dot[aria-current="true"]::after {
  width: 22px; background: #22c8ff; box-shadow: 0 0 10px rgba(34, 200, 255, 0.55);
}
@media (min-width: 900px) {
  /* the words sit on the picture's clean left side, never in a panel under it */
  body.site .home-hero-row .banner-slider .banner-text {
    position: absolute; inset: 0 auto 0 0; width: 56%; max-width: none;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 0.5rem; padding: 0 0 0 4.2%; text-align: left; border-radius: 0;
    background: linear-gradient(90deg, rgba(4, 8, 16, 0.86) 0%, rgba(4, 8, 16, 0.62) 46%, rgba(4, 8, 16, 0) 100%);
    backdrop-filter: none; -webkit-backdrop-filter: none; border: 0;
  }
  body.site .home-hero-row .banner-slider .banner-title {
    font-size: clamp(1.4rem, 1.9vw + 0.4rem, 2.5rem); line-height: 1.08; letter-spacing: -0.015em;
  }
  body.site .home-hero-row .banner-slider .banner-subtitle { max-width: 32rem; font-size: 0.95rem; }
  body.site .home-hero-row .banner-slider .banner-cta { margin-top: 0.55rem; }
}
@media (max-width: 899px) {
  /* a worded slide carries a title, a description and a button: 16:9 was too short and the
     words overflowed above the frame, so the text slides get a taller 4:3 frame on phones */
  body.site .home-hero-row .banner-slider .banner-slide.has-text { aspect-ratio: 4 / 3; }
  body.site .home-hero-row .banner-slider .banner-text {
    padding: calc(24 * var(--u)) calc(13 * var(--u)) calc(38 * var(--u));
  }
  body.site .home-hero-row .banner-slider .banner-dots {
    left: calc(13 * var(--u)); bottom: calc(22 * var(--u) - 22px);
  }
  body.site .home-hero-row .banner-slider .banner-dot,
  body.site .home-hero-row .banner-slider .banner-dot.active,
  body.site .home-hero-row .banner-slider .banner-dot.is-active,
  body.site .home-hero-row .banner-slider .banner-dot[aria-current="true"] {
    width: 44px; height: 44px;
  }
  body.site .home-hero-row .banner-slider .banner-dot::after { width: calc(14 * var(--u)); height: calc(3 * var(--u)); }
  body.site .home-hero-row .banner-slider .banner-dot.active::after { width: calc(14 * var(--u)); }
  body.site .home-hero-row .banner-slider .banner-title { color: #ffffff; }
}

/* ================================================================ v3.1 HERO ====
   The banner carries the message, so the intro above it is one slim brand strip on a desktop
   (the words stay in the page: the h1 and the description), and the two buttons shrink to the
   size of the ones in the slider. Phones keep the block under the products (home.css order). */
@media (min-width: 1024px) {
  body.home-v2 .home-page > .home-intro {
    padding: 0.65rem 0 0.75rem;
    border-bottom: 1px solid var(--border);
  }
  body.home-v2 .home-page > .home-intro .hero-content {
    flex-wrap: nowrap; align-items: center; gap: 1.5rem;
  }
  body.home-v2 .home-page > .home-intro .hero-text {
    display: flex; align-items: baseline; gap: 0.85rem; flex: 1 1 auto; min-width: 0;
  }
  body.site.home-v2 main .home-intro h1 {
    margin: 0; flex: none;
    font-size: 1.3rem; line-height: 1; letter-spacing: 0.14em; text-shadow: none;
  }
  body.home-v2 .home-page > .home-intro .hero-tagline {
    display: block; max-width: none; margin: 0;
    font-size: 0.82rem; line-height: 1.5; color: var(--muted-soft);
    white-space: normal; overflow: visible; text-overflow: clip;
  }
  body.home-v2 .home-page > .home-intro .hero-actions { flex: none; flex-wrap: nowrap; gap: 0.5rem; margin: 0; }
  body.site.home-v2 .home-intro .hero-actions a.btn {
    padding: 0.5rem 1rem; font-size: 0.84rem; white-space: nowrap;
  }
  body.site.home-v2 .home-intro .hero-actions a.btn-outline {
    background: transparent; border: 1px solid rgba(34, 200, 255, 0.45); color: var(--text);
  }
}

/* =============================================================== v3.1 PAGES ====
   The inner pages keep their glass cards; these two rules only fix the two places the eye
   stumbled: a 5 + 2 card row on the services page, and a small centred photo above a wide
   left-aligned service text (now a full-width band, the same shape as a banner). */
@media (min-width: 900px) {
  body.site .services-page .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  }
}
body.site .service-detail .service-cover {
  width: 100%; margin: 0 0 1.1rem; aspect-ratio: 3 / 1; max-height: 380px;
  border: 1px solid var(--border); border-radius: var(--radius-lg, 14px);
}
@media (max-width: 767px) {
  body.site .service-detail .service-cover { aspect-ratio: 16 / 9; }
}

/* ============================================================ v3.1 ADMIN ====
   style.css pins the admin's native selects to a dark colour-scheme; in the light theme
   the dropdown list and its arrow follow the page instead. */
html[data-theme="light"] body.is-admin select { color-scheme: light; }

/* ============================================================ v3.3 NAV =====
   The desktop bar shows the section links only (services, shop, news, projects,
   gallery, reviews, about, contact, downloads); the grouped drawer blocks and
   the hamburger stay hidden while the bar fits (main.js keeps 1024-1199 in the
   drawer on purpose). */
@media (min-width: 1024px) {
  body.site .site-header:not(.nav-collapsed) nav.site-nav > .nav-drawer-only { display: none; }
  body.site .site-header:not(.nav-collapsed) .hamburger { display: none; }
  /* v3.3: glass.css loads after this file and gives the links 0.58rem; the bar needs 0.45rem to fit at 1200 */
  body.site .site-header:not(.nav-collapsed) nav.site-nav > a {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
  /* a bar that only just fits in the measuring pass may come up a pixel short afterwards; it flexes so
     the page never gains a sideways scroll (the links keep their own width) */
  body.site .site-header:not(.nav-collapsed) .header-right {
    min-width: 0;
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  body.site .site-header:not(.nav-collapsed) nav.site-nav > a {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.88rem;
  }
}

/* ========================================================== v3.3 FOOTER ====
   One composed band: a glowing hairline on top, a deep fade at the page end
   (no more slab cut out of the page), icon-led contact rows, a social row and
   a tidy two-column link grid. */
body.site .site-footer {
  margin-top: 2.4rem;
  border-top: 0;
  background:
    radial-gradient(130% 170% at 10% 0%, rgba(34, 200, 255, 0.07), transparent 55%),
    linear-gradient(180deg, rgba(10, 18, 31, 0.16), rgba(4, 7, 13, 0.96) 78%);
}

body.site .site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent 3%, rgba(34, 200, 255, 0.5) 38%,
    rgba(122, 92, 255, 0.42) 62%, transparent 97%);
}

html[data-theme="light"] body.site .site-footer {
  background:
    radial-gradient(130% 170% at 10% 0%, rgba(0, 97, 143, 0.07), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(226, 234, 244, 0.97) 72%);
}

body.site .site-footer .footer-grid {
  gap: 1.6rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.1rem;
}

body.site .site-footer .footer-contact h3,
body.site .site-footer .footer-links h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

body.site .site-footer .footer-line {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

body.site .site-footer .footer-line svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(2px);
}

body.site .site-footer .footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

body.site .site-footer .footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  color: var(--muted-soft, var(--muted));
  transition: color 0.18s var(--ease, ease), border-color 0.18s var(--ease, ease),
    box-shadow 0.18s var(--ease, ease), transform 0.18s var(--ease, ease);
}

body.site .site-footer .footer-social a:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.65);
  box-shadow: 0 0 16px -4px rgba(var(--accent-rgb), 0.55);
  transform: translateY(-2px);
}

body.site .site-footer .footer-social svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.site .site-footer .footer-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.9rem;
}

body.site .site-footer .footer-link-grid a {
  margin-bottom: 0;
  padding: 0.18rem 0;
}

@media (min-width: 768px) {
  body.site .site-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    text-align: left;
  }
}

@media (max-width: 767px) {
  body.site .site-footer .footer-link-grid {
    grid-template-columns: 1fr;
  }

  body.site .site-footer .footer-social {
    margin-top: 0.7rem;
  }
}
