/*
 * LakeRidge site chrome: the header and footer every page shares, plus the design tokens and
 * Inter. _includes/head.html loads it on marketing pages (before marketing.css, which relies on
 * its tokens) and on the older Bootstrap pages (after the theme). Every header and footer rule
 * is scoped to .site-header or .site-footer, so it also wins over Bootstrap's .nav, .container
 * and element styles there.
 * Order: fonts and tokens → chrome base → header → footer → responsive → without JavaScript.
 */

/* ==========================================================================
   1. Fonts and tokens
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/InterVariable-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallback keeps layout steady while Inter loads. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90.5%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

:root {
  --font-sans: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  --blue: #2c4bff;
  --blue-hover: #233ccc;
  /* Status hues from the LakeRidge app dashboard (compliance-app dashboard-theme.css). */
  --violet: #8b5cf6;
  --ok: #16a36b;
  --warn: #c98210;
  /* Extra topic hues for the blog: the globe's MSP sky, and slate for general articles. */
  --sky: #0ea5e9;
  --slate: #64748b;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #475569;          /* lightest allowed text colour */
  --ink-disabled: #94a3b8;   /* disabled controls only */
  --line: #e2e8f0;
  --line-2: #dbe3ee;
  --line-input: #cbd5e1;

  --bg: #fff;
  --bg-hero: #f5f7fa;
  --bg-tile: #f2f4f7;
  --bg-neutral: #f8fafc;

  --radius-frame: 12px;
  --radius-tile: 16px;
  --radius-panel: 20px;
  --shadow-frame: 0 1px 2px rgba(15, 23, 42, .06), 0 24px 48px -24px rgba(15, 23, 42, .22);

  --container: 1200px;
  --gutter: 48px;
  --section-y: clamp(72px, 2.5rem + 5.5vw, 120px);
  --head-gap: clamp(40px, 1.5rem + 2.5vw, 64px);
  --grid-gap: 24px;
  --header-h: 72px;
  --hero-overlap: clamp(96px, 14vw, 200px);   /* how far the hero frame hangs below the tint */

  --ease: 150ms ease;
}

/* Land each section's top edge (and its hairline) just under the sticky header's border. */
html { scroll-padding-top: calc(var(--header-h) - 1px); }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link (first in the body on every page) and the main landmark it targets. */
a.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
a.skip:focus { transform: none; }
main:focus { outline: none; }

/* ==========================================================================
   2. Chrome base: what marketing.css's base gives the header and footer,
      restated so the older pages' Bootstrap styles cannot reach in.
   ========================================================================== */

.site-header,
.site-footer {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-align: left;
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.site-header :is(p, ul, ol, h2),
.site-footer :is(p, ul, ol, h2) { margin: 0; }
.site-header :is(ul, ol),
.site-footer :is(ul, ol) { padding: 0; list-style: none; }
.site-header :is(p, li),
.site-footer :is(p, li) { text-wrap: pretty; }
.site-footer h2 {
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-wrap: balance;
}
.site-header a,
.site-footer a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.site-header :is(img, svg),
.site-footer :is(img, svg) { display: block; max-width: 100%; }
.site-header img,
.site-footer img { height: auto; }
.site-header button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.site-header :focus-visible,
.site-footer :focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.site-header .container,
.site-footer .container {
  width: min(var(--container), calc(100% - var(--gutter)));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

/* The header's demo buttons: marketing.css's .button, pill shaped with a 44px target. */
.site-header .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.site-header .button:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

@media (prefers-reduced-motion: reduce) {
  .site-header *, .site-header *::before, .site-header *::after,
  .site-footer *, .site-footer *::before, .site-footer *::after { transition: none !important; }
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header .nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.site-header .brand,
.site-footer .brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  border-radius: 4px;
}
.site-header .brand img { width: auto; height: 32px; }

.site-header .nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.site-header .nav-links a,
.site-header .login-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease);
}
.site-header .nav-links a:hover,
.site-header .login-link:hover { color: var(--ink); background: var(--bg-neutral); }
.site-header .nav-links .mobile-only { display: none; }

/* Dropdowns (Solutions, Resources): a disclosure button and a panel of grouped links. */
.site-header .nav-item {
  position: relative;
  display: flex;
}
.site-header .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--ease), background-color var(--ease);
}
.site-header .nav-trigger:hover,
.site-header .nav-trigger[aria-expanded="true"] { color: var(--ink); background: var(--bg-neutral); }
.site-header .nav-caret {
  width: 12px;
  height: 12px;
  transition: transform var(--ease);
}
.site-header .nav-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.site-header .nav-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 60;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 32px;
  padding: 20px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06), 0 24px 48px -16px rgba(15, 23, 42, .2);
  transform: translateX(calc(-50% + var(--nav-shift, 0px)));
}
.site-header .nav-menu.open { display: grid; }
/* Bridges the gap under the trigger so the pointer can travel into the panel. */
.site-header .nav-menu::before {
  content: "";
  position: absolute;
  inset: -16px 0 auto;
  height: 16px;
}
.site-header .nav-group-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-header .nav-menu ul { display: grid; gap: 2px; }
.site-header .nav-menu a {
  display: flex;
  min-height: 38px;
  margin-inline: -10px;
  padding: 0 10px;
  white-space: nowrap;
}

