/*
 * Shared styles for the blog articles in src/blog/. These pages are plain HTML
 * (not Framer), so the header, footer and type scale are rebuilt here to match
 * the Framer pages: Funnel Display headings, Inter / Inter Display text,
 * #0077FF pill buttons and #F8F8F8 cards with 16px corners.
 * Fonts come from the mirrored copies in /_cdn/ (same files Framer uses).
 */

@font-face { font-family: "Funnel Display"; src: url("/_cdn/fonts.gstatic.com/s/funneldisplay/v3/B50WF7FGv37QNVWgE0ga--4Pbb6dDYs.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/_cdn/framerusercontent.com/assets/GrgcKwrN6d3Uz8EwcLHZxwEfC4.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/_cdn/framerusercontent.com/assets/UjlFhCnUjxhNfep4oYBPqnEssyo.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/_cdn/framerusercontent.com/assets/yDtI2UI8XcEg1W2je9XPN3Noo.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/_cdn/framerusercontent.com/assets/bHYNJqzTyl2lqvmMiRRS6Y16Es.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/_cdn/framerusercontent.com/assets/iwWTDc49ENF2tCHbqlNARXw6Ug.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/_cdn/framerusercontent.com/assets/PfdOpgzFf7N2Uye9JX7xRKYTgSc.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --ink: #222222;
  --black: #000000;
  --text: #363636;
  --muted: #8e9196;
  --soft: #98a1ab;
  --line: #ebebeb;
  --card: #f8f8f8;
  --blue: #0077ff;
  --blue-text: #3f83f8;
  --blue-soft: #ebf3ff;
  --panel: #141518;
  --panel-fg: #ededed;
  --panel-muted: #8b8f96;
  --panel-line: #2a2c31;
  --good: #1f8a4c;
  --bad: #c2412d;
  --f-display: "Funnel Display", "Funnel Display Placeholder", "Helvetica Neue", Arial, sans-serif;
  --f-text: "Inter Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --w-text: 760px;
  --w-wide: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 17px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px;
}
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--black); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 34px); font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 500; line-height: 1.2; }
strong, b { font-weight: 600; color: var(--ink); }
code, kbd, pre { font-family: var(--f-mono); }
:not(pre) > code { font-size: 0.86em; background: var(--card); border: 1px solid var(--line); color: var(--ink); padding: 1px 6px; border-radius: 6px; }

.wrap { max-width: var(--w-wide); margin: 0 auto; padding-inline: var(--gutter); }
.col { max-width: var(--w-text); margin-inline: auto; }

