/* councils.sh — marketing site
   Aesthetic: "instrument" — International Typographic / Swiss. White field,
   black ink, one saturated blue. A strict grid, oversized grotesque, hard
   hairline rules, numbers as design elements. No warmth, no decoration.
   One self-hosted variable grotesk (Archivo). No third-party calls. */

@font-face {
  font-family: "Archivo Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo.woff2") format("woff2");
}

:root {
  --paper:  #ffffff;
  --ink:    #0a0a0a;
  --ink-2:  #565656;   /* secondary text — AA on white */
  --ink-3:  #8c8c8c;   /* tertiary / captions */
  --line:   #e4e4e4;   /* hairline grey */
  --field:  #f5f5f4;   /* faint inset (code, wells) */

  --blue:      #1a33dd;   /* text/link-safe blue */
  --blue-pure: #1f3bff;   /* bold fills */
  --blue-ink:  #0a1a8c;   /* pressed/hover */
  --red:       #d52b1e;   /* single warning token, used sparingly */

  --grotesk: "Archivo Variable", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono:    ui-monospace, "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

  --maxw: 1200px;
  --pad: 2rem;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grotesk);
  font-size: 17px;
  font-weight: 420;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-ink); }

::selection { background: var(--blue-pure); color: #fff; }

/* ---------- focus + a11y ---------- */
:focus-visible { outline: 2px solid var(--blue-pure); outline-offset: 2px; }
.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: #fff;
  padding: 8px 14px; font-weight: 700; letter-spacing: .01em;
  transition: top .2s var(--ease); z-index: 100;
}
.skip-link:focus { top: 12px; }

/* ---------- container + section rules ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 6.5rem var(--pad); border-top: 1px solid var(--ink); }

/* numbered section label: a blue index + uppercase mono tag */
.eyebrow {
  display: flex; align-items: baseline; gap: .65rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink); margin: 0 0 2rem;
}
.eyebrow__n { color: var(--blue); font-weight: 600; }
.section__head { margin-bottom: 4rem; }

h2 {
  font-family: var(--grotesk); font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: .98; letter-spacing: -.025em;
  margin: 0; max-width: 18ch; color: var(--ink);
}
h3 { font-family: var(--grotesk); font-weight: 700; margin: 0 0 .5rem; font-size: 1.18rem; letter-spacing: -.01em; }
.lede { color: var(--ink-2); font-size: 1.12rem; margin: 1.4rem 0 0; max-width: 52ch; line-height: 1.5; }

/* ---------- nav / masthead ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem var(--pad);
  max-width: var(--maxw); margin: 0 auto;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--ink); }
.nav__brand { display: inline-flex; align-items: baseline; gap: .12rem; color: var(--ink); }
.nav__mark { display: none; }   /* drop the decorative glyph; wordmark carries it */
.nav__word { font-family: var(--grotesk); font-weight: 800; letter-spacing: -.03em; font-size: 1.15rem; }
.nav__dot { color: var(--blue); }
.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links a { color: var(--ink); font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.nav__links a:hover { color: var(--blue); }
.nav__cta {
  color: #fff !important; background: var(--blue-pure);
  padding: .55rem .9rem; letter-spacing: .08em !important;
}
.nav__cta:hover { background: var(--blue-ink); color: #fff !important; }

/* hamburger */
.nav__toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--ink); cursor: pointer;
}
.nav__bars, .nav__bars::before, .nav__bars::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav__bars { position: relative; }
.nav__bars::before { position: absolute; top: -6px; }
.nav__bars::after  { position: absolute; top: 6px; }
.nav.is-open .nav__bars { background: transparent; }
.nav.is-open .nav__bars::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--ink);
    padding: .5rem var(--pad) 1.2rem; display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 1rem .2rem; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__cta { text-align: center; margin-top: .7rem; padding: 1rem; }
  html:not(.js) .nav__toggle { display: none; }
  html:not(.js) .nav__links { position: static; display: flex; flex-direction: row; flex-wrap: wrap; background: none; border: 0; padding: 0; }
  html:not(.js) .nav__links a { border: 0; padding: .4rem .6rem; }
}

/* ---------- buttons (sharp, flat, blocky) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--grotesk); font-weight: 700; font-size: .96rem; letter-spacing: -.01em;
  padding: .85rem 1.5rem; border: 1.5px solid var(--ink); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue-pure); border-color: var(--blue-pure); color: #fff; }
.btn--primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--link { padding: .85rem .2rem; border: 0; color: var(--ink); }
.btn--link:hover { color: var(--blue); }

/* ---------- status label (was a pill + pulse) ---------- */
.badge {
  display: inline-flex; align-items: baseline; gap: .65rem;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ink);
  margin: 0 0 1.5rem;
}
.badge::before { content: "001"; color: var(--blue); font-weight: 600; }

