/* ============================================================
   MegaTools Apps — megatoolsapps.com.br
   Folha de estilo única do site (100% externa, compatível com
   Content-Security-Policy style-src 'self').
   ============================================================ */

:root {
  --ink: #101a2e;
  --ink-soft: #2b3a55;
  --muted: #5b6b85;
  --bg: #f5f7fc;
  --card: #ffffff;
  --line: #e3e9f4;
  --line-strong: #cdd8ea;
  --brand: #2f5cff;
  --brand-dark: #1e44d4;
  --brand-2: #7b3ff2;
  --brand-soft: #eef3ff;
  --brand-soft-line: #d8e3ff;
  --ok: #0c8f5b;
  --ok-soft: #e7f7ef;
  --warn: #a15c07;
  --warn-soft: #fdf3e2;
  --err: #c92f3d;
  --err-soft: #fdecee;
  --footer-bg: #0d1526;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(23, 43, 99, 0.18);
  --shadow-soft: 0 4px 16px -8px rgba(23, 43, 99, 0.14);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 .55em; font-weight: 800; }
h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.015em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); background: #eef2fa; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 46px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 26px; }
.section-head p { color: var(--muted); }
.center { text-align: center; }
.center .section-head, .section-head.center { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Acessibilidade ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid rgba(47, 92, 255, .45); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 64px; }
.logo-link { display: inline-flex; align-items: center; gap: 10px; }
.logo-link img { height: 36px; width: auto; display: block; }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 9px 14px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem;
}
.main-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.main-nav a.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line-strong); border-radius: 10px;
  width: 44px; height: 40px; cursor: pointer; padding: 8px 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow-soft); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 16px 16px; }
  .main-nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(123, 63, 242, .12), transparent 60%),
    radial-gradient(800px 400px at 0% 0%, rgba(47, 92, 255, .12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 40px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: start; }
.hero p.lead { font-size: 1.08rem; color: var(--muted); max-width: 640px; }
.hero-art { border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; padding: 0; list-style: none; }
.badges li {
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink-soft);
  border-radius: 999px; padding: 5px 13px; font-size: .84rem; font-weight: 600;
}
.badges li::before { content: "✓ "; color: var(--ok); font-weight: 800; }
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art-wrap { display: none; }
}

