/* ============================================================
   confluence.css — ronrivers.com design system (2026 redesign)
   Used by the homepage and all build.mjs-generated pages.
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #F7F4EC;
  --ink: #131210;
  --dim: #6b675e;
  --faint: #a5a196;
  --spirit: #8B5CF6;
  --system: #2563EB;
  --intel: #0D9488;
  --community: #D97706;
  --craft: #B91C1C;
  --card-bg: rgba(255,255,255,0.62);
  --card-border: rgba(19,18,16,0.09);
  --rule: rgba(19,18,16,0.14);
  --shadow: rgba(19,18,16,0.35);
  --nav-fade: rgba(247,244,236,0.92);
  --btn-hover: #2b2925;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Space Grotesk", "Inter", sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#flow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }

/* ---------- top nav ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.1rem 3.5vw;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--nav-fade) 60%, transparent);
  pointer-events: none;
}
.topnav > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--ink); text-decoration: none; flex: none; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
.brand b { font-weight: 500; }
.navlinks { display: flex; flex-wrap: wrap; gap: 0.45rem 1.8rem; }
.navlinks a { color: var(--dim); text-decoration: none; transition: color 0.2s; white-space: nowrap; }
.navlinks a:hover, .navlinks a.on { color: var(--ink); }
.navlinks .num { opacity: 0.55; margin-right: 0.4ch; }
@media (max-width: 720px) {
  .brand b { display: none; }
  .topnav { padding: 0.85rem 4vw; }
  .navlinks { gap: 0.4rem 1.1rem; }
  .navlinks .num { display: none; }
}

/* ---------- hero (homepage) ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14vh 7vw 8vh;
}
.kicker {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 2.2rem;
}
.hero h1 {
  font-size: clamp(2.55rem, 10vw, 8.6rem);
  font-weight: 220; line-height: 1.0; letter-spacing: -0.028em; max-width: 14ch;
}
.hero h1 em { font-style: italic; font-weight: 240; }
.hero .sub {
  margin-top: 2.4rem; max-width: 37rem;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 300; color: var(--dim);
}
.hero .sub strong { color: var(--ink); font-weight: 500; }
.hero .sub em { color: var(--ink); }
.cta-row { margin-top: 2.6rem; }
.btn {
  display: inline-block; font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper); background: var(--ink);
  padding: 1.05rem 2.2rem; border-radius: 999px; text-decoration: none;
  transition: transform 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-2px); background: var(--btn-hover); }
.legend {
  margin-top: 3.4rem; display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem;
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.legend span { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--dim); }
.legend i { width: 22px; height: 3px; border-radius: 2px; display: inline-block; }

/* ---------- archive hero (press / blog / posts) ---------- */
.arch-hero {
  padding: 22vh 7vw 6vh;
  max-width: 1050px; margin: 0 auto;
}
.arch-hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  font-weight: 220; line-height: 1.0; letter-spacing: -0.025em;
}
.arch-hero h1 em { font-style: italic; font-weight: 240; }
.arch-hero .lede {
  margin-top: 1.6rem; max-width: 36rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 300; color: var(--dim);
}
.counters {
  margin-top: 1.8rem; font-family: var(--sans); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem;
}
.counters a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.counters a:hover { color: var(--ink); border-color: var(--ink); }
.counters b { color: var(--ink); font-weight: 500; }

/* ---------- pools & markers ---------- */
section.pool { padding: 13vh 7vw; position: relative; scroll-margin-top: 4rem; }
section.pool.tight { padding: 6vh 7vw; }
.pool-inner { max-width: 1050px; margin: 0 auto; }
.marker {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 1.2rem;
}
.marker b { color: var(--ink); font-weight: 500; }
h2.pool-title {
  font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 250; letter-spacing: -0.02em;
  line-height: 1.05; max-width: 24ch; margin-bottom: 3rem;
}
h2.pool-title em { font-style: italic; }

/* sub-groups inside a pool (homepage press breadth) */
.sub-marker {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--faint);
  margin: 3.2rem 0 0.4rem;
}
.sub-marker:first-of-type { margin-top: 0; }
.sub-marker b { color: var(--ink); font-weight: 500; }
.sub-marker a { color: var(--dim); text-decoration: none; letter-spacing: 0.14em; }
.sub-marker a:hover { color: var(--ink); }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.float-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border); border-radius: 4px;
  padding: 1.7rem 1.6rem 1.5rem; position: relative;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
}
.float-card:hover { transform: translateY(-5px); box-shadow: 0 24px 60px -28px var(--shadow); }
.float-card::before {
  content: ""; position: absolute; top: 0; left: 1.6rem; right: 1.6rem; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--stream, var(--ink));
}
.float-card .tag {
  font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
  display: flex; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.9rem;
}
.float-card h3 { font-size: 1.5rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 0.6rem; }
.float-card p { font-size: 0.95rem; font-weight: 300; color: var(--dim); }
.float-card a.go {
  display: inline-block; margin-top: 1.1rem; font-family: var(--sans); font-size: 0.74rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--faint);
  padding-bottom: 2px; transition: color 0.2s, border-color 0.2s;
}
.float-card a.go:hover { color: var(--stream, var(--ink)); border-color: var(--stream, var(--ink)); }

