/* blog.clivo.io — reading-first. Same palette and type as clivo.io, but the
 * layout is built around a comfortable measure rather than around the artwork.
 */

:root {
  --ink: #0F172A;
  --body: #334155;
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E2E8F0;
  --navy: #052659;
  --amber: #D97706;
  --gold: #FBBF24;
  --bg: #F8FAFC;
  --measure: 68ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--body); text-decoration: none; }
a:hover { color: var(--amber); }

/* Scoped to article content on purpose. As a global rule this clobbered the
   logo: the wordmark is a large image positioned inside a small crop window, and
   max-width:100% overrode its inline width, squashing it horizontally. */
.prose img, .card img { max-width: 100%; height: auto; }

/* ------------------------------------------------------------------ page -- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 40px 100px;
}

.eyebrow {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--amber);
}

.lede { display: flex; flex-direction: column; gap: 18px; margin-bottom: 64px; }
.lede h1 {
  margin: 0;
  font-family: Epilogue, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--ink);
  max-width: 16ch;
  text-wrap: pretty;
}
.lede .sub { margin: 0; font-size: 19px; color: var(--muted); max-width: 54ch; }

/* ----------------------------------------------------------------- cards -- */

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 32px 30px; border-radius: 20px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(2, 16, 36, .10);
  box-shadow: 0 18px 50px rgba(2, 16, 36, .10);
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 28px 64px rgba(2, 16, 36, .16); }
.card h2, .card h3 {
  margin: 0;
  font-family: Epilogue, sans-serif; font-weight: 700;
  font-size: 25px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink);
}
.card h3 { font-size: 20px; }
.card p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.card-meta, .card-more {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
.card-more { color: var(--amber); margin-top: 4px; }
.empty { color: var(--faint); }

/* ------------------------------------------------------------------ post -- */

.post { max-width: var(--measure); margin: 0 auto; }
.back {
  display: inline-block; margin-bottom: 34px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.post h1 {
  margin: 14px 0 0;
  font-family: Epilogue, sans-serif; font-weight: 700;
  font-size: clamp(34px, 4.4vw, 58px); line-height: 1.06; letter-spacing: -.03em;
  color: var(--ink); text-wrap: pretty;
}
.post-meta {
  margin: 18px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}

.prose { margin-top: 44px; }
/* element selectors below would out-specify a bare `> * + *`, so zero the
   margins on the children first and let the adjacent-sibling rule do the work */
.prose > * { margin-top: 0; margin-bottom: 0; }
.prose > * + * { margin-top: 1.5em; }
.prose h2 {
  margin-top: 2.2em;
  font-family: Epilogue, sans-serif; font-weight: 700;
  font-size: 30px; line-height: 1.18; letter-spacing: -.02em; color: var(--ink);
}
.prose h3 {
  margin-top: 1.9em;
  font-family: Epilogue, sans-serif; font-weight: 700;
  font-size: 22px; color: var(--ink);
}
.prose a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  margin: 2em 0; padding: 4px 0 4px 26px;
  border-left: 3px solid var(--gold);
  color: var(--ink); font-size: 19px;
}
.prose code {
  font-family: 'IBM Plex Mono', monospace; font-size: .88em;
  background: rgba(2, 16, 36, .06); padding: 2px 6px; border-radius: 5px;
}
.prose pre {
  overflow-x: auto; padding: 20px 22px; border-radius: 14px;
  background: var(--navy); color: #E4F4FF;
}
.prose pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.7; }
.prose img { border-radius: 14px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }

.more { max-width: var(--measure); margin: 84px auto 0; padding-top: 44px; border-top: 1px solid var(--line); }
.more h2 {
  margin: 0 0 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}

/* --------------------------------------------------------------- motion -- */

/* Content is visible by default and only hidden once JS has opted in by adding
   .js-anim. A blocked script, a JS error, or an IntersectionObserver that never
   delivers can therefore never leave the page blank — the reveal is decoration,
   never a gate on content. */
.js-anim [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js-anim [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-group] { transition: none !important; }
}

/* --------------------------------------------------------------- mobile -- */

@media (max-width: 900px) {
  body { font-size: 16.5px; }
  /* the header and footer are the site's markup, so they need the site's rules */
  [data-m="header"] { padding: 14px 18px !important; gap: 12px !important; }
  [data-m="nav"] { display: none !important; }
  [data-m="login"] { display: none !important; }
  [data-m="cta"] { display: none !important; }
  [data-m="burger"] { display: flex !important; }
  [data-m="logo"] { width: 107px !important; height: 47px !important; }
  [data-m="logo"] img { left: -18px !important; top: -49px !important; width: 145px !important; height: 145px !important; }
  [data-m="sec"] { padding: 60px 22px !important; }
  [data-m="footcols"] { gap: 30px !important; }
  .wrap { padding: 36px 22px 70px; }
  .lede { margin-bottom: 40px; gap: 14px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 26px 24px; }
  .post h1 { font-size: clamp(30px, 8.5vw, 40px); }
  .prose h2 { font-size: 25px; }
}
