/* antunez.com.br — Engenharia de PCB & Direito
   Paleta: grafite/azul profundo + cobre (trilhas) + verde-sinal (osciloscópio) */
:root {
  --bg: #0a0f1a;
  --bg-2: #0f1626;
  --surface: #131c2e;
  --surface-2: #1a2540;
  --line: #24314f;
  --text: #e7edf7;
  --muted: #9aa8c2;
  --copper: #d98c4f;
  --copper-2: #f0b07d;
  --signal: #3ee0c5;
  --gold: #d6b062;
  --danger: #ff7a7a;
  --radius: 14px;
  --maxw: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, .mono { font-family: var(--mono); font-size: .9em; }
code { background: #0b1322; border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: var(--copper-2); }
kbd { background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; padding: .05em .4em; border-radius: 5px; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--copper); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 26, .82);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; line-height: 1.1; }
.brand span { line-height: 1.15; }
.menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--text); background: var(--surface); text-decoration: none; }
.menu a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--copper); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 44px; height: 40px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 66px; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  .menu.open { display: flex; }
  .menu a { display: block; padding: 12px; font-size: 16px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; background: url("../img/hero-pcb.jpg") center/cover no-repeat; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,15,26,.96) 0%, rgba(10,15,26,.82) 42%, rgba(10,15,26,.35) 100%),
              linear-gradient(0deg, rgba(10,15,26,1) 0%, rgba(10,15,26,0) 35%); }
