/* web/assets/css/theme.css — DanLemos redesign */

/* ---- Variáveis ---- */
:root {
  --bg-base:        #050810;
  --bg-deep:        #03060c;
  --fg:             #ffffff;
  --fg-muted:       rgba(255,255,255,0.70);
  --fg-faint:       rgba(255,255,255,0.45);
  --accent:         #2a7fc4;
  --accent-strong:  #4396d8;
  --accent-deep:    #143a5e;
  --accent-glow:    rgba(42,127,196,0.55);
  --border:         rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.16);
  --font-ui:        'Manrope', sans-serif;
  --font-body:      'Source Serif 4', Georgia, serif;
  --font-display:   'Instrument Serif', serif;
  --header-h:       68px;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-base); }
body {
  background: var(--bg-base);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: var(--accent); color: var(--bg-deep); }

/* ---- Header fixo ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 16px 28px;
  transition: background 300ms ease, backdrop-filter 300ms ease, border-color 300ms ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5,8,16,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}
.nav-row {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--fg);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.brand-mark img { width: 22px; height: 22px; filter: invert(1) brightness(1.1); }
.brand-text {
  font-family: var(--font-ui); font-weight: 700;
  font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase;
}
.nav-menu { display: none; align-items: center; gap: 36px; }
@media (min-width: 880px) { .nav-menu { display: flex; } }
.nav-menu a {
  font-family: var(--font-ui); font-weight: 600;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
  transition: color 200ms; position: relative;
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 250ms ease;
}
.nav-menu a:hover::after { transform: scaleX(1); }
.hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: 10px; color: #fff; cursor: pointer;
  transition: color 200ms, border-color 200ms;
}
@media (min-width: 880px) { .hamburger { display: none; } }
.hamburger:hover { color: var(--accent); border-color: var(--accent); }

/* Mobile overlay */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3,6,12,0.96);
  backdrop-filter: blur(18px);
  display: flex; flex-direction: column;
  padding: 22px 28px;
  transform: translateY(-100%);
  transition: transform 350ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}
.mobile-overlay.open { transform: translateY(0); pointer-events: auto; }
.mobile-overlay .mob-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-overlay nav { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.mobile-overlay nav a {
  font-family: var(--font-ui); font-weight: 800;
  font-size: 32px; letter-spacing: 0.06em;
  color: #fff; text-decoration: none; text-transform: uppercase;
}
.mobile-overlay nav a:hover { color: var(--accent); }
.mobile-overlay .mob-foot {
  font-size: 12px; color: var(--fg-faint);
  letter-spacing: 0.18em; text-transform: uppercase; padding-bottom: 12px;
}

/* ---- Background: vídeo ---- */
.bg-stage {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: var(--bg-deep);
}
.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; opacity: 0.6;
}
.bg-overlay-left {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,#070b0a 0%,rgba(7,11,10,.92) 18%,rgba(7,11,10,.65) 38%,rgba(7,11,10,.25) 60%,rgba(7,11,10,0) 100%);
  pointer-events: none;
}
.bg-overlay-bottom {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,rgba(5,8,16,0) 35%,rgba(5,8,16,.55) 75%,rgba(5,8,16,.95) 100%);
  pointer-events: none;
}
.bg-tint-blue {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 30%,rgba(20,60,110,.35) 0%,rgba(8,20,40,.25) 50%,rgba(3,6,12,.45) 100%);
  mix-blend-mode: multiply; pointer-events: none;
}
.grid-lines { position: absolute; inset: 0; pointer-events: none; display: none; }
@media (min-width: 768px) { .grid-lines { display: block; } }
.grid-lines::before, .grid-lines::after, .grid-lines > i {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 1px; background: rgba(255,255,255,0.08);
}
.grid-lines::before { left: 25%; }
.grid-lines > i     { left: 50%; }
.grid-lines::after  { left: 75%; }