/* ---------- hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 4.5rem var(--pad) 6rem; }
.hero__title {
  font-family: var(--grotesk); font-weight: 800;
  font-size: clamp(2.6rem, 5.4vw, 5.2rem); line-height: .92; letter-spacing: -.035em;
  margin: 0 0 1.7rem; max-width: 13ch;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; }
.hero__sub { color: var(--ink-2); font-size: 1.28rem; line-height: 1.4; max-width: 36ch; margin: 0 0 2.2rem; }
.hero__sub em { font-style: normal; font-weight: 700; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-bottom: 2rem; }
.hero__note { color: var(--ink-3); font-family: var(--mono); font-size: .8rem; letter-spacing: .01em; margin: 0; }
.hero__panel-cap { color: var(--ink-3); font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; margin: 1rem 0 0; }
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
  .hero__sub { max-width: none; }
}

/* ---------- code blocks (flat, sharp, 1px black) ---------- */
.code {
  margin: 0; background: var(--field);
  border: 1px solid var(--ink); overflow: hidden;
  min-width: 0; max-width: 100%;
}
.hero__copy, .hero__panel, .record__copy, .record__grid > .code { min-width: 0; }
.code__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem; background: var(--ink); color: #fff;
}
.code__title { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; }
.code__copy {
  margin-left: auto; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: #fff; background: transparent; border: 1px solid #555; padding: .25rem .6rem; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.code__copy:hover { background: var(--blue-pure); border-color: var(--blue-pure); }
.code__copy.is-copied { background: #fff; color: var(--ink); border-color: #fff; }
.code__copy:focus-visible { outline: 2px solid var(--blue-pure); outline-offset: 2px; }
.code pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: .82rem; line-height: 1.7; color: var(--ink); }
.t-cm { color: var(--ink-3); }
.t-st { color: var(--blue); }
.t-ky { color: var(--ink); font-weight: 600; }
.t-va { color: var(--blue-ink); }
.code__note { padding: .75rem 1.2rem 1rem; color: var(--ink-3); font-family: var(--mono); font-size: .74rem; line-height: 1.5; border-top: 1px solid var(--line); }
.code__note code { font-family: var(--mono); color: var(--blue); }

.inline {
  font-family: var(--mono); font-size: .8rem;
  background: var(--field); border: 1px solid var(--line);
  padding: .1rem .42rem; color: var(--blue-ink);
  display: inline-block; margin-top: .25rem;
}

/* ---------- steps: numbers as the design ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 4rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start; padding: 2rem 0; border-top: 1px solid var(--line); }
.step__n { font-family: var(--grotesk); font-weight: 800; font-size: 2.4rem; line-height: .8; letter-spacing: -.04em; color: var(--ink); -webkit-text-stroke: 0; }
.step:nth-child(odd) .step__n { color: var(--blue); }
.step__body p { color: var(--ink-2); margin: 0 0 .7rem; font-size: .96rem; }
.step__body .inline { margin-right: .35rem; }
@media (max-width: 720px){ .steps { grid-template-columns: 1fr; column-gap: 0; } }

/* ---------- the record ---------- */
.record__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.chips { list-style: none; margin: 2.2rem 0 0; padding: 0; }
.chip { display: flex; align-items: baseline; gap: 1rem; font-weight: 700; color: var(--ink); padding: 1rem 0; border-top: 1px solid var(--ink); }
.chip:last-child { border-bottom: 1px solid var(--ink); }
.chip__k { font-family: var(--mono); color: var(--blue); font-weight: 600; font-size: .8rem; flex: none; width: 1.6rem; }
.chip__d { font-weight: 400; color: var(--ink-3); font-family: var(--mono); font-size: .74rem; margin-left: auto; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 880px){ .record__grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- audience: two ruled columns ---------- */
.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.aud { padding-top: 1.6rem; border-top: 3px solid var(--ink); }
.aud__title { color: var(--ink); }
.aud p { color: var(--ink-2); font-size: 1rem; }
.aud__list { margin: 1.4rem 0 0; padding: 0; list-style: none; }
.aud__list li { position: relative; padding-left: 1.6rem; margin-bottom: .7rem; color: var(--ink); font-size: .94rem; }
.aud__list li::before { content: "—"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
@media (max-width: 720px){ .audience { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- access: full blue block ---------- */
.section--cta { border-top: 1px solid var(--ink); }
.cta {
  background: var(--blue-pure); color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  display: grid; gap: 0;
}
.cta .eyebrow { color: #fff; margin-bottom: 1.8rem; }
.cta .eyebrow__n { color: #fff; }
.cta h2 { color: #fff; max-width: 16ch; }
.cta .lede { color: rgba(255,255,255,.85); max-width: 50ch; }
.cta__actions { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: 2.4rem 0 1.6rem; }
.cta .btn--primary { background: #fff; border-color: #fff; color: var(--blue-ink); }
.cta .btn--primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cta .btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.cta .btn--ghost:hover { background: #fff; color: var(--blue-ink); }
.cta__fine { color: rgba(255,255,255,.75); font-family: var(--mono); font-size: .78rem; line-height: 1.6; max-width: 64ch; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--ink); max-width: var(--maxw); margin: 0 auto; padding: 3rem var(--pad) 4rem; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__brand { font-family: var(--grotesk); color: var(--ink); font-weight: 800; letter-spacing: -.03em; font-size: 1.1rem; }
.footer__links { display: flex; gap: 1.8rem; }
.footer__links a { color: var(--ink); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.footer__links a:hover { color: var(--blue); }
.footer__fine { color: var(--ink-3); font-family: var(--mono); font-size: .74rem; line-height: 1.6; margin: 1.6rem 0 0; max-width: 80ch; }

/* ---------- reveal-on-scroll (a crisp settle) ----------
   Only hides with JS present; no-JS + crawlers + screenshots see all. */
html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
html.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero API demo terminal ----------
   A live walkthrough of the real request lifecycle. The full transcript is in
   the DOM (no-JS, crawlers, screenshots, screen readers see the finished run);
   main.js replays it line-by-line only when JS is on and motion is allowed. */
.term { margin: 0; background: #0a0a0a; border: 1px solid var(--ink); overflow: hidden; }
.term__bar { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-bottom: 1px solid #222; }
.term__title { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; }
.term__status { margin-left: auto; font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; padding: .18rem .5rem; border: 1px solid #333; color: #9a9a9a; }
.term__status.is-pending { color: #9a9a9a; border-color: #333; }
.term__status.is-running { color: #fff; border-color: var(--blue-pure); background: rgba(31,59,255,.18); }
.term__status.is-running::after { content: "…"; }   /* terminal-idiomatic, not a glow */
.term__status.is-decided { color: #46c46a; border-color: #2f6f3f; }
.term__status.is-escalated { color: #ffb24d; border-color: #7a5320; }

/* scenario tabs */
.term__tabs { display: flex; gap: 0; border-bottom: 1px solid #222; }
.term__tab { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #7a7a7a; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: .6rem .95rem; cursor: pointer; }
.term__tab:hover { color: #fff; }
.term__tab.is-active { color: #fff; border-bottom-color: var(--blue-pure); }
.term__tab:focus-visible { outline: 2px solid var(--blue-pure); outline-offset: -2px; }

.term__body { padding: 1rem 1.1rem; font-family: var(--mono); font-size: .78rem; line-height: 1.75; color: #e6e6e6; min-height: 22.5rem; }
.term__body:focus-visible { outline: 2px solid var(--blue-pure); outline-offset: -2px; }
.term__line { margin: 0; white-space: pre-wrap; word-break: break-word; }
.term__cmd { color: #fff; font-weight: 600; }
.term__vote b { color: #e6e6e6; font-weight: 700; }
.term .t-ok   { color: #46c46a; }
.term .t-flag { color: #ff8a5c; }
.term .t-warn { color: #ffb24d; }
.term .t-key  { color: #7e9bff; font-weight: 700; }
.term .t-mut  { color: #777; }
.term .t-cm   { color: #8a8a8a; }
.term .t-slack { color: #c39bff; font-weight: 700; }

/* slack approval block */
.term__slack { color: #cfcfcf; }
.term__msg { color: #cfcfcf; }
.term__btn { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 600; padding: .04rem .55rem; border: 1px solid #444; color: #cfcfcf; margin-left: .3rem; }
.term__btn--ok.is-clicked { background: #1f7a3d; border-color: #1f7a3d; color: #fff; }

/* animation states — applied only on the active panel when main.js adds .is-anim */
.term__body.is-anim .term__line { opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.term__body.is-anim .term__line.is-in { opacity: 1; transform: none; }
.term__body.is-anim .term__line.is-active::after { content: "▌"; color: var(--blue-pure); margin-left: 1px; animation: term-blink 1s step-end infinite; }
@keyframes term-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .term__body.is-anim .term__line { opacity: 1; transform: none; }
  .term__body.is-anim .term__line.is-active::after { animation: none; content: ""; }
}
