/*
 * undersignal.css — Master stylesheet for all Undersignal marketing pages
 * Imported by: landing.html, language-tiers.html, glossary.html, how-to.html,
 *              methodology.html, privacy.html, terms.html, cookies.html, gdpr.html
 *
 * DO NOT duplicate these rules in page-level <style> blocks.
 * Page-specific overrides allowed in a scoped <style> block, clearly labeled.
 *
 * THEME: Black + Amber (Option A — unified with WAKE homepage)
 * Updated: 2026-04-10
 */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Brand Tokens ─────────────────────────────────────────
   Use these CSS variables everywhere — never hardcode hex values
   in HTML attributes when using this stylesheet.
   ─────────────────────────────────────────────────────── */
:root {
  /* Core palette — Black + Amber theme */
  --us-navy:        #0f0f0f;   /* page bg */
  --us-navy-mid:    #0a0a0a;   /* section-alt bg */
  --us-navy-deep:   #111111;   /* card bg */
  --us-navy-darkest:#080808;   /* footer bg */
  --us-border:      #2a2a2a;   /* card / section border */
  --us-border-nav:  #1a1a1a;   /* nav bottom border */

  /* Text */
  --us-text:        #f0ede8;   /* primary text — warm white */
  --us-muted:       #999999;   /* secondary / body copy */
  --us-faint:       #8A8F99;   /* footer copy, labels */

  /* Accent — amber replaces cyan */
  --us-cyan:        #e8a838;   /* primary CTA, links, highlights (amber) */
  --us-cyan-dim:    rgba(232,168,56,0.15);
  --us-cyan-border: rgba(232,168,56,0.28);

  /* Semantic */
  --us-red:         #ef4444;
  --us-amber:       #e8a838;
  --us-green:       #22c55e;
  --us-purple:      #a78bfa;

  /* Pills/badges: text always light; hue only on border + bg tint */
  --us-pill-text:   #f1f5f9;

  /* Typography */
  --us-font:        'Inter', system-ui, sans-serif;
  --us-serif:       'Source Serif 4', Georgia, serif;
  --us-mono:        'Courier New', monospace;

  /* Spacing scale */
  --us-section-pad: 5rem 1rem;
  --us-section-pad-sm: 3rem 1rem;
  --us-max-content: 72rem;
  --us-max-copy:    52rem;
  --us-max-narrow:  42rem;
}

/* ── Base ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--us-font);
  margin: 0;
  background: var(--us-navy);
  color: var(--us-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout helpers ───────────────────────────────────── */
.us-container   { max-width: var(--us-max-content); margin: 0 auto; padding: 0 1.5rem; }
.us-container-copy { max-width: var(--us-max-copy); margin: 0 auto; padding: 0 1.5rem; }
.us-container-narrow { max-width: var(--us-max-narrow); margin: 0 auto; padding: 0 1.5rem; }
.section-alt    { background: var(--us-navy-mid); }

/* ── Site Nav ─────────────────────────────────────────── */
.site-nav {
  background: var(--us-navy);
  border-bottom: 1px solid var(--us-border-nav);
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Auth-dependent nav links ship hidden to prevent the signed-out → signed-in
   CTA flash. Both data-auth states stay hidden at parse time (this rule loads
   render-blocking in <head>, before the nav paints); site-nav-auth.js adds
   .auth-resolved after /api/auth/me resolves, then reveals the correct set.
   Scoped to [data-auth], which only the four doc-page navs use, so home.html
   and every other .site-nav are unaffected. */
.site-nav:not(.auth-resolved) [data-auth] { display: none; }

.nav-row {
  max-width: var(--us-max-content);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: #888;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--us-text); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-signin {
  color: var(--us-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-signin:hover { color: var(--us-text); }

.nav-cta {
  background: #F5C140;
  color: #0f0f0f;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; }

/* Mobile nav */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-ham span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--us-text);
  border-radius: 1px;
}
.nav-toggle-cb { display: none; }
.nav-mob-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--us-border);
  background: var(--us-navy-mid);
}
.nav-mob-menu a {
  padding: 0.75rem 1.5rem;
  color: var(--us-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--us-border);
  display: block;
  transition: color 0.15s, background 0.15s;
}
.nav-mob-menu a:hover { color: var(--us-text); background: var(--us-navy-deep); }
.nav-mob-menu a:last-child { border-bottom: none; }
.nav-mob-menu a.mob-cta { color: #F5C140; font-weight: 600; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-ham   { display: flex; }
  .nav-toggle-cb:checked ~ .nav-mob-menu { display: flex; }
}

