/* ============================================================
   Qombra blog — the one stylesheet for every static blog page
   (/blog/, category pages, articles). Copied verbatim to
   build/blog/assets/blog.css by scripts/blog/build.js.

   These pages are plain HTML outside the React bundle, so this
   file MIRRORS the FRONTIER design sources by hand, exactly like
   ConsentBanner.css already does:

     - tokens + chrome (.lshell*, .lbtn*, .grad-gloss)
         ← src/components/LandingShell.css
     - long-form article column (.blog-* ≙ .legal-*)
         ← src/pages/Legal.css
     - consent card (.consent-banner*)
         ← src/components/ConsentBanner.css

   build.js asserts the token values below still appear verbatim
   in LandingShell.css and fails the build otherwise — if the
   brand palette is ever retuned, retune this file too.

   Unlike the scoped .lshell, blog pages own their whole document,
   so tokens live on :root and body carries paper + ink directly.
   ============================================================ */

/* ---------- tokens (mirror of .lshell in LandingShell.css) ---------- */
:root {
  --paper: #ffffff;
  --cream: #f8f7fb;
  --wash: #F5F3FB;
  --ink: #17161d;
  --slate: #3c3a45;
  --steel: #56535f;
  --fog: #83808c;
  --pewter: #9b98a5;
  --hair: #E6E2EF;

  --iris: #8B76E2;
  --iris-deep: #7460D4;
  --orchid: #B77CD6;
  --iris-ink: #52427F;
  --magenta: #C97FC4;
  --accent-soft: rgba(139, 118, 226, 0.08);
  --line-bright: rgba(139, 118, 226, 0.35);

  --gloss: linear-gradient(105deg, #7E68DC 0%, #A87ADB 46%, #C97FC4 100%);
  --gloss-fx: drop-shadow(0 2px 10px rgba(150, 110, 220, 0.22));

  --shadow: 0 1px 2px rgba(58, 40, 100, 0.05), 0 30px 56px -38px rgba(76, 52, 130, 0.42);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  --font: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* anchor jumps land below the sticky header */
[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--steel);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(184, 130, 220, 0.16); color: var(--ink); }
img { max-width: 100%; height: auto; }

.lshell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* ---------- atmosphere (mirror of .lshell-aurora) ---------- */
.lshell-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(124% 40% at 50% -6%, rgba(140, 118, 232, 0.10), transparent 68%),
    radial-gradient(92% 30% at 104% 12%, rgba(184, 130, 220, 0.06), transparent 66%),
    radial-gradient(86% 28% at -6% 44%, rgba(150, 124, 236, 0.05), transparent 66%),
    radial-gradient(98% 34% at 88% 98%, rgba(214, 150, 200, 0.055), transparent 66%);
}
.lshell-aurora::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout primitive ---------- */
.lshell-wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }

/* ---------- gradient display type ----------
   Must stay INLINE (never inline-block): background-clip:text paints across
   the element box, and an inline-block box is only line-height tall, which
   slices descenders. See the note on .legal-h1__accent in Legal.css. */
.grad-gloss {
  color: var(--iris-deep);
  background-image: var(--gloss);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: var(--gloss-fx);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- nav (mirror of .lshell-hdr) ---------- */
.lshell-hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid transparent;
  transition: background 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.lshell-hdr.scrolled {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--hair);
}
.lshell-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.lshell-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.lshell-brand b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.lshell-nav-right { display: flex; align-items: center; gap: 20px; }

/* blog-only: quiet inline nav links beside the Log in pill, matching the
   landing's .nav-links tone */
.blog-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--steel);
  text-decoration: none;
  transition: color 160ms ease;
}
.blog-nav-link:hover { color: var(--ink); }
.blog-nav-link[aria-current] { color: var(--iris-deep); }

/* ---------- buttons (mirror of .lbtn) ---------- */
.lbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border-radius: 9999px;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.lbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--line-bright); }
.lbtn svg { width: 16px; height: 16px; flex: none; }
.lbtn--grad {
  background: transparent;
  color: var(--iris-deep);
  border-color: var(--iris);
  font-weight: 600;
}
.lbtn--grad:hover {
  background: var(--accent-soft);
  border-color: var(--iris-deep);
  color: var(--iris-ink);
}
.lbtn--glass {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--hair);
  font-weight: 600;
}
.lbtn--glass:hover {
  background: var(--cream);
  border-color: var(--pewter);
  color: var(--iris-ink);
}
.lbtn--sm { padding: 6px 12px; font-size: 14px; font-weight: 500; }
.lbtn--lg { padding: 14px 24px; font-size: 15px; }

