/* Mangaba Agent - GitHub Pages Shared Styles */
/* Paleta oficial mangaba.ai (raspada de www.mangaba.ia.br):
   laranja #F97518, marrom #382B22, fundo escuro #1E0D01, âmbar #FFD485 */
:root {
  --bg:        #FAF7F0;
  --bg-2:      #F1ECE2;
  --bg-hero:   hsl(33 95% 95%);
  --card:      #FFFFFF;
  --text-1:    #382B22;
  --text-2:    #6B5D52;
  --text-3:    #A89A8C;
  --border:    #E7E0D4;
  --orange:    #F97518;
  --orange-2:  #F5910F;
  --orange-3:  #C45E0A;
  --orange-gold:#FFD485;
  --orange-bg: rgba(249,117,24,.10);
  --green:     #4A7A2E;
  --green-2:   #9BCE6A;
  --green-3:   #5A8A3A;
  --green-bg:  rgba(74,122,46,.10);
  --emerald:   #22c55e;
  --radius:    8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}
.dark {
  --bg:      #1E0D01;
  --bg-2:    #2A1810;
  --bg-hero: hsl(27 70% 8%);
  --card:    #2C1C12;
  --text-1:  #F7EFE3;
  --text-2:  #C9B8A6;
  --text-3:  #8A7A6C;
  --border:  #3D2A1C;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
::selection { background:rgba(235,114,21,.15); }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:999px; }
body {
  background: var(--bg);
  color: var(--text-1);
  font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.6;
  overflow-x: hidden;
  transition: background .25s, color .25s;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }

