/* Shared site components (nav, breadcrumb, footer, skip-link).
   Design tokens + base typography live in brand.css, which loads first. */

/* Skip-to-content link, hidden until focused. */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---- Primary navigation -------------------------------------------------
   Single-row, 72px-tall premium header: logo left, evenly spaced charcoal
   dropdown triggers centered, and a light "Call" pill + primary "Get Started"
   button grouped on the right. CSS-only dropdowns on native <details>/<summary>:
   every link lives in the HTML source (crawlable); CSS only hides/reveals and
   positions the floating panels. No JavaScript is involved.

   Spacing baseline (per the header redesign spec): 28px nav gaps, 40–48px
   nav-to-actions gap, 12px phone-to-CTA gap, dropdowns floating 14px below
   their trigger. The desktop nav never wraps to a second row — below 1024px it
   collapses to the mobile/tablet header. */
:root {
  --nav-h: 76px;                       /* desktop header height */
  --nav-h-mobile: 68px;                /* mobile header height */
  --nav-blue: var(--c-primary);        /* QVD blue accent */
  --nav-ink: #0F172A;                  /* nav text / titles */
  --nav-border: rgba(15, 23, 42, 0.08);
  --util-bg: #07182b;                   /* dark utility-bar band */
}

/* ---- Utility bar: thin dark band above the main nav (phone, email, tool). --- */
.site-util {
  background: var(--util-bg);
  color: #cfe0f2;
  font-size: 0.75rem;
  margin: 0 -1rem;                      /* full-bleed, matching .site-nav */
}
body.page-wide .site-util { margin: 0; }
.site-util__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  min-height: 2rem;
  padding: 0.35rem var(--gutter);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-6);
}
.site-util__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: #cfe0f2;
  text-decoration: none;
  white-space: nowrap;
}
.site-util__link:hover { color: #fff; }
.site-util__tool { color: #8bc5ff; font-weight: 700; }

.site-nav {
  position: relative;
  z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--nav-border);
  /* Full-bleed band: break out of the readable-column body padding so the bar
     spans edge-to-edge on every page, matching the homepage (.page-wide). */
  margin: 0 -1rem;
}
/* Keep breathing room below the header on text pages; the homepage hero butts
   directly against the header border (no extra white gap). */
body:not(.page-wide) .site-nav { margin-bottom: 1.5rem; }
body.page-wide .site-nav { margin: 0; }

/* Inner row: logo | centered nav | right-grouped actions. Padding matches the
   hero/.container (24px) so the logo aligns with the hero's left edge. */
.site-nav__inner {
  width: 100%;
  max-width: var(--container);         /* ~1152px, within the 1120–1200 target */
  min-height: var(--nav-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo: ~42px tall, capped width, never tall enough to force a second row. */
.site-nav__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: clamp(var(--space-8), 4vw, var(--space-12));
}
.site-nav__brand img {
  display: block;
  height: 40px;
  width: auto;                 /* size by height only — preserve aspect ratio */
  object-fit: contain;         /* never distort even if a width cap kicks in */
}

/* Centered nav group, evenly spaced. */
.site-nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  list-style: none;
  margin: 0 auto;                      /* center between logo and actions */
  padding: 0;
}
.site-nav__item { position: relative; } /* positioning context for the panel */

/* Right-hand action block: light phone pill + primary CTA, 12px apart, set off
   from the last nav item by 40–48px. */
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: clamp(var(--space-6), 3vw, var(--space-10));
}
.site-nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: #EEF4FF;
  color: var(--nav-ink);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.site-nav__phone:hover { background: #e2ecff; }
.site-nav__phone-icon {
  display: inline-flex;
  color: var(--nav-blue);
  font-size: 15px;
}
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius);
  background: var(--nav-blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.site-nav__cta:hover {
  background: var(--c-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 102, 255, 0.22);
}

/* Mobile-only controls — the checkbox hamburger toggle and the compact
   tel: icon. All hidden on desktop (full nav + pill shown instead). */
.site-nav__toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.site-nav__burger,
.site-nav__mobile-phone {
  display: none; /* revealed only in the mobile media query below */
}
.site-nav__burger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
}
/* Visible focus ring on the button when the hidden checkbox is focused. */
.site-nav__toggle:focus-visible ~ .site-nav__burger {
  outline: 3px solid var(--nav-blue);
  outline-offset: 2px;
}