.hero .wrap { position: relative; padding-top: 110px; padding-bottom: 110px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--signal); letter-spacing: 1px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; margin: 18px 0 18px; max-width: 760px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: #c7d2e6; max-width: 620px; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 16px; border: 1px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--copper); color: #1a0f05; }
.btn-primary:hover { background: var(--copper-2); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(19,28,46,.6); }
.btn-ghost:hover { border-color: var(--copper); }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 46px; font-family: var(--mono); }
.stats div { border-left: 2px solid var(--copper); padding-left: 12px; }
.stats b { display: block; font-size: 24px; color: var(--text); }
.stats span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.5px; line-height: 1.15; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); border-color: #3a4c74; }
.card a.cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card a.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover a.cover img { transform: scale(1.04); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 8px 0 8px; font-size: 19px; line-height: 1.3; }
.card h3 a { color: var(--text); }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; }
.card .meta { margin-top: auto; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--copper-2); background: rgba(217,140,79,.12); border: 1px solid rgba(217,140,79,.3); padding: 2px 8px; border-radius: 999px; margin-right: 6px; }
.tag.t-ipc { color: var(--signal); background: rgba(62,224,197,.1); border-color: rgba(62,224,197,.3); }
.tag.t-cis { color: #a9b8ff; background: rgba(140,160,255,.1); border-color: rgba(140,160,255,.3); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters button { background: var(--surface); color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; }
.filters button[aria-pressed="true"], .filters button:hover { color: var(--text); border-color: var(--copper); }
.search { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 16px; }
.search:focus, .filters button:focus-visible, .btn:focus-visible, input:focus, select:focus { outline: 2px solid var(--signal); outline-offset: 2px; }

/* notes */
.notes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--copper); border-radius: 10px; padding: 16px 18px; }
.note h4 { margin: 6px 0 6px; font-size: 16.5px; }
.note p { margin: 0; color: #c2cde0; font-size: 15px; }

/* split feature */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.split img { border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--copper); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--surface); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; }
td:first-child { font-family: var(--mono); color: var(--copper-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* classes */
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px) { .classes { grid-template-columns: 1fr; } }
.cls { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.cls b { font-family: var(--mono); font-size: 34px; color: var(--copper); display: block; line-height: 1; }
.cls h4 { margin: 10px 0 6px; }
.cls p { margin: 0; color: var(--muted); font-size: 15px; }

/* calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.calc .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.calc label { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.calc input, .calc select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.result { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.result div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.result b { display: block; font-family: var(--mono); font-size: 26px; color: var(--signal); }
.result span { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.small { font-size: 14px; color: var(--muted); }

/* law teaser */
.law { position: relative; border: 1px solid var(--line); border-radius: 20px; padding: 40px; overflow: hidden;
  background: radial-gradient(ellipse at 100% 0%, rgba(214,176,98,.18), transparent 55%), var(--surface); }
.law h2 { margin-top: 8px; }
.law .eyebrow { color: var(--gold); }
.law .eyebrow::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 20px 0 0; }
.pill-list li { border: 1px solid var(--line); background: var(--bg-2); padding: 8px 14px; border-radius: 999px; font-size: 14.5px; }

/* article */
.article-hero { position: relative; padding: 70px 0 40px; border-bottom: 1px solid var(--line); overflow: hidden; }
.article-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; }
.article-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(10,15,26,.5) 100%); }
.article-hero .wrap { position: relative; }
.article-hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; margin: 14px 0 12px; max-width: 880px; letter-spacing: -.6px; }
.article-hero p { color: #c7d2e6; max-width: 760px; margin: 0; font-size: 18.5px; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding: 48px 20px 80px; }
@media (max-width: 980px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 42px 0 12px; letter-spacing: -.3px; scroll-margin-top: 84px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #d3dceb; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose figure { margin: 28px 0; }
.prose figure img, .prose figure svg { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.prose figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--signal); background: rgba(62,224,197,.06); border-radius: 10px; padding: 14px 18px; margin: 22px 0; }
.callout.warn { border-left-color: var(--copper); background: rgba(217,140,79,.07); }
.callout p { margin: 0; }
.callout strong { color: var(--text); }
.path { font-family: var(--mono); font-size: .88em; color: var(--signal); background: #0b1322; border: 1px solid var(--line); padding: .1em .45em; border-radius: 6px; white-space: nowrap; }
.toc { position: -webkit-sticky; position: sticky; top: 90px; align-self: start; border-left: 1px solid var(--line); padding-left: 18px; }
.toc h5 { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.toc a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; }
.toc a:hover { color: var(--text); text-decoration: none; }
.refs { border-top: 1px solid var(--line); margin-top: 46px; padding-top: 18px; font-size: 14.5px; }
.refs li { color: var(--muted); }
.next-prev { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 46px 0 30px; color: var(--muted); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h5 { color: var(--text); font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); }
.legal { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; font-size: 13px; }

/* reveal animation (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  .hero .wrap { padding-top: 70px; padding-bottom: 70px; }
  section { padding: 54px 0; }
  .law { padding: 26px 20px; }
  .notes { grid-template-columns: 1fr; }
  .article-layout { padding: 32px 16px 60px; }
}

/* ---------- cookies ---------- */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-align: left; }
.linklike:hover { color: var(--text); text-decoration: underline; }
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 980px; margin: 0 auto;
  background: var(--surface-2); border: 1px solid #33456d; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.55);
  padding: 20px 22px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.cookie-banner[hidden] { display: none; }
.ck-inner { display: flex; gap: 22px; align-items: flex-end; }
.ck-text { flex: 1; }
.ck-text strong { font-size: 16.5px; }
.ck-text p { margin: 6px 0 0; font-size: 14.5px; color: #c7d2e6; line-height: 1.55; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ck-actions .btn { padding: 10px 16px; font-size: 15px; }
.ck-actions .btn[hidden] { display: none; }
.ck-prefs { margin-top: 12px; display: grid; gap: 8px; }
.ck-prefs[hidden] { display: none; }
.ck-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #c7d2e6; cursor: pointer; }
.ck-opt input { width: 18px; height: 18px; margin-top: 3px; accent-color: #d98c4f; flex: none; }
@media (max-width: 760px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
  .ck-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .ck-actions { justify-content: stretch; }
  .ck-actions .btn { flex: 1 1 45%; justify-content: center; }
}
.policy h2 { font-size: 24px; margin: 38px 0 10px; }
.policy p, .policy li { color: #d3dceb; }
.policy table td:first-child { white-space: normal; }
