/* ============================================================
   Flaming fleet — Landing kit (logged-out `/`)
   Source: FlamingTracker tracker/app/templates/landing.html (2026-09-25),
   corrected to DESIGN-SYSTEM.md §4 (nav + header auth rules), §5 (footer),
   §7 (buttons/cards) and §11 (skeleton, 4/2/1 feature grid).

   Every class is prefixed `lk-` so this file can load next to any site's own
   stylesheet without fighting over `.btn`, `.hero`, `.card`, `.footer`.
   Every token has a fallback, so it renders correctly with no site CSS at all.
   ============================================================ */

.lk {
  --lk-bg:          var(--bg-base, #0d0d0d);
  --lk-surface:     var(--bg-surface, rgba(255, 255, 255, 0.03));
  --lk-elevated:    var(--bg-elevated, rgba(255, 255, 255, 0.06));
  --lk-border:      var(--border, rgba(255, 255, 255, 0.06));
  --lk-border-hi:   rgba(255, 255, 255, 0.10);
  --lk-text:        #ffffff;
  --lk-body:        #f3f4f6;
  --lk-text-2:      var(--text-secondary, #9ca3af);   /* gray-400 */
  --lk-text-3:      var(--text-tertiary, #6b7280);    /* gray-500 */
  --lk-accent:      var(--accent, #f97316);
  --lk-gradient:    var(--accent-gradient, linear-gradient(135deg, #f97316 0%, #ef4444 100%));
  --lk-shadow-flame:var(--shadow-flame, 0 0 20px rgba(249, 115, 22, 0.3));
  --lk-shadow-card: var(--shadow-card-hover, 0 8px 32px rgba(0, 0, 0, 0.3));
  --lk-radius-sm:   var(--radius-sm, 8px);
  --lk-radius-md:   var(--radius-md, 12px);
  --lk-radius-lg:   var(--radius-lg, 16px);
  --lk-font:        var(--font-primary, 'Inter', system-ui, -apple-system, sans-serif);
  --lk-display:     var(--font-display, 'Poppins', system-ui, sans-serif);
  --lk-mono:        var(--font-mono, 'JetBrains Mono', monospace);
  --lk-nav-h:       64px;

  background: var(--lk-bg);
  color: var(--lk-body);
  font-family: var(--lk-font);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}
.lk *, .lk *::before, .lk *::after { box-sizing: border-box; }
.lk a { color: inherit; text-decoration: none; }
.lk ::selection { background: rgba(249, 115, 22, 0.3); }

/* Page content sits above the ember canvas (canvas is fixed, z-index 0). */
.lk-main > * { position: relative; z-index: 1; }

/* Anchor targets (#features, #pricing, …) land BELOW the fixed 64px nav, not under it.
   The nav is 64px at every width, including the phone header. (Fix 2026-09-25.) */
.lk [id] { scroll-margin-top: calc(var(--lk-nav-h) + 1rem); }

.lk-container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Buttons (§7) ---------- */
.lk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--lk-radius-sm);
  font-family: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1.25;
  white-space: nowrap;
  border: none; cursor: pointer;
  min-height: 0; min-width: 0;          /* neutralise site-wide 44px touch rules on desktop nav */
  transition: all 0.2s;
}
.lk-btn-primary { background: var(--lk-gradient); color: #fff; }
.lk-btn-primary:hover { box-shadow: var(--lk-shadow-flame); transform: scale(1.05); }
.lk-btn-secondary { background: rgba(255, 255, 255, 0.05); color: var(--lk-body); border: 1px solid var(--lk-border-hi); }
.lk-btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15); }
.lk-btn-ghost { background: transparent; color: var(--lk-text-2); }
.lk-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.lk-btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ---------- Header auth state ----------
   Both button sets are always in the markup; `data-auth` on <html> picks one.
   Server-rendered apps set it in the template; client-only apps set it from JS
   (FlamingLanding.setAuth). Missing/unknown = logged out. */
html:not([data-auth="in"]) .lk-auth-in  { display: none !important; }
html[data-auth="in"]       .lk-auth-out { display: none !important; }

/* ---------- Landing nav (§4) ---------- */
.lk-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(13, 13, 13, 0.6);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--lk-border);
}
.lk-nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
  height: var(--lk-nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.lk-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; flex-shrink: 0; }
.lk-brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.lk-brand-text { font-family: var(--lk-display); font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.lk-brand-hl, .lk-gradient-text {
  background: var(--lk-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lk-nav-links { display: flex; align-items: center; gap: 0.25rem; margin-right: auto; margin-left: 1.5rem; }
.lk-nav-links a {
  padding: 0.4rem 0.85rem; border-radius: var(--lk-radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--lk-text-2); transition: all 0.15s;
}
.lk-nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.lk-nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.lk-burger {
  display: none;
  width: 40px; height: 40px; min-height: 0; min-width: 0; padding: 0;
  align-items: center; justify-content: center;
  border: none; border-radius: var(--lk-radius-sm);
  background: transparent; color: var(--lk-body); cursor: pointer;
}
.lk-burger:hover { background: rgba(255, 255, 255, 0.05); }
.lk-burger svg { width: 22px; height: 22px; }
.lk-burger .lk-i-close { display: none; }
.lk-nav.open .lk-burger .lk-i-open { display: none; }
.lk-nav.open .lk-burger .lk-i-close { display: block; }

/* Mobile menu panel (drops down under the 64px bar) */
.lk-menu {
  display: none;
  border-top: 1px solid var(--lk-border);
  padding: 0.75rem 1rem 1rem;
  background: rgba(13, 13, 13, 0.92);
  max-height: calc(100vh - var(--lk-nav-h)); overflow-y: auto;
}
.lk-menu a.lk-menu-link {
  display: block; padding: 0.75rem 0.85rem; border-radius: var(--lk-radius-md);
  font-size: 0.95rem; font-weight: 500; color: var(--lk-text-2);
}
.lk-menu a.lk-menu-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.lk-menu-actions { display: grid; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--lk-border); }
.lk-menu-actions .lk-btn { width: 100%; padding: 0.7rem 1rem; font-size: 0.95rem; }
.lk-menu-actions .lk-btn-ghost { border: 1px solid var(--lk-border-hi); }

@media (max-width: 768px) {
  .lk-nav-inner { padding: 0 1rem; }
  .lk-nav-links { display: none; }
  /* Phones: keep ONE header action visible beside the menu button (Log in, or Dashboard when signed in);
     Register stays in the menu panel. (Phil, 2026-09-28: the login looked missing on phones.) */
  .lk-nav-actions { margin-left: auto; gap: 0.35rem; }
  .lk-nav-actions .lk-btn { padding: 0.4rem 0.85rem; font-size: 0.8125rem; }
  .lk-nav-actions .lk-btn-ghost { border: 1px solid var(--lk-border-hi); }
  .lk-nav-actions .lk-btn-primary.lk-auth-out { display: none; }
  .lk-burger { display: inline-flex; }
  .lk-nav.open .lk-menu { display: block; }
}
@media (max-width: 380px) {
  .lk-brand-text { font-size: 1.1rem; }
  .lk-brand svg { width: 24px; height: 24px; }
}

/* ---------- Hero (§11.2) ---------- */
.lk-hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--lk-nav-h) + 4rem) 1.5rem 5rem;
  overflow: hidden;
}
.lk-hero-glow-1 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 800px; height: 800px; max-width: 200vw; background: radial-gradient(circle, rgba(249, 115, 22, 0.10) 0%, transparent 70%); pointer-events: none; }
.lk-hero-glow-2 { position: absolute; top: 10%; right: 5%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(239, 68, 68, 0.05) 0%, transparent 70%); pointer-events: none; }
.lk-hero-content { position: relative; z-index: 1; max-width: 800px; }
.lk-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.15rem; border-radius: 9999px;
  background: rgba(249, 115, 22, 0.10); border: 1px solid rgba(249, 115, 22, 0.20);
  color: var(--lk-accent); font-size: 0.85rem; font-weight: 500;
  margin-bottom: 2rem;
}
.lk-pill svg { width: 16px; height: 16px; flex-shrink: 0; }
.lk-hero h1 {
  font-family: var(--lk-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--lk-text);
  margin: 0 0 1.5rem;
}
.lk-hero-sub {
  font-size: 1.25rem; line-height: 1.7; color: var(--lk-text-2);
  max-width: 600px; margin: 0 auto 2.5rem;
}
.lk-hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.5rem; }
.lk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 550px; margin: 0 auto; }
.lk-stats .lk-num { font-family: var(--lk-display); font-size: 1.75rem; font-weight: 800; color: var(--lk-text); }
.lk-stats .lk-lbl { font-size: 0.78rem; color: var(--lk-text-3); }