/* ---------- Painel de ferramenta ---------- */
.tool-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin: 6px 0 10px;
}
.tool-panel h2, .tool-panel h3 { margin-top: 0; }
.tool-block + .tool-block { margin-top: 26px; padding-top: 26px; border-top: 1px dashed var(--line-strong); }
.tool-block > h3 { font-size: 1.02rem; color: var(--ink-soft); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type="text"], input[type="number"], input[type="date"], input[type="tel"],
input[type="url"], input[type="email"], select, textarea {
  font: inherit; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; background: #fff; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(47, 92, 255, .15); }
textarea { resize: vertical; min-height: 110px; }
input[type="color"] { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); height: 46px; width: 100%; padding: 4px; background: #fff; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .95rem; color: var(--ink-soft); font-weight: 500; }

.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.row-tight { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-checks { display: flex; flex-wrap: wrap; gap: 14px 22px; margin: 4px 0 14px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font: inherit; font-weight: 700; font-size: .98rem;
  border: 0; border-radius: var(--radius-sm); padding: 12px 22px;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(47, 92, 255, .65);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); text-decoration: none; box-shadow: 0 10px 22px -8px rgba(47, 92, 255, .7); }
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: #fff; color: var(--brand-dark);
  border: 1.5px solid var(--brand-soft-line); box-shadow: none;
}
.btn-secondary:hover { background: var(--brand-soft); filter: none; }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: #fff; filter: none; }
.btn-small { padding: 8px 14px; font-size: .88rem; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Resultados ---------- */
.result {
  margin-top: 18px; background: var(--brand-soft);
  border: 1px solid var(--brand-soft-line); border-radius: 12px;
  padding: 16px 18px; overflow-wrap: anywhere;
}
.result .big { display: block; font-size: 1.75rem; font-weight: 800; color: var(--brand-dark); line-height: 1.2; }
.result .exp { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
.result table { margin: 8px 0 0; }
.result-ok { background: var(--ok-soft); border-color: #bfe8d4; }
.result-ok .big { color: var(--ok); }
.result-warn { background: var(--warn-soft); border-color: #f3ddb5; }
.result-warn .big { color: var(--warn); }
.result-err { background: var(--err-soft); border-color: #f5c6cc; }
.result-err .big { color: var(--err); font-size: 1.05rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.stat {
  background: var(--brand-soft); border: 1px solid var(--brand-soft-line);
  border-radius: 12px; padding: 12px 14px; text-align: center;
}
.stat b { display: block; font-size: 1.45rem; color: var(--brand-dark); line-height: 1.2; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 600; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: #f0f4fb; color: var(--ink-soft); font-size: .85rem; }

/* ---------- Abas ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  background: #fff; color: var(--ink-soft);
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 8px 18px;
}
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Cards de ferramentas ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); text-decoration: none; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.card h3 { margin: 0; font-size: 1.04rem; }
.card p { margin: 0; color: var(--muted); font-size: .89rem; flex: 1; }
.card .card-go { color: var(--brand-dark); font-weight: 700; font-size: .88rem; margin-top: 8px; }
.card:hover .card-go { text-decoration: underline; }

/* ---------- Página de ferramenta ---------- */
.breadcrumb { font-size: .84rem; color: var(--muted); margin: 18px 0 6px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }
.tool-hero { padding: 10px 0 8px; }
.tool-hero .tagline { color: var(--muted); font-size: 1.05rem; max-width: 700px; }
.tool-hero-grid { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center; }
.tool-hero-grid img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
@media (max-width: 820px) { .tool-hero-grid { grid-template-columns: 1fr; } .tool-hero-grid .tool-hero-art { display: none; } }

.steps { counter-reset: step; list-style: none; padding: 0; max-width: 760px; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 14px 52px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

.prose { max-width: 780px; }
.prose h2 { margin-top: 1.4em; }
.prose ul li, .prose ol li { margin-bottom: .4em; }

.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; font-weight: 700; padding: 15px 34px 15px 2px;
  list-style: none; position: relative; color: var(--ink-soft);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--brand);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 16px; padding-right: 20px; }

.cta-strip {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: var(--radius); color: #fff; padding: 30px 30px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  box-shadow: var(--shadow);
}
.cta-strip h2 { color: #fff; margin: 0 0 4px; font-size: 1.35rem; }
.cta-strip p { margin: 0; opacity: .92; font-size: .95rem; }
.cta-strip .btn { background: #fff; color: var(--brand-dark); box-shadow: none; }

/* ---------- Recursos (features) ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .ic {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 1.3rem; font-weight: 800; margin-bottom: 12px;
}
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Ferramentas específicas ---------- */
/* QR Code */
.qr-preview { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 18px; }
.qr-preview canvas { border: 1px solid var(--line); border-radius: 12px; max-width: 100%; height: auto; background: #fff; }

/* Calculadora */
.calc-wrap { max-width: 380px; margin: 0 auto; }
.calc-screen {
  background: #0f172a; color: #fff; border-radius: 14px; padding: 14px 18px 16px;
  text-align: right; margin-bottom: 14px; min-height: 92px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.calc-screen .ca-hist { font-size: .85rem; color: #8fa3c8; min-height: 1.3em; overflow-wrap: anywhere; }
.calc-screen .ca-cur { font-size: 2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ca-btn {
  font: inherit; font-size: 1.12rem; font-weight: 600; cursor: pointer;
  background: #f4f7fd; color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 0;
  transition: background .1s ease, transform .1s ease;
}
.ca-btn:hover { background: #e9eefb; }
.ca-btn:active { transform: scale(.97); }
.ca-btn.op { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-soft-line); font-weight: 700; }
.ca-btn.eq { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; }
.ca-btn.danger { color: var(--err); }

/* Cronômetro / Temporizador */
.timer-disp {
  font-family: var(--mono); font-size: clamp(2.6rem, 9vw, 4.2rem); font-weight: 700;
  text-align: center; color: var(--ink); letter-spacing: .02em;
  background: #f4f7fd; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 10px; margin-bottom: 18px; font-variant-numeric: tabular-nums;
}
.timer-disp.running { color: var(--brand-dark); border-color: var(--brand-soft-line); background: var(--brand-soft); }
.timer-disp.done { color: var(--err); background: var(--err-soft); border-color: #f5c6cc; }
.timer-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.laps { margin-top: 18px; padding: 0; list-style: none; max-height: 260px; overflow: auto; }
.laps li { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .95rem; }
.laps li span:first-child { color: var(--muted); }

/* Sorteador */
.sorteio-out { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.sorteio-num {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; box-shadow: var(--shadow-soft);
}

/* Senha */
.pw-out-row { display: flex; gap: 10px; align-items: stretch; }
.pw-out-row input { font-family: var(--mono); font-size: 1.05rem; }
.pw-meter { height: 9px; background: #e8edf6; border-radius: 99px; margin-top: 14px; overflow: hidden; }
.pw-meter-bar { height: 100%; width: 0; border-radius: 99px; background: var(--err); transition: width .25s ease, background .25s ease; }
.pw-label { font-size: .86rem; font-weight: 700; margin-top: 6px; }

/* Dropzone (imagens) */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: #fafcff; padding: 38px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone p { margin: 0; color: var(--muted); }
.dropzone .dz-title { font-weight: 700; color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 4px; }
.img-preview { max-width: 100%; max-height: 340px; width: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: block; margin: 14px auto 0; }

/* Saída de texto (lorem etc.) */
.text-out {
  background: #fafcff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin-top: 16px; max-height: 420px; overflow: auto;
}
.text-out p:last-child { margin-bottom: 0; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--footer-bg); color: #c4cfe3; margin-top: 60px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 30px; padding: 44px 0 30px; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b7c3dc; }
.site-footer a:hover { color: #fff; }
.footer-company p { margin-bottom: 8px; color: #94a3c0; }
.footer-company strong { color: #d6deee; }
.footer-bottom { border-top: 1px solid #1e2b47; padding: 18px 0 22px; font-size: .82rem; color: #8093b5; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 680px; margin: 0 auto;
  background: #101a2e; color: #dbe4f5;
  border-radius: 14px; padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  box-shadow: 0 18px 40px -12px rgba(2, 8, 30, .55);
}
.cookie-banner p { margin: 0; font-size: .86rem; flex: 1 1 340px; }
.cookie-banner a { color: #9db8ff; text-decoration: underline; }
.cookie-banner .btn { padding: 9px 20px; font-size: .88rem; }

/* ---------- Avisos / notas ---------- */
.note {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 18px 0;
  font-size: .9rem; color: var(--ink-soft);
}
.note-warn { border-left-color: var(--warn); background: var(--warn-soft); }

/* ---------- Página de conteúdo (legal) ---------- */
.page-head { padding: 40px 0 8px; }
.page-head .updated { color: var(--muted); font-size: .88rem; }
.legal { max-width: 800px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal table { margin: 14px 0; }

/* ---------- Utilidades ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-card h3 { display: flex; align-items: center; gap: 8px; }
.related-head { margin: 40px 0 18px; }
.copy-feedback { color: var(--ok); font-weight: 700; }
