/* ==========================================================================
   Vidda Site Shell — shared layout & components
   --------------------------------------------------------------------------
   Loaded after tokens.css on every page. Holds everything that appears on
   more than one page (banner, nav, subnav, cards, tables, footer, cookie
   banner) so pages only carry their own content.

   Per-page knobs (set on :root in the page's <style>):
     --subnav-max        width of the in-page subnav pill row
     --hero-h1-mobile    hero <h1> size below 1040px
     --section-pad-mobile  padding for .ns-section-pad below 1040px
   ========================================================================== */

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); font-family: var(--font-sans); color: var(--fg1); }
a { color: var(--brand); }
a:hover { color: var(--brand-bright); }
::selection { background: var(--beacon-200); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.ns-container { max-width: 1120px; margin: 0 auto; }
.ns-scroll-anchor { scroll-margin-top: 140px; }

/* --------------------------------------------------------------------------
   TEASER BANNER
   -------------------------------------------------------------------------- */
.ns-banner { background: var(--harbor-800); color: var(--fg-on-brand); }
.ns-banner-inner { padding: 10px 32px; display: flex; align-items: center; justify-content: center; gap: 9px; flex-wrap: wrap; text-align: center; }
.ns-banner-icon { width: 14px; height: 14px; flex: none; color: var(--beacon-300); }
.ns-banner-text { font-family: var(--font-sans); font-size: 13.5px; line-height: 1.4; }
.ns-banner-text strong { font-weight: 700; }
.ns-banner-text a { color: var(--beacon-300); font-weight: 600; text-decoration: underline; }

/* --------------------------------------------------------------------------
   HEADER / NAV
   -------------------------------------------------------------------------- */
.ns-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.ns-header-inner { padding: 0 32px; display: flex; align-items: center; height: 68px; gap: 28px; }
.ns-header-logo { display: flex; align-items: center; }
.ns-header-logo img { height: 42px; width: auto; }
.ns-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ns-nav { display: flex; gap: 26px; margin-left: 18px; }
.ns-link { text-decoration: none; color: var(--fg2); font-family: var(--font-sans); font-weight: 500; font-size: 14.5px; transition: color var(--dur-fast); white-space: nowrap; }
.ns-link:hover { color: var(--fg1); }
.ns-link.is-current { color: var(--fg1); font-weight: 700; }

.ns-cta { text-decoration: none; font-family: var(--font-sans); font-weight: 600; border-radius: var(--radius-md); display: inline-flex; align-items: center; white-space: nowrap; transition: background var(--dur-fast); }
.ns-cta-sm { font-size: 14.5px; padding: 10px 18px; gap: 8px; }
.ns-cta-lg { font-size: 16px; padding: 13px 24px; gap: 9px; }
.ns-cta-primary { background: var(--brand); color: var(--fg-on-brand); }
.ns-cta-primary:hover { background: var(--brand-hover); }
.ns-cta-ghost { background: transparent; color: var(--fg1); border: 1px solid var(--border-strong); }
.ns-cta-ghost:hover { background: var(--surface-2); }
.ns-cta-accent { background: var(--accent); color: var(--fg-on-accent); }
.ns-cta-accent:hover { background: var(--accent-hover); }

.ns-menu-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg1); cursor: pointer; flex: none; padding: 0; }
.ns-menu-toggle:hover { background: var(--surface-2); }
.ns-mobile-menu { display: none; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); }
.ns-mobile-menu.is-open { display: flex; }
.ns-mobile-link { text-decoration: none; color: var(--fg1); font-family: var(--font-sans); font-weight: 600; font-size: 15.5px; padding: 15px 32px; border-bottom: 1px solid var(--border); }
.ns-mobile-link:last-child { border-bottom: none; }

/* --------------------------------------------------------------------------
   IN-PAGE SUBNAV
   -------------------------------------------------------------------------- */
.ns-subnav { position: sticky; top: 68px; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.ns-subnav-wrap { padding: 16px 32px; display: flex; justify-content: center; }
.ns-subnav-inner { display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--surface-2); border-radius: var(--radius-pill); padding: 6px; width: 100%; max-width: var(--subnav-max, 560px); }
.subnav-link { text-decoration: none; font-size: 13.5px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-pill); white-space: nowrap; flex: 1; text-align: center; background: transparent; color: var(--fg2); transition: background var(--dur-fast), color var(--dur-fast); }
.subnav-link.is-active { background: var(--brand); color: var(--fg-on-brand); }

/* --------------------------------------------------------------------------
   TYPE
   -------------------------------------------------------------------------- */
