/* ══════════════════════════════════════════════════════════
   AviatorAI Blog — design system mirror

   Cores e tokens replicam globals.css do app. Sem dependência
   de Tailwind — CSS puro pra páginas estáticas servidas pelo
   Caddy direto.
   ══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/InterVariable.woff2') format('woff2');
}
:root {
  color-scheme: dark;
  --c-bg:           #0a0e14;
  --c-surface:      #0c1119;
  --c-raised:       #0f1520;
  --c-elevated:     #141b2a;
  --c-hover:        #1a2335;
  --c-edge:         rgba(0,212,255,0.10);
  --c-edge-s:       rgba(0,212,255,0.22);
  --c-text:         #ffffff;
  --c-sub:          rgba(255,255,255,0.72);
  --c-dim:          rgba(255,255,255,0.50);
  --c-brand:        #00d4ff;
  --c-brand-light:  #5ce6ff;
  --c-accent:       #00ff88;
  --c-danger:       #ff3355;
  --c-warning:      #ffaa00;
  --c-vela-azul:    #4d9fff;
  --c-vela-roxa:    #b388ff;
  --c-vela-rosa:    #ff6eb4;
  --c-glow-brand:   rgba(0,212,255,0.30);
  --c-glow-accent:  rgba(0,255,136,0.24);
  --c-gradient-brand: linear-gradient(135deg, #00d4ff, #00ff88);
  --c-card-shadow:  0 8px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,212,255,0.08);
  --c-glass-bg:     rgba(10,14,20,0.78);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font-sans: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient background glow ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(0,212,255,0.14), transparent 70%),
    radial-gradient(50% 40% at 85% 5%, rgba(0,255,136,0.10), transparent 70%),
    radial-gradient(40% 30% at 50% 95%, rgba(179,136,255,0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Reading progress bar (top) ── */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--c-gradient-brand);
  box-shadow: 0 0 12px var(--c-glow-brand);
  transition: width 0.1s ease-out;
}

/* ── Header (sticky glass) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: var(--c-glass-bg);
  border-bottom: 1px solid var(--c-edge);
}
.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--c-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  box-shadow: 0 0 16px var(--c-glow-brand), 0 0 0 1px var(--c-edge-s);
}
.brand__name { background: var(--c-gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--c-sub);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--c-text); background: rgba(255,255,255,0.04); }
.nav a.is-primary {
  background: var(--c-gradient-brand);
  color: #000;
  font-weight: 600;
}
.nav a.is-primary:hover { background: var(--c-gradient-brand); filter: brightness(1.1); }

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}
.wrap--narrow { max-width: 760px; }

.crumbs {
  font-size: 13px;
  color: var(--c-dim);
  margin-bottom: 16px;
}
.crumbs a { color: var(--c-sub); text-decoration: none; }
.crumbs a:hover { color: var(--c-brand); }
.crumbs span.sep { margin: 0 6px; opacity: 0.4; }

/* ── Hero ── */
.hero {
  padding: 24px 0 8px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--c-edge-s);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.65) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: 19px;
  color: var(--c-sub);
  margin: 0 0 32px;
  max-width: 680px;
}
.hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--c-dim);
  font-size: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.hero__meta strong { color: var(--c-text); font-weight: 600; }
.hero__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--c-dim); display: inline-block; }
.author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.author__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-gradient-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 12px var(--c-glow-brand);
}

/* ── Tags ── */
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,212,255,0.10);
  border: 1px solid var(--c-edge-s);
  color: var(--c-brand);
}
.tag--accent { background: rgba(0,255,136,0.10); border-color: rgba(0,255,136,0.30); color: var(--c-accent); }
.tag--rosa { background: rgba(255,110,180,0.10); border-color: rgba(255,110,180,0.30); color: var(--c-vela-rosa); }

/* ── Article body ── */
.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,0.85);
}
.article-body > * { max-width: 720px; }
.article-body p { margin: 0 0 20px; }
.article-body strong { color: var(--c-text); font-weight: 600; }
.article-body em { color: var(--c-sub); }
.article-body a {
  color: var(--c-brand);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,212,255,0.30);
  transition: border-color .15s, color .15s;
}
.article-body a:hover { border-bottom-color: var(--c-brand); color: var(--c-brand-light); }

.article-body h2 {
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 56px 0 16px;
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}
.article-body h2::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background: var(--c-gradient-brand);
}
.article-body h3 {
  font-size: 20px;
  margin: 32px 0 10px;
  font-weight: 600;
  color: var(--c-text);
}
.article-body ul, .article-body ol { padding-left: 24px; margin: 0 0 20px; }
.article-body li { margin-bottom: 8px; }
.article-body ul ul, .article-body ol ol { margin-top: 8px; }

