/* ==========================================================================
   Hatux — estilos globais
   ========================================================================== */

/* Space Grotesk (auto-hospedada) — logo e títulos */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #3a52f4;
  --primary-hover: #2a40d8;
  --primary-soft: #eef0fe;
  --accent: #06b6d4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #111831;
    --surface: #141c38;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #232d52;
    --primary: #7d8cff;
    --primary-hover: #a3aeff;
    --primary-soft: #1c2456;
    --accent: #22d3ee;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

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

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: 12px; text-align: center; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--text); }
.nav .btn { color: #fff; padding: 9px 16px; }

/* ---------- Seções ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 88px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 700px; height: 700px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent), transparent);
  pointer-events: none;
}
.hero .container { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 .grad { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.code-card {
  background: #0f172a; color: #cbd5e1; border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--mono); font-size: .88rem; line-height: 1.7; overflow: hidden; border: 1px solid #1e293b;
}
.code-card .bar { display: flex; gap: 6px; padding: 12px 14px; background: #111a2e; border-bottom: 1px solid #1e293b; }
.code-card .bar span { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.code-card .bar span:nth-child(1) { background: #f87171; }
.code-card .bar span:nth-child(2) { background: #fbbf24; }
.code-card .bar span:nth-child(3) { background: #34d399; }
.code-card pre { margin: 0; padding: 20px 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-k { color: #c084fc; } .tk-s { color: #86efac; } .tk-f { color: #67e8f9; } .tk-c { color: #64748b; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 64px 0; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.card p { color: var(--text-muted); margin: 0; font-size: .97rem; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Processo ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0; font-family: var(--mono); font-weight: 700; font-size: 1.6rem; color: var(--primary);
}
.step p { color: var(--text-muted); font-size: .97rem; }

/* ---------- Tecnologias ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { font-family: var(--mono); font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }

/* ---------- Produtos ---------- */
.product-card { display: flex; flex-direction: column; gap: 14px; }
.product-card .head { display: flex; align-items: center; gap: 14px; }
.product-logo {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #0ea5e9, #6366f1); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 1.1rem;
}
img.product-logo { background: #fff; object-fit: contain; border: 1px solid var(--border); }
.product-logo-lg { width: 72px; height: 72px; border-radius: 18px; }
.product-card h3 { margin: 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); vertical-align: middle; margin-left: 6px; letter-spacing: 0; }
.feature-list { list-style: none; padding: 0 !important; }
.feature-list li { padding-left: 28px; position: relative; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.product-card .links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: auto; font-size: .92rem; font-weight: 500; }

/* ---------- CTA / Contato ---------- */
.cta {
  background: linear-gradient(135deg, #3a52f4, #1e2fa8); color: #fff;
  border-radius: 22px; padding: 56px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); max-width: 560px; margin: 0 auto 28px; }
.cta .btn-primary { background: #fff; color: #1e2fa8; }
.cta .btn-primary:hover { background: #eef0fe; color: #1e2fa8; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta .btn-ghost:hover { border-color: #fff; color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 620px) { .cta { padding: 40px 22px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; font-size: .92rem; color: var(--text-muted); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }

/* ---------- Páginas internas / documentos ---------- */
.page-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.breadcrumb { font-size: .88rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span { margin: 0 6px; opacity: .6; }

.doc { padding: 48px 0 88px; }
.doc .container { max-width: 800px; }
.doc h2 { font-size: 1.35rem; margin-top: 2.2em; padding-top: .4em; }
.doc h3 { font-size: 1.08rem; margin-top: 1.6em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc .card h3 { margin-top: 0; }
.doc .meta { color: var(--text-muted); font-size: .92rem; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.doc-nav a { font-size: .9rem; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); background: var(--surface); }
.doc-nav a:hover, .doc-nav a[aria-current="page"] { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.notice { background: var(--primary-soft); border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 8px; margin: 24px 0; }

/* Marca trechos que ainda precisam ser preenchidos — remova a classe ao preencher */
.todo { background: #fef08a; color: #713f12; padding: 0 4px; border-radius: 4px; font-weight: 600; }

/* ---------- Utilidades ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Smash PDF (ferramenta) ---------- */
.hidden { display: none !important; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.smash-section { padding: 48px 0 56px; }
.smash {
  max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 22px;
}
@media (max-width: 620px) { .smash { padding: 18px; } }

.sm-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--border)); border-radius: 16px;
  padding: 44px 20px; background: var(--primary-soft); transition: border-color .2s, background .2s, transform .2s;
}
.sm-drop:hover, .sm-drop:focus-visible, .sm-drop.dragover { border-color: var(--primary); outline: none; }
.sm-drop.dragover { transform: scale(1.01); }
.sm-drop svg { width: 48px; height: 48px; color: var(--primary); margin-bottom: 6px; }
.sm-drop strong { font-family: var(--display); font-size: 1.2rem; }
.sm-drop span { color: var(--text-muted); font-size: .95rem; }

.sm-file { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt); }
.sm-file > svg { width: 32px; height: 32px; color: var(--primary); flex-shrink: 0; }
.sm-file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-file-meta span { color: var(--text-muted); font-size: .88rem; }

.sm-modes { border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-modes legend, .sm-dpi-head label { font-weight: 600; font-size: .92rem; margin-bottom: 10px; padding: 0; }
@media (max-width: 620px) { .sm-modes { grid-template-columns: 1fr; } }
.sm-mode { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.sm-mode:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.sm-mode:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.sm-mode input { margin-top: 5px; accent-color: var(--primary); }
.sm-mode small { display: block; color: var(--text-muted); font-size: .86rem; line-height: 1.45; margin-top: 4px; }

.sm-dpi { margin-bottom: 20px; }
.sm-dpi-head { display: flex; justify-content: space-between; align-items: center; }
.sm-dpi-head label { margin: 0; }
.sm-dpi input[type="range"] { width: 100%; accent-color: var(--primary); margin: 12px 0 4px; }
.sm-dpi-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-muted); gap: 8px; }
.sm-go { width: 100%; padding: 14px; font-size: 1.02rem; }

.sm-working { text-align: center; }
.sm-working p { margin: 12px 0 4px; font-weight: 600; }
.sm-working small, .sm-hint { color: var(--text-muted); font-size: .84rem; }
.sm-progress { height: 10px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); overflow: hidden; }
.sm-bar { height: 100%; width: 4%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .3s; }
.sm-bar.indeterminate { width: 35%; animation: sm-slide 1.2s ease-in-out infinite; }
@keyframes sm-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .sm-bar.indeterminate { animation: none; width: 100%; opacity: .6; } }

.sm-result { display: grid; gap: 16px; }
.sm-stats { display: grid; grid-template-columns: 1fr auto 1fr 1fr; gap: 12px; align-items: center; }
.sm-stats > div:not(.sm-arrow) { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.sm-stats span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.sm-stats strong { font-family: var(--display); font-size: 1.35rem; }
.sm-arrow { color: var(--text-muted); font-size: 1.4rem; }
.sm-stats .sm-pct { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.sm-pct strong { color: var(--primary); }
@media (max-width: 620px) { .sm-stats { grid-template-columns: 1fr 1fr; } .sm-arrow { display: none; } .sm-pct { grid-column: span 2; } }
.sm-nogain { margin: 0; padding: 12px 16px; border-radius: 10px; background: #fef3c7; color: #78350f; font-size: .92rem; }
.sm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sm-actions .btn { flex: 1; min-width: 200px; }

.sm-error { padding: 12px 16px; border-radius: 10px; background: #fee2e2; color: #991b1b; font-size: .94rem; }
.sm-privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-size: .88rem; color: var(--text-muted); text-align: center; }
.sm-privacy svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--primary); }
