/* ═══════════════════════════════════════════════════════════════════════════
   marketing-header.css — canonical PennaPay marketing chrome (header + footer).

   ONE source of truth for the pennapay.com marketing header, the mobile
   hamburger, and the marketing footer. Copy-paste the matching HTML blocks
   (see docs/marketing-chrome.md / scripts/apply_marketing_chrome.py) onto any
   pennapay.com marketing page and link this file — nothing else styles them.

   SELF-CONTAINED BY DESIGN. Marketing pages load different theme stylesheets
   (pennapay-theme.css defines only --pp-*, marketing-theme.css defines
   --ink/--bg, some pages define neither), so this file must not depend on any
   page-level token. It carries its own private --mh-* palette with a
   [data-theme="dark"] flip, and every rule is namespaced under `.nav` /
   `.site-footer` so it never touches the generic .btn-primary / .btn-ghost
   used elsewhere on these pages.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --mh-bg:          #ffffff;
  --mh-ink:         #0f172a;
  --mh-ink-soft:    #475569;
  --mh-rule:        #e2e8f0;
  --mh-surface:     #f8fafc;
  --mh-gold:        #c9a05a;
  --mh-gold-strong: #b58a3f;
  --mh-danger:      #c0392b;
  --mh-danger-soft: #fff5f5;
}
:root[data-theme="dark"] {
  --mh-bg:          #0c1a13;
  --mh-ink:         #f3f6f0;
  --mh-ink-soft:    #c2cfc3;
  --mh-rule:        #284736;
  --mh-surface:     #13261b;
  --mh-gold:        #c9a05a;
  --mh-gold-strong: #b58a3f;
  --mh-danger:      #f87171;
  --mh-danger-soft: #2a1416;
}

/* ── Bar ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--mh-bg);
  border-bottom: 1px solid var(--mh-rule);
  padding: 0 48px;
  height: 60px;
  display: flex; align-items: center; gap: 40px;
}
.nav-brand {
  font-size: 1rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--mh-ink); text-decoration: none;
  flex-shrink: 0;
}
.nav-brand span { color: var(--mh-gold); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: .82rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  color: var(--mh-ink-soft); text-decoration: none;
}
.nav-links a:hover { color: var(--mh-ink); }

/* ── "Freelancers" dropdown ─────────────────────────────────────────────── */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-toggle {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: .82rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  color: var(--mh-ink-soft); display: inline-flex; align-items: center; gap: 5px;
}
.nav-dropdown-toggle::after { content: "▾"; font-size: .62rem; line-height: 1; }
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { color: var(--mh-ink); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 14px;
  display: none; min-width: 230px; z-index: 200;
  background: var(--mh-bg); border: 1px solid var(--mh-rule);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.nav-dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 11px 18px;
  font-size: .8rem; font-weight: 500; letter-spacing: .02em; text-transform: none;
  color: var(--mh-ink-soft); text-decoration: none; border-bottom: 1px solid var(--mh-rule);
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus { color: var(--mh-ink); background: var(--mh-surface); }

/* ── Right-hand actions ─────────────────────────────────────────────────── */
.nav-cta { margin-left: auto; display: flex; gap: 16px; align-items: center; flex-shrink: 0; }
.nav .btn-ghost {
  font-size: .82rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  color: var(--mh-ink-soft); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav .btn-ghost:hover { color: var(--mh-ink); }
.nav .btn-primary {
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--mh-ink); color: #fff;
  padding: 10px 20px; text-decoration: none; border: 0; cursor: pointer;
  transition: background .15s;
}
.nav .btn-primary:hover { background: var(--mh-gold); }
/* --mh-ink is near-white in dark mode; a white-on-white fill would vanish, so
   the primary CTA becomes the gold accent with dark text instead. */
:root[data-theme="dark"] .nav .btn-primary { background: var(--mh-gold); color: #1b1a17; }
:root[data-theme="dark"] .nav .btn-primary:hover { background: var(--mh-gold-strong); }

/* ── Language toggle (mounted by lang-toggle.js) ────────────────────────── */
.nav .lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  color: var(--mh-ink-soft);
}
.nav .lang-toggle button {
  background: none; border: none; padding: 4px 6px; cursor: pointer;
  color: inherit; font: inherit; text-transform: uppercase;
}
.nav .lang-toggle button[aria-pressed="true"] { color: var(--mh-ink); font-weight: 700; }
.nav .lang-toggle button:hover { color: var(--mh-ink); }

/* ── Theme toggle (mounted by theme-toggle.js) ──────────────────────────── */
.nav [data-theme-toggle], .nav .theme-toggle {
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--mh-ink-soft); line-height: 0;
}
.nav [data-theme-toggle]:hover, .nav .theme-toggle:hover { color: var(--mh-ink); }