/* Top-level trigger: label + chevron behave as one inline-flex unit so the
   chevron tracks the label. Plain links (Home, Contact Us) reuse the class but
   have no chevron. */
.nav-drop__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none; /* hide default disclosure triangle (most browsers) */
  padding: var(--space-3) 0;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1;
  color: var(--nav-ink);   /* charcoal links; accent only on hover/open */
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-drop__label::-webkit-details-marker {
  display: none; /* hide disclosure triangle in WebKit/Blink */
}
.nav-drop__label:hover,
.nav-drop[open] > summary.nav-drop__label {
  color: var(--nav-blue);
}

/* Subtle chevron, only on real dropdown triggers (<summary>); rotates 180° on
   open. Never appears on plain links, which have no panel to expand. */
summary.nav-drop__label::after {
  content: "\25BE"; /* small down caret */
  font-size: 11px;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.nav-drop[open] > summary.nav-drop__label::after,
summary.nav-drop__label:hover::after { color: var(--nav-blue); }
.nav-drop[open] > summary.nav-drop__label::after { transform: rotate(180deg); }

/* Dropdown panel — a floating card menu. Shared look; positioning/animation is
   layered on per-breakpoint below. */
.nav-drop__panel {
  list-style: none;
  margin: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: 0 1.5rem 4rem rgba(15,23,42,0.14);
}
.nav-drop__panel a {
  display: block;
  padding: 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--nav-ink);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.nav-drop__panel a:hover,
.nav-drop__panel a:focus { background: #F8FAFC; }
.nav-drop__panel li + li { margin-top: 3px; }

/* ---- Mega-menu panels: multi-column layouts with title + description rows.
   These override the plain-link panel styling above for the richer menus. --- */
.nav-mega { padding: var(--space-5); }
.nav-mega__col { min-width: 0; }
/* Mega rows wrap (override the nowrap plain-panel <a> rule, which otherwise
   wins on the featured cards and overflows their text across columns). */
.nav-mega a { white-space: normal; }
.nav-mega__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nav-border);
}

/* A single link row: bold title + grey sub-text. */
.nav-mega .nav-item {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  white-space: normal;
  font-weight: 400;
}
.nav-mega .nav-item:hover,
.nav-mega .nav-item:focus { background: var(--c-subtle); }
.nav-item__t { display: block; font-size: 14.5px; font-weight: 600; color: var(--nav-ink); line-height: 1.25; }
.nav-item__d { display: block; font-size: 12.5px; color: var(--c-muted); margin-top: 2px; line-height: 1.4; }

/* Featured cards (Products left rail). */
.nav-feature {
  display: block;
  border: 1px solid var(--nav-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  white-space: normal;
  font-weight: 400;
}
.nav-feature:hover { border-color: var(--nav-blue); background: #EEF4FF; }
.nav-feature--flagship { border: 2px solid var(--nav-blue); }
.nav-feature__t { display: block; font-size: 15px; font-weight: 700; color: var(--nav-ink); line-height: 1.25; }
.nav-feature__d { display: block; font-size: 12.5px; color: var(--c-muted); margin-top: 3px; line-height: 1.4; }

/* Company right rail. */
.nav-rail { background: var(--c-subtle); border-radius: 10px; padding: 14px; }
.nav-rail__pop a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nav-ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--nav-border);
  white-space: normal;
}
.nav-rail__pop a:last-child { border-bottom: 0; }
.nav-rail__pop a:hover { color: var(--nav-blue); background: none; }
.nav-rail__pills { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.nav-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: #EEF4FF;
  color: var(--nav-blue);
  padding: 6px 10px;
  border-radius: 999px;
}

