/* Shared nav (Systems dropdown) and footer. Pairs with partials/nav.html and js/nav.js.
   The page stylesheet supplies the tokens (--ink --text --muted --line --blue --blue-soft --nav-h),
   .nav, .nav-inner, .nav-logo, .nav-mark, .nav-word and .btn. Mobile first. No shadows, no purple.
   The only motion on the site that lives here: the dropdown fades in over 150ms (desktop). */

.nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; margin-left: auto; padding: 0 10px; border: 0; background: none; cursor: pointer; }
.nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-cta { display: none; }

/* Phone: the menu drops under the bar */
.nav-menu { display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-bottom: 1px solid var(--line); padding: 4px 16px 20px; }
.nav.open .nav-menu { display: block; }
.nav-link, .nav-dd-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; cursor: pointer; }
.nav-caret { width: 12px; height: 12px; }
.nav-dd-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-panel { display: none; padding: 4px 0 8px; }
.nav-dd.open .nav-panel { display: block; }
.nav-cta-m { width: 100%; margin-top: 16px; }
.nav-col-h { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--blue); margin: 16px 0 4px; }
.nav-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; color: inherit; text-decoration: none; }
.nav-item:hover b, .nav-item:focus-visible b { color: var(--blue); }
.nav-item b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.nav-item small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
/* Flagship badge: one component, used in the nav, the basket cards and the systems list */
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; background: var(--blue); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; white-space: nowrap; }
.flag-star { width: 11px; height: 11px; flex: none; }
.nav-badge { vertical-align: 1px; margin-left: 6px; }
.nav-ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; color: var(--blue); }
.nav-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Phone type floor (desktop unchanged) */
@media (max-width: 759px) {
  .nav-col-h { font-size: 14px; }
  .nav-item small { font-size: 14px; }
  .flag { font-size: 12px; }
}
/* Mobile pass 2: 44px tap targets for the logo link and every footer link (phones only) */
@media (max-width: 759px) {
  .nav-logo { min-height: 44px; }
  .ft-groups ul { gap: 0; }
  .ft-groups a { display: flex; align-items: center; min-height: 44px; }
  .ft-links { gap: 0 24px; }
  .ft-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .ft-groups b { font-size: 14px; }
  .ft-legal, .ft-note { font-size: 14px; }
}

/* Desktop: inline links, dropdown panel under "Systems" */
@media (min-width: 1024px) {
  .nav-burger, .nav-cta-m { display: none; }
  .nav-cta { display: inline-flex; }
  .nav-inner { position: relative; }
  .nav-menu { display: flex; align-items: center; gap: 32px; position: static; max-height: none; overflow: visible; background: none; border: 0; padding: 0; margin: 0 auto; }
  .nav-link, .nav-dd-btn { width: auto; min-height: 0; padding: 8px 0; border: 0; font-size: 16px; font-weight: 600; color: var(--ink); gap: 6px; }
  .nav-link:hover, .nav-dd-btn:hover, .nav-dd-btn[aria-expanded="true"] { color: var(--blue); }
  .nav-panel { display: grid; position: absolute; top: calc(100% - 4px); left: 50%; transform: translateX(-50%); width: min(1040px, calc(100vw - 48px)); grid-template-columns: 1.05fr 1fr 1fr; gap: 8px 24px; align-items: start; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility .15s ease; }
  .nav-dd.open .nav-panel { display: grid; opacity: 1; visibility: visible; }
  .nav-col-flag { background: var(--blue-soft); border-radius: 12px; padding: 0 16px 8px; }
  .nav-col-h { margin: 16px 0 4px; }
  .nav-item { padding: 9px 0; }
}

/* Footer (shared; classes start with ft- so page stylesheets do not collide) */
.ft { border-top: 1px solid var(--line); background: #fff; padding: 40px 0 32px; font-size: 14px; color: var(--text); }
.ft-top { display: flex; flex-direction: column; gap: 24px; }
.ft-groups { display: grid; gap: 24px; }
.ft-groups b { display: block; font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.ft-groups ul { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.ft a { color: var(--text); text-decoration: none; }
.ft a:hover { color: var(--blue); }
.ft-bottom { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.ft-links { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 0; list-style: none; }
.ft-links a { font-weight: 600; color: var(--ink); }
.ft-legal { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.bc-contact { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 16px 0 0; font-size: 14px; }
.bc-contact a, .bc-contact span { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.bc-contact a:hover { color: var(--blue); }
.ft-note { margin: 0; font-size: 13px; color: var(--muted); max-width: 560px; }
@media (min-width: 760px) {
  .ft-groups { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .ft-bottom { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

/* ===== Card states (shared by the homepage and the system pages) =====
   hover (pointer devices only): lift 4px, blue 40% border, soft shadow, icon tile 1.06, arrow slides 4px.
   press: back down and 98%. keyboard focus: 3px blue ring. Reduced motion keeps the colour and border changes only. */
:root { --cx-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
:focus-visible { outline: 3px solid #0077FA; outline-offset: 3px; }
.bcard, .tb-item, .rcard, .card { transition: border-color .18s ease-out, box-shadow .18s ease-out; -webkit-tap-highlight-color: transparent; }
.tile, .tb-item .av { transition: transform .18s ease-out; }
.tb-item { position: relative; }
.bcard h3::after, .tb-item::after { content: ""; position: absolute; width: 22px; height: 22px; background: #0077FA; -webkit-mask: var(--cx-arrow) center / contain no-repeat; mask: var(--cx-arrow) center / contain no-repeat; transition: transform .18s ease-out; pointer-events: none; }
.bcard h3 { position: relative; }
.bcard h3::after { right: 0; top: .2em; width: 16px; height: 16px; }
.tb-item { padding-right: 38px; }
.tb-item::after { right: 12px; top: 11px; width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .bcard, .tb-item, .rcard, .card { transition: transform .18s ease-out, border-color .18s ease-out, box-shadow .18s ease-out; }
}
@media (hover: hover) {
  .bcard:hover, .card:hover { border-color: rgba(0, 119, 250, .4); box-shadow: 0 12px 28px rgba(7, 18, 64, .12); }
  .rcard:hover, .tb-item:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 119, 250, .4), 0 12px 28px rgba(7, 18, 64, .12); }
  .rcard:hover { background: #f4f5f7; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bcard:hover, .tb-item:hover, .rcard:hover, .card:hover { transform: translateY(-4px); }
  .bcard:hover .tile, .tb-item:hover .av, .card:hover .tile { transform: scale(1.06); }
  .bcard:hover h3::after, .tb-item:hover::after { transform: translateX(4px); }
}
.bcard:active, .tb-item:active { box-shadow: 0 2px 6px rgba(7, 18, 64, .10); transition-duration: .09s; }
.tb-item:active { box-shadow: inset 0 0 0 1px rgba(0, 119, 250, .4), 0 2px 6px rgba(7, 18, 64, .10); }
@media (prefers-reduced-motion: no-preference) {
  .bcard:active, .tb-item:active { transform: translateY(0) scale(.98); }
}
