/* Figurinhas com Som · estilo Apple, tema claro e escuro.
   Contrastes conferidos: ver nota "Os cinzas secundarios da Apple reprovam WCAG AA" no cofre. */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --inset: #e8e8ed;
  --line: #d2d2d7;
  --text: #1d1d1f;
  --text-2: #6e6e73;          /* 5.07 sobre branco, 4.66 sobre #f5f5f7 */
  --accent: #0071e3;          /* preenchimento: 4.70 com rótulo branco */
  --accent-hover: #0064c8;    /* escurece no hover, nunca clareia */
  --accent-label: #ffffff;
  --link: #0066cc;            /* azul de texto, separado do preenchimento */
  --nav: rgba(251, 251, 253, .8);
  --shadow: 0 2px 6px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
  --check-a: #ececf0; --check-b: #f7f7f9;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --inset: #3a3a3c;
  --line: #38383a;
  --text: #f5f5f7;
  --text-2: #a1a1a6;          /* 6.6 sobre #1c1c1e, 5.4 sobre #2c2c2e */
  --accent: #0071e3;          /* contra o preto: 4.6 como forma, rótulo branco 4.70 */
  --accent-hover: #0064c8;
  --accent-label: #ffffff;
  --link: #2997ff;
  --nav: rgba(22, 22, 23, .8);
  --shadow: none;
  --check-a: #242426; --check-b: #2e2e30;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px; line-height: 1.47; letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }

/* ---------- anúncio (carrossel no topo) ---------- */
.ad { padding-top: 12px; padding-bottom: 12px; }
.ad-frame { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 2 / 1; max-height: 420px; width: 100%; margin: 0 auto; background: #06200a; }
@media (min-width: 900px) { .ad-frame { max-width: 560px; } }
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); }
.ad-slide.on { opacity: 1; z-index: 1; }
.ad-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-tag { position: absolute; z-index: 2; left: 12px; bottom: 12px; font-size: 11px; letter-spacing: 0; color: #fff; background: rgba(0,0,0,.55); border-radius: 6px; padding: 2px 7px; }
.ad-x { position: absolute; z-index: 2; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ad-x:hover { background: rgba(0,0,0,.75); }
.ad-dots { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: flex; gap: 2px; }
.ad-dots button { width: 24px; height: 24px; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; place-items: center; }
.ad-dots button::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); }
.ad-dots button.on::after { background: #fff; }
.ad-legal { font-size: 12px; color: var(--text-2); margin: 6px auto 0; letter-spacing: 0; text-align: center; max-width: 840px; }

/* ---------- navegação ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 12px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); flex: 0 0 auto; }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 15px; } .lang select { padding-left: 6px; } .nav-in { gap: 4px; } }
.nav-sp { flex: 1; }
.lang { position: relative; }
.lang select { appearance: none; -webkit-appearance: none; background: transparent; color: var(--text); border: 0; font: inherit; font-size: 14px; padding: 8px 26px 8px 10px; border-radius: 980px; cursor: pointer; }
.lang select:hover { background: var(--surface-2); }
.lang::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .moon { display: none; }
[data-theme="dark"] .icon-btn .sun { display: none; }
[data-theme="dark"] .icon-btn .moon { display: block; }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(32px, 4vw, 48px); }
.eyebrow { color: var(--text-2); font-size: 17px; font-weight: 600; margin: 0 0 10px; }
h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; margin: 0 auto 16px; max-width: 16ch; }
.lead { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.38; color: var(--text-2); max-width: 36em; margin: 0 auto; letter-spacing: -0.015em; }

/* ---------- ferramenta ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 834px) { .tool { grid-template-columns: 1fr; } }
.card { background: var(--surface); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 600px) { .card { padding: 20px; border-radius: 22px; } }
.card h2 { font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.step { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: 0; }

.drop { display: grid; place-items: center; text-align: center; gap: 10px; min-height: 280px; border: 1.5px dashed var(--line); border-radius: 22px; padding: 28px; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--surface-2); }
.drop input { display: none; }
.drop .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.drop b { font-weight: 600; }
.drop span { color: var(--text-2); font-size: 14px; }
.swap { margin-top: 12px; }

.stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 22px; overflow: hidden; touch-action: none; cursor: grab;
  background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 24px 24px; }
.stage:active { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; display: block; }
.badge { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.hint { color: var(--text-2); font-size: 14px; margin: 10px 0 0; text-align: center; letter-spacing: -0.01em; }

.field { margin-top: 20px; }
.field > label, .field > .label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text-2); margin-bottom: 8px; letter-spacing: -0.01em; }
.field output { color: var(--text); font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--text-2); margin: 10px 0 0; letter-spacing: -0.01em; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--inset); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--inset); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 3px 8px rgba(0,0,0,.18); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 3px 8px rgba(0,0,0,.18); }
input[type=range]:disabled { opacity: .4; cursor: not-allowed; }

input[type=text] { width: 100%; height: 44px; background: var(--surface-2); color: var(--text); border: 1px solid transparent; border-radius: 12px; padding: 0 14px; font: inherit; }
input[type=text]::placeholder { color: var(--text-2); }
input[type=text]:focus { outline: none; border-color: var(--accent); }

/* controle segmentado iOS */
.seg { display: flex; background: var(--inset); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; transition: background-color .2s var(--ease); }
.seg button.on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
[data-theme="dark"] .seg button.on { background: #636366; }

/* interruptor iOS */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 17px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: relative; flex: 0 0 auto; width: 51px; height: 31px; border-radius: 31px; background: var(--inset); transition: background-color .25s var(--ease); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15); transition: transform .25s var(--ease); }
.switch input:checked + i { background: #248a3d; }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 22px; border-radius: 980px; border: 0; background: var(--accent); color: var(--accent-label); font: inherit; font-size: 17px; cursor: pointer; transition: background-color .2s var(--ease); }
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.secondary:hover { background: var(--inset); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* saídas */
.exports { margin-top: 20px; }
.outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 834px) { .outs { grid-template-columns: 1fr; } }
.out { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 18px; padding: 20px; }
.out h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.out p { margin: 0 0 16px; color: var(--text-2); font-size: 14px; letter-spacing: -0.01em; flex: 1; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent-label); background: var(--accent); border-radius: 980px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; letter-spacing: 0; }
.res { margin-top: 12px; font-size: 14px; color: var(--text-2); display: grid; gap: 6px; }
.res a { font-weight: 600; }
.res .row2 { grid-template-columns: 1fr; gap: 8px; }
.res .btn { white-space: nowrap; }
.res .warn { color: var(--text); }
.progress { height: 4px; border-radius: 4px; background: var(--inset); overflow: hidden; margin-top: 12px; display: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- conteúdo ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0 0; }
.section > .wrap > h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; text-align: center; margin: 0 0 clamp(28px, 4vw, 48px); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 834px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--surface); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.steps .num { font-size: 40px; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; line-height: 1; display: block; margin-bottom: 14px; }
.steps h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--text-2); }