/* ── Hamburger (mobile) ─────────────────────────────────────────────────── */
.nav-hamburger {
  display: none; /* shown ≤768px */
  background: none; border: 0; padding: 8px; margin: 0; cursor: pointer;
  color: var(--mh-ink); line-height: 0; border-radius: 6px;
}
.nav-hamburger:hover { background: var(--mh-surface); }
.nav-hamburger svg { display: block; }
.nav-hamburger .ic-close { display: none; }
.nav.mobile-open .nav-hamburger .ic-open { display: none; }
.nav.mobile-open .nav-hamburger .ic-close { display: block; }

/* Mobile panel — full-width dropdown under the bar; part of the markup so no
   JS DOM-building is needed. Hidden on desktop and until the nav is open. */
.nav-mobile-panel {
  display: none;
  position: absolute; top: 60px; left: 0; right: 0; z-index: 200;
  background: var(--mh-bg); border-bottom: 1px solid var(--mh-rule);
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
  padding: 8px 0;
}
.nav.mobile-open .nav-mobile-panel { display: block; }
.nav-mobile-panel a {
  display: block; padding: 14px 24px;
  font-size: .9rem; font-weight: 500; letter-spacing: .02em;
  color: var(--mh-ink-soft); text-decoration: none;
  border-bottom: 1px solid var(--mh-rule);
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel a:hover { color: var(--mh-ink); background: var(--mh-surface); }
.nav-mobile-panel a.mp-cta { color: var(--mh-ink); font-weight: 700; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 24px; gap: 16px; }
  .nav-links { display: none; }
  .nav-hamburger { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 480px) {
  .nav { padding: 0 16px; gap: 12px; }
  .nav-cta { gap: 10px; }
  .nav .btn-primary { padding: 9px 14px; font-size: .72rem; }
  .nav .btn-ghost { font-size: .72rem; }
  .nav .lang-toggle { font-size: .65rem; }
  .nav .lang-toggle button { padding: 4px 4px; }
}
/* DA CTAs run ~20% longer — drop the header "Sign in" (it lives in the panel)
   and tighten padding/gaps so the primary CTA never overflows the narrowest
   phones (e.g. "START GRATIS" + hamburger at 390px). */
@media (max-width: 430px) {
  .nav { padding: 0 12px; gap: 8px; }
  .nav-cta { gap: 8px; }
  .nav #nav-signin { display: none; }
}

/* ── User chip (logged-in state; marketing-header.js reveals it) ─────────── */
.nav .user-chip {
  display: none;
  position: relative; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.nav .user-chip.visible { display: flex; }
.nav .user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mh-ink); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
:root[data-theme="dark"] .nav .user-avatar { background: var(--mh-gold); color: #1b1a17; }
.nav .user-name {
  font-size: .82rem; font-weight: 500; color: var(--mh-ink-soft);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav .user-chevron { font-size: .65rem; color: var(--mh-ink-soft); transition: transform .2s; }
.nav .user-chip.open .user-chevron { transform: rotate(180deg); }
.nav .user-dropdown {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--mh-bg); border: 1px solid var(--mh-rule);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  min-width: 160px; z-index: 200;
}
.nav .user-chip.open .user-dropdown { display: block; }
.nav .user-dropdown a {
  display: block; padding: 11px 18px;
  font-size: .82rem; font-weight: 500; color: var(--mh-ink-soft);
  text-decoration: none; border-bottom: 1px solid var(--mh-rule);
}
.nav .user-dropdown a:last-child { border-bottom: none; }
.nav .user-dropdown a:hover { color: var(--mh-ink); background: var(--mh-surface); }
.nav .user-dropdown .logout-link { color: var(--mh-danger); }
.nav .user-dropdown .logout-link:hover { background: var(--mh-danger-soft); color: var(--mh-danger); }

/* ═══════════════════════════════════════════════════════════════════════════
   Footer — the intentionally-dark marketing band. Fixed slate palette in both
   themes (it is always a dark band), namespaced under .site-footer.
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #1b1a17;
  border-top: 1px solid #1e293b;
  padding: 48px;
}
.site-footer .footer-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.site-footer .footer-brand {
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; text-decoration: none;
}
.site-footer .footer-brand span { color: var(--mh-gold); }
.site-footer .footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.site-footer .footer-links a {
  font-size: .72rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: #64748b; text-decoration: none; white-space: nowrap;
}
.site-footer .footer-links a:hover { color: #94a3b8; }
.site-footer .footer-copy { font-size: .72rem; color: #475569; }

@media (max-width: 720px) {
  .site-footer { padding: 40px 24px; }
  .site-footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}