/* ---- Desktop: floating, animated dropdowns (>=1024px) ------------------- */
@media (min-width: 64rem) {
  .nav-drop__panel {
    position: absolute;
    top: calc(100% + 14px);          /* float 14px below the trigger */
    left: 0;
    z-index: 1000;                    /* clear the hero */
    width: 320px;                     /* Solutions / Challenges default */
    min-width: 280px;
    max-width: 360px;
    padding: 10px;
    /* Keep the panel in layout (override the closed-<details> UA hide) so the
       open/hover transition can animate; visibility gates interaction. */
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
  }
  /* Invisible bridge spanning the 14px gap so the cursor can travel from the
     trigger to the panel without it closing. */
  .nav-drop__panel::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
  }
  /* Reveal on click-open (<details open>) or hover. */
  .nav-drop[open] > .nav-drop__panel,
  .site-nav__item:hover .nav-drop__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  /* Mega-menu widths & column grids (keep panels on-screen). The 20px panel
     padding comes from .nav-mega, overriding the 10px plain-panel default. */
  .nav-mega { display: grid; gap: 24px; width: auto; max-width: none; }
  .nav-mega--products { width: 840px; grid-template-columns: 230px 1fr 1fr; }
  .nav-mega--solutions { width: 360px; grid-template-columns: 1fr; }
  .nav-mega--tools { width: 340px; grid-template-columns: 1fr; }
  .nav-mega--who { width: 520px; grid-template-columns: 1fr 1fr; }
  .nav-mega--company { width: 560px; grid-template-columns: 1fr 220px; }

  /* Anchor near-right menus to the right edge so they stay on-screen. */
  .nav-mega--right { left: auto; right: 0; }

  /* Tighten gaps as the row narrows so the nav never wraps to a second line. */
  @media (max-width: 74.99rem) {       /* 1024–1199px */
    .site-nav__menu { gap: 23px; }
    .site-nav__actions { margin-left: 30px; }
    .site-nav__brand { margin-right: 40px; }
    /* Shrink the logo by height (keeps aspect ratio) rather than capping width. */
    .site-nav__brand img { height: 38px; }
  }
}

/* ---- Mobile / tablet header (<1024px) ----------------------------------- */
@media (max-width: 63.99rem) {
  .site-nav__inner {
    min-height: var(--nav-h-mobile);
    padding-inline: 16px;
    flex-wrap: wrap;
    gap: var(--space-1);
  }
  .site-nav__brand { margin-right: 0; }
  .site-nav__brand img { height: 32px; }

  /* Top row right group: Call button + hamburger. */
  .site-nav__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    box-sizing: border-box;
    cursor: pointer;
  }
  .site-nav__mobile-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 2;
    margin-left: auto;               /* push the button group to the right */
    height: 36px;
    padding: 0 var(--space-4);
    border-radius: var(--radius);
    background: var(--nav-blue);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .site-nav__burger {
    order: 3;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
  }

  /* Menu panel: collapsed until the toggle is checked. */
  .site-nav__menu {
    order: 4;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    gap: 4px;
    padding: 20px 16px 0;
  }
  .site-nav__toggle:checked ~ .site-nav__menu,
  .site-nav__toggle:checked ~ .site-nav__actions { display: flex; }

  .site-nav__item { width: 100%; }
  .nav-drop { width: 100%; }
  .nav-drop__label {
    justify-content: space-between;   /* label left, chevron right */
    padding: 14px 4px;
    font-size: 18px;
    font-weight: 700;
  }

  /* Accordion children flow inline (stacked), not as a floating card. */
  .nav-drop__panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
  }
  .nav-drop__panel a {
    padding: 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    white-space: normal;
  }
  .nav-drop__panel li + li { margin-top: 0; }

  /* Mega panels: collapse columns to a single stacked accordion block. */
  .nav-mega { display: block; width: auto !important; padding: 6px 0 10px 16px; }
  .nav-mega__col + .nav-mega__col,
  .nav-mega__col + .nav-rail { margin-top: 14px; }
  .nav-mega__title { margin-top: 4px; }
  .nav-mega .nav-item { padding: 10px 0; }
  .nav-feature { margin-bottom: 8px; }
  .nav-rail { padding: 12px; }

  /* Phone pill + CTA move into the opened menu as a divided action block. */
  .site-nav__actions {
    order: 5;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin: 16px 0 0;
    padding: 16px 16px 8px;
    border-top: 1px solid var(--nav-border);
  }
  .site-nav__phone {
    justify-content: center;
    height: 48px;
  }
  .site-nav__cta { height: 52px; }
}

