/*
 * BitFeed site styling.
 *
 * Deliberately the same design system as BitLogin: identical type scale,
 * spacing, radii, card and nav structure, and the same brass ring running
 * through the marks. These are layers of one stack, and they should read that
 * way at a glance.
 *
 * The one thing that changes per project is the seal colour — BitLogin's
 * violet, BitFeed's teal. Brass stays shared, because it is the family
 * resemblance rather than the identifier.
 */
:root {
  --ink: #0d0b12;
  --ink-soft: #17141f;
  --ink-softer: #201c2b;
  --paper: #f3ead9;
  --paper-dim: #e8dcc2;
  --seal: #2bd4c4;
  --seal-deep: #12a594;
  --brass: #d1a85a;
  --brass-soft: #9c824f;
  --fg: #f4f1ea;
  --muted: #a49cb0;
  --line: rgba(244, 241, 234, 0.11);
  --line-strong: rgba(244, 241, 234, 0.2);
  --code-bg: #100e17;
  --pos: #56d364;
  --neg: #ff8a7a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --ink: #f7f2e7;
    --ink-soft: #ffffff;
    --ink-softer: #efe8d8;
    --paper: #ffffff;
    --paper-dim: #efe8d8;
    --seal: #0d9488;
    --seal-deep: #0f766e;
    --brass: #9c7a2e;
    --brass-soft: #b3924a;
    --fg: #211c2c;
    --muted: #675f75;
    --line: rgba(33, 28, 44, 0.12);
    --line-strong: rgba(33, 28, 44, 0.22);
    --code-bg: #211c2c;
    --pos: #1a7f37;
    --neg: #cf222e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 620px at 82% -10%, color-mix(in srgb, var(--seal) 16%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 15%, color-mix(in srgb, var(--brass) 10%, transparent), transparent 55%),
    var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--seal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
}
.nav .brand { display: flex; align-items: center; color: var(--fg); }
/* Mark and wordmark are one SVG with their relative size baked in, so callers
   only ever set a single height and the lockup looks identical everywhere. */
.nav .brand .lockup { height: 27px; width: auto; display: block; }
.nav .links { display: flex; gap: 26px; font-size: 14px; }
.nav .links a { color: var(--muted); }
.nav .links a.active, .nav .links a:hover { color: var(--fg); text-decoration: none; }
.nav .links a.active { position: relative; }
.nav .links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--brass);
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.wide { max-width: 1500px; }

/* ---------- hero ---------- */
.hero { padding: 56px 24px 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 56px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0 0 22px;
  color: var(--fg);
}
.hero h1 em { font-style: italic; color: var(--seal); }
.hero p.lead {
  color: var(--muted);
  font-size: 17.5px;
  max-width: 480px;
  margin: 0 0 30px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid var(--line-strong);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}
.btn.primary {
  background: linear-gradient(160deg, var(--seal), var(--seal-deep));
  color: #04211e;
  border: none;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--seal) 35%, transparent);
}
.btn.primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn.secondary { color: var(--fg); background: transparent; }
.btn.secondary:hover { background: var(--ink-soft); text-decoration: none; transform: translateY(-1px); }

/* ---------- signature visual: lanes composing into one ordered feed ---------- */
.compose-scene { position: relative; display: grid; gap: 14px; justify-items: stretch; }
.lane-rail {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 4px;
}
.lane-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 11px;
}
.lane-row .lane-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--seal) 70%, transparent);
}
.lane-row .lane-label { font-size: 13.5px; color: var(--fg); font-weight: 550; flex: 1; }
.lane-row .lane-bar {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--seal), var(--seal-deep));
  width: var(--share, 40%);
  min-width: 18px;
  opacity: 0.85;
}
.lane-row .lane-pct {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  width: 34px;
  text-align: right;
  flex-shrink: 0;
}

.feed-card {
  position: relative;
  background: linear-gradient(155deg, var(--paper), var(--paper-dim));
  color: #241d12;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
}
.feed-card .fc-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b5a34;
  font-weight: 700;
  margin-bottom: 10px;
}
.feed-card .fc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid rgba(107, 90, 52, 0.18);
  animation: settle-in 0.5s ease-out both;
  animation-delay: calc(var(--row-order, 0) * 0.14s + 0.35s);
}
.feed-card .fc-row:first-of-type { border-top: 0; }
.feed-card .fc-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #6b5a34;
  width: 16px;
  flex-shrink: 0;
}
.feed-card .fc-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 600; flex: 1; }
.feed-card .fc-tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b5a34;
  border: 1px solid rgba(107, 90, 52, 0.35);
  border-radius: 999px;
  padding: 1px 7px;
  flex-shrink: 0;
}
@keyframes settle-in {
  0% { opacity: 0; transform: translateY(7px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .feed-card .fc-row { animation: none; }
}
.compose-scene .scene-caption {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 2px;
}

/* ---------- diagram ---------- */
.diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0;
  font-size: 13.5px;
}
.diagram .step {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 130px;
  text-align: center;
}
.diagram .step .k {
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.diagram .arrow { color: var(--brass); font-size: 18px; }

/* ---------- feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 40px 0;
}
.feature {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature h3 { margin: 0 0 8px; font-size: 15.5px; font-family: var(--font-display); font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- stack layers ---------- */
.stack {
  display: grid;
  gap: 8px;
  margin: 36px 0 8px;
}
.stack-layer {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 18px;
}
@media (max-width: 700px) {
  .stack-layer { grid-template-columns: 1fr; gap: 4px; }
}
.stack-layer .layer-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.stack-layer .layer-q { color: var(--muted); font-size: 13.5px; }
.stack-layer.is-self {
  background: linear-gradient(165deg, color-mix(in srgb, var(--seal) 16%, var(--ink-soft)), var(--ink-soft));
  border-color: color-mix(in srgb, var(--brass) 55%, var(--line));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--seal) 16%, transparent);
}
.stack-layer.is-self .layer-name { color: var(--fg); }
.stack-layer.is-self .layer-q { color: var(--fg); opacity: 0.85; }

section { padding: 20px 0 40px; }
h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
h3 { font-family: var(--font-display); }
p.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

pre {
  background: var(--code-bg);
  color: #e6f5f2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
code { font-family: var(--font-mono); }
:not(pre) > code {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.92em;
}

.callout {
  border: 1px solid var(--line);
  background: var(--ink-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--muted);
  margin: 18px 0;
}
.callout strong { color: var(--fg); }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer .footer-links { margin-top: 8px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