/* ---- Background: glow estático (páginas sem vídeo) ---- */
.bg-stage--static {
  position: fixed; inset: 0; z-index: 0;
  background: var(--bg-base); pointer-events: none;
}

/* ---- Glow SVG central ---- */
.central-glow {
  position: absolute; top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 1200px; max-width: 130%; height: 600px;
  pointer-events: none; opacity: 0.75;
}

/* ---- Layout ---- */
.page { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
.page-content { position: relative; z-index: 2; flex: 1; }
.page-header-space { height: var(--header-h); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; width: 100%; }
.wrap--narrow { max-width: 800px; margin: 0 auto; padding: 0 28px; width: 100%; }

/* ---- Hero (páginas com vídeo) ---- */
.hero {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 140px 28px 100px;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.eyebrow {
  font-family: var(--font-ui); font-weight: 700;
  font-size: 11px; letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  animation: fade-rise .9s ease-out .2s both;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-strong); }
.headline {
  font-family: var(--font-ui); font-weight: 800; text-transform: uppercase;
  color: #fff; margin: 0;
  font-size: clamp(38px,7vw,72px); line-height: 0.95;
  letter-spacing: -0.03em; max-width: 920px;
  animation: fade-rise .9s ease-out .3s both;
}
.headline .accent-dot { color: var(--accent-strong); }
.hero-desc {
  font-family: var(--font-body); font-size: 17px; line-height: 1.7;
  color: rgba(255,255,255,.78); max-width: 560px;
  margin: 28px 0 0; animation: fade-rise .9s ease-out .45s both;
}

/* Glass card (destaque home) */
.glass-card {
  width: 200px; height: 200px; border-radius: 22px;
  transform: translateY(-40px); margin-bottom: 16px;
  padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(255,255,255,0.01);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.10);
  position: relative; overflow: hidden; color: #fff;
  animation: fade-rise .9s ease-out .1s both;
}
.glass-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px;
  background: linear-gradient(180deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.18) 22%,rgba(255,255,255,0) 45%,rgba(255,255,255,0) 55%,rgba(255,255,255,.18) 78%,rgba(255,255,255,.55) 100%);
  -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; pointer-events: none;
}
.glass-card .gc-tag { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: .12em; color: var(--accent-strong); }
.glass-card .gc-title { font-family: var(--font-ui); font-weight: 600; font-size: 16px; line-height: 1.3; margin: 0; }
.glass-card .gc-title em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent-strong); font-size: 20px; }
.glass-card .gc-desc { font-family: var(--font-body); font-size: 12px; line-height: 1.55; color: var(--fg-muted); }

/* CTA buttons */
.cta-row { display: flex; align-items: center; gap: 18px; margin-top: 38px; flex-wrap: wrap; animation: fade-rise .9s ease-out .55s both; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; border: none; border-radius: 9999px;
  padding: 14px 22px 14px 26px;
  font-family: var(--font-ui); font-weight: 800; font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform 200ms, box-shadow 200ms, background 200ms;
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 12px 36px -10px var(--accent-glow); }
.btn-primary svg { transition: transform 200ms; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: transparent; color: #fff; border: 1px solid var(--border-strong);
  border-radius: 9999px; padding: 14px 22px;
  font-family: var(--font-ui); font-weight: 600; font-size: 13px;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: color 200ms, border-color 200ms, background 200ms;
}
.btn-secondary:hover { color: var(--accent-strong); border-color: var(--accent-strong); background: rgba(42,127,196,.08); }

/* ---- README card ---- */
.readme-card { border-radius: 6px; overflow: hidden; margin-bottom: 32px; border: 1px solid var(--border); }
.readme-card__header { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border); }
.readme-card__header span { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--fg-muted); }
.readme-card__header span em { opacity: .5; font-style: normal; }
.readme-card__body { padding: 24px; }

