/* Nav dropdowns — Services / DrivenOS / Industries (markup: pages/partials/nav-links.html,
   injected into every page by tools/build_pages.py). Opens on hover or keyboard focus. */
.nd { position: relative; display: flex; }
.nl__caret { width: 7px; height: 7px; margin: 5px 0 0 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; transition: transform .4s var(--ease); }
.nd:hover .nl__caret, .nd:focus-within .nl__caret, .nd.is-open .nl__caret { transform: translateY(3px) rotate(225deg); }
.nd .nl::after { right: 14px; }                                     /* underline stops before the caret */
.nd .nl::before { right: 14px; }
.nd__panel { position: absolute; top: 100%; left: 50%; padding-top: 24px;          /* padding bridges the gap so hover isn't lost */
  transform: translate(-50%, 8px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), transform .4s var(--ease), visibility 0s .3s; }
.nd:hover .nd__panel, .nd:focus-within .nd__panel, .nd.is-open .nd__panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.nd__box { padding: 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--text);
  background: var(--surface);
  box-shadow: 0 30px 60px -30px #000a; }
.nd__box--2 { width: 560px; }
.nd__box--os { width: 800px; display: grid; grid-template-columns: 250px 1fr; gap: 10px; }
.nd__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.nd__item { display: block; padding: 14px 16px; border-radius: 12px; transition: background-color .25s; }
.nd__item:hover, .nd__item:focus-visible { background: var(--surface-2); }
.nd__item strong, .nd__feature strong { display: block; font: 600 15px/1.3 var(--font-body); letter-spacing: -.01em; }
.nd__item small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.nd__item:hover strong { color: var(--accent); }
.nd__feature { display: flex; flex-direction: column; padding: 20px; border-radius: 14px; background: var(--green-panel); color: #fff; }
.nd__feature small { margin-top: 8px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.72); }
.nd__feature b { margin-top: auto; padding-top: 18px; font: 600 13px var(--font-body); color: var(--brand); }
.nd__feature:hover b { text-decoration: underline; text-underline-offset: 4px; }
.nd__mark { width: 22px; height: 22px; margin-bottom: 18px; color: var(--brand); }
.nd__mark svg { width: 100%; height: 100%; animation: ebx-spin 14s linear infinite; }
.nd__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--muted); }
.nd__foot b { color: var(--text); font-weight: 600; }
.nd__foot:hover b { color: var(--accent); }
@keyframes ebx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nd__panel, .nl__caret { transition: none; } .nd__mark svg { animation: none; } }

/* A menu heading with no page of its own (Industries): a button that only opens its dropdown */
.nl--menu { background: none; border: 0; margin: 0; padding: 0 0 5px; cursor: pointer; }   /* keeps the .nl font and colour */

/* ---------- Mobile menu (≤ 900px, where the links above are hidden) ----------
   The burger button is in content/partials/nav-links.html; the panel is built by demos/nav-menu.js from the
   same links, so the menu is only ever edited in one place. Big Satoshi rows; the three dropdowns open as
   accordions ("+" turns into "×", like the FAQ); "Start a project" sits at the bottom. */
.nav__burger { display: none; }
.mnav { display: none; }
@media (max-width: 900px) {
  .nav { gap: 10px; }
  .nav .brand { margin-right: auto; }
  .nav__burger { position: relative; order: 2; display: grid; place-content: center; gap: 6px; width: 40px; height: 40px; flex: none;
    border-radius: 50%; color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 32%, transparent); }
  .nav__burger::after { content: ""; position: absolute; inset: -4px; }                  /* 48px tap area around the 40px circle */
  .nav__burger i { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .45s var(--ease); }
  .nav__burger[aria-expanded="true"] i:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] i:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__burger:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
  body:has(.hero) .nav:not(.is-scrolled) .nav__burger { color: #fff; }

  .mnav { position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
    padding: 92px var(--gutter) calc(24px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--text);
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s; }
  .mnav.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
  html.mnav-open, html.mnav-open body { overflow: hidden; }

  .mnav__list { list-style: none; border-top: 1px solid var(--line); }
  .mnav__list > li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i) * 45ms + 60ms); }
  .mnav.is-open .mnav__list > li { opacity: 1; transform: none; }
  .mnav__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 0; text-align: left;
    font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 8.4vw, 40px); line-height: 1.1; letter-spacing: -.03em; }
  .mnav__row:focus-visible, .mnav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 12px; }
  .mnav__arrow { font: 400 20px/1 var(--font-body); color: var(--muted); transition: transform .35s var(--ease), color .3s; }
  a.mnav__row:active .mnav__arrow { transform: translateX(6px); color: var(--brand); }
  .mnav__plus { position: relative; flex: none; width: 16px; height: 16px; transition: transform .45s var(--ease); }
  .mnav__plus::before, .mnav__plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; margin-top: -.75px; background: currentColor; }
  .mnav__plus::after { transform: rotate(90deg); }
  .mnav__group.is-open .mnav__plus { transform: rotate(135deg); color: var(--brand); }

  .mnav__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
  .mnav__group.is-open .mnav__sub { grid-template-rows: 1fr; }
  .mnav__subin { overflow: hidden; margin: 0 -14px; padding: 0 14px; }           /* room for the items' tap background */
  .mnav__sub a:focus-visible { outline-offset: -2px; }
  .mnav__subin > :last-child { margin-bottom: 18px; }
  .mnav__item { display: block; padding: 12px 14px; margin: 0 -14px; border-radius: 12px; transition: background-color .25s; }
  .mnav__item:active { background: var(--surface-2); }
  .mnav__item strong { display: block; font: 600 16px/1.3 var(--font-body); letter-spacing: -.01em; }
  .mnav__item small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
  .mnav__feature { display: block; margin: 4px 0 8px; padding: 18px; border-radius: 14px; background: var(--green-panel); color: #fff; }
  .mnav__feature strong { display: flex; align-items: center; gap: 10px; font: 600 16px/1.3 var(--font-body); }
  .mnav__feature strong svg { width: 16px; height: 16px; color: var(--brand); animation: ebx-spin 14s linear infinite; }
  .mnav__feature small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.72); }
  .mnav__feature b { display: inline-block; margin-top: 12px; font: 600 13px var(--font-body); color: var(--brand); }
  .mnav__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; padding: 14px 16px;
    border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--muted); }
  .mnav__foot b { flex: none; color: var(--text); font-weight: 600; }

  .mnav__cta { margin-top: auto; padding-top: 32px; opacity: 0; transform: translateY(14px);
    transition: opacity .5s var(--ease) .3s, transform .6s var(--ease) .3s; }
  .mnav.is-open .mnav__cta { opacity: 1; transform: none; }
  .mnav__cta .roll { width: 100%; justify-content: center; }
}
@media (max-width: 900px) and (hover: hover) {          /* tablets with a mouse or trackpad */
  .mnav__item:hover { background: var(--surface-2); }
  .mnav__item:hover strong, .mnav__foot:hover b { color: var(--brand); }
  a.mnav__row:hover .mnav__arrow { transform: translateX(6px); color: var(--brand); }
}
@media (max-width: 359px) { .nav .nav__right { display: none; } }          /* very narrow phones: the menu's own button takes over */
@media (prefers-reduced-motion: reduce) {
  .mnav, .mnav__list > li, .mnav__cta, .mnav__sub, .nav__burger i, .mnav__plus { transition: none !important; }
  .mnav__feature strong svg { animation: none; }
}
