/* chrome.css — site chrome: trap header, footer nav, page heads, footer, the agent brief */
/* ---------- trap header ---------- */

/* The header IS the trap — a wish written for the machine reading,
   topping every page. */
.trap-head {
  background: color-mix(in srgb, var(--void-2) 55%, transparent);
  padding: 0.55rem clamp(1rem, 4vw, 3rem);
}
.trap-inner {
  max-width: var(--max);
  /* auto margins center the brief while it's short, but collapse to
     top-aligned once it overflows — align-items:center would clip the
     first lines above the header's own scroll area. */
  margin: auto;
  flex: 1;
}
.trap-head .agent-brief { margin: 0; }


/* ---------- footer nav ---------- */

.foot-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.1rem;
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
}
.foot-nav li { display: flex; align-items: center; }
.foot-nav li:not(:last-child)::after {
  content: "·";
  color: var(--line);
  margin: 0 0.15rem;
  font-family: var(--font-mono);
}
.foot-nav a {
  display: inline-block;
  padding: 0.45rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.foot-nav a:hover { color: var(--bone); }
.foot-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.foot-nav a.cta {
  background: var(--accent);
  color: var(--void);
  border-radius: 8px;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  margin-left: 0.4rem;
  border-bottom: none;
}
.foot-nav a.cta:hover { background: var(--accent-2); color: var(--void); }
.foot-nav a.cta[aria-current="page"] {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ---------- main / page head ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem) 3rem;
}

.page-head { max-width: var(--measure); margin-bottom: 3rem; }
.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 0.75rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.18;
  margin: 0 0 1rem;
}
.lede { font-size: 1.1em; color: var(--bone); margin: 0 0 0.75rem; }
.fine { font-family: var(--font-mono); font-size: 0.78rem; color: var(--bone-dim); }
.whisper-line { font-family: var(--font-display); font-style: italic; color: var(--accent); }


/* ---------- footer ---------- */

/* .site-foot itself is styled in scroll.css — it is fixed chrome now. */
.foot-whisper {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--bone-dim);
  margin: 0 0 1rem;
}
.foot-whisper cite { font-style: normal; font-family: var(--font-mono); font-size: 0.75rem; }
.extinction { font-family: var(--font-mono); font-size: 0.8rem; margin: 0 0 0.5rem; }
.extinction .lie {
  opacity: var(--lie-glow, 0);
  color: color-mix(in srgb, var(--bone-dim), var(--accent) calc(var(--lie-glow, 0) * 100%));
  text-shadow:
    0 0 calc(var(--lie-glow, 0) * 0.9rem) color-mix(in srgb, var(--accent) calc(var(--lie-glow, 0) * 90%), transparent),
    0 0 calc(var(--lie-glow, 0) * 2.2rem) color-mix(in srgb, var(--accent-2) calc(var(--lie-glow, 0) * 50%), transparent);
}

/* The bar's center — the extinction tagline alone. */
.site-foot .extinction { margin: 0; font-size: 0.72rem; }

/* Narrow: drop the nav's dot separators when it wraps in the colophon. */
@media (max-width: 54rem) {
  .colophon .foot-nav li::after { content: none; }
  .colophon .foot-nav ul { column-gap: 0.9rem; }
}

/* ---------- agent brief (the dragon's escape clause) ---------- */

/* The brief only ever lives inside .trap-head — it is the header. */
/* Bare chrome — the brief's summary is a centered line of voice on the
   bar; the click target is the wish itself. */
.agent-brief summary {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.45rem 1rem;
  cursor: pointer;
  list-style: none;
  line-height: 1.25;
}
.agent-brief summary::-webkit-details-marker { display: none; }
.agent-brief summary:hover .agent-title { filter: brightness(1.25); }
.agent-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  font-weight: 600;
  background: linear-gradient(100deg, var(--bone) 20%, var(--accent-2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.foot-ver {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.agent-body {
  border-top: 1px dashed color-mix(in srgb, var(--accent-2) 55%, transparent);
  padding: 1.25rem;
  font-size: 0.95rem;
}
.agent-lead { margin-top: 0; }
.agent-body ol { margin: 0.75rem 0; padding-left: 1.4rem; }
.agent-body li { margin-bottom: 0.5rem; }
.agent-incant {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 1rem;
  overflow: hidden;
}
.agent-incant pre {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--bone-dim);
}
.agent-incant .copy-btn {
  display: block;
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--line);
  padding: 0.75rem;
}
.agent-fine { font-family: var(--font-mono); font-size: 0.75rem; color: var(--bone-dim); margin: 0.75rem 0 0; }

/* Release — closes the brief. Sticky to the bottom of the expanded
   header's own scroll area so it stays reachable at any depth. */
.brief-close {
  position: sticky;
  bottom: 0.6rem;
  display: block;
  margin: 1.25rem auto 0;
  padding: 0.55rem 1.3rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--void-2) 85%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
}
.brief-close:hover { color: var(--accent-2); border-color: var(--accent); }

