/* =========================================================================
   JAWK Tradutor — estilos
   Tema escuro nativo, utilitário. Destaques: dourado suave e azul-metálico.
   ========================================================================= */

:root {
  --bg: #0f1115;
  --bg-elev: #181b21;
  --bg-elev-2: #1f232b;
  --border: #2a2f38;
  --border-strong: #3a404b;

  --text: #e6e8eb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --gold: #d4b46a;
  --gold-hover: #e0c27d;
  --gold-ink: #17140c;
  --gold-soft: rgba(212, 180, 106, 0.12);

  --steel: #7fa3c7;
  --steel-hover: #94b4d4;
  --steel-ink: #0d141b;
  --steel-soft: rgba(127, 163, 199, 0.12);

  --ok: #6fbf8e;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;

  --radius: 8px;
  --radius-sm: 5px;
  --container: 1160px;
  --header-h: 64px;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--steel); text-decoration: none; }
a:hover { color: var(--steel-hover); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.88em; }
code {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  color: var(--gold);
  word-break: break-word;
}
pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8em 1em;
  overflow-x: auto;
  margin: 0.6em 0;
}
pre code { background: none; border: 0; padding: 0; color: var(--text); word-break: normal; }
kbd {
  display: inline-block;
  min-width: 1.8em;
  padding: 0.1em 0.45em;
  text-align: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--text);
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-narrow { max-width: 820px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--gold); color: var(--gold-ink);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--text-muted); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9em;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  font: inherit; font-weight: 600; line-height: 1.2;
  padding: 0.7em 1.15em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none !important;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.5em 0.9em; font-size: 0.9rem; }
.btn-lg { padding: 0.85em 1.35em; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-hover); color: var(--gold-ink); }

.btn-steel { background: var(--steel); color: var(--steel-ink); }
.btn-steel:hover { background: var(--steel-hover); color: var(--steel-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 21, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-logo { width: 28px; height: 28px; }
.brand-name { font-weight: 500; font-size: 1.05rem; margin: 0; letter-spacing: 0.01em; }
.brand-name strong { color: var(--gold); font-weight: 700; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(111, 191, 142, 0.15);
  display: inline-block;
}

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.site-nav ul a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.site-nav ul a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text); padding: 6px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.lead { font-size: 1.12rem; color: var(--text-muted); max-width: 60ch; }
.lead strong { color: var(--text); font-weight: 600; }

.compat { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 1.5em 0; padding: 0; }
.chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--steel);
  background: var(--steel-soft);
  border: 1px solid rgba(127, 163, 199, 0.28);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-note { margin: 12px 0 0; font-size: 0.85rem; color: var(--text-dim); }

