/* VIMDRIVE — site chrome: the main navigation (mega menu) and the footer.
   Loaded after css/style.css by every page except the /contact/ lead page (which keeps its own focused header),
   so the header and footer are the same everywhere else.
   Nothing here targets page content. The homepage and the Platform / Channels pages also load css/v2.css.
   Markup is generated: _build/v2lib.py (header(), footer()); run `python3 _build/gen_v2.py` after changing it. */

/* Page gutter: 48 / 32 / 24px like the rest of the site, and from 1400px up the
   content column stops at 1304px so it lines up with the header (.nav-inner). */
:root { --g: 48px; --G: max(var(--g), calc(50% - 652px)); }
@media (max-width: 1024px) { :root { --g: 32px; } }
@media (max-width: 900px)  { :root { --g: 24px; } }

.nav--mega, .site-footer, .skip-link { font-variant-numeric: lining-nums; }     /* Syne's default figures are old-style: a 0 drops below the baseline */
main { scroll-margin-top: 69px; }                      /* the skip link lands the content below the sticky header */
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 12px 18px; border-radius: 10px; background: #fff; color: #06090f; font-size: 14px; font-weight: 700; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* Stage colours of the menu columns */
.mega-col--blue   { --c: var(--accent-2); --c-rgb: 110, 164, 255; }
.mega-col--green  { --c: var(--green);    --c-rgb: 93, 202, 165; }
.mega-col--warm   { --c: var(--warm-2);   --c-rgb: 224, 138, 104; }
.mega-col--purple { --c: var(--purple);   --c-rgb: 175, 169, 236; }

/* ── Mega menu (desktop) ─────────────────────────────────── */
.nav--mega .has-mega { position: static; }
@media (min-width: 901px) {
  /* the hover target is as tall as the bar, so it touches the panel: the pointer never crosses a gap */
  .nav--mega .nav-links { align-self: stretch; }
  .nav--mega .nav-links > .has-mega { display: flex; align-items: center; align-self: stretch; }
  .nav--mega .nav-toggle { display: none; }          /* the checkbox is the phone menu's switch; at this width it is not a tab stop */
}
.nav--mega .has-mega:hover > a,
.nav--mega .has-mega:focus-within > a,
.nav--mega .has-mega.is-grace > a,
.nav--mega .has-mega.is-open > a { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav--mega .has-mega:hover .caret,
.nav--mega .has-mega:focus-within .caret,
.nav--mega .has-mega.is-grace .caret,
.nav--mega .has-mega.is-open .caret { transform: rotate(180deg); opacity: 0.8; }
.nav--mega .mega {
  position: absolute; top: 100%; left: 0; right: 0;
  padding: 0 48px;
  opacity: 0; visibility: hidden; pointer-events: none;   /* the full-width box lets the pointer through; the card itself takes it */
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
  z-index: 210;
}
.nav--mega .has-mega:hover > .mega,
.nav--mega .has-mega:focus-within > .mega,
.nav--mega .has-mega.is-grace > .mega,
.nav--mega .has-mega.is-open > .mega {
  opacity: 1; visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.nav--mega .mega-inner { pointer-events: auto; position: relative; margin-top: 10px; }
.nav--mega .mega-inner::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }   /* keeps hover across the gap between bar and card (overlaps the bar's own border) */
@media (min-width: 901px) {
  /* Escape: hide the panel until the pointer leaves or focus moves to another item (home.js) */
  .nav--mega.is-closing .mega { opacity: 0 !important; visibility: hidden !important; }
  .nav--mega.is-closing .mega-inner { pointer-events: none; }
  /* the outgoing panel goes at once when the pointer moves to another item: never two panels on screen */
  .nav--mega:has(.has-mega:hover) .has-mega:not(:hover):not(.is-grace) > .mega { transition: none; opacity: 0; visibility: hidden; }
  /* a panel that lingers (home.js) keeps the stage for 160 ms; the neighbour the pointer crosses on its way waits */
  .nav--mega.is-grace .has-mega:hover:not(.is-grace) > .mega { transition: none; opacity: 0; visibility: hidden; }
  /* hover wins over keyboard focus: never two panels at once */
  .nav--mega:has(.has-mega:hover) .has-mega:not(:hover):focus-within > .mega { opacity: 0; visibility: hidden; }
}
.mega-inner {
  max-width: 1304px; margin: 0 auto;
  display: flex; gap: 22px;
  padding: 26px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #121828 0%, #0b1019 100%);     /* opaque: a panel this large must not let the page show through */
  box-shadow: inset 0 1px 0 var(--glass-spec-top), 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.mega-feature {
  flex: 0 0 200px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(110, 164, 255, 0.45);
  background: linear-gradient(160deg, rgba(25, 110, 240, 0.22), rgba(255, 255, 255, 0.03));
  transition: border-color 0.15s, background 0.15s;
}
.mega-feature:hover { border-color: rgba(110, 164, 255, 0.85); }
.mega-feature--warm { border-color: rgba(224, 138, 104, 0.45); background: linear-gradient(160deg, rgba(201, 115, 81, 0.20), rgba(255, 255, 255, 0.03)); }
.mega-feature--warm:hover { border-color: rgba(224, 138, 104, 0.85); }
.mega-feature-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); }
.mega-feature--warm .mega-feature-label { color: var(--warm-2); }
.mega-feature-title { font-family: var(--font-serif); font-size: 24px; line-height: 1.1; color: var(--text); }
.mega-feature-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.mega-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mega-col-head {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 8px 12px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(var(--c-rgb), 0.45);
}
.mega-num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--c); }
.mega-col-name { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.mega-col-name .nw { white-space: nowrap; }       /* the arrow always stays with the last word of the title */
.mega-col-name svg { display: inline-block; flex: none; vertical-align: -2px; margin-left: 6px; color: var(--c); opacity: 0.85; transition: transform 0.15s; }
.mega-col-head:hover .mega-col-name svg { transform: translateX(3px); }
.mega-link, .mega-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 8px; transition: background 0.15s; }
.mega-link:hover, .mega-tile:hover { background: rgba(110, 164, 255, 0.10); }
.mega-link-t { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.mega-link-t svg { color: var(--warm-2); }
.mega-link-d { font-size: 12px; color: var(--text-3); }
.mega-tiles { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; align-content: start; }
.mega-tiles--resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }      /* four tiles: two by two, not three and one */
.mega-tile { padding: 14px; border: 1px solid var(--glass-stroke); border-radius: 12px; }
.mega-slot {
  display: flex; align-items: center;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(224, 138, 104, 0.5);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--warm-2);
}
@media (max-width: 1400px) and (min-width: 901px) {
  /* laptops: column titles may take two lines, so every title block gets the same height (10 + 6 + 2 × 20 + 12 + rule) */
  .mega-col-name { white-space: normal; }
  .mega-col-head { min-height: 80px; justify-content: flex-start; }
}
@media (max-width: 1240px) and (min-width: 901px) {
  .mega-feature { flex-basis: 172px; }
  .mega-inner { gap: 16px; padding: 20px; }
}
@media (max-width: 1024px) and (min-width: 901px) { .nav--mega .mega { padding-left: 32px; padding-right: 32px; } }