.faq { max-width: 760px; margin: 0 auto; background: var(--surface); border-radius: 28px; padding: 8px 28px; box-shadow: var(--shadow); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; position: relative; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 22px; color: var(--text-2); }

/* ---------- rodapé ---------- */
footer { margin-top: clamp(64px, 8vw, 112px); border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); letter-spacing: 0; }
footer .wrap { padding-top: 24px; padding-bottom: 40px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 16px; font-size: 14px; }
.foot-links a { color: var(--text); }
.foot-blog { font-weight: 600; color: var(--link) !important; }
footer p { margin: 0 0 6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ============ fluxo simples (v2): uma coluna, botão sempre à mão ============ */
.hero { padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(16px, 3vw, 32px); }
h1 { font-size: clamp(30px, 5.5vw, 56px); }
.lead { font-size: clamp(17px, 2vw, 21px); }
.maker { max-width: 520px; margin: 0 auto; background: var(--surface); border-radius: 28px; padding: 16px; box-shadow: var(--shadow); }
.maker .drop { min-height: 300px; }
.maker .drop .ico { width: 72px; height: 72px; background: var(--accent); color: #fff; }
.maker .drop b { font-size: 21px; }
.stage .badge { border: 0; cursor: pointer; width: 44px; height: 44px; top: 10px; left: 10px; }
.stage .badge .on { display: none; }
.stage .badge.on .on { display: block; }
.stage .badge.on .off { display: none; }
.stage .swap { position: absolute; top: 10px; right: 10px; height: 36px; padding: 0 14px; border: 0; border-radius: 980px; background: rgba(0,0,0,.55); color: #fff; font: inherit; font-size: 14px; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.maker .field { margin-top: 16px; padding: 0 4px; }
.more { margin-top: 12px; border-top: 1px solid var(--line); padding: 0 4px; }
.more summary { list-style: none; cursor: pointer; padding: 14px 0 6px; color: var(--link); font-size: 15px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " ›"; display: inline-block; transition: transform .2s var(--ease); }
.more[open] summary::after { transform: rotate(90deg); }
.more .switch { font-size: 15px; margin-top: 16px; }

/* barra de ação: no celular gruda no rodapé da tela enquanto a ferramenta está visível */
.actionbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; margin: 16px -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-radius: 0 0 28px 28px; }
.btn.big { position: relative; overflow: hidden; flex: 1; min-height: 56px; font-size: 19px; font-weight: 600; }
.btn.big .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.22); transition: width .15s linear; }
.btn.big .lbl { position: relative; }
.btn.big[data-state="preparing"] { background: #00529f; }        /* azul escuro: rótulo branco 7.76 */
.btn.big[data-state="error"] { background: var(--inset); color: var(--text); }
.actionbar .dl { flex: 0 0 auto; width: 56px; height: 56px; background: var(--surface-2); }
.actionbar .dl:disabled { opacity: .4; cursor: not-allowed; }
.after { max-width: 520px; margin: 12px auto 0; text-align: center; font-size: 15px; color: var(--text); background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow); }
@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  .maker { padding: 12px; border-radius: 24px; }
  .actionbar { margin: 12px -12px -12px; padding-left: 12px; padding-right: 12px; border-radius: 0 0 24px 24px; }
}

/* banners laterais 160x600 em volta da ferramenta (padrão do Vizu); somem em tela estreita */
.casca { display: grid; grid-template-columns: 160px minmax(0, 520px) 160px; gap: 32px; justify-content: center; align-items: start; }
.casca .maker { width: 100%; margin: 0; }
.lat { position: sticky; top: 72px; display: grid; gap: 6px; }
.lat a { display: block; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.lat img { display: block; width: 160px; height: 600px; }
.lat small { font-size: 11px; color: var(--text-2); text-align: center; letter-spacing: 0; line-height: 1.3; }
@media (max-width: 919px) { .casca { grid-template-columns: minmax(0, 520px); } .lat { display: none !important; } }

/* carrossel do topo: só no celular; no desktop os anúncios ficam nas laterais */
@media (min-width: 920px) { .ad { display: none !important; } }