.counter-panel {
  margin-top: 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 560px;
}
.counter-main { display: flex; flex-direction: column; }
.counter-value {
  font-family: var(--font-mono);
  font-size: 1.9rem; font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.counter-label { font-size: 0.88rem; color: var(--text-muted); }
.counter-split { display: flex; gap: 22px; margin: 0; }
.counter-split div { display: flex; flex-direction: column; }
.counter-split dt { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.counter-split dd { margin: 0; font-family: var(--font-mono); font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }

/* Prévia do log (terminal) */
.term {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.term-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-muted);
}
.term-state { display: inline-flex; align-items: center; gap: 7px; }
.term-log { list-style: none; margin: 0; padding: 6px 0; font-family: var(--font-mono); font-size: 0.82rem; }
.term-log li { padding: 10px 16px; border-bottom: 1px dashed var(--border); }
.term-log li:last-child { border-bottom: 0; }
.term-log .who { color: var(--text); }
.term-log .src { color: var(--text-dim); display: block; margin-top: 2px; }
.term-log .src::before { content: "EN  "; color: var(--text-dim); opacity: 0.7; }
.term-log .dst { color: var(--text); display: block; }
.term-log .dst::before { content: "PT  "; color: var(--gold); }
.ch { font-weight: 600; }
.ch-guild { color: #6fbf8e; }
.ch-party { color: #7fa3c7; }
.ch-world { color: #c9a36b; }
.ch-quest { color: #d4b46a; }

/* ---------- Anúncios ---------- */
.ad-slot {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(24, 27, 33, 0.5);
}
.ad-label {
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim);
  align-self: flex-start;
  padding: 6px 10px 0;
}
.ad-leaderboard { margin: 28px 0; min-height: 110px; padding-bottom: 8px; }
.ad-leaderboard .adsbygoogle { width: 100%; min-height: 90px; }
.ad-rectangle { width: 320px; max-width: 100%; min-height: 280px; padding-bottom: 10px; overflow: hidden; }

/* Sem ADSENSE_PUB_ID configurado: oculta os espaços vazios. */
html[data-ads="off"] .ad-slot,
html[data-ads="off"] .install-aside { display: none; }
html[data-ads="off"] .install-layout { grid-template-columns: minmax(0, 1fr); }

/* ---------- Seções ---------- */
.section { padding: 84px 0; }
.section-alt { background: #12151a; border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

/* Como funciona */
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.module-card, .install-card, .dl-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.module-card p { color: var(--text-muted); }
.module-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 4px; padding: 3px 8px; margin-bottom: 14px;
}
.tag-gold { color: var(--gold); background: var(--gold-soft); }
.tag-steel { color: var(--steel); background: var(--steel-soft); }
.tag-neutral { color: var(--text-muted); background: rgba(156, 163, 175, 0.12); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 24px; margin-bottom: 8px; color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 10px; height: 6px;
  border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

.pipeline {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elev);
}
.pipeline li { padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); }
.pipeline li:last-child { border-right: 0; }
.pipeline .step-n { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold); }
.pipeline strong { font-size: 1rem; }
.pipeline span:last-child { font-size: 0.88rem; color: var(--text-muted); }

.gallery-title { margin-top: 64px; margin-bottom: 20px; font-size: 1.35rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shot { margin: 0; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-elev-2); border-bottom: 1px solid var(--border); }
.shot figcaption { padding: 14px 16px 16px; font-size: 0.9rem; color: var(--text-muted); }
.shot figcaption strong { color: var(--text); }

/* Instalação */
.install-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.install-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.install-card header { display: flex; flex-direction: column; align-items: flex-start; }
.install-card h3 { margin-bottom: 14px; }
.install-aside { position: sticky; top: calc(var(--header-h) + 24px); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 8px; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  color: var(--text); background: var(--bg-elev-2); border: 1px solid var(--border-strong);
}
.hint { font-size: 0.88rem; color: var(--text-muted); margin: 6px 0 0; }
.hint.warn { border-left: 2px solid var(--gold); padding-left: 10px; margin-top: 12px; }

.keys { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.92rem; }
.keys caption { text-align: left; font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); padding-bottom: 8px; }
.keys th, .keys td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.keys th { font-weight: 600; color: var(--text-muted); font-size: 0.82rem; background: var(--bg-elev-2); }
.keys tr:last-child td { border-bottom: 0; }
.keys td:first-child { white-space: nowrap; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dl-head h3 { margin: 0; }
.dl-meta { margin: 18px 0 22px; display: grid; gap: 0; }
.dl-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 0.93rem; }
.dl-meta dt { color: var(--text-muted); }
.dl-meta dd { margin: 0; font-family: var(--font-mono); text-align: right; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 48px 16px 20px; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--gold);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--text-muted); }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: 0.9rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: start; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); }
.disclaimer { grid-column: 1 / -1; font-size: 0.8rem; color: var(--text-dim); margin: 0; max-width: 80ch; }

/* Aviso flutuante (download indisponível etc.) */
.notice {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 16px);
  max-width: calc(100% - 32px);
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.notice.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Página 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.notfound .code { font-family: var(--font-mono); color: var(--gold); font-size: 0.9rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-preview { max-width: 640px; }
  .install-layout { grid-template-columns: minmax(0, 1fr); }
  .install-aside { position: static; display: flex; justify-content: center; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .modules, .downloads { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li:nth-child(2) { border-right: 0; }
  .pipeline li:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .hero { padding-top: 44px; }
  .status-badge { display: none; }
  .cta-group .btn { width: 100%; }
  .gallery { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .module-card, .install-card, .dl-card { padding: 20px; }
  .footer-inner { grid-template-columns: 1fr; }
  .keys th, .keys td { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
