/* ──────────────────────────────────────────────────────────────
   The Muster App — marketing site (dark theme)
   Single source of truth for design tokens, reset, type, buttons,
   nav, footer, and responsive scaling.

   Every dark-theme marketing page must <link> this file BEFORE its
   own inline <style>. Page-specific rules belong in the page.
   ────────────────────────────────────────────────────────────── */

/* Design tokens */
:root {
  --bg: #0a0a0a;
  --s1: #111111;
  --s2: #161616;
  --sHi: #1c1c1c;
  --hair: rgba(255,255,255,0.08);
  --hair2: rgba(255,255,255,0.14);
  --ink: #ffffff;
  --inkDim: rgba(255,255,255,0.72);
  --inkMuted: rgba(255,255,255,0.50);
  --inkFaint: rgba(255,255,255,0.32);
  --signal: #e85a3c;
  --ok: #7fc28b;
  --caution: #e6c46a;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
  --page: 1280px;
  --gutter: 48px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* Layout primitives */
.container { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 120px 0; border-top: 1px solid var(--hair); }
.section:first-of-type { border-top: none; }

/* Type — desktop defaults */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--inkMuted);
}
.h1   { font-size: clamp(48px, 6vw, 84px);   line-height: 0.98; letter-spacing: -0.035em; font-weight: 500; text-wrap: balance; }
.h1--xl { font-size: clamp(56px, 7vw, 100px); letter-spacing: -0.042em; }
.h2   { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 500; text-wrap: balance; }
.h2--xl { font-size: clamp(40px, 4.4vw, 56px); letter-spacing: -0.035em; }
.h3   { font-size: 22px; line-height: 1.2; letter-spacing: -0.012em; font-weight: 500; }
.body { font-size: 17px; line-height: 1.55; color: var(--inkDim); }
.small{ font-size: 13.5px; line-height: 1.55; color: var(--inkMuted); }
.mono { font-family: var(--mono); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  border: 0; font-family: inherit;
  transition: transform 0.15s;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--ink);
  padding: 14px 18px;
  border: 1px solid var(--hair2);
  background: transparent;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.32); }
.arrow {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  fill: none;
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner { display: flex; align-items: center; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: 40px; }
.nav-brand img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--inkDim); }
.nav-links a { transition: color 0.15s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.nav-right .btn-primary { padding: 10px 16px; font-size: 13.5px; }
.nav-signin { font-size: 14px; color: var(--inkDim); }
.nav-signin:hover { color: var(--ink); }

/* ── Dropdown nav (Product / Compliance / Support) ─────────────── */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; padding: 0; margin: 0;
  font-family: inherit; font-size: 14px; line-height: 1;
  color: var(--inkDim); cursor: pointer; transition: color 0.15s;
}
.nav-caret { width: 11px; height: 11px; opacity: 0.65; transition: transform 0.18s ease; }
.nav-item:hover .nav-trigger, .nav-item:focus-within .nav-trigger { color: var(--ink); }
.nav-item:hover .nav-caret, .nav-item:focus-within .nav-caret { transform: rotate(180deg); opacity: 1; }
/* a plain link sitting among the dropdowns (e.g. Pricing) */
.nav-flat { display: inline-flex; align-items: center; font-size: 14px; color: var(--inkDim); transition: color 0.15s; }
.nav-flat:hover, .nav-flat.is-active { color: var(--ink); }

.nav-panel {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 256px; margin-top: 12px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--s1); border: 1px solid var(--hair2); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}
/* invisible bridge so the panel survives the cursor travelling down to it */
.nav-item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 18px; }
.nav-item:hover .nav-panel, .nav-item:focus-within .nav-panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-panel a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; border-radius: 9px; transition: background 0.14s;
}
.nav-panel a:hover { background: var(--sHi); }
.np-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.np-desc { font-size: 12.5px; color: var(--inkMuted); }

/* Hamburger — hidden on desktop, shown ≤880px */
.nav-burger {
  display: none; background: none; border: 0; padding: 6px; margin-left: 4px;
  color: var(--ink); cursor: pointer; line-height: 0;
}
.nav-burger svg { width: 24px; height: 24px; }

/* Footer */
footer { border-top: 1px solid var(--hair); padding: 64px 0 40px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer-brand img { height: 22px; }
.footer-brand p { margin-top: 14px; max-width: 280px; font-size: 13.5px; color: var(--inkMuted); }
.footer-col-title { margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--inkDim); transition: color 0.15s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: var(--inkMuted);
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a:hover { color: var(--ink); }

/* ──────────────────────────────────────────────────────────────
   Responsive — laptops (13"–16" MBA/Pro at any standard scaling,
   viewport ~880–1600px). The design clamps hit their MAX at this
   width range, which renders too large for the screen real estate.
   Dial back one tier; the design's full grandeur is preserved
   above 1600px for 27"+ displays.
   ────────────────────────────────────────────────────────────── */
@media (min-width: 880px) and (max-width: 1600px) {
  .h1     { font-size: clamp(36px, 4.4vw, 60px); }
  .h1--xl { font-size: clamp(42px, 5vw, 72px);   }
  .h2     { font-size: clamp(28px, 3vw, 40px);   }
  .h2--xl { font-size: clamp(32px, 3.6vw, 44px); }
  .section { padding: 88px 0; }
}

/* Mobile */
@media (max-width: 880px) {
  :root { --gutter: 24px; }
  .section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* ── Mobile nav: hamburger + slide-down menu (reuses .nav-links) ── */
  .nav-burger { display: inline-flex; }
  .nav-signin { display: none; }            /* bar keeps just Sign up + burger */
  .nav-links {
    display: none;                          /* closed by default */
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 22px;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hair);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-item { display: block; border-top: 1px solid var(--hair); }
  .nav-item:first-child { border-top: 0; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 16px 0; font-size: 15px; }
  .nav-item:hover .nav-caret, .nav-item:focus-within .nav-caret { transform: none; }
  .nav-item::after { display: none; }       /* no hover bridge on touch */
  .nav-panel {                              /* sit open, inline, no float */
    position: static; opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; box-shadow: none; border: 0; background: transparent;
    min-width: 0; margin: 0 0 8px; padding: 0 0 4px 2px; gap: 0;
  }
  .nav-panel a { padding: 8px; }
  .nav-flat { width: 100%; padding: 16px 0; font-size: 15px; border-top: 1px solid var(--hair); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