/* ── Callouts ── */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  margin: 28px 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-edge-s);
  background: linear-gradient(180deg, rgba(0,212,255,0.06), rgba(0,212,255,0.02));
  font-size: 15px;
}
.callout__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c-gradient-brand);
  color: #000;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.callout--warn {
  background: linear-gradient(180deg, rgba(255,51,85,0.10), rgba(255,51,85,0.03));
  border-color: rgba(255,51,85,0.30);
}
.callout--warn .callout__icon { background: var(--c-danger); color: #fff; }
.callout--rosa {
  background: linear-gradient(180deg, rgba(255,110,180,0.10), rgba(255,110,180,0.03));
  border-color: rgba(255,110,180,0.30);
}
.callout--rosa .callout__icon { background: var(--c-vela-rosa); color: #000; }

/* ── Stat tiles (inline KPIs) ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 28px 0;
}
.stat {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--c-raised);
  border: 1px solid var(--c-edge);
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-dim);
  margin-bottom: 4px;
}
.stat__value { font-size: 24px; font-weight: 700; color: var(--c-brand); font-variant-numeric: tabular-nums; }
.stat--accent .stat__value { color: var(--c-accent); }
.stat--rosa .stat__value { color: var(--c-vela-rosa); }

/* ── Table ── */
.article-body table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  background: var(--c-raised);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--c-edge);
}
.article-body th, .article-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--c-edge);
}
.article-body th {
  background: rgba(0,212,255,0.04);
  color: var(--c-brand);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.article-body tr:last-child td { border-bottom: none; }
.verdict-good { color: var(--c-accent); font-weight: 600; }
.verdict-bad { color: var(--c-danger); font-weight: 600; }
.verdict-mid { color: var(--c-warning); font-weight: 600; }

/* ── CTA card ── */
.cta {
  margin: 48px 0;
  padding: 32px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(0,212,255,0.10), rgba(0,255,136,0.06)),
    var(--c-raised);
  border: 1px solid var(--c-edge-s);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: var(--c-gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.4;
  pointer-events: none;
}
.cta h3 {
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--c-text);
  font-weight: 700;
}
.cta p { color: var(--c-sub); margin: 0 0 20px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn--primary {
  background: var(--c-gradient-brand);
  color: #000;
  box-shadow: 0 4px 24px var(--c-glow-brand);
}
.btn--primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 6px 32px var(--c-glow-brand); }
.btn--ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-edge);
  color: var(--c-text);
}
.btn--ghost:hover { background: var(--c-hover); }

/* ── Share bar ── */
.share {
  display: flex;
  gap: 8px;
  margin: 48px 0 32px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--c-raised);
  border: 1px solid var(--c-edge);
  align-items: center;
}
.share__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-dim);
  margin-right: 8px;
}
.share a {
  padding: 8px 14px;
  font-size: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-edge);
  color: var(--c-sub);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.share a:hover { background: var(--c-hover); color: var(--c-brand); border-color: var(--c-edge-s); }

/* ── Related posts ── */
.related {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--c-edge);
}
.related__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-dim);
  margin: 0 0 20px;
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Post card (blog index + related) ── */
.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--c-raised);
  border: 1px solid var(--c-edge);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--c-edge-s);
  box-shadow: var(--c-card-shadow);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-gradient-brand);
  opacity: 0;
  transition: opacity .2s;
}
.card:hover::before { opacity: 1; }
.card__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--c-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.card__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--c-text);
}
.card__excerpt {
  font-size: 14px;
  color: var(--c-sub);
  margin: 0 0 16px;
  line-height: 1.6;
  flex-grow: 1;
}
.card__cta {
  font-size: 13px;
  color: var(--c-brand);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ── Posts grid (blog index) ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--c-edge);
  margin-top: 80px;
  padding: 32px 24px;
  text-align: center;
  color: var(--c-dim);
  font-size: 13px;
}
.site-footer a { color: var(--c-sub); margin: 0 10px; text-decoration: none; }
.site-footer a:hover { color: var(--c-brand); }
.site-footer__legal { margin-top: 12px; opacity: 0.6; font-size: 12px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 32px 18px 64px; }
  .site-header__inner { padding: 12px 18px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .hero h1 { font-size: 30px; }
  .hero__lead { font-size: 17px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 24px; margin-top: 40px; }
  .cta { padding: 24px 20px; }
  .share { flex-wrap: wrap; }
}
