/* EcuManager — estilos do site (conteúdo fica nos .html) */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #FF6B35;
  --secondary: #F7931E;
  --bg: #12131f;
  --bg-alt: #181a2b;
  --card: #1f2236;
  --border: rgba(255, 107, 53, 0.22);
  --text: #eef0f6;
  --muted: #a9adc1;
  --ok: #4ecca3;
  --info: #5faef7;
  --radius: 16px;
  --max: 1160px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
a { color: var(--primary); }
img { max-width: 100%; display: block; }
code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.92em;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Navegação */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(18, 19, 31, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.logo {
  font-size: 1.35rem; font-weight: 800; color: var(--text);
  text-decoration: none; display: flex; align-items: center; gap: 0.4rem;
}
.logo span { color: var(--primary); }
.nav-links { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 0.35rem 0.7rem; font-size: 1.1rem;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--secondary)); color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}
.btn-secondary { border: 2px solid var(--primary); color: var(--text); }
.btn-secondary:hover { background: var(--primary); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.2); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn-row.center { justify-content: center; }

/* Hero */
.hero {
  padding: 6rem 0 5rem;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,107,53,0.18), transparent 45%),
    linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  text-align: center;
}
.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.9rem; margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.15; margin-bottom: 1.25rem; }
.hero h1 .grad {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 760px; margin: 0 auto 2rem; }
.hero .btn-row { justify-content: center; }
.hero-note { margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }

/* Seções */
.section { padding: 5rem 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.2; margin-bottom: 0.75rem; text-align: center; }
.section .intro { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 3rem; font-size: 1.08rem; }

/* Grids e cards */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(255, 107, 53, 0.18); }
.card .icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.card h3 { color: var(--primary); font-size: 1.25rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); }
.card ul { margin: 0.75rem 0 1.25rem 1.1rem; color: var(--muted); }
.card .btn { margin-top: auto; }
.card.product { display: flex; flex-direction: column; }
.card.product .platform { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Lista de ECUs */
.chips { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.chip {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.55rem 1.2rem; font-weight: 600;
}

/* Passos */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { position: relative; padding-top: 3rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 1.25rem; left: 1.75rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-top: 0.75rem; }

/* Destaque (Slowduino / guia) */
.highlight {
  border-radius: 20px; padding: 2.5rem; border: 2px solid var(--ok);
  background: linear-gradient(135deg, #2d4a2b 0%, #1e3a1c 100%);
}
.highlight h3 { color: var(--ok); font-size: 1.6rem; margin-bottom: 0.75rem; }
.highlight p { margin-bottom: 1rem; }
.highlight ul { margin: 0 0 1.5rem 1.25rem; }
.highlight.info { border-color: var(--info); background: linear-gradient(135deg, #2a4a7c 0%, #1a3a5c 100%); }
.highlight.info h3 { color: var(--info); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.4rem; margin-bottom: 0.85rem;
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.faq details p { margin-top: 0.75rem; color: var(--muted); }

/* Artigo (páginas de guia) */
.article { max-width: 820px; margin: 0 auto; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin-bottom: 1rem; }
.article h2 { text-align: left; font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
.article p, .article li { color: var(--muted); }
.article ol, .article ul { margin: 0.5rem 0 1rem 1.4rem; }
.article li { margin-bottom: 0.4rem; }
.callout {
  border-left: 4px solid var(--primary); background: var(--card);
  padding: 1rem 1.25rem; border-radius: 8px; margin: 1.5rem 0;
}

/* Footer */
.site-footer {
  background: #0d0e17; border-top: 1px solid var(--border);
  padding: 3rem 0 2rem; font-size: 0.93rem; color: var(--muted);
}
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 2rem; }
.site-footer h4 { color: var(--text); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
.legal { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 1.5rem; font-size: 0.82rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.active { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Responsivo */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.85rem 1.25rem; }
  .hero { padding: 4rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
  .highlight { padding: 1.75rem 1.25rem; }
}

/* ===== Ferramentas (calculadoras) ===== */
.nav-links .lang-switch { display: flex; gap: 0.25rem; }
.lang-switch a {
  font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15); color: var(--muted);
}
.lang-switch a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.tool-hero { padding: 3rem 0 1rem; }
.tool-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; margin-bottom: 0.75rem; }
.tool-hero .lead { color: var(--muted); max-width: 760px; font-size: 1.05rem; }
.tool { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.tool .fields { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tool h3.sub { font-size: 1.05rem; color: var(--primary); margin: 1.5rem 0 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field[hidden] { display: none; }
.f-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.f-hint { font-size: 0.78rem; color: var(--muted); opacity: 0.8; }
.tool input, .tool select {
  width: 100%; padding: 0.65rem 0.8rem; border-radius: 10px; font-size: 1rem;
  background: #12131f; color: var(--text); border: 1px solid rgba(255,255,255,0.18);
  font-family: inherit; min-height: 44px;
}
.tool input:focus, .tool select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.tool .chips-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
.chip-btn {
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.4rem 0.95rem; cursor: pointer; font-weight: 600; font-size: 0.9rem; min-height: 36px;
}
.chip-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.results { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: 1.25rem; }
.result { background: #12131f; border: 1px solid rgba(255,107,53,0.35); border-radius: 12px; padding: 0.85rem 1rem; }
.r-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.15rem; }
.r-val { font-size: 1.45rem; font-weight: 800; color: var(--primary); }
.r-val small { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.note-warn { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 10px; border-left: 4px solid #f2b705; background: rgba(242,183,5,0.1); }
.note-warn[hidden] { display: none; }
table.data { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: 0.95rem; }
table.data th, table.data td { padding: 0.5rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; }
table.data th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tr.sel td { color: var(--primary); font-weight: 700; }
.tools-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.tools-grid a.card { text-decoration: none; color: inherit; display: block; }
.tools-grid a.card h2 { text-align: left; font-size: 1.15rem; color: var(--primary); margin-bottom: 0.4rem; }
.related { margin: 3rem 0 1rem; }
.related h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.cta-box { margin: 2.5rem 0; padding: 1.75rem; border-radius: 16px; border: 1px solid var(--border); background: linear-gradient(135deg, #16213e 0%, #0f3460 100%); }
.cta-box h2 { text-align: left; font-size: 1.3rem; margin: 0 0 0.5rem; }
.cta-box p { color: var(--muted); margin-bottom: 1rem; }
@media (max-width: 820px) {
  .nav-links .lang-switch { padding: 0.85rem 1.25rem; }
}