@keyframes rise    { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse   { 0%,100%{opacity:.35;transform:scale(.65)} 50%{opacity:1;transform:scale(1)} }
@keyframes float   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
.rise  { animation: rise .45s cubic-bezier(.22,1,.36,1) both; }
.d1 { animation-delay:.07s } .d2 { animation-delay:.14s } .d3 { animation-delay:.22s }

/* NAV */
nav {
  position: fixed; top:0; left:0; right:0; z-index:200;
  height: 64px;
  display: flex; align-items:center; justify-content:space-between;
  padding: 0 max(1.5rem, calc(50% - 620px));
  transition: background .2s, border-color .2s, backdrop-filter .2s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  border-color: var(--border);
}
.nav-logo { display:flex; align-items:center; gap:.5rem; }
.logo-name { font-size:1.0625rem; font-weight:600; letter-spacing:-.02em; line-height:1; }
.logo-name b { color:var(--text-1); font-weight:600; }
.logo-name span { color:var(--orange); font-weight:600; }
.nav-links { display:flex; gap:2rem; list-style:none; }
.nav-links a { font-size:.875rem; font-weight:600; color:var(--text-2); transition:color .15s; }
.nav-links a:hover { color:var(--text-1); }
.nav-links a.active { color:var(--orange); }
.nav-right { display:flex; align-items:center; gap:.75rem; }
.btn-icon {
  width:36px; height:36px; border-radius:var(--radius);
  background:transparent; border:1px solid var(--border);
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  color:var(--text-2); transition:all .15s;
}
.btn-icon:hover { border-color:var(--orange); color:var(--orange); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items:center; gap:.45rem;
  font-family:inherit; font-size:.875rem; font-weight:600;
  border:none; cursor:pointer; white-space:nowrap;
  transition: all .18s; text-decoration:none;
  border-radius: var(--radius);
  padding: .6875rem 1.5rem; min-height:42px;
  line-height:1;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { background:transparent; color:var(--text-1); border: 1px solid var(--border); }
.btn-ghost:hover { border-color:var(--orange); color:var(--orange); }
.link-arr {
  font-size:.9375rem; font-weight:600; color:var(--text-2);
  display:inline-flex; align-items:center; gap:.3rem;
  transition: all .15s;
}
.link-arr:hover { color:var(--text-1); gap:.55rem; }

/* LAYOUT */
.wrap { max-width:1160px; margin:0 auto; padding:0 2rem; }
section { padding:6rem 0; }
.sep { border:none; border-top:1px solid var(--border); }
.label {
  display:inline-block;
  font-size:.72rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  color:var(--orange); margin-bottom:.875rem;
}
.h2 {
  font-size: clamp(1.875rem,3.5vw,2.75rem);
  font-weight:800; letter-spacing:-.025em; line-height:1.1;
  margin-bottom:1rem;
}
.sub {
  font-size:1.0625rem; color:var(--text-2);
  max-width:560px; line-height:1.75;
}
.pill {
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.3rem .875rem; border-radius:999px;
  border:1px solid var(--border); background:var(--card);
  font-size:.75rem; font-weight:600; color:var(--text-2);
}
.dot-live { width:6px; height:6px; border-radius:50%; background:var(--emerald); animation:pulse 1.5s ease-in-out infinite; }

/* PAGE HEADER */
.page-header {
  padding: 8rem 0 4rem;
  background: radial-gradient(ellipse 90% 80% at 55% 40%, var(--bg-hero) 0%, var(--bg) 65%);
  text-align:center;
}
.page-header .h2 { margin-bottom:1rem; }

/* CARDS */
.card {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:1.75rem;
  transition:all .22s;
}
.card:hover {
  border-color:rgba(235,114,21,.3);
  box-shadow:0 8px 28px rgba(235,114,21,.07);
  transform:translateY(-2px);
}
.card-icon {
  width:40px; height:40px; border-radius:10px;
  background:var(--orange-bg);
  display:flex; align-items:center; justify-content:center;
  font-size:18px; margin-bottom:1rem;
}
.card-title { font-size:1rem; font-weight:700; margin-bottom:.5rem; }
.card-desc  { font-size:.875rem; color:var(--text-2); line-height:1.65; }

/* GRID */
.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:1.5rem; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:1.5rem; }

/* CODE BLOCK */
.code-block {
  background:#1a1a2e; border-radius:var(--radius);
  padding:1.25rem; font-family:'Fira Code',monospace;
  font-size:.8125rem; line-height:1.7; color:#e2e8f0;
  overflow-x:auto;
}
.code-block .comment { color:#6b7280; }
.code-block .keyword { color:#c084fc; }
.code-block .string { color:#34d399; }
.code-block .function { color:#60a5fa; }

/* PIPELINE */
.pipeline-flow {
  display:flex; align-items:stretch; justify-content:center; gap:0;
  margin-bottom:3rem; flex-wrap:wrap;
}
.pipeline-stage {
  flex:1; min-width:180px; max-width:220px;
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:1.5rem;
  text-align:center; position:relative;
  transition:all .22s;
}
.pipeline-stage:hover {
  border-color:rgba(235,114,21,.3);
  box-shadow:0 8px 28px rgba(235,114,21,.07);
  transform:translateY(-3px);
}
.pipeline-stage-num {
  width:32px; height:32px; border-radius:50%;
  background:var(--orange); color:#fff;
  font-size:.75rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto .75rem;
}
.pipeline-stage-icon { font-size:1.75rem; margin-bottom:.5rem; }
.pipeline-stage-title { font-size:.875rem; font-weight:700; margin-bottom:.35rem; }
.pipeline-stage-desc { font-size:.75rem; color:var(--text-2); line-height:1.5; }
.pipeline-arrow {
  display:flex; align-items:center; justify-content:center;
  font-size:1.5rem; color:var(--orange); padding:0 .5rem;
  font-weight:300;
}

/* TAG */
.tag {
  display:inline-block; font-size:.65rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.09em;
  padding:.2rem .55rem; border-radius:999px;
  margin-bottom:.75rem;
}
.tag-input { background:rgba(99,102,241,.1); color:#6366f1; }
.tag-process { background:var(--orange-bg); color:var(--orange); }
.tag-output { background:var(--green-bg); color:var(--green); }
.tag-arch { background:rgba(139,92,246,.1); color:#8b5cf6; }

/* DETAIL CARD */
.detail-card {
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:2rem;
  transition:all .22s;
}
.detail-card:hover {
  border-color:rgba(235,114,21,.25);
  box-shadow:0 8px 28px rgba(235,114,21,.07);
  transform:translateY(-2px);
}
.detail-card h3 { font-size:1rem; font-weight:700; margin-bottom:.5rem; }
.detail-card p { font-size:.875rem; color:var(--text-2); line-height:1.7; }
.detail-card ul { list-style:none; margin-top:.75rem; }
.detail-card li {
  font-size:.8125rem; color:var(--text-2);
  padding:.3rem 0 .3rem 1.25rem; position:relative;
}
.detail-card li::before {
  content:''; position:absolute; left:0; top:.65em;
  width:5px; height:5px; border-radius:50%;
  background:var(--orange);
}

/* STEPS */
.step-num {
  font-size:3rem; font-weight:800; letter-spacing:-.04em;
  color:var(--orange); opacity:.18; line-height:1;
  margin-bottom:.75rem; font-variant-numeric:tabular-nums;
}

/* TABLE */
.data-table {
  width:100%; border-collapse:collapse;
  background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-lg); overflow:hidden;
}
.data-table th {
  background:var(--bg-2); padding:.875rem 1.25rem;
  text-align:left; font-size:.75rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em;
  color:var(--text-3); border-bottom:1px solid var(--border);
}
.data-table td {
  padding:.875rem 1.25rem; font-size:.875rem;
  border-bottom:1px solid var(--border); color:var(--text-2);
}
.data-table tr:last-child td { border-bottom:none; }
.data-table tr:hover td { background:var(--bg-2); }

/* FOOTER */
.footer-cta {
  background:var(--text-1); color:var(--bg);
  padding:5.5rem 2rem; text-align:center;
}
.footer-cta .label { color:rgba(235,114,21,.85); }
.footer-cta .h2 { color:var(--bg); margin:0 auto .875rem; }
.footer-cta .sub { color:color-mix(in srgb, var(--bg) 60%, transparent); margin:0 auto 2.5rem; }

footer {
  background:var(--bg); border-top:1px solid var(--border);
  padding:3rem 0 2rem;
}
.foot-top {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:3rem;
  margin-bottom:3rem;
}
.foot-brand p { font-size:.875rem; color:var(--text-2); line-height:1.7; max-width:240px; margin-top:.75rem; }
.foot-col h4 {
  font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em;
  color:var(--text-3); margin-bottom:.875rem;
}
.foot-col ul { list-style:none; display:flex; flex-direction:column; gap:.5rem; }
.foot-col a  { font-size:.875rem; color:var(--text-2); transition:color .15s; }
.foot-col a:hover { color:var(--orange); }
.foot-bottom {
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:.75rem;
  padding-top:1.5rem; border-top:1px solid var(--border);
  font-size:.8125rem; color:var(--text-3);
}

/* RESPONSIVE */
@media(max-width:1024px) {
  .grid-3 { grid-template-columns:1fr 1fr; }
  .grid-4 { grid-template-columns:1fr 1fr; }
  .pipeline-flow { flex-direction:column; align-items:center; }
  .pipeline-arrow { transform:rotate(90deg); }
  .foot-top { grid-template-columns:1fr 1fr; }
}
/* Hero colapsa em 1 coluna no tablet/mobile (sobrepõe o grid inline) */
@media(max-width:900px) {
  .hero-grid { grid-template-columns:1fr !important; gap:2.5rem !important; }
  section[style*="min-height:100vh"] { min-height:auto !important; padding:6.5rem 0 3.5rem !important; }
}
@media(max-width:640px) {
  .nav-links { display:none; }
  .grid-2 { grid-template-columns:1fr; }
  .grid-3 { grid-template-columns:1fr; }
  .grid-4 { grid-template-columns:1fr; }
  .foot-top { grid-template-columns:1fr; }
  .wrap { padding:0 1.25rem; }
  /* chips flutuantes viram estáticos para não vazar da tela */
  .fc { position:static !important; display:inline-flex; margin:.35rem .35rem 0 0; }
  .nav-right .btn-ghost { display:none; }
}
/* nunca deixar imagem/code estourar a largura */
img { max-width:100%; height:auto; }
.code-block { overflow-x:auto; }
pre { overflow-x:auto; }
