/* ================= Etecanos — portal ================= */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #ffffff; --bg-2: #f8fafc;
  --brand: #4f46e5; --brand-2: #06b6d4; --brand-3: #9333ea; --ok: #059669; --warn: #d97706;
  --radius: 16px; --shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 8px 24px rgb(15 23 42 / 0.06);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Code', Consolas, 'DejaVu Sans Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
html, body { overflow-x: clip; }
@media (max-width: 480px) { .wrap { width: calc(100% - 28px); } }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 650; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-3)); }
.btn--sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn--block { display: flex; width: 100%; margin-top: 16px; }

/* topo */
.top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; }
.brand__name { font-size: 24px; font-weight: 800; letter-spacing: -0.8px; }
.brand__name b { color: var(--brand); font-weight: 800; }
.top__nav { display: flex; gap: 4px; margin-left: auto; }
.top__nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; }
.top__nav a:hover, .top__nav a[aria-current] { background: #eef2ff; color: var(--brand); }
.top__nav-lab { display: none; }
.top__toggle { display: none; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.top__toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.top.is-open .top__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.top.is-open .top__toggle span:nth-child(2) { opacity: 0; }
.top.is-open .top__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 760px) {
  .top__in { gap: 10px; height: 60px; }
  .top__lab { margin-left: auto; }
  .top__toggle { display: inline-flex; }
  .top__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; gap: 2px; padding: 10px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgb(15 23 42 / 0.10); max-height: calc(100vh - 60px); overflow-y: auto; }
  .top.is-open .top__nav { display: flex; }
  .top__nav a { padding: 12px 14px; font-size: 17px; }
  .top__nav-lab { display: block; margin-top: 6px; text-align: center; color: #fff !important; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-3)) !important; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__name { font-size: 21px; }
}
@media (max-width: 420px) { .top__lab { display: none; } .top__toggle { margin-left: auto; } }

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #e0e7ff 0, transparent 60%), radial-gradient(800px 400px at -10% 110%, #cffafe 0, transparent 55%), var(--bg-2); border-bottom: 1px solid var(--line); }
.hero__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 72px 0; }
@media (max-width: 900px) { .hero__in { grid-template-columns: minmax(0, 1fr); padding: 48px 0; gap: 32px; } .mock { transform: none; } }
@media (max-width: 560px) { .mock__term { font-size: 12px; padding: 12px; } .lead { font-size: 17px; } .hero__cta .btn { flex: 1 1 100%; } }
.eyebrow { margin: 0 0 10px; color: var(--brand); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -1.5px; }
.hero h1 span { background: linear-gradient(135deg, var(--brand-2), var(--brand) 50%, var(--brand-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18.5px; color: var(--ink-2); max-width: 62ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; color: var(--muted); }
.hero__facts b { color: var(--ink); font-size: 20px; margin-right: 4px; }
.mock { border-radius: 18px; overflow: hidden; background: #0b1020; box-shadow: 0 30px 60px rgb(30 27 75 / 0.28); transform: rotate(-1.5deg); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #1e293b; color: #94a3b8; font-size: 12px; }
.mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: #f87171; } .mock__bar i:nth-child(2) { background: #fbbf24; } .mock__bar i:nth-child(3) { background: #34d399; }
.mock__bar span { margin-left: 8px; }
.mock__body { display: flex; min-height: 260px; }
.mock__side { width: 52px; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px; background: #111827; }
.mock__side b { display: block; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #22d3ee, #6366f1); opacity: .85; } .mock__side b:nth-child(2) { background: #10b981; } .mock__side b:nth-child(3) { background: #f59e0b; } .mock__side b:nth-child(4) { background: #64748b; }
.mock__term { flex: 1; margin: 0; padding: 16px; color: #e2e8f0; font: 13.5px/1.55 var(--mono); background: #300a24; white-space: pre; overflow: hidden; }
.cur { animation: blink 1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } }

/* seções e cartões */
.section { padding: 56px 0; }
.section h2, .page-head h1 { letter-spacing: -0.6px; }
.section h2 { font-size: 30px; margin: 0 0 8px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.section__head a { font-weight: 600; text-decoration: none; }
.section__lead { color: var(--muted); margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; margin-top: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 4px 0 0; font-size: 19px; line-height: 1.3; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card__tag { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: #eef2ff; color: var(--brand); font-size: 12px; font-weight: 700; }
.card__meta { margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 13px; }
.card--challenge .card__tag { background: #ecfeff; color: #0e7490; }
.band { background: linear-gradient(180deg, var(--bg-2), #fff); border-block: 1px solid var(--line); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; margin-top: 24px; }
.steps li { counter-increment: s; padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.steps span { color: var(--ink-2); font-size: 15px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-top: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--ink-2); margin-bottom: 0; }

/* cabeçalho de página e trilha */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 46px); margin: 6px 0; }
.crumbs { color: var(--muted); font-size: 14px; margin: 0; }
.crumbs a { color: var(--muted); }

/* artigo */
.article { padding: 36px 0 20px; }
.article__head { max-width: 820px; }
.article__head h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.1; letter-spacing: -1.2px; margin: 10px 0; }
.article__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; }
.article__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; margin-top: 28px; }
@media (max-width: 960px) { .article__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; } .toc { position: static !important; } }
.toc { position: sticky; top: 92px; align-self: start; }
.toc nav { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); }
.toc__box > summary { list-style: none; padding: 0 0 8px 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc__box > summary::-webkit-details-marker { display: none; }
@media (min-width: 961px) { .toc__box > summary { pointer-events: none; } }
@media (max-width: 960px) {
  .toc__box { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
  .toc__box > summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; color: var(--ink-2); }
  .toc__box > summary::after { content: '▾'; font-size: 16px; transition: transform .2s; }
  .toc__box[open] > summary::after { transform: rotate(180deg); }
  .toc__box nav { margin: 0 16px 12px; }
  .toc .btn--block { margin-top: 12px; }
}
.toc nav a { padding: 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.toc nav a:hover { border-left-color: var(--brand); color: var(--brand); }
.prose { max-width: 760px; min-width: 0; font-size: 18px; line-height: 1.78; color: #1e293b; overflow-wrap: break-word; }
.prose a, .prose code { overflow-wrap: anywhere; }
.prose img, .prose svg, .prose iframe { max-width: 100%; }
.prose--page { padding-bottom: 60px; }
.prose h2 { font-size: 28px; line-height: 1.25; letter-spacing: -0.5px; margin: 48px 0 12px; }
.prose h3 { font-size: 21px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose code { font: 0.86em var(--mono); background: #f1f5f9; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose pre { margin: 0 0 22px; padding: 18px 20px; border-radius: 14px; background: #0f172a; color: #e2e8f0; overflow: auto; font: 14.5px/1.6 var(--mono); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote { margin: 0 0 22px; padding: 4px 20px; border-left: 4px solid #c7d2fe; color: var(--ink-2); }
.fig { margin: 30px 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.fig img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; background: #fff; }
.fig figcaption { margin-top: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.fig figcaption small { display: block; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th { background: var(--bg-2); text-align: left; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.callout { margin: 0 0 22px; padding: 16px 20px; border-radius: 14px; border: 1px solid; font-size: 16.5px; }
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-weight: 800; margin: 0 0 6px !important; }
.callout--dica { background: #f0fdfa; border-color: #99f6e4; } .callout--dica .callout__title { color: #0f766e; }
.callout--atencao { background: #fffbeb; border-color: #fde68a; } .callout--atencao .callout__title { color: #b45309; }
.callout--saiba { background: #eff6ff; border-color: #bfdbfe; } .callout--saiba .callout__title { color: #1d4ed8; }
.callout--lab { background: linear-gradient(135deg, #eef2ff, #faf5ff); border-color: #c7d2fe; } .callout--lab .callout__title { color: var(--brand); }
.callout--lab .btn { margin-top: 8px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 44px 0 10px; }
.pager a { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: 16px; line-height: 1.35; }
.pager a.is-next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager a.is-next { text-align: left; } .pager > span:empty { display: none; } }
.pager small { color: var(--muted); font-weight: 500; margin-bottom: 4px; }

/* desafios */
.challenges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; margin-top: 20px; }
.challenge { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; scroll-margin-top: 90px; }
.challenge:target { border-color: var(--brand); box-shadow: 0 0 0 4px #e0e7ff; }
.challenge h3 { margin: 10px 0 4px; font-size: 20px; }
.challenge p { margin: 0 0 10px; color: var(--ink-2); font-size: 15.5px; }
.badge { display: inline-block; margin-right: 6px; padding: 3px 10px; border-radius: 99px; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 700; }
.badge--soft { background: #f1f5f9; color: var(--ink-2); }
.challenge__scenario { padding: 10px 12px; border-radius: 10px; background: var(--bg-2); }
.challenge__label { margin: 8px 0 4px !important; font-size: 12px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) !important; }
.challenge ol, .challenge ul { margin: 0 0 8px; padding-left: 20px; font-size: 15px; color: var(--ink-2); }
.challenge footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; font-size: 14px; }

/* anúncios */
.ad { margin: 26px auto; text-align: center; } .ad__label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* rodapé */
.foot { margin-top: 40px; background: #0b1020; color: #cbd5e1; }
.foot__in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 48px 0 24px; }
@media (max-width: 760px) { .foot__in { grid-template-columns: 1fr; } }
.foot .brand { color: #fff; } .foot .brand__name b { color: #a5b4fc; }
.foot p { color: #94a3b8; max-width: 52ch; }
.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot nav b { color: #fff; }
.foot nav a { color: #cbd5e1; text-decoration: none; } .foot nav a:hover { color: #fff; }
.foot__copy { padding: 18px 0 28px; border-top: 1px solid #1e293b; font-size: 13px; color: #64748b; }
.contact { font-size: 20px; }

/* telas pequenas */
@media (max-width: 560px) {
  .section { padding: 40px 0; }
  .section h2 { font-size: 25px; }
  .prose { font-size: 17px; line-height: 1.72; }
  .prose h2 { font-size: 23px; margin-top: 38px; }
  .prose h3 { font-size: 19px; }
  .prose pre { margin-inline: -14px; border-radius: 0; padding: 14px; font-size: 13px; }
  .fig { margin-inline: -14px; padding: 10px; border-radius: 0; border-inline: 0; }
  .prose table { font-size: 14.5px; }
  .prose th, .prose td { padding: 8px 10px; }
  .callout { padding: 14px 16px; }
  .challenge, .card { padding: 18px; }
  .challenge footer { flex-wrap: wrap; }
  .article__head h1 { letter-spacing: -0.6px; }
}