/* ---- Posts grid (listagem) ---- */
.section-title {
  font-family: var(--font-ui); font-weight: 800; font-size: clamp(28px,4vw,48px);
  text-transform: uppercase; letter-spacing: -0.02em; margin: 0 0 48px;
}
.posts-grid { display: grid; gap: 24px; }
@media (min-width: 640px)  { .posts-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* Post card */
.post-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 250ms, background 250ms, transform 250ms;
}
.post-card:hover { border-color: var(--accent); background: rgba(42,127,196,0.06); transform: translateY(-2px); }
.post-card__cat {
  font-family: var(--font-ui); font-weight: 700; font-size: 11px;
  letter-spacing: .20em; text-transform: uppercase; color: var(--accent-strong);
}
.post-card__title {
  font-family: var(--font-ui); font-weight: 700; font-size: 17px; line-height: 1.3;
  color: var(--fg); margin: 0;
}
.post-card__excerpt { font-family: var(--font-body); font-size: 14px; color: var(--fg-muted); line-height: 1.6; flex: 1; }
.post-card__meta {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--fg-faint);
  border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto;
}

/* ---- Post single ---- */
.post-hero { padding: 60px 0 40px; border-bottom: 1px solid var(--border); margin-bottom: 48px; }
.post-hero__cat { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: .20em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 16px; }
.post-hero__title { font-family: var(--font-ui); font-weight: 800; font-size: clamp(28px,5vw,52px); letter-spacing: -0.02em; margin: 0 0 20px; line-height: 1.1; }
.post-hero__meta { font-family: var(--font-ui); font-size: 13px; color: var(--fg-faint); letter-spacing: .10em; }
.post-body { font-family: var(--font-body); font-size: 18px; line-height: 1.8; color: var(--fg-muted); }
.post-body h2, .post-body h3 { font-family: var(--font-ui); font-weight: 700; color: var(--fg); }
.post-body a { color: var(--accent-strong); }
.post-body a:hover { color: var(--accent); }
.post-body code { background: rgba(255,255,255,0.08); border-radius: 4px; padding: 2px 6px; font-size: .9em; }
.post-body pre { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 8px; padding: 20px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.post-nav a { font-family: var(--font-ui); font-size: 13px; color: var(--fg-muted); text-decoration: none; transition: color 200ms; }
.post-nav a:hover { color: var(--accent-strong); }

/* ---- Footer strip ---- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--border); background: linear-gradient(180deg,rgba(5,8,16,.4),rgba(5,8,16,.9)); backdrop-filter: blur(8px); }
.strip-inner { max-width: 1280px; margin: 0 auto; padding: 22px 28px; display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; }
@media (min-width: 880px) { .strip-inner { grid-template-columns: auto 1fr auto; gap: 36px; } }
.strip-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-faint); }
.live-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.strip-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat .n { font-family: var(--font-ui); font-weight: 700; font-size: 18px; color: #fff; }
.stat .l { font-family: var(--font-ui); font-weight: 600; font-size: 10px; letter-spacing: .20em; text-transform: uppercase; color: var(--fg-faint); margin-top: 3px; }
.strip-copy { font-family: var(--font-ui); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-faint); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.strip-copy a { color: var(--fg-faint); text-decoration: none; transition: color 200ms; }
.strip-copy a:hover { color: var(--accent-strong); }

/* ---- Animações ---- */
@keyframes fade-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 100% { box-shadow: 0 0 0 12px rgba(42,127,196,0); } }
.site-header { animation: fade-rise .7s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- Content sections (páginas sem hero) ---- */
.content-hero { padding: 80px 0 48px; border-bottom: 1px solid var(--border); margin-bottom: 64px; }
.content-hero__eyebrow { font-family: var(--font-ui); font-weight: 700; font-size: 11px; letter-spacing: .30em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.content-hero__eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent-strong); }
.content-hero__title { font-family: var(--font-ui); font-weight: 800; font-size: clamp(32px,5vw,60px); text-transform: uppercase; letter-spacing: -0.025em; margin: 0; line-height: 1; }