/* ---------- main ---------- */
.lshell-main { position: relative; flex: 1; width: 100%; }

/* ---------- footer (mirror of .lshell-footer) ---------- */
.lshell-footer {
  position: relative;
  border-top: 1px solid var(--hair);
  margin-top: 96px;
}
.lshell-foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 40px;
}
.lshell-foot-brand p {
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: var(--fog);
  margin: 12px 0 0;
  max-width: 32ch;
}
.lshell-foot-col h4 {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 12px;
}
.lshell-foot-col a {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 20px;
  color: var(--fog);
  padding: 3px 0;
  transition: color 160ms ease;
  text-decoration: none;
}
.lshell-foot-col a:hover { color: var(--iris-deep); }
.lshell-foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 22px;
  border-top: 1px solid var(--hair);
}
.lshell-foot-bottom .meta { font-size: 12px; font-weight: 400; color: var(--pewter); }

@media (max-width: 860px) {
  .lshell-wrap { padding-inline: 22px; }
  .lshell-foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .lshell-foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .lshell-foot-col a { padding: 10px 0; }
}
@media (max-width: 560px) {
  .lshell-foot-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Article column — .blog-* ≙ Legal.css .legal-*, widened with
   the tech-article extras legal text never needed (code, figures,
   tables, FAQ). 720px measure.
   ============================================================ */
/* Article grid: 1fr | 720px | 1fr keeps the text column exactly centered;
   the contents box lives in the left gutter and goes sticky. On narrow
   viewports the gutter collapses and the box is hidden. */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr min(720px, 100%) 1fr;
}
.blog-layout > .blog-main { grid-column: 2; }
.blog-toc-col {
  grid-column: 1;
  justify-self: end;
  padding: clamp(64px, 10vh, 108px) 36px 40px 24px;
}
.blog-toc {
  position: sticky;
  top: 92px;
  width: 216px;
  padding: 16px 18px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}
.blog-toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fog);
  margin-bottom: 10px;
}
.blog-toc a {
  display: block;
  text-decoration: none;
  line-height: 18px;
  transition: color 160ms ease;
}
.blog-toc__l2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
  padding: 5px 0 3px;
}
.blog-toc__l3 {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--fog);
  padding: 3px 0 3px 12px;
}
.blog-toc a:hover { color: var(--iris-deep); }
@media (max-width: 1150px) {
  .blog-toc-col { display: none; }
}

.blog-main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) 28px 40px;
}
@media (max-width: 720px) {
  .blog-main { padding: 48px 22px 32px; }
}

.blog-h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 46px);
  letter-spacing: -0.028em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
}
/* Stays INLINE — see .grad-gloss note above. */
.blog-h1__accent {
  color: var(--iris-deep);
  background-image: var(--gloss);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: var(--gloss-fx);
  font-weight: 400;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* byline row: Geist Mono, the landing's figure/label face */
.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--fog);
}
.blog-meta a { color: inherit; text-decoration: none; }
.blog-meta a:hover { color: var(--iris-deep); }
.blog-meta .sep { color: var(--pewter); }

.blog-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--hair);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--iris-deep);
  background: var(--paper);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}
.blog-chip:hover { border-color: var(--iris); color: var(--iris-ink); }

.blog-section {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--hair);
}
.blog-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

