/* Fontes locais — sem CDN, sem dependência de rede externa. */
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --blue: #0f5bd9;
  --blue-deep: #0b4cb8;
  --blue-soft: #e4edfc;
  --violet: #6528c9;
  --orange: #ea5a2a;
  --ink: #1a2130;
  --ink-mid: #5b6472;
  --ink-soft: #7c8593;
  --line: #e3e8ef;
  --paper: #f7f9fc;
  --sans: 'Century Gothic', 'URW Gothic', 'Avenir Next', Avenir, 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --edge: clamp(16px, 5vw, 64px);
  --glide: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.shell { max-width: 1160px; margin: 0 auto; padding: 0 var(--edge); }
.reading { max-width: calc(720px + var(--edge) * 2); }
.wide { max-width: calc(960px + var(--edge) * 2); }
.sky { background: radial-gradient(50% 46% at 88% 50%, #e6f6f8 0%, transparent 100%), radial-gradient(42% 46% at 8% 50%, #fbf1ea 0%, transparent 100%), var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 600 14px var(--sans); text-decoration: none; transition: transform .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-line { color: var(--ink); border-color: var(--ink); }
.btn-light { background: #fff; color: var(--blue-deep); min-height: 48px; padding: 0 28px; font-size: 15px; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 20; transition: background .3s ease, box-shadow .3s ease; }
.topbar.stuck { background: rgb(247 249 252 / .84); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.topbar.stuck .nav { padding-top: 12px; padding-bottom: 12px; }
.progress { position: absolute; inset: auto 0 -1px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--violet)); transform: scaleX(var(--page, 0)); transform-origin: left; }
.nav { display: flex; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 28px; transition: padding .3s ease; }
.nav-logo img { display: block; height: 24px; width: auto; }
.nav-links { display: flex; gap: 36px; margin: 0 auto; font-size: 14px; }
.nav-links a { position: relative; padding: 4px 0; color: var(--ink-mid); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.on { color: var(--ink); font-weight: 600; }
.nav-links a.on::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: -4px; height: 3px; border-radius: 3px; background: var(--blue); }
.nav-cta { display: flex; gap: 10px; }

.eyebrow { display: block; margin-bottom: 14px; color: var(--blue); font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.tag { display: inline-block; padding: 2px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--blue-deep); font-size: 13px; font-weight: 600; }
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.16; font-weight: 700; letter-spacing: -.015em; }
.lede { margin-top: 20px; max-width: 60ch; color: var(--ink-mid); font-size: 18px; }
.scribble { position: relative; display: inline-block; }
.scribble svg { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .26em; overflow: visible; }
.draw { stroke-dasharray: 1; }
.motion .draw { animation: draw 1s var(--glide) calc(var(--d, 0s) + .5s) backwards; }

.page-head { padding: 152px 0 72px; }
.posts { padding-top: 56px; padding-bottom: 104px; }
.post { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; padding: 20px; border-radius: 24px; background: #fff; box-shadow: 0 24px 50px -32px rgb(26 33 48 / .4); transition: box-shadow .35s ease, translate .35s var(--glide); }
.post:hover { translate: 0 -5px; box-shadow: 0 34px 60px -32px rgb(26 33 48 / .5); }
.post-cover { display: block; overflow: hidden; border-radius: 16px; }
.post-cover img { display: block; width: 100%; height: auto; transition: scale .8s var(--glide); }
.post:hover .post-cover img { scale: 1.04; }
.post-body { padding-right: 24px; }
.post h2 { margin: 16px 0 12px; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.25; }
.post h2 a { text-decoration: none; background: linear-gradient(var(--blue), var(--blue)) 0 100% / 0 2px no-repeat; transition: background-size .45s var(--glide); }
.post:hover h2 a { background-size: 100% 2px; }
.post-body > p { color: var(--ink-mid); font-size: 15px; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(145deg, var(--blue), var(--violet)); color: #fff; font-size: 14px; font-weight: 700; }
.byline b { display: block; font-size: 14px; line-height: 1.3; }
.byline small { color: var(--ink-soft); font-size: 13px; }

.article-head { padding: 128px 0 150px; }
.back { display: flex; align-items: center; gap: 10px; width: fit-content; margin-bottom: 30px; color: var(--ink-mid); font-size: 14px; text-decoration: none; }
.back svg { width: 28px; height: 12px; transition: translate .3s var(--glide); }
.back:hover { color: var(--ink); }
.back:hover svg { translate: -5px 0; }
.article-head h1 { margin-top: 16px; font-size: clamp(30px, 4.2vw, 46px); }
.cover { display: block; width: 100%; height: auto; margin-top: -106px; border-radius: 20px; box-shadow: 0 34px 70px -34px rgb(26 33 48 / .6); }

.prose { padding-top: 56px; font-size: 18px; line-height: 1.75; }
.prose p { margin-bottom: 1.35em; }
.prose h2 { margin: 2em 0 .7em; font-size: 28px; line-height: 1.25; }
.prose h3 { margin: 1.9em 0 .7em; font-size: 23px; line-height: 1.3; }
.prose em { font-style: italic; }
.points { margin: 0 0 1.6em; padding: 0; list-style: none; }
.points li { position: relative; padding: 14px 0 14px 34px; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
ul.points li::before { content: ''; position: absolute; left: 6px; top: 1.45em; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
ol.points { counter-reset: step; }
ol.points li { padding-left: 46px; counter-increment: step; }
ol.points li::before { content: counter(step); position: absolute; left: 0; top: 15px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-deep); font-size: 14px; font-weight: 700; line-height: 1; }
.table-wrap { margin: 0 0 1.8em; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--ink); color: #fff; font-weight: 600; }
tbody th { font-weight: 600; white-space: nowrap; }
.origin { margin: 28px 0 88px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }

.cta { padding: 68px 0; background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff; text-align: center; }
.cta h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.25; }
.cta p { margin: 12px auto 26px; max-width: 50ch; opacity: .9; }
.cta .btn-light:focus-visible { outline-color: #fff; }

footer { padding: 64px 0 28px; background: linear-gradient(180deg, var(--blue), var(--blue-deep)); color: #fff; font-size: 14px; }
.cta + footer { background: var(--blue-deep); }
.foot-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 36px; }
.foot-grid img { display: block; height: 24px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); }
.foot-about { max-width: 30ch; opacity: .85; }
.foot-grid h2 { margin-bottom: 14px; font-size: 14px; }
.foot-grid ul { margin: 0; padding: 0; list-style: none; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid li a { opacity: .85; text-decoration: none; overflow-wrap: anywhere; }
.foot-grid li a:hover { opacity: 1; text-decoration: underline; }
footer a:focus-visible { outline-color: #fff; }
.copy { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .22); text-align: center; font-size: 13px; opacity: .8; }

.motion .rise { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--glide), transform .8s var(--glide); }
.motion .rise.seen { opacity: 1; transform: none; transition-delay: var(--d, 0ms); }
@keyframes draw { from { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}
@media (max-width: 820px) {
  .post { grid-template-columns: 1fr; gap: 22px; padding: 14px; }
  .post-body { padding: 0 6px 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .prose { font-size: 17px; }
}
@media (max-width: 520px) {
  .nav-cta .btn-line { display: none; }
  .nav-logo img { height: 20px; }
  .page-head { padding-top: 120px; padding-bottom: 48px; }
  .article-head { padding-top: 104px; }
  .lede { font-size: 16px; }
  tbody th { white-space: normal; }
  th, td { padding: 11px 12px; }
}