.site-header .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header .menu {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
.site-header .menu-icon,
.site-header .menu-icon::before {
  display: block;
  width: 20px;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--ease);
}
.site-header .menu-icon { position: relative; transform: translateY(-3.5px); }
.site-header .menu-icon::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
}
.site-header .menu[aria-expanded="true"] .menu-icon { transform: translateY(0) rotate(45deg); }
.site-header .menu[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(-90deg); }

/* ==========================================================================
   4. Footer
   ========================================================================== */

.site-footer {
  padding-top: 64px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
}
.site-footer .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 48px;
  padding-bottom: 56px;
}
.site-footer .footer-brand .brand img { width: auto; height: 28px; }
.site-footer .footer-brand p {
  max-width: 240px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.site-footer .footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.site-footer .footer-group h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}
.site-footer .footer-group a,
.site-footer .footer-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--ease);
}
.site-footer .footer-group a:hover,
.site-footer .footer-legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .footer-legal { display: flex; gap: 20px; }
.site-footer .footer-legal a { min-height: 44px; }
/* Older pages float a "Get a Demo" button bottom right; leave room so it never covers Terms. */
@media (min-width: 701px) {
  .floating-book-call ~ .site-footer .footer-meta { padding-bottom: 92px; }
}

/* ==========================================================================
   5. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .site-footer .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .site-footer .footer-brand p { max-width: 360px; }
}

@media (min-width: 901px) {
  /* Equal side tracks centre the links on the page, above the centred hero. */
  .site-header .nav { grid-template-columns: 1fr auto 1fr; }
  .site-header .nav-actions { justify-self: end; }
}

/* Navigation collapses before links can crowd the actions. */
@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .site-header .nav {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .site-header .brand img { height: 28px; }
  .site-header .nav-actions { justify-self: end; }
  .site-header .login-link { display: none; }
  .site-header .nav-demo { min-height: 44px; padding: 0 16px; font-size: 14px; }
  .site-header .menu { display: grid; }

  .site-header .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    /* --menu-h is set by marketing.js from the panel's real top edge. */
    max-height: var(--menu-h, calc(100dvh - var(--header-h)));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px calc(var(--gutter) / 2) 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 24px 32px -24px rgba(15, 23, 42, .2);
  }
  .site-header .nav-links.open { display: flex; min-height: var(--menu-h, auto); }
  /* The panel has its own full-width demo button. */
  .site-header.is-menu-open .nav-demo { visibility: hidden; }
  /* So is the older pages' floating demo button, which would sit on top of the open panel. */
  .site-header.is-menu-open ~ .floating-book-call { display: none; }
  .site-header .nav-links a {
    min-height: 52px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    font-size: 17px;
  }
  .site-header .nav-links a:hover { background: transparent; color: var(--blue); }
  .site-header .nav-links .mobile-only { display: inline-flex; }
  .site-header .nav-links .mobile-demo {
    justify-content: center;
    min-height: 48px;
    margin-top: 20px;
    padding: 0 20px;
    border: 1px solid var(--blue);
    border-radius: 999px;
    color: #fff;
    font-size: 16px;
  }
  .site-header .nav-links .mobile-demo:hover { background: var(--blue-hover); color: #fff; }

  /* Dropdowns become accordions inside the panel. */
  .site-header .nav-item { flex-direction: column; }
  .site-header .nav-trigger {
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    font-size: 17px;
  }
  .site-header .nav-trigger:hover,
  .site-header .nav-trigger[aria-expanded="true"] { background: transparent; color: var(--blue); }
  .site-header .nav-caret { width: 14px; height: 14px; }
  .site-header .nav-menu {
    position: static;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 16px;
    padding: 14px 0 16px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .site-header .nav-menu::before { content: none; }
  .site-header .nav-menu a {
    min-height: 44px;
    margin-inline: 0;
    padding: 0;
    border-bottom: 0;
    color: var(--ink-2);
    font-size: 16px;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  :root { --gutter: 32px; --grid-gap: 20px; --hero-overlap: 96px; }

  .site-footer .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .site-footer .footer-group a,
  .site-footer .footer-legal a { min-width: 44px; min-height: 44px; }
  .site-header .brand,
  .site-footer .brand { min-height: 44px; }
  .site-footer .footer-meta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .site-header .nav-demo { padding: 0 14px; }
}

/* ==========================================================================
   6. Without JavaScript
   ========================================================================== */

/* Dropdowns open on hover and keyboard focus instead. */
@media (min-width: 901px) {
  html:not(.js) .site-header .nav-item:hover .nav-menu,
  html:not(.js) .site-header .nav-item:focus-within .nav-menu { display: grid; }
}

/* The menu button cannot work: show the links inline instead. */
@media (max-width: 900px) {
  html:not(.js) .site-header { position: relative; }
  html:not(.js) .site-header .menu { display: none; }
  html:not(.js) .site-header .nav { height: auto; min-height: var(--header-h); row-gap: 0; padding-block: 10px 6px; }
  html:not(.js) .site-header .nav-actions { grid-row: 1; grid-column: 2; }
  html:not(.js) .site-header .nav-links {
    display: flex;
    position: static;
    grid-row: 2;
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 20px;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }
  html:not(.js) .site-header .nav-links a { min-height: 44px; border-bottom: 0; font-size: 15px; }
  html:not(.js) .site-header .nav-links .mobile-demo { display: none; }
}