/* Mega menu inside the phone menu: plain rows, like the existing dropdowns */
@media (max-width: 900px) {
  .nav--mega .mega {
    position: static; padding: 0;
    opacity: 1; visibility: inherit; pointer-events: inherit; transform: none;      /* inherit: a closed menu is not reachable by keyboard or screen reader */
    transition: none;
  }
  .nav--mega .mega-inner { margin-top: 0; }
  .nav--mega .mega-inner::before { display: none; }
  .nav--mega .mega-feature { display: none; }          /* the group's own link already goes there */
  .nav--mega .nav-toggle:checked ~ .btn-primary { display: inline-flex; }       /* Book a Call stays in view while the menu is open */
  .nav--mega .nav-toggle:checked ~ .nav-links { max-height: calc(100dvh - 68px); overscroll-behavior: contain; }
  .nav--mega .logo { min-height: 44px; }
  .mega-inner { display: block; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .mega-feature, .mega-col-head, .mega-tile {
    display: block;
    padding: 12px 8px 12px 22px; margin: 0;
    border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
    background: none;
    font-size: 14px; color: var(--text-3);
  }
  .mega-feature-label, .mega-feature-cta, .mega-num, .mega-link-d, .mega-tiles--slots, .mega-col-name svg, .mega-link-t svg { display: none; }
  .mega-link { display: block; padding: 11px 8px 11px 40px; margin: 0; border: 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-3); }
  .mega-link-t { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--text-3); }
  .mega-feature-title, .mega-col-name, .mega-link-t { font-family: var(--font-sans); font-size: 14px; font-weight: 500; color: var(--text-3); }
  .mega-col, .mega-tiles { display: block; }
  .mega-tiles.mega-tiles--slots { display: none; }      /* industry placeholders stay out of the phone menu */
}

