/* blergai.com — marketing page styles.
   Palette, status chips, and the type-voice tokens come from brand/tokens.css
   (kept byte-identical to blerg/brand/tokens.css). Only the two web faces are
   overridden here, in front of the brand's system fallbacks. */

:root {
  --display: "Barlow Condensed", "Avenir Next Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  --measure: 62ch;
  --wrap: 1120px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; }
body {
  background: var(--basalt);
  color: var(--fog);
  font-family: var(--body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a { color: var(--blaze); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--chalk); }
:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; border-radius: 2px; }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--chalk);
  background: var(--scree-2);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}
h1, h2, h3 {
  font-family: var(--display);
  color: var(--chalk);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 6.4vw, 78px); font-weight: 700; }
h2 { font-size: clamp(32px, 4.6vw, 52px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--blaze); color: var(--basalt);
  padding: 8px 12px; font-family: var(--display); text-decoration: none; z-index: 10;
}
.skip:focus { top: 8px; }

/* ── wordmark ─────────────────────────────────────────────────────────── */
.wordmark {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--mono); font-weight: 500; font-size: 26px;
  color: var(--chalk); text-decoration: none; letter-spacing: 0.01em; line-height: 1;
}
.wordmark:hover { color: var(--chalk); }
.wordmark .cursor {
  display: inline-block; width: 0.42em; height: 0.66em;
  background: var(--blaze); transform: translateY(0.04em);
}
.wordmark.small { font-size: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .wordmark .cursor { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

/* ── top bar ──────────────────────────────────────────────────────────── */
.top { border-bottom: 1px solid var(--stone); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.top-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.top-nav a {
  font-family: var(--display); font-size: 17px; font-weight: 500;
  color: var(--fog); text-decoration: none; letter-spacing: 0.01em;
}
.top-nav a:hover { color: var(--chalk); }
.top-nav .gh { display: inline-flex; align-items: center; gap: 7px; color: var(--chalk); }
@media (max-width: 560px) { .top-nav a:not(.gh) { display: none; } }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--stone); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.hero-copy { max-width: 40rem; }
.lede { font-size: clamp(16px, 1.6vw, 19px); max-width: var(--measure); margin-top: 22px; color: var(--fog); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fineprint { margin-top: 16px; font-size: var(--text-sm); color: var(--fog-dim); }

.btn {
  display: inline-flex; align-items: center;
  font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: 0.01em;
  padding: 11px 18px; border: 1px solid var(--stone); border-radius: 4px;
  color: var(--chalk); text-decoration: none; background: var(--scree);
}
.btn:hover { border-color: var(--fog-dim); color: var(--chalk); }
.btn.primary { background: var(--blaze); border-color: var(--blaze); color: #0d1117; }
.btn.primary:hover { filter: brightness(1.08); color: #0d1117; }

/* the session list — the page's one moving part */
.sessions {
  margin: 0; border: 1px solid var(--stone); border-radius: 6px;
  background: var(--scree); overflow: hidden; align-self: start;
}
.sessions-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--stone); background: var(--scree-2);
}
.sessions-title { font-family: var(--mono); font-size: var(--text-sm); color: var(--chalk); font-weight: 500; }
.sessions-count { font-family: var(--mono); font-size: var(--text-xs); color: var(--fog-dim); }
.session-rows { list-style: none; margin: 0; padding: 6px 0; font-family: var(--mono); font-size: 13px; }
.row {
  display: grid; grid-template-columns: 14px 1fr auto; grid-template-areas: "st name state" ". meta state";
  column-gap: 12px; row-gap: 2px; align-items: center;
  padding: 10px 14px; border-left: 3px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.row + .row { border-top: 1px solid var(--scree-2); }
.row .st { grid-area: st; width: 8px; height: 8px; border-radius: 50%; background: var(--fog-dim); justify-self: center; }
.row[data-status="running"] .st { background: var(--lichen); }
.row[data-status="waiting"] .st { background: var(--amber); }
.row[data-status="idle"] .st { background: var(--fog-dim); }
.row .name { grid-area: name; color: var(--chalk); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { grid-area: meta; color: var(--fog-dim); font-size: var(--text-xs); white-space: nowrap; }
.row .meta .where::before { content: "on "; }
.row .state { grid-area: state; color: var(--fog); font-size: var(--text-xs); text-align: right; white-space: nowrap; }
.row .state small { display: block; font-size: 11px; color: var(--fog-dim); }
.row[data-status="waiting"] { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, var(--scree)); }
.row[data-status="waiting"] .state { color: var(--amber); }
.row.unread .name::after {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blaze); margin-left: 8px; vertical-align: middle;
}
@media (prefers-reduced-motion: no-preference) {
  .row[data-status="running"] .st { animation: pulse 1.8s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: 0.35; } }
.sessions-foot { padding: 10px 14px; border-top: 1px solid var(--stone); font-size: var(--text-xs); color: var(--fog-dim); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sessions { max-width: 640px; }
}

/* ── sections ─────────────────────────────────────────────────────────── */
section { padding-block: clamp(56px, 8vw, 104px); }
section + section { border-top: 1px solid var(--stone); }
.section-lede { margin-top: 16px; max-width: var(--measure); font-size: clamp(16px, 1.4vw, 18px); }

/* three parts: a ruled row, not three floating cards */
.parts-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 44px; border-top: 1px solid var(--stone);
}
.part { padding: 28px clamp(0px, 2vw, 28px) 8px 0; }
.part + .part { border-left: 1px solid var(--stone); padding-left: clamp(18px, 2.5vw, 32px); }
.part h3 { padding-top: 4px; }
.part h3::before {
  content: ""; display: block; width: 28px; height: 4px; background: var(--blaze); margin-bottom: 14px;
}
.part-tag { font-family: var(--display); font-size: 19px; color: var(--chalk); margin: 6px 0 14px; font-weight: 500; }
.part p + p, .part ul { margin-top: 14px; }
.part ul { padding-left: 1.1em; color: var(--fog); }
.part li + li { margin-top: 6px; }
@media (max-width: 860px) {
  .parts-grid { grid-template-columns: 1fr; }
  .part + .part { border-left: 0; border-top: 1px solid var(--stone); padding-left: 0; }
}

/* rungs: a real sequence, so it earns its numbers */
.rungs { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.rung { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.rung-n {
  font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1;
  color: var(--blaze); padding-top: 2px; min-width: 1.2ch;
}
.rung h3 { font-size: 24px; }
.rung p { margin-top: 8px; }
@media (max-width: 860px) { .rungs { grid-template-columns: 1fr; } }

/* why */
.why-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 72px); }
.why-intro p { margin-top: 16px; max-width: 36ch; }
.why-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); }
.why-list dt { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--chalk); line-height: 1.1; }
.why-list dd { margin: 8px 0 0; }
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .why-list { grid-template-columns: 1fr; } }

/* install */
.code {
  margin: 28px 0 0; padding: 20px 22px; overflow-x: auto;
  background: var(--scree); border: 1px solid var(--stone); border-radius: 6px;
  font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--chalk);
  max-width: 720px;
}
.code .c { color: var(--fog-dim); }
.install-note { margin-top: 20px; max-width: var(--measure); }
.install .cta-row { margin-top: 24px; }

/* footer */
.foot { border-top: 1px solid var(--stone); padding-block: 28px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.foot-text { color: var(--fog-dim); font-size: var(--text-sm); flex: 1; }
.tt {
  font-family: var(--display); font-size: 15px; color: var(--fog);
  background: transparent; border: 1px solid var(--stone); border-radius: 4px; padding: 6px 12px; cursor: pointer;
}
.tt:hover { color: var(--chalk); border-color: var(--fog-dim); }