/* ---------- Header (matches the Framer desktop nav) ---------- */
.sd-header {
  position: sticky; top: 0; z-index: 20;
  height: 80px; background: #fff;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 36px;
}
.sd-header nav { display: flex; gap: 40px; padding-left: 16px; }
.sd-header nav a { font: 400 18px/1.2 var(--f-text); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.sd-header nav a:hover { color: var(--blue); }
.sd-logo { display: block; width: 92px; height: 51px; }
.sd-logo img { display: block; width: 100%; height: 100%; }
.sd-header .btn { justify-self: end; }

/* ---------- Buttons, tags, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 50px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; text-decoration: none; white-space: nowrap;
  font: 500 17px/1 var(--f-ui); letter-spacing: -0.03em;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #0066dd; }
.btn:active { transform: scale(0.98); }
.btn.dark { background: #000; }
.btn.dark:hover { background: #222; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: #f0f0f0; }

.tag {
  display: inline-block; padding: 4px 8px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-text);
  font: 600 13px/1.2 var(--f-text);
}
.eyebrow {
  display: block; font: 700 11px/1.2 var(--f-text); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--blue-text);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips > * {
  font: 500 13px/1.3 var(--f-text); padding: 5px 10px; border-radius: 999px;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.chips > .on { background: var(--blue-soft); color: var(--blue-text); box-shadow: none; }

/* ---------- Article hero (matches the case-study pages) ---------- */
.crumb {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px;
  font: 500 14px/1 var(--f-text); color: var(--muted); text-decoration: none;
}
.crumb:hover { color: var(--blue); }
.post-hero { padding-top: clamp(40px, 7vw, 80px); text-align: center; }
.post-hero .tag { margin-bottom: 18px; }
.post-hero h1 {
  font-size: clamp(34px, 5.2vw, 56px); font-weight: 400; line-height: 1.12;
  letter-spacing: -0.035em; color: var(--ink); max-width: 960px; margin: 0 auto;
}
.post-hero h1 .hl { color: var(--blue); display: inline-block; } /* keep the highlighted phrase together */
.post-hero .lede {
  max-width: 800px; margin: 22px auto 0; font: 400 18px/1.55 var(--f-ui); color: #000;
}
.meta-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 800px; margin: 40px auto 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.meta-row > div { padding: 18px 12px; display: grid; gap: 6px; align-content: start; }
.meta-row > div + div { border-left: 1px solid var(--line); }
.meta-row dt { font: 600 10px/1.2 var(--f-text); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.meta-row dd { margin: 0; font: 500 14px/1.25 var(--f-text); color: #000; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; }

.cover {
  margin: clamp(40px, 6vw, 72px) auto 0; width: min(var(--w-wide), calc(100% - 2 * var(--gutter)));
  border-radius: 20px; overflow: hidden; position: relative;
}

/* TL;DR card (same gradient wash as the case studies) */
.tldr {
  margin: clamp(48px, 7vw, 88px) auto 0; max-width: 880px;
  padding: 32px 36px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16) 0%, rgba(165, 180, 252, 0.1) 55%, rgba(251, 207, 232, 0.09) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.tldr ul { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 12px; }
.tldr li { color: var(--text); }

/* ---------- Article body ---------- */
.post-body > section { padding-top: clamp(64px, 9vw, 112px); }
.sec-head { display: grid; gap: 12px; margin-bottom: 32px; }
.sec-head .lede, .lede { font-size: 18px; color: var(--text); max-width: 68ch; }
.stack { display: grid; gap: 16px; }
.caption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.card { background: var(--card); border-radius: 16px; padding: clamp(20px, 3vw, 32px); }

pre {
  margin: 0; background: var(--panel); color: var(--panel-fg); border-radius: 12px;
  padding: 14px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6;
}
pre .c { color: var(--panel-muted); }
kbd {
  font-size: 12px; display: inline-block; min-width: 24px; text-align: center;
  padding: 2px 7px; border-radius: 7px; background: #fff; color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 1.5px 0 var(--line);
}
blockquote {
  margin: 0; padding: 12px 18px; border-left: 3px solid var(--blue);
  background: var(--card); border-radius: 0 12px 12px 0;
  font-family: var(--f-display); font-size: 18px; color: var(--ink);
}

.table-wrap { overflow-x: auto; border-radius: 16px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 14px 20px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font: 600 11px/1.2 var(--f-text); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
th.hl { color: var(--blue-text); }

.rule {
  margin-top: 20px; padding: 22px 26px; border-radius: 16px; background: var(--blue-soft);
  font: 500 clamp(18px, 2vw, 21px)/1.4 var(--f-display); color: var(--ink);
}

/* Next article */
.next { padding-top: clamp(72px, 10vw, 128px); }
.next a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: clamp(22px, 3vw, 32px); border-radius: 16px; background: var(--card);
  text-decoration: none; color: inherit; transition: background-color 0.2s ease;
}
.next a:hover { background: #f1f1f1; }
.next h3 { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.02em; margin-top: 8px; }
.next p { color: var(--muted); margin-top: 8px; }

/* ---------- Footer (matches the Framer footer) ---------- */
.sd-footer {
  margin-top: clamp(96px, 12vw, 160px);
  position: relative; overflow: hidden; background: #000; color: #fff;
  min-height: 640px; display: grid; grid-template-rows: 1fr auto;
}
.sd-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(28% 32% at 64% 0%, rgba(120, 60, 230, 0.55), transparent 70%),
    radial-gradient(22% 28% at 86% 0%, rgba(110, 70, 220, 0.4), transparent 70%),
    radial-gradient(30% 40% at 30% 0%, rgba(80, 40, 160, 0.3), transparent 70%),
    linear-gradient(180deg, #0b0614 0%, #000 70%);
}
.sd-footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.7;
  background-image:
    radial-gradient(1px 1px at 15% 8%, #fff, transparent), radial-gradient(1px 1px at 48% 5%, #fff, transparent),
    radial-gradient(1px 1px at 36% 15%, #ccc, transparent), radial-gradient(1px 1px at 74% 12%, #fff, transparent),
    radial-gradient(1px 1px at 8% 82%, #aaa, transparent), radial-gradient(1px 1px at 58% 70%, #ddd, transparent),
    radial-gradient(1px 1px at 88% 40%, #bbb, transparent), radial-gradient(1px 1px at 24% 52%, #999, transparent),
    radial-gradient(1px 1px at 92% 78%, #ccc, transparent), radial-gradient(1px 1px at 44% 98%, #fff, transparent);
}
.sd-footer > * { position: relative; z-index: 1; }
.sd-footer .cta { display: grid; justify-items: center; align-content: center; gap: 44px; padding: 96px var(--gutter) 64px; text-align: center; }
.sd-footer .cta p {
  font: 400 clamp(44px, 7vw, 88px)/1.08 var(--f-display); letter-spacing: -0.05em; max-width: 820px;
  background: linear-gradient(90deg, #a9a9a9 0%, #fff 60%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sd-footer .cta a {
  display: inline-flex; align-items: center; justify-content: center;
  height: clamp(64px, 6vw, 85px); padding: 0 clamp(36px, 4vw, 56px); border-radius: 50px;
  background: #0099ff; color: #fff; text-decoration: none;
  font: 500 clamp(20px, 2vw, 24px)/1 var(--f-text); letter-spacing: -0.04em; transition: background-color 0.15s ease;
}
.sd-footer .cta a:hover { background: #0088ee; }
.sd-footer .bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 0 36px 36px; }
.sd-footer .bottom span { font: 500 14px/1 var(--f-ui); color: #d4d4d4; }
.sd-footer .bottom nav { display: flex; gap: 40px; }
.sd-footer .bottom nav a { font: italic 400 14px/1 var(--f-ui); color: #cfcfcf; text-decoration: none; }
.sd-footer .bottom nav a:hover { color: #fff; }

/* ---------- Tablet (810–1199px): Framer's tablet nav puts the logo on the
   left and drops the Playground link ---------- */
@media (min-width: 810px) and (max-width: 1199.98px) {
  .sd-header { grid-template-columns: auto 1fr auto; gap: 24px; }
  .sd-logo { order: -1; }
  .sd-header nav { justify-content: center; padding-left: 0; }
  .sd-header nav a:last-child { display: none; }
}

/* ---------- Phone (< 810px, Framer's phone breakpoint) ---------- */
@media (max-width: 809.98px) {
  body { font-size: 16px; }
  .sd-header { height: 72px; grid-template-columns: 1fr; justify-items: center; padding: 0 16px; }
  .sd-header nav, .sd-header .btn { display: none; }
  .meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-row > div:nth-child(3) { border-left: 0; }
  .meta-row > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .tldr { padding: 24px 22px; }
  .next a { grid-template-columns: 1fr; }
  .sd-footer { min-height: 560px; padding-bottom: 96px; } /* room for the fixed mobile nav */
  .sd-footer .bottom { justify-content: center; padding-inline: 16px; }
  .sd-footer .bottom nav { gap: 24px; }
}

/* ---------- Motion ----------
   The hero settles in on load (staggered 50ms); later sections reveal on
   scroll via .sd-reveal (src/site.js + src/overrides.css). */
@keyframes sd-rise { from { opacity: 0; translate: 0 12px; } }
.post-hero > * { animation: sd-rise 0.5s cubic-bezier(0.23, 1, 0.32, 1) both; }
.post-hero > :nth-child(2) { animation-delay: 50ms; }
.post-hero > :nth-child(3) { animation-delay: 100ms; }
.post-hero > :nth-child(4) { animation-delay: 150ms; }
.post-hero > :nth-child(5) { animation-delay: 200ms; }
.post-hero > :nth-child(n + 6) { animation-delay: 250ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes sd-rise { from { opacity: 0; } }
  .post-hero > * { animation-duration: 0.3s; animation-delay: 0s !important; }
}