/* ── Footer that mirrors the menu ────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--glass-stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.03) 100%);
}
.footer-top { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 3.1fr); gap: 56px; padding: 64px var(--G) 44px; }
.site-footer .footer-tagline { margin: 0 0 14px; }
.footer-reach { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.footer-reach a:hover { color: var(--accent-2); }
/* WhatsApp button in place of the phone number: a glass pill with the WhatsApp glyph, the one green accent in the footer */
.footer-reach .footer-wa { display: inline-flex; align-items: center; align-self: flex-start; gap: 9px; margin-top: 10px; min-height: 42px; padding: 0 18px 0 14px; border-radius: 999px; border: 1px solid rgba(37, 211, 102, 0.5); background: linear-gradient(135deg, rgba(37, 211, 102, 0.16), rgba(37, 211, 102, 0.04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.footer-reach .footer-wa svg { flex: none; color: #25d366; }
.footer-reach .footer-wa:hover { color: var(--text); border-color: rgba(37, 211, 102, 0.85); background: linear-gradient(135deg, rgba(37, 211, 102, 0.24), rgba(37, 211, 102, 0.08)); box-shadow: 0 10px 28px -14px rgba(37, 211, 102, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.footer-reach .footer-wa:focus-visible { outline: 2px solid #25d366; outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .footer-reach .footer-wa:hover { transform: translateY(-1px); } }
@media (max-width: 1160px) { .site-footer .footer-col-title { min-height: 32px; } }       /* "Pricing · Resources" wraps here; the four lists still start on one line */
.footer-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-slot { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--warm-2); }
.footer-bottom--v2 { padding-left: var(--G); padding-right: var(--G); }
.site-footer > .footer-bottom--v2 { margin: 0; padding: 20px var(--G); }      /* the bottom bar sits inside <footer>, edge to edge */
.site-footer .footer-tagline, .footer-bottom--v2, .footer-bottom--v2 a { color: var(--text-3); }
.footer-bottom--v2 a:hover { color: var(--accent-2); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 44px; padding-bottom: 32px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  /* touch: every footer link is a comfortable tap target */
  .site-footer .footer-links { gap: 0; }
  .site-footer .footer-links a, .site-footer .footer-slot { display: block; padding: 9px 0; }
  .footer-reach { gap: 0; }
  .footer-reach a { padding: 8px 0; }
  .footer-reach .footer-wa { min-height: 44px; margin-top: 8px; padding: 0 18px 0 14px; }
  .site-footer .footer-col-title { margin-bottom: 8px; }
  .footer-legal a { padding: 9px 0; }
}

/* mega menu: current page, Resources panel */
.nav .nav-top[aria-current], .nav .nav-links > a[aria-current="page"]:not(.nav-cta-mobile) { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 12px 12px 0 0; }
.nav--mega .mega-link[aria-current], .nav--mega .mega-tile[aria-current] { background: rgba(110, 164, 255, 0.12); }
.mega-feature--blue { border-color: rgba(110, 164, 255, 0.45); }

@media (prefers-reduced-motion: reduce) {
  .mega-col-name svg, .nav--mega .mega, .nav .caret, .nav .nav-burger span, .nav .nav-links, .mega-feature, .mega-link, .mega-tile, .nav .btn-primary, .footer-links a { transition: none; }
  .nav--mega .mega { transform: none; }
}


/* ═══ Cards: one hover motion across the site ═══════════════════════════════════
   Every card lifts 4 px, its edge brightens, a soft glow appears and any arrow slides out. The colour is the card's stage
   colour where it has one (--c-rgb, set by the stage / tone classes) and the brand blue everywhere else. Only where a mouse
   can hover, and not in the swipe rows on phones (they would clip a lift). Off under reduced motion. */
:where(.cap-card, .pg-card, .pg-tile, .pg-step, .pg-inside-card, .pg-control, .opp-item, .pf-tile, .ch-tile, .pf-lane, .flow-node) { transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.solution-card, .case-card, .proof-card, .testi-card, .principle-card, .agent-block, .pg-pager-a { transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.25s; }
.reveal-init:is(.solution-card, .case-card, .proof-card, .testi-card) {      /* staged by assets/motion.js: keep the reveal timing until it has played */
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.2s, box-shadow 0.2s, background 0.25s;
}
.pg-step::after { transition: transform 0.2s; }
@media (hover: hover) and (min-width: 601px) {
  :is(.cap-card, .pg-card, .pg-tile, .pg-step, .pg-inside-card, .pg-control, .opp-item, .pf-tile, .ch-tile, .pf-lane, .flow-node, .solution-card, .case-card, .proof-card, .testi-card, .principle-card, .agent-block, .pg-pager-a):hover {
    transform: translateY(-4px);
    border-color: rgba(var(--c-rgb, 110, 164, 255), 0.7);
    box-shadow: 0 28px 60px -34px rgba(var(--c-rgb, 110, 164, 255), 0.7);
  }
  .pg-step:hover::after { transform: translateY(4px); }          /* the connector line stays level with the next step */
  .cap-card:hover .cap-more { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  :where(.cap-card, .pg-card, .pg-tile, .pg-step, .pg-inside-card, .pg-control, .opp-item, .pf-tile, .ch-tile, .pf-lane, .flow-node), .solution-card, .case-card, .proof-card, .testi-card, .principle-card, .agent-block, .pg-pager-a, .pg-step::after { transition: none; }
  :is(.cap-card, .pg-card, .pg-tile, .pg-step, .pg-inside-card, .pg-control, .opp-item, .pf-tile, .ch-tile, .pf-lane, .flow-node, .solution-card, .case-card, .proof-card, .testi-card, .principle-card, .agent-block, .pg-pager-a):hover, .pg-step:hover::after { transform: none; }
}