/* ── Site Footer ──────────────────────────────────────── */
.site-footer {
  background: var(--us-navy-darkest);
  border-top: 1px solid var(--us-border-nav);
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--us-max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Legacy class kept for compat — no longer used for text wordmark */
.footer-wordmark {
  font-family: var(--us-font);
  font-weight: 700;
  font-size: 1rem;
  color: var(--us-text);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--us-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: center;
}
.footer-links a {
  color: var(--us-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--us-text); }
.footer-links span { color: var(--us-faint); font-size: 0.8rem; }

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.footer-info span { font-size: 0.8rem; color: var(--us-muted); }
.footer-info a { font-size: 0.8rem; color: var(--us-cyan); text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }

.footer-disclaimer {
  max-width: var(--us-max-content);
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid #0d2435;
  font-size: 0.7rem;
  color: var(--us-faint);
  text-align: center;
}

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { align-items: center; }
  .footer-info  { align-items: center; }
}

/* ── Cards ────────────────────────────────────────────── */
.us-card {
  background: var(--us-navy-deep);
  border: 1px solid var(--us-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.us-card-sm {
  background: var(--us-navy-deep);
  border: 1px solid var(--us-border);
  border-radius: 8px;
  padding: 1.25rem;
}

/* Tier accent bars */
.tier-standard { border-top: 3px solid #64748b; }
.tier-academic  { border-top: 3px solid var(--us-purple); }
.tier-intel     { border-top: 3px solid var(--us-red); }

/* Tier badges — label text always --us-pill-text */
.badge-standard {
  background: rgba(100,116,139,.22);
  color: var(--us-pill-text);
  border: 1px solid rgba(148,163,184,.42);
}
.badge-academic {
  background: rgba(139,61,255,.2);
  color: var(--us-pill-text);
  border: 1px solid rgba(167,139,250,.45);
}
.badge-intel {
  background: rgba(220,38,38,.18);
  color: var(--us-pill-text);
  border: 1px solid rgba(248,113,113,.42);
}

/* Generic badge */
.us-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--us-font);
}

/* Coming soon */
.badge-soon {
  display: inline-block;
  background: rgba(0, 200, 212, 0.12);
  color: var(--us-pill-text);
  border: 1px solid var(--us-cyan-border);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Small tier tags (Free / Analyst lock) */
.tier-mini {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--us-pill-text);
  font-family: var(--us-font);
  white-space: nowrap;
}
.tier-mini-cyan {
  background: rgba(0, 200, 212, 0.12);
  border: 1px solid rgba(0, 200, 212, 0.38);
}
.tier-mini-purple {
  background: rgba(139, 61, 255, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.38);
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--us-cyan);
  color: var(--us-navy);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--us-cyan);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  border: 1.5px solid var(--us-cyan);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(0,200,212,0.08); }

.btn-ghost {
  display: inline-block;
  background: var(--us-navy-deep);
  color: var(--us-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--us-border);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-ghost:hover { border-color: var(--us-muted); }

/* ── Floating CTA ─────────────────────────────────────── */
.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.floating-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--us-cyan);
  color: var(--us-navy);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,200,212,0.35);
  transition: opacity 0.15s;
}
.floating-cta a:hover { opacity: 0.88; }

/* ── Typography ───────────────────────────────────────── */
.us-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--us-cyan);
}

.us-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--us-faint);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ── Sections ─────────────────────────────────────────── */
.us-section { padding: var(--us-section-pad); }
.us-section-sm { padding: var(--us-section-pad-sm); }

