/* Shared styles for Cadence blog posts + listing. Extends the legal.css tokens. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #0A0A0B;
  --bg-elevated: #131316;
  --bg-card: #1A1A1F;
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-tertiary: #71717A;
  --accent: #00E5A0;
  --accent-glow: rgba(0, 229, 160, 0.18);
  --accent-glow-strong: rgba(0, 229, 160, 0.32);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; background: var(--bg-base); }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.75;
}
::selection { background: var(--accent); color: #002B1C; }

/* Subtle grain overlay matching index.html */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Sticky nav */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 0;
  background: rgba(10, 10, 11, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.page-nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wordmark::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}
.nav-back {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 200ms;
}
.nav-back:hover { color: var(--accent); }

/* Content shell */
article, main {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 120px;
  position: relative;
  z-index: 2;
}

.post-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: 100px;
  background: rgba(0, 229, 160, 0.06);
}

.post-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(44px, 6.2vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--text-primary);
  margin: 28px 0 18px;
}
.post-title em {
  font-style: italic;
  background: linear-gradient(180deg, #FFFFFF, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.post-meta {
  font-size: 14px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 56px;
}
.post-meta::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: var(--border);
}

article p {
  font-size: 18px;
  margin-bottom: 22px;
  color: #D4D4D8;
}

article p:first-of-type::first-line {
  font-weight: 500;
  color: var(--text-primary);
}

article h2 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 60px;
  margin-bottom: 18px;
}

article h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 10px;
}

article strong, article b { color: var(--text-primary); font-weight: 600; }
article em, article i { color: var(--text-primary); }

article a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 160, 0.3);
  transition: border-color 200ms;
}
article a:hover { border-bottom-color: var(--accent); }

article ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
article ul li {
  font-size: 18px;
  padding: 6px 0 6px 28px;
  position: relative;
  color: #D4D4D8;
}
article ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

article blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: 19px;
  font-style: italic;
  color: var(--text-primary);
}

article hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 56px 0;
}

/* Post CTA pill */
.post-cta {
  margin-top: 72px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.12), rgba(0, 229, 160, 0.02));
  border: 1px solid rgba(0, 229, 160, 0.28);
  border-radius: 20px;
  text-align: center;
}
.post-cta h3 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.post-cta p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.post-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 100px;
  background: var(--accent);
  color: #002B1C;
  font-weight: 700;
  font-size: 16px;
  border: none;
  text-decoration: none;
  box-shadow: 0 0 0 0 var(--accent-glow), 0 8px 32px -8px var(--accent-glow);
  transition: all 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.post-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 6px var(--accent-glow), 0 16px 40px -10px var(--accent-glow-strong);
}

/* Blog listing (index) */
.blog-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 100px 32px 40px;
  position: relative;
  z-index: 2;
}
.blog-hero h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-primary);
  margin: 20px 0 18px;
}
.blog-hero p {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 560px;
}

.blog-list {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 32px 140px;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
}
.blog-list article {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: none;
  margin: 0;
  transition: all 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-list article:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 160, 0.28);
}
.blog-list a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-list h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 10px 0 8px;
}
.blog-list .excerpt {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}
.blog-list .post-date {
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-base);
  margin-top: 80px;
}
.footer-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 200ms;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-copy { font-size: 13px; color: var(--text-tertiary); }

@media (max-width: 640px) {
  article, main { padding: 60px 24px 100px; }
  .page-nav-inner { padding: 0 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
}