/* ---------- Sections ---------- */
.lk-section { padding: 5rem 1.5rem; max-width: 1280px; margin: 0 auto; }
.lk-band { padding: 5rem 1.5rem; background: rgba(255, 255, 255, 0.01); }   /* full-bleed tinted section */
.lk-band > .lk-section { padding: 0; }
.lk-section-header { text-align: center; margin-bottom: 3rem; }
.lk-section-header h2 {
  font-family: var(--lk-display); font-size: 2rem; font-weight: 800;
  color: var(--lk-text); margin: 0 0 0.75rem;
}
.lk-section-header p { color: var(--lk-text-2); max-width: 600px; margin: 0 auto; }
.lk-section-header .lk-pill { margin-bottom: 1.5rem; }

/* ---------- Cards (§7) + feature grid 4/2/1 (§11.3) ---------- */
.lk-card {
  background: var(--lk-surface);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--lk-border);
  border-radius: var(--lk-radius-lg);
  padding: 1.5rem;
  transition: all 0.3s;
}
.lk-card-hover:hover {
  background: var(--lk-elevated); border-color: var(--lk-border-hi);
  box-shadow: var(--lk-shadow-card); transform: translateY(-2px);
}
.lk-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.lk-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1024px) { .lk-grid-4, .lk-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .lk-grid-4, .lk-grid-3 { grid-template-columns: minmax(0, 1fr); } }

