/* site-chrome.css — the shared header, nav, footer and type tokens for planetai.fab.city.
   Extracted from index.html on 3 Sep 2026 so subpages stop re-implementing the chrome and drifting.
   node0/ uses this file. index.html still carries its own inline copy; migrating it is a separate,
   riskier pass and should happen next time that file is opened. Until then, change both. */

:root {
  /* Fab City brand palette — verbatim from the 2026 brand guidelines */
  --fab-black: #1E1E1E;
  --fab-warm:  #F7F5F1;  /* warm white — NOT #FFFFFF */
  --fab-red:   #E62038;  /* City applications */
  --fab-green: #00A057;  /* Region applications */
  --fab-blue:  #20388D;  /* Island applications + PLANETAI program colour */

  /* Surface aliases — kept for backwards compatibility with existing markup */
  --bg:        var(--fab-warm);
  --surface:   #ffffff;
  --surface-2: #f0ede5;
  --rule:      #d8d3c4;
  --text:      var(--fab-black);
  --muted:     #4a4a44;

  /* Typography per Fab City Brand 2026 skill:
     - Circular Std Medium 500 = display (paid; we use Figtree as web substitute)
     - Figtree (variable) = body / web / general use
     - Funnel Sans (variable) = utility / system / italic accents
     - IBM Plex Mono = technical annotations (PLANETAI-specific carve-out;
       FC web stack doesn't use mono but our instrument register needs it) */
  --font-display: 'Figtree', 'Circular Std', system-ui, sans-serif;
  --font-body:    'Figtree', -apple-system, system-ui, sans-serif;
  --font-utility: 'Funnel Sans', 'Figtree', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  /* Provenance pills (PLANETAI-specific, not in FC palette) */
  --prov-live:    var(--fab-green);
  --prov-synth:   var(--fab-red);
  --prov-pending: #7a5a10;

  /* Hairline rules */
  --ok-border-10: rgba(30, 30, 30, 0.10);
  --ok-border-20: rgba(30, 30, 30, 0.20);
  --ok-ink-60:    rgba(30, 30, 30, 0.60);

  --col: 1180px;

  /* Legacy aliases — mapped to brand palette so existing rules
     across this stylesheet keep rendering on-brand. Will be cleaned
     up in Day 2 of the redesign sprint. */
  --fc-red:    var(--fab-red);
  --fc-green:  var(--fab-green);
  --fc-blue:   var(--fab-blue);
  --fc-rose:   var(--fab-red);     /* hover/accent → brand red */
  --fc-sky:    var(--fab-blue);    /* sky → brand blue */
  --fc-plum:   var(--fab-blue);    /* plum → brand blue */
  --fc-dark:   var(--fab-black);
  --cursor-100: #f7f7f4;
  --cursor-200: #f2f1ed;
  --cursor-300: #ebeae5;
  --cursor-400: #e6e5e0;
  --cursor-500: #e1e0db;
  --surface-3: #e0dbc9;
  --L1: var(--fab-red);
  --L2: var(--fab-blue);
  --L3: var(--fab-blue);
  --L4: var(--fab-green);
  --L5: var(--fab-red);
  --L6: var(--fab-black);
  /* Solid brand accent — replaces the dropped --accent-gradient */
  --accent-gradient: var(--fab-blue);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

a:hover { color: var(--fc-rose); text-decoration-color: var(--fc-rose); }

.col {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .col { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
}

.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--muted);
  display: inline-block;
}

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 241, 0.88);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--ok-border-10);
}

header.site .row {
  max-width: var(--col);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.fc-lockup {
  display: grid;
  grid-template-columns: 40px 1px auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--fab-black);
}

.fc-lockup:hover { color: var(--fab-black); }

.fc-lockup .fc-mark {
  width: 40px;
  height: 40px;
  display: block;
}

.fc-lockup .fc-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fc-lockup .divider {
  width: 1px;
  height: 32px;
  background: var(--fab-black);
}

.fc-lockup .program-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fc-lockup .org {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fab-black);
  line-height: 1;
}

.fc-lockup .program {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fab-blue);
  line-height: 1;
  display: flex; align-items: baseline; gap: 10px;
}

