/* brand.css — shared design tokens for the Pip & Po landing pages.
   Mirrors the existing pipandpo.html system so all pages feel like siblings. */

:root {
  --ground:        #EFE9DD;
  --ground-warm:   #F4EFE6;
  --ground-cream:  #FBF7EE;
  --ink:           #1A1A1A;
  --ink-soft:      #2A2A28;
  --ink-muted:     #5C5852;
  --green:         #1F3A2E;
  --green-deep:    #162820;
  --terracotta:    #B5775E;
  --rule:          rgba(26, 26, 26, 0.12);
  --rule-soft:     rgba(26, 26, 26, 0.06);
  --rule-strong:   rgba(26, 26, 26, 0.22);

  /* Po-specific accents — slightly cooler, dashboard-adjacent */
  --po-ground:     #F1EEE6;
  --po-rule:       rgba(26, 26, 26, 0.10);
  --po-grid:       rgba(26, 26, 26, 0.05);
  --po-ink-blue:   #1F2D44;
  --po-amber:      #8C6A2F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-feature-settings: "ss01", "ss02";
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Paper texture used on the Pip pages */
body.pip::before, body.chooser::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(26,26,26,0.025) 1px, transparent 1px),
    radial-gradient(rgba(26,26,26,0.02) 1px, transparent 1px);
  background-size: 24px 24px, 17px 17px;
  background-position: 0 0, 12px 12px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

body.po {
  background: var(--po-ground);
  font-size: 16px;
  line-height: 1.5;
}
/* a faint grid on the Po pages — the dashboard signal */
body.po::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--po-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--po-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 2;
}

/* Shared wordmark */
.wordmark {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 18, "SOFT" 30;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.wordmark .amp {
  font-style: italic;
  font-weight: 300;
  color: var(--green);
  padding: 0 2px;
  font-variation-settings: "opsz" 18, "SOFT" 100;
}

/* Italic Fraunces inline helper */
.it {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--green);
  font-variation-settings: "opsz" 18, "SOFT" 100, "WONK" 1;
}

/* Mono for tags, dashboard numerals, kickers */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Soft horizontal rule */
hr.rule { border: none; border-top: 1px solid var(--rule); margin: 0; }

/* Buttons */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--green);
  color: var(--ground-warm);
  padding: 16px 28px;
  border: none;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cta:hover { background: var(--green-deep); transform: translateY(-1px); }
.cta svg { transition: transform 0.2s ease; }
.cta:hover svg { transform: translateX(3px); }

.cta-inverse {
  background: var(--ground-warm);
  color: var(--green);
}
.cta-inverse:hover { background: #fff; }

/* Po-specific rectangular CTA — less editorial, more operator */
.po-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--ground-cream);
  padding: 14px 22px;
  border: none;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.po-cta:hover { background: #000; }
.po-cta.green { background: var(--green); }
.po-cta.green:hover { background: var(--green-deep); }
.po-cta.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}
.po-cta.ghost:hover { background: var(--ground-cream); }

/* Nav */
.nav {
  display: flex;
  gap: 36px;
  align-items: baseline;
}
.nav a {
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--green); }

/* Common header */
.site-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

/* Common footer */
.site-footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--rule);
}
.site-footer .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer .footer-tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--ink-muted);
  font-size: 14px;
  font-variation-settings: "opsz" 14, "SOFT" 100;
}
.site-footer .links {
  display: flex; gap: 32px;
}
.site-footer .links a {
  font-size: 14px; color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer .links a:hover { color: var(--green); }
.site-footer .meta {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
}

/* Subtle entrance for hero blocks */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease-out backwards; }

/* ========================================================================
   Unified site header — used across every page so the primary nav is
   consistent. Page-specific in-page anchors go into `.page-subnav` below.
   ======================================================================== */
.jj-header {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: rgba(239, 233, 221, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}
.jj-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
}
.jj-nav { display: flex; gap: 28px; justify-content: center; }
.jj-nav a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.15s;
}
.jj-nav a.active { color: var(--green); }
.jj-nav a:hover { color: var(--green); }
.jj-actions {
  display: flex; align-items: center;
  justify-content: flex-end; gap: 14px;
}
.jj-link {
  font-size: 14px; color: var(--ink);
  text-decoration: none; padding: 9px 8px;
  transition: color 0.15s;
}
.jj-link:hover { color: var(--green); }
.jj-button {
  background: var(--ink);
  color: var(--ground-cream);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}
.jj-button:hover { background: #000; }

/* Page sub-navigation — sits below the primary header on pages that have
   in-page sections worth jumping to. NOT sticky (avoids two sticky bars).
   Scrolls away with the rest of the page. */
.page-subnav {
  border-bottom: 1px solid var(--rule);
  background: var(--ground-warm);
  font-size: 13.5px;
}
.page-subnav .inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.page-subnav .label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-muted);
  font-variation-settings: "opsz" 14, "SOFT" 100;
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid var(--rule);
}
.page-subnav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.page-subnav ul a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
  font-weight: 500;
  letter-spacing: -0.003em;
}
.page-subnav ul a:hover { color: var(--green); }

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .nav { gap: 20px; }
  .jj-header-inner { grid-template-columns: 1fr auto; gap: 16px; }
  .jj-nav { display: none; }
  .page-subnav .inner { gap: 14px; padding: 10px 0; overflow-x: auto; flex-wrap: nowrap; }
  .page-subnav .label { padding-right: 10px; }
  .page-subnav ul { flex-wrap: nowrap; gap: 16px; white-space: nowrap; }
}