/* ---- Global footer ------------------------------------------------------ */
.site-footer {
  width: 100vw;
  margin-top: 0;
  margin-left: calc(50% - 50vw);
  color: #9fb0c4;
  background: #06111e;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Full-width pages already span the viewport; avoid the 100vw scrollbar gutter. */
body.page-wide .site-footer {
  width: 100%;
  margin-left: 0;
}

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(var(--space-12), 8vw, var(--space-24));
  padding-block: clamp(var(--space-16), 7vw, var(--space-24));
}

.site-footer__brand { max-width: 25rem; }

.site-footer__brand img {
  display: block;
  width: auto;
  height: 2.25rem;
  margin-bottom: var(--space-6);
  object-fit: contain;
}

.site-footer__brand p {
  margin: 0;
  color: #aab9ca;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.site-footer__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.site-footer__credentials span {
  padding: 0.4rem 0.65rem;
  color: #8fc5fb;
  border: 1px solid rgba(101,174,245,0.2);
  border-radius: 999px;
  background: rgba(57,135,211,0.07);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(var(--space-8), 5vw, var(--space-16));
}

.site-footer__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.site-footer__heading {
  margin: 0 0 var(--space-2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.site-footer__group a {
  color: #9fb0c4;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.site-footer__group a:hover { color: #fff; }

.site-footer__bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}
.site-footer__legal a {
  color: #9fb0c4;
  text-decoration: none;
  white-space: nowrap;
}
.site-footer__legal a:hover { color: #fff; }

.site-footer__bottom p { margin: 0; white-space: nowrap; }

.org-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  color: #8295aa;
  font-style: normal;
}

.org-contact .org-name { color: #b8c6d5; font-weight: 700; }
.org-contact a { color: #9fb0c4; text-decoration: none; }
.org-contact a:hover { color: #fff; }

@media (max-width: 48rem) {
  .site-util { display: none; }
  .site-footer__main { grid-template-columns: 1fr; }
  .site-footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__bottom { align-items: flex-start; flex-direction: column; }
  .site-footer__bottom p { white-space: normal; }
}

@media (max-width: 30rem) {
  .site-footer__nav { grid-template-columns: 1fr; }
}

.breadcrumb-bar {
  border-bottom: 1px solid var(--c-border);
  background: var(--c-subtle);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding-block: var(--space-3);
  margin: 0;
  font-size: 0.85rem;
  color: var(--c-muted);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--c-border);
}
.breadcrumb a {
  color: var(--c-muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--c-primary);
  text-decoration: underline;
}
.breadcrumb li[aria-current="page"] {
  color: var(--c-ink);
  font-weight: 600;
}

/* Editorial SEO-targeting callout (partials/seo_note.html) shown at the top of
   the spec-driven keyword-map pages so the team can review primary/secondary
   keywords and the internal-linking strategy each page is built to own. */
.seo-note {
  border: 1px dashed #9ca3af;
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: #374151;
}
.seo-note p { margin: 0.2rem 0; }
.seo-note__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
  color: #6b7280;
}

/* Legal documents (Privacy Policy, Terms & Conditions, Acceptable Use
   Policy) — templates/legal/policy.html. Reuses .prose (blog.css) for the
   body typography. */
.legal-doc {
  padding: var(--space-10, 3rem) 0 var(--space-12, 4rem);
}
.legal-doc__header h1 {
  margin-bottom: 0.5rem;
}
.legal-doc__updated {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 2rem;
}