.blog-h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
}
.blog-h3 {
  margin: 32px 0 10px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.blog-h4 {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* FAQ block: rendered by the template after the fragment, without its own
   hairline so it reads as part of the article's final section */
.blog-faq { margin-top: 36px; }

.blog-p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 26px;
  color: var(--steel);
  text-wrap: pretty;
}
.blog-p:last-child { margin-bottom: 0; }
.blog-p strong { color: var(--ink); font-weight: 500; }

.blog-ul, .blog-ol {
  margin: 10px 0 16px;
  padding-left: 20px;
}
.blog-ul { list-style: disc; }
.blog-ul li, .blog-ol li {
  margin: 6px 0;
  font-size: 15.5px;
  line-height: 25px;
  color: var(--steel);
  padding-left: 4px;
}
.blog-ul li::marker { color: var(--orchid); }
.blog-ol li::marker { color: var(--fog); font-family: var(--font-mono); font-size: 13px; }

.blog-link {
  color: var(--iris-deep);
  text-decoration: underline;
  text-decoration-color: rgba(139, 118, 226, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
.blog-link:hover {
  color: var(--iris-ink);
  text-decoration-color: var(--iris-ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--iris-ink);
  background: var(--wash);
  border-radius: 5px;
  padding: 1px 5px;
}
pre {
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid var(--hair);
  border-radius: 12px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; color: var(--slate); font-size: 13px; line-height: 21px; }

/* figures: hairline frame, cream mat, mono caption — the landing's card tone */
.blog-fig {
  margin: 26px 0 30px;
}
.blog-fig__frame {
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}
.blog-fig svg { display: block; width: 100%; height: auto; }
.blog-fig figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 19px;
  letter-spacing: 0.01em;
  color: var(--fog);
}
.blog-fig figcaption strong { color: var(--slate); font-weight: 500; }

/* hero */
.blog-hero {
  margin: 0 0 36px;
}
.blog-hero img {
  display: block;
  width: 100%;
  border: 1px solid var(--hair);
  border-radius: 16px;
}

/* pull-quote / key takeaway */
.blog-note {
  margin: 18px 0 20px;
  padding: 14px 18px;
  border-left: 2px solid var(--iris);
  background: var(--wash);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 25px;
  color: var(--slate);
}

/* article-end CTA band */
.blog-cta {
  margin-top: 44px;
  padding: 26px 28px;
  border: 1px solid var(--hair);
  border-radius: 18px;
  background: var(--cream);
}
.blog-cta h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.blog-cta p { margin: 0 0 16px; font-size: 14.5px; line-height: 23px; color: var(--steel); }
.blog-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   Index + category pages — card list at the article measure's
   wider cousin (kept calm: hairlines, no boxes-in-boxes).
   ============================================================ */
.blog-list-main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 96px) 28px 40px;
}
@media (max-width: 720px) {
  .blog-list-main { padding: 48px 22px 32px; }
}
.blog-list-intro {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 25px;
  color: var(--steel);
  max-width: 60ch;
}
.blog-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 26px 0 8px;
}

.blog-card {
  display: block;
  padding: 26px 0;
  border-top: 1px solid var(--hair);
  text-decoration: none;
}
.blog-card:first-of-type { border-top: 0; }
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fog);
  margin-bottom: 8px;
}
.blog-card__meta .cat { color: var(--iris-deep); }
.blog-card h2, .blog-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  transition: color 160ms ease;
}
.blog-card:hover h2, .blog-card:hover h3 { color: var(--iris-deep); }
.blog-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 23px;
  color: var(--steel);
  max-width: 64ch;
}
.blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--iris-deep);
}
.blog-card__more svg { width: 14px; height: 14px; }

.blog-empty {
  padding: 40px 0;
  border-top: 1px solid var(--hair);
  font-size: 14.5px;
  color: var(--fog);
}

/* "More in <category>" strip after an article */
.blog-more {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
}
.blog-more h2 {
  margin: 0 0 4px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

/* ============================================================
   Consent card — verbatim mirror of ConsentBanner.css
   ============================================================ */
.consent-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: 340px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #E6E2EF;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(58, 40, 100, .05),
              0 30px 56px -38px rgba(76, 52, 130, .42);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}
@media (max-width: 480px) {
  .consent-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
.consent-banner__text {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 19px;
  color: #56535f;
}
.consent-banner__link {
  color: #7460D4;
  text-decoration: underline;
  text-decoration-color: rgba(139, 118, 226, 0.35);
  text-underline-offset: 2px;
}
.consent-banner__link:hover { color: #52427F; }
.consent-banner__actions { display: flex; gap: 8px; }
.consent-banner__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  color: #17161d;
  background: #ffffff;
  border: 1px solid #E6E2EF;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.consent-banner__btn:hover { background: #f8f7fb; border-color: #9b98a5; }
.consent-banner__btn--accept { color: #7460D4; border-color: #8B76E2; }
.consent-banner__btn--accept:hover {
  background: rgba(139, 118, 226, 0.08);
  border-color: #7460D4;
  color: #52427F;
}