.lk-f-icon {
  width: 44px; height: 44px; border-radius: var(--lk-radius-md);
  background: rgba(249, 115, 22, 0.10); color: var(--lk-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem; transition: background 0.3s;
}
.lk-f-icon svg { width: 22px; height: 22px; }
.lk-card-hover:hover .lk-f-icon { background: rgba(249, 115, 22, 0.20); }
.lk-card h3 { font-family: var(--lk-display); font-size: 1.05rem; font-weight: 700; color: var(--lk-text); margin: 0 0 0.4rem; }
.lk-card p { color: var(--lk-text-2); font-size: 0.875rem; line-height: 1.6; margin: 0; }

/* ---------- Building blocks for site-specific sections ---------- */
.lk-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.lk-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: var(--lk-radius-lg);
  background: var(--lk-surface); border: 1px solid var(--lk-border);
  font-size: 0.82rem; font-weight: 500; color: var(--lk-text-2);
  transition: all 0.2s;
}
.lk-chip:hover { background: var(--lk-elevated); border-color: rgba(249, 115, 22, 0.3); color: #fff; }

.lk-price-name { font-size: 0.78rem; font-weight: 600; color: var(--lk-text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.lk-price { font-family: var(--lk-mono); font-size: 2.25rem; font-weight: 700; color: var(--lk-text); margin-bottom: 0.2rem; }
.lk-price span { font-size: 0.9rem; color: var(--lk-text-3); font-weight: 400; }
.lk-price-desc { color: var(--lk-text-2); font-size: 0.82rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--lk-border); }
.lk-ticks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.lk-ticks li { display: flex; gap: 0.6rem; font-size: 0.82rem; margin-bottom: 0.6rem; color: var(--lk-text-2); }
.lk-ticks li::before { content: '✓'; color: #22c55e; font-weight: 700; }
.lk-card .lk-btn-block { width: 100%; }
.lk-note { text-align: center; color: var(--lk-text-3); font-size: 0.82rem; margin-top: 2rem; }

/* ---------- CTA band (§11.5) ---------- */
.lk-cta {
  text-align: center; padding: 5rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--lk-border);
  margin-top: 3rem;
}
.lk-cta h2 { font-family: var(--lk-display); font-size: 2rem; font-weight: 800; color: var(--lk-text); margin: 0 0 1rem; }
.lk-cta p { color: var(--lk-text-2); margin: 0 0 2rem; }

/* ---------- Footer (§5, verbatim values) ---------- */
.lk-footer {
  padding: 2rem 1.5rem; text-align: center;
  color: rgba(255, 255, 255, 0.25); font-size: 0.82rem;
  border-top: 1px solid var(--lk-border);
}
.lk-footer p { margin: 0; }
.lk-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; margin-bottom: 0.75rem; }
.lk-footer-links a { color: rgba(255, 255, 255, 0.35); }
.lk-footer-links a:hover { color: rgba(255, 255, 255, 0.7); }

/* ---------- Auth-page cross-link (login <-> register) ---------- */
.lk-auth-switch { text-align: center; font-size: 0.875rem; color: var(--text-secondary, #9ca3af); margin-top: 1.25rem; }
.lk-auth-switch a { color: var(--accent, #f97316); font-weight: 500; text-decoration: none; }
.lk-auth-switch a:hover { text-decoration: underline; }

/* ---------- Phone ---------- */
@media (max-width: 768px) {
  .lk-hero { min-height: 100svh; padding: calc(var(--lk-nav-h) + 2.5rem) 1rem 3rem; }
  .lk-hero-sub { font-size: 1.05rem; }
  .lk-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .lk-section { padding: 3rem 1rem; }
  .lk-band { padding: 3rem 1rem; }
  .lk-section-header h2, .lk-cta h2 { font-size: 1.6rem; }
  .lk-cta { padding: 3.5rem 1rem; }
}
@media (max-width: 400px) {
  .lk-hero-btns .lk-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .lk-btn, .lk-card, .lk-chip { transition: none; }
  .lk-btn-primary:hover, .lk-card-hover:hover { transform: none; }
}