/* ---------- press rows ---------- */
.row-list { border-top: 1px solid var(--rule); }
.press-row {
  display: grid; grid-template-columns: 7rem 1fr auto; gap: 1.6rem; align-items: baseline;
  padding: 1.25rem 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--ink);
  transition: padding-left 0.3s cubic-bezier(.2,.8,.2,1);
}
a.press-row:hover { padding-left: 0.9rem; }
a.press-row:hover .pr-title { font-style: italic; }
.pr-date { font-family: var(--sans); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.1em; }
.pr-title { font-size: clamp(1.05rem, 2vw, 1.5rem); font-weight: 330; letter-spacing: -0.01em; }
.pr-venue { font-family: var(--sans); font-size: 0.66rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.16em; text-align: right; }
@media (max-width: 640px) {
  .press-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .pr-venue { display: none; }
}
.see-all {
  display: inline-block; margin-top: 2rem;
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--faint); padding-bottom: 2px;
}
.see-all:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- connect ---------- */
.connect { text-align: center; padding: 18vh 7vw 14vh; scroll-margin-top: 4rem; }
.connect .portrait {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 2rem;
  box-shadow: 0 18px 44px -18px var(--shadow);
}
.connect h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 220; letter-spacing: -0.025em; }
.connect h2 em { font-style: italic; }
.connect p { color: var(--dim); font-weight: 300; margin: 1.4rem auto 2.6rem; max-width: 30rem; }

/* ---------- footer ---------- */
footer.site {
  padding: 3rem 7vw 4rem; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
footer.site a { color: var(--dim); text-decoration: none; margin-right: 1.4rem; }
footer.site a:hover { color: var(--ink); }

/* ---------- blog post ---------- */
.post-wrap { max-width: 46rem; margin: 0 auto; padding: 20vh 7vw 8vh; }
.post-wrap .post-meta {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 1.4rem;
}
.post-wrap h1.post-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 250;
  line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 1.2rem;
}
.post-wrap .post-lede { font-size: 1.12rem; font-weight: 300; font-style: italic; color: var(--dim); margin-bottom: 2.6rem; }
.post-rule { border: 0; border-top: 1px solid var(--rule); margin: 0 0 2.6rem; }

.prose { font-size: 1.08rem; font-weight: 350; line-height: 1.72; color: var(--ink); }
.prose p { margin: 0 0 1.4rem 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--serif); font-weight: 400; margin: 2.4rem 0 0.9rem; line-height: 1.2; letter-spacing: -0.01em;
}
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.35rem; }
.prose h4 { font-size: 1.1rem; }
.prose a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--dim); transition: color 0.2s, border-color 0.2s; }
.prose a:hover { color: var(--system); border-color: var(--system); }
.prose img { max-width: 100%; height: auto; margin: 1.8rem 0; border-radius: 3px; border: 1px solid var(--card-border); }
.prose blockquote {
  margin: 1.8rem 0; padding-left: 1.3rem;
  border-left: 2px solid var(--system);
  color: var(--dim); font-style: italic;
}
.prose ul, .prose ol { margin: 0 0 1.4rem 0; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose iframe { max-width: 100%; margin: 1.8rem 0; border: 1px solid var(--card-border); border-radius: 3px; }
.prose pre, .prose code { font-family: Consolas, monospace; font-size: 0.88em; background: var(--card-bg); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre { padding: 1rem; overflow-x: auto; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2rem 0; }

.back-link {
  display: inline-block; margin-top: 2.4rem;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--faint); padding-bottom: 2px;
}
.back-link:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- 404 ---------- */
.lost { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 16vh 7vw 8vh; }
.lost img.wizard { max-width: 280px; width: 60vw; height: auto; border-radius: 4px; margin-bottom: 2rem; }
.lost h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 220; letter-spacing: -0.025em; }
.lost h1 em { font-style: italic; }
.lost p { color: var(--dim); font-weight: 300; margin-top: 1rem; }
.lost a { color: var(--ink); border-bottom: 1px solid var(--dim); text-decoration: none; }
.lost a:hover { color: var(--system); border-color: var(--system); }

@media (prefers-reduced-motion: reduce) { #flow { display: none; } html { scroll-behavior: auto; } }