.ns-eyebrow-on-dark { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--beacon-300); }
.ns-section-title { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -.02em; color: var(--fg1); margin: 12px 0 0; }
.ns-section-title--lg { font-size: 38px; }
.ns-balance { text-wrap: balance; }
.ns-section-lead { font-size: 15.5px; line-height: 1.65; color: var(--fg2); margin: 0 0 28px; max-width: 960px; }

/* --------------------------------------------------------------------------
   CARDS
   -------------------------------------------------------------------------- */
.ns-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 26px; box-shadow: var(--shadow-sm); }
.ns-card--sm { border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs); }
.ns-card--xs { border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-xs); }
.ns-card-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.ns-card-head--tight { gap: 10px; }
.ns-card-icon { width: 44px; height: 44px; flex: none; border-radius: var(--radius-md); background: var(--harbor-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.ns-card-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; color: var(--fg1); margin: 0; }
.ns-card-text { font-size: 15px; line-height: 1.6; color: var(--fg2); margin: 0; }
.ns-card-text--sm { font-size: 13.5px; line-height: 1.55; }
.ns-card-kicker { font-weight: 600; font-size: 14.5px; margin: 12px 0 5px; color: var(--fg1); }
.ns-card-glyph { width: 19px; height: 19px; color: var(--secondary); }
.ns-list-icon { width: 20px; height: 20px; color: var(--brand); flex: none; }

.ns-feature-list { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.ns-feature-list li { font-size: 13.5px; line-height: 1.55; color: var(--fg2); }

/* --------------------------------------------------------------------------
   TABLES (CSS-table layout, horizontally scrollable on small screens)
   -------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; }
.ns-table { display: table; width: 100%; border-collapse: collapse; --th-pad: 14px 20px; --td-pad: 14px 20px; }
.ns-table--framed { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.ns-table-head { display: table-row; background: var(--surface-2); }
.ns-table-row { display: table-row; }
.ns-th { display: table-cell; padding: var(--th-pad); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg3); font-weight: 600; border-bottom: 1px solid var(--border); text-align: left; }
.ns-th--brand { color: var(--brand); }
.ns-th--right { text-align: right; }
.ns-td { display: table-cell; padding: var(--td-pad); border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--fg2); }
.ns-td--label { font-weight: 600; font-size: 14px; color: var(--fg1); }
.ns-td--highlight { color: var(--fg1); background: var(--harbor-50); }
.ns-td--price { font-family: var(--font-mono); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; color: var(--brand); }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.ns-footer { background: var(--harbor-900); color: rgba(244, 251, 252, 0.7); }
.ns-footer-inner { padding: 40px 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.ns-footer-logo { height: 24px; }
.ns-footer-meta { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 251, 252, 0.55); }
.ns-footer-copy { font-family: var(--font-mono); font-size: 11.5px; color: rgba(244, 251, 252, 0.45); }

/* --------------------------------------------------------------------------
   COOKIE CONSENT BANNER
   -------------------------------------------------------------------------- */
.ns-cookie-banner { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; max-width: 480px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); padding: 20px 22px; flex-direction: column; gap: 14px; }
.ns-cookie-banner.is-visible { display: flex; }
.ns-cookie-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ns-cookie-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--fg1); }
.ns-cookie-text { font-size: 13.5px; line-height: 1.55; color: var(--fg2); margin: 6px 0 0; }
.ns-cookie-close { background: none; border: none; cursor: pointer; color: var(--fg3); flex: none; padding: 2px; }
.ns-cookie-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.ns-btn { border-radius: var(--radius-md); font-family: var(--font-sans); font-weight: 600; font-size: 13.5px; padding: 9px 16px; cursor: pointer; }
.ns-btn--ghost { background: transparent; color: var(--fg1); border: 1px solid var(--border-strong); }
.ns-btn--primary { background: var(--brand); color: var(--fg-on-brand); border: none; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .ns-hide-mobile { display: none !important; }
  .ns-grid-2 { grid-template-columns: 1fr !important; }
  .ns-grid-3 { grid-template-columns: 1fr !important; }
  .ns-grid-4 { grid-template-columns: 1fr !important; }
  .ns-hero-h1 { font-size: var(--hero-h1-mobile, 40px) !important; }
  .ns-section-pad { padding: var(--section-pad-mobile, 48px 20px) !important; }
  .ns-menu-toggle { display: inline-flex; }
  .ns-subnav-wrap { padding: 12px 16px !important; }
  .ns-subnav-inner { flex-wrap: wrap !important; justify-content: center !important; max-width: 100% !important; gap: 6px !important; }
  .ns-subnav-inner .subnav-link { flex: none !important; padding: 8px 14px !important; font-size: 12.5px !important; }
}
