/* Blog Tyar
   Identidade do site tyar.com.br: fundo quase preto, roxo da marca em degradê, Inter.
   Layout: hero com brilho roxo + artigo em coluna de leitura com sumário fixo à direita. */
:root {
  --bg: #0d0d0d;
  --surface: #141416;
  --surface-2: #1b1b1f;
  --line: #26262c;
  --text: #ececee;
  --text-2: #b4b4bc;
  --muted: #7d7d87;
  --brand: #803eac;
  --brand-hi: #a252d9;
  --brand-glow: #ad46ff;
  --grad: linear-gradient(120deg, #a252d9 0%, #803eac 90%);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-hi); text-decoration: none; }
a:hover { color: #c48bf0; }
:focus-visible { outline: 2px solid var(--brand-glow); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { margin: 0 0 14px; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--brand-hi); }
.eyebrow a { color: inherit; }
.lead { color: var(--text-2); font-size: 19px; line-height: 1.6; max-width: 62ch; margin: 0; }

/* barra de leitura */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 30; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* topo */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13,13,13,.82); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.top-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { height: 26px; width: auto; display: block; }
.brand-tag { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.nav { display: flex; gap: 26px; flex: 1; }
.nav a { color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: #fff; }

/* botões */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--grad); color: #fff; padding: 13px 22px; border-radius: 8px; font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 24px -8px rgba(173,70,255,.6); transition: transform .15s, box-shadow .15s; }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(173,70,255,.75); }
.btn-sm { padding: 10px 16px; font-size: 12px; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.btn-ghost:hover { border-color: #fff; box-shadow: none; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 80px 0 72px; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto 30%; height: 140%; background: radial-gradient(closest-side, rgba(128,62,172,.42), rgba(128,62,172,0) 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.04; font-weight: 600; margin: 0 0 22px; }
.hero-sm { padding: 64px 0 52px; }
.hero-sm h1 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 14px; }

/* capa do artigo (gerada no build, em capas/) */
.thumb { aspect-ratio: 1200 / 630; overflow: hidden; background: #121214; border-bottom: 1px solid var(--line); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img, .feature:hover .thumb img { transform: scale(1.035); }

/* destaque */
.feature { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.feature:hover { border-color: rgba(162,82,217,.6); transform: translateY(-2px); }
.feature-body { padding: 24px 26px 26px; }
.feature h2 { font-size: 24px; line-height: 1.25; margin: 14px 0 10px; font-weight: 600; }
.feature p { color: var(--text-2); font-size: 15px; margin: 0 0 18px; }
.read-more { font-weight: 600; font-size: 14px; color: var(--brand-hi); }
.card-link { position: absolute; inset: 0; z-index: 2; }

/* lista */
.list { padding: 56px 24px 88px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.list-head h2 { font-size: 26px; margin: 0; font-weight: 600; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cats a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: 14px; background: var(--surface); transition: border-color .15s, color .15s; }
.cats a span { font: 500 11px/1 var(--mono); color: var(--muted); }
.cats a:hover { color: #fff; border-color: #444; }
.cats a.on { background: var(--grad); border-color: transparent; color: #fff; }
.cats a.on span { color: rgba(255,255,255,.75); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { border-color: rgba(162,82,217,.6); transform: translateY(-3px); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card h3 { font-size: 19px; line-height: 1.3; margin: 12px 0 8px; font-weight: 600; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0 0 18px; flex: 1; }
.pill { align-self: flex-start; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: #d9b3f5; background: rgba(128,62,172,.18); border: 1px solid rgba(162,82,217,.35); padding: 6px 9px; border-radius: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.meta > * + *::before { content: "·"; margin-right: 14px; color: #4a4a52; }

/* artigo */
.post-head { --h: 275; position: relative; overflow: hidden; padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.post-head::before { content: ""; position: absolute; inset: -60% -20% auto 40%; height: 180%; background: radial-gradient(closest-side, hsl(var(--h) 60% 45% / .38), transparent 70%); pointer-events: none; }
.post-head-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.post-cover { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(128,62,172,.55); }
.post-cover img { display: block; width: 100%; height: auto; }
.post-head h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; font-weight: 600; margin: 18px 0 18px; max-width: 22ch; }
.post-head .lead { margin-bottom: 26px; }
.crumbs { display: flex; gap: 10px; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.crumbs a { color: var(--brand-hi); }
.crumbs span { color: var(--muted); }

.post-layout { display: grid; grid-template-columns: minmax(0, 720px) 260px; justify-content: space-between; gap: 64px; padding-top: 48px; padding-bottom: 32px; }
.prose { font-size: 18px; color: #dcdce0; }
.prose > *:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 22px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--brand-hi); }
.prose strong { color: #fff; font-weight: 600; }
.prose h2 { font-size: 30px; line-height: 1.2; margin: 60px 0 16px; font-weight: 600; color: #fff; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 36px 0 10px; font-weight: 600; color: #fff; }
.prose a { text-decoration: underline; text-decoration-color: rgba(162,82,217,.5); text-underline-offset: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0 28px; }
.prose hr + p { font-size: 14px; color: var(--muted); }
.prose em { color: var(--muted); font-size: .9em; }
.prose code { font: 500 .85em var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; }
.prose blockquote { margin: 28px 0; padding: 6px 22px; border-left: 3px solid var(--brand); color: var(--text-2); }

.tldr { margin: 0 0 40px; padding: 26px 28px 8px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(128,62,172,.16), rgba(128,62,172,.04)); border: 1px solid rgba(162,82,217,.32); }
.tldr h2 { margin: 0 0 14px !important; font: 500 12px/1 var(--mono) !important; text-transform: uppercase; letter-spacing: .14em; color: var(--brand-hi) !important; }
.tldr ul { padding-left: 20px; }
.tldr li { font-size: 17px; }

.table-wrap { overflow-x: auto; margin: 26px 0 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 12px/1.3 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: #fff; font-weight: 500; }

/* sumário lateral */
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc-title { margin: 0 0 14px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.toc ol { list-style: none; margin: 0 0 28px; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); line-height: 1.4; }
.toc li a:hover { color: #fff; }
.toc li a.on { color: #fff; border-left-color: var(--brand-hi); }
.toc-cta { display: grid; gap: 6px; padding: 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.toc-cta span { color: var(--brand-hi); font-weight: 600; }
.toc-cta:hover { border-color: rgba(162,82,217,.6); color: var(--text); }

/* FAQ */
.faq { margin-top: 64px; }
.faq h2 { font-size: 30px; font-weight: 600; margin: 0 0 18px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 10px; transition: border-color .15s; }
.faq details[open] { border-color: rgba(162,82,217,.45); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-hi); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 20px; color: var(--text-2); font-size: 16px; }

/* CTA */
.cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin: 64px 0 0; padding: 36px; border-radius: 18px; background: radial-gradient(120% 140% at 100% 0%, rgba(162,82,217,.55), transparent 55%), var(--surface-2); border: 1px solid rgba(162,82,217,.35); }
.cta h2 { margin: 0 0 10px; font-size: 28px; font-weight: 600; }
.cta p { margin: 0; color: var(--text-2); font-size: 16px; max-width: 46ch; }
.cta .eyebrow { margin-bottom: 12px; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.related { padding-top: 40px; border-top: 1px solid var(--line); margin-top: 56px; }

/* rodapé */
.foot { border-top: 1px solid var(--line); background: #0a0a0a; padding: 56px 0 32px; color: var(--muted); font-size: 14px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.foot-brand svg { height: 28px; width: auto; }
.foot-brand p { margin: 14px 0 0; max-width: 34ch; }
.stats { display: flex; flex-wrap: wrap; gap: 40px; margin: 0; }
.stats dt { font-size: 32px; font-weight: 600; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats dd { margin: 4px 0 0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; }
.foot a { color: var(--text-2); }

/* responsivo */
@media (max-width: 1080px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .post-head-in { grid-template-columns: 1fr; gap: 32px; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .nav { display: none; }
  .top-in { justify-content: space-between; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .prose { font-size: 17px; }
  .hero { padding: 56px 0 48px; }
  .cta { grid-template-columns: 1fr; padding: 26px; }
  .brand-tag { display: none; }
  .wrap { padding: 0 18px; }
  .list { padding: 40px 18px 64px; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