/* Hero glow */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(232,168,56,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Standard Nav Logo SVG (AMBER theme) ─────────────── 
   This is the canonical nav logo. Copy-paste into every page's nav.
   IMPORTANT: If multiple SVGs exist on same page, rename gradient/clip IDs
   to avoid collisions (e.g. wg2, ec2, wgf, ecf, etc.)
   ──────────────────────────────────────────────────── */
/*
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 48" height="36" aria-label="Undersignal">
    <defs>
      <linearGradient id="wg" x1="0%" y1="0%" x2="100%" y2="0%">
        <stop offset="0%" stop-color="#f4c870" stop-opacity="0.5"/>
        <stop offset="50%" stop-color="#e8a838"/>
        <stop offset="100%" stop-color="#f4c870" stop-opacity="0.5"/>
      </linearGradient>
      <clipPath id="ec"><ellipse cx="24" cy="24" rx="20" ry="11"/></clipPath>
    </defs>
    <circle cx="24" cy="24" r="17" fill="none" stroke="#e8a838" stroke-width="1.2" opacity="0.5" clip-path="url(#ec)"/>
    <circle cx="24" cy="24" r="10" fill="none" stroke="#e8a838" stroke-width="1.5" clip-path="url(#ec)"/>
    <path d="M2,24 L6,24 L8.5,18 L12,30 L15,20 L18,27 L20,23 L22,25.5 L23,24 L24.5,17 L27,32 L28.5,17 L30,24 L32,25.5 L33.5,23 L36,27 L39,20 L42,30 L45.5,18 L47,24"
      fill="none" stroke="url(#wg)" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
    <path d="M2,25.5 L6,25.5 L8.5,20 L12,31 L15,21.5 L18,28.5 L20,24.5 L22,27 L23,25.5 L24.5,19 L27,33 L28.5,19 L30,25.5 L32,27 L33.5,24.5 L36,28.5 L39,21.5 L42,31 L45.5,20 L47,25.5"
      fill="none" stroke="#f4c870" stroke-width="0.9" stroke-linecap="round" stroke-linejoin="round" opacity="0.45"/>
    <circle cx="24" cy="24" r="3.8" fill="#0f0f0f" stroke="#e8a838" stroke-width="0.9"/>
    <ellipse cx="22.4" cy="22.4" rx="1.2" ry="0.75" fill="white" opacity="0.7"/>
    <path d="M4,24 Q24,13 44,24" fill="none" stroke="#e8a838" stroke-width="1.1" stroke-linecap="round" opacity="0.6"/>
    <path d="M4,24 Q24,35 44,24" fill="none" stroke="#e8a838" stroke-width="1.1" stroke-linecap="round" opacity="0.6"/>
    <text x="58" y="18" font-family="'Source Serif 4','Georgia',serif" font-weight="700" font-size="13" letter-spacing="2" fill="#e8e0d0">UNDER</text>
    <text x="58" y="35" font-family="'Source Serif 4','Georgia',serif" font-weight="700" font-size="13" letter-spacing="2" fill="#e8a838">SIGNAL</text>
  </svg>
*/

/* ── Nav Schema (standard links for all marketing pages)
   Desktop:
     How It Works   → /how-to
     Language Tiers → /language-tiers
     Glossary       → /glossary
     Pricing        → /pricing
   Right side:
     Sign In        → /dashboard  (nav-signin)
     Try It Free    → /app        (nav-cta)
   Mobile: same links in nav-mob-menu
   ──────────────────────────────────────────────────── */

/* ── Pricing cards ────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}
.pricing-card {
  background: var(--us-navy-deep);
  border: 1px solid var(--us-border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.pricing-card-featured {
  border: 2px solid var(--us-cyan);
  position: relative;
}
@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 28rem; }
}

/* ── Report cards ─────────────────────────────────────── */
.report-card {
  background: var(--us-navy-mid);
  border: 1px solid var(--us-border);
  border-radius: 12px;
}

/* ── Ticker / feed ────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

/* ── Signal bars ──────────────────────────────────────── */
.signal-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
}
.signal-bar-label { font-size: 0.72rem; color: var(--us-muted); flex-shrink: 0; width: 90px; }
.signal-bar-score { width: 24px; text-align: right; font-size: 11px; font-family: var(--us-mono); font-weight: 700; flex-shrink: 0; }
.signal-bar-track { flex: 1; height: 5px; background: var(--us-border); border-radius: 3px; overflow: hidden; }
.signal-bar-fill  { height: 100%; border-radius: 3px; }

/* ── Feed grid ────────────────────────────────────────── */
#feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 768px) { #feed-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { #feed-grid { grid-template-columns: 1fr; } }

/* ── Misc utilities ───────────────────────────────────── */
.no-print { }
@media print { .no-print { display: none !important; } }

/* ── Settings panel (signal-deck-dark.css:937-1054, tokens resolved to dark literals) ── */
#settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.45);
}
#settings-overlay.open { display: block; }

#settings-panel {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 100vw;
  height: 100vh;
  z-index: 201;
  overflow-y: auto;
  transition: right 0.25s ease;
  padding: 24px 20px;
  background: #0f1117;
  border-left: 1px solid #2a3040;
  color: #e2e8f0;
}
#settings-panel.open { right: 0; }

.settings-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #F5C140;
  margin-bottom: 10px;
  margin-top: 20px;
}
.settings-section-label:first-child { margin-top: 4px; }

.settings-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  cursor: pointer;
  color: #E8ECF2;
}
.settings-check-row input[type="checkbox"] {
  width: 15px; height: 15px;
  cursor: pointer; flex-shrink: 0;
  accent-color: #F5C140;
}

.settings-scale-btn {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #2a3040;
  background: #131720;
  color: #cbd5e1;
  transition: background 0.15s, color 0.15s;
}
.settings-scale-btn.active {
  background: #F5C140;
  color: #0a1f2e;
  border-color: #F5C140;
}

.settings-gear-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0.65;
  transition: opacity 0.15s;
  flex-shrink: 0;
  color: #E8ECF2;
}
.settings-gear-btn:hover { opacity: 1; }

.settings-nav-link {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #bbbbbb;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.07);
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 5px;
}
.settings-nav-link:hover { border-color: #D4A032; color: #D4A032; }

.show-all-btn {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: #F5C140;
  color: #0a1f2e;
  cursor: pointer;
  margin-bottom: 4px;
}
.show-all-btn:hover { color: #D4A032; border-color: #D4A032; }
