/* postflo-base.css — shared nav + footer design system
   Source of truth: templates/core/index.html V2 tokens */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #080808;
  --surface:      #0E0E0E;
  --surface-lift: #111;
  --border:       #1a1a1a;
  --text:         #F0EDE8;
  --yellow:       #C9A84C;
  --yellow-dim:   rgba(201,168,76,0.25);
  --yellow-bg:    rgba(201,168,76,0.08);
  --muted:        #555;
  --dim:          #333;
  --teal:         #2BBFAB;
  --orange:       #E8734A;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Noise texture — carried from index.html */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: .03;
  pointer-events: none;
  z-index: 9999;
}

/* ── pf-nav — original home page nav (V2, preserved exactly) ── */
.pf-nav {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 28px;
  background: rgba(8,8,8,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 0;
}
.pf-nav-logo { display: flex; align-items: center; flex-shrink: 0; margin-right: 28px; }
.pf-nav-links { display: flex; gap: 2px; flex: 1; }
.pf-nav-link {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.pf-nav-link:hover { color: var(--yellow); background: var(--yellow-bg); border-color: var(--yellow-dim); }
.pf-nav-link--active { color: var(--text); border-color: var(--border); }
.pf-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.pf-nav-intel {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid rgba(43,191,171,.25);
  background: rgba(43,191,171,.07);
}
.pf-nav-intel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  animation: pf-intel-pulse 2s ease-in-out infinite;
}
@keyframes pf-intel-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
@media (prefers-reduced-motion: reduce) { .pf-nav-intel-dot { animation: none; } }
.pf-nav-intel-text {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pf-nav-quota {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.pf-nav-quota-count {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
}
.pf-nav-quota-plan {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--yellow);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .pf-nav-intel { display: none; }
  .pf-nav-links { display: none; }
  .pf-nav-quota-plan { display: none; }
}

/* ── wk-nav — work pages: logo left · context center · avatar right ── */
.wk-nav {
  display: flex;
  align-items: center;
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 28px 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.2s ease, backdrop-filter 0.2s ease, border-color 0.2s ease;
}
.wk-nav.is-scrolled {
  background: rgba(8,8,8,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: rgba(255,255,255,0.06);
}
.wk-nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.wk-nav-logo img {
  height: 28px;
  width: auto;
  display: block;
}
.wk-nav-context {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 16px;
}
.wk-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Trial / free pill — surfaces plan in chrome, taps to /upgrade */
.wk-trial-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(201, 168, 76, 0.06);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9A84C;
  text-decoration: none;
  min-height: 32px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.wk-trial-pill:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.5);
}
.wk-trial-pill:active { transform: scale(0.96); }
.wk-trial-pill:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 2px;
}
.wk-trial-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C9A84C;
  flex-shrink: 0;
}
.wk-trial-pill__label { color: #C9A84C; }
.wk-trial-pill__action {
  color: rgba(240, 237, 230, 0.72);
  border-left: 1px solid rgba(201, 168, 76, 0.22);
  padding-left: 7px;
}

@media (max-width: 640px) {
  .wk-nav-context { display: none; }
  /* Top-right avatar lives in bottom nav on mobile — hide here */
  .wk-nav-avatar--desktop { display: none; }
  /* Tighten chrome padding on mobile */
  .wk-nav { padding-left: 16px; padding-right: 16px; }
  .wk-trial-pill__action { display: none; }
  .wk-trial-pill { padding: 5px 10px; font-size: 9px; }
}

/* ── pf-footer — work pages: one line, entity left · links right ── */
.pf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.pf-footer-entity {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--dim);
  white-space: nowrap;
}
.pf-footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pf-footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  transition: color .2s;
}
.pf-footer-links a:hover { color: var(--muted); }

/* ── entry-body — auth + legal: logo centered, no nav, no footer ── */
.entry-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.entry-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  flex-shrink: 0;
}
.entry-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.entry-logo img {
  height: 28px;
  width: auto;
  display: block;
}
.entry-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