.fc-lockup .program .third-tier {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--fab-black);
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .fc-lockup .program .third-tier { display: none; }
}

nav.primary {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav.primary a {
  text-decoration: none;
  color: var(--muted);
}

nav.primary a:hover { color: var(--fc-rose); }

nav.primary a[aria-current="page"] { color: var(--fab-blue, #20388D); }

nav.primary .cta {
  color: var(--text);
  border: 1.5px solid var(--text);
  padding: 8px 14px;
  border-radius: 0;
  background: transparent;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease;
}

nav.primary .cta:hover {
  background: var(--text);
  color: var(--bg);
}

header.site .row { position: relative; }

.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--ok-border-20, rgba(30,30,30,0.20));
  width: 40px; height: 40px;
  border-radius: 8px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: border-color 140ms ease;
}

.nav-burger:hover { border-color: var(--fc-rose, #d6346c); }

.nav-burger:focus-visible { outline: 2px solid var(--fab-blue, #20388D); outline-offset: 2px; }

.nav-burger span {
  display: block; width: 18px; height: 2px;
  background: var(--fab-black, #1E1E1E);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-burger { display: inline-flex; }
  nav.primary {
    position: absolute;
    top: calc(100% - 4px);
    right: 16px;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(247, 245, 241, 0.98);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border: 1px solid var(--ok-border-10, rgba(30,30,30,0.10));
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.10);
    min-width: 220px;
    max-width: calc(100vw - 32px);
    align-items: stretch;
    display: none;
    z-index: 60;
  }
  nav.primary.is-open { display: flex; }
  nav.primary a { padding: 10px 14px; border-radius: 8px; }
  nav.primary a:hover { background: rgba(255,255,255,0.7); }
  nav.primary .cta { margin-top: 6px; text-align: center; }
  .brand-text small { display: none; }
}

@media (max-width: 1100px) {
  .hero-backdrop { right: -240px; opacity: 0.32; }
}

@media (max-width: 720px) {
  .hero-backdrop { display: none; }
}

@media (max-width: 780px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .hero-meta div { border-right: none; padding-left: 0; padding-right: 0; }
  .hero-meta div + div + div { border-top: 1px solid var(--rule); padding-top: 16px; }
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.020em;
  margin: 0 0 24px;
  max-width: 22ch;
}

h2.section-title em { font-style: normal; font-weight: 800; color: var(--fab-blue); }

.section-lede {
  font-size: 18px;
  max-width: 62ch;
  color: var(--text);
  margin: 0 0 40px;
}

@media (max-width: 900px) {
  .gap-section .layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 1000px) {
  .stack-layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .tier { grid-template-columns: 70px 1fr; }
  .tier-side { display: none; }
}

@media (max-width: 820px) { .claims { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .node-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; padding: 28px 0; }
  .stats > div { border-right: none; border-bottom: 1px solid var(--rule); padding: 0 0 18px; }
  .stats > div:last-child { border-bottom: none; padding-bottom: 0; }
}

@media (max-width: 820px) { .bioregions { grid-template-columns: 1fr; } }

@media (max-width: 720px) {
  .honest-list li { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 680px) {
  .cta-card { padding: 36px 28px; }
}

footer.site {
  border-top: 1px solid var(--rule);
  padding: 48px 0 32px;
  background: var(--cursor-200);
}

footer.site .row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 780px) {
  footer.site .row { grid-template-columns: 1fr; gap: 24px; }
}

footer.site .credits {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

footer.site .credits strong { color: var(--text); font-weight: 600; }

footer.site nav.foot {
  display: flex; justify-content: flex-end; gap: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 780px) { footer.site nav.foot { justify-content: flex-start; } }

footer.site nav.foot a { color: var(--muted); text-decoration: none; }

footer.site nav.foot a:hover { color: var(--fc-rose); }

.fineprint {
  max-width: var(--col);
  margin: 36px auto 0;
  padding: 18px 32px 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
/* separates on-page anchors from links that leave the page (added with node0, 3 Sep 2026) */
.nav-sep { width: 1px; height: 14px; background: var(--ok-border-20); display: inline-block; flex: none; }
@media (max-width: 1100px) { .nav-sep { display: none; } }
