/* ═══════════════════════════════════════════
   RESTR — main.css
   CSS partilhado por todas as páginas
═══════════════════════════════════════════ */

/* LÍNGUA */
[data-lang] { display: none !important; }
html[lang="pt"] [data-lang="pt"] { display: revert !important; }
html[lang="en"] [data-lang="en"] { display: revert !important; }

/* TOKENS */
:root {
  --primary:   #550000;
  --primary-h: #7A0000;
  --ff-d: 'DM Serif Display', Georgia, serif;
  --ff-b: 'DM Sans', system-ui, sans-serif;
  --nav-h: 64px;
  --r: 10px;
  --ease: 220ms cubic-bezier(.4,0,.2,1);
}
html[data-theme="dark"] {
  --bg:        #0D0D0D;
  --bg-alt:    #111111;
  --bg-card:   #161616;
  --bg-foot:   #080808;
  --tx:        #F0F0F0;
  --tx2:       #8A8A9A;
  --tx3:       #4A4A5A;
  --bdr:       rgba(255,255,255,.07);
  --bdr-h:     rgba(255,255,255,.15);
  --in:        rgba(255,255,255,.04);
  --in-f:      rgba(255,255,255,.08);
  --nav-bg:    rgba(13,13,13,.88);
  --h-tx:      #ffffff;
  --h-tx2:     rgba(255,255,255,.65);
  --h-sep:     rgba(255,255,255,.14);
  --h-pill-b:  rgba(255,255,255,.18);
  --h-pill-tx: rgba(255,255,255,.65);
  --dev-b:     rgba(255,255,255,.14);
  --dev-bg:    rgba(255,255,255,.04);
  --dev-tx:    rgba(255,255,255,.16);
  --feat-ov:   rgba(8,0,0,.84);
  --feat-tx:   rgba(255,255,255,.95);
  --feat-tx2:  rgba(255,255,255,.58);
  --feat-ph:   rgba(255,255,255,.07);
  --ft-tx:     rgba(255,255,255,.35);
  --ft-tx2:    rgba(255,255,255,.22);
  --ft-tx3:    rgba(255,255,255,.55);
  --ft-bdr:    rgba(255,255,255,.06);
  --ft-copy:   rgba(255,255,255,.14);
}
html[data-theme="light"] {
  --bg:        #F5F1EE;
  --bg-alt:    #EDE8E4;
  --bg-card:   #FFFFFF;
  --bg-foot:   #181010;
  --tx:        #1A1010;
  --tx2:       #6E6464;
  --tx3:       #AAA098;
  --bdr:       rgba(0,0,0,.09);
  --bdr-h:     rgba(0,0,0,.18);
  --in:        rgba(0,0,0,.04);
  --in-f:      rgba(0,0,0,.07);
  --nav-bg:    rgba(245,241,238,.93);
  --h-tx:      #ffffff;
  --h-tx2:     rgba(255,255,255,.72);
  --h-sep:     rgba(255,255,255,.2);
  --h-pill-b:  rgba(255,255,255,.25);
  --h-pill-tx: rgba(255,255,255,.78);
  --dev-b:     rgba(255,255,255,.22);
  --dev-bg:    rgba(255,255,255,.06);
  --dev-tx:    rgba(255,255,255,.28);
  --feat-ov:   rgba(245,238,235,.91);
  --feat-tx:   #1A1010;
  --feat-tx2:  #6E6464;
  --feat-ph:   rgba(0,0,0,.1);
  --ft-tx:     rgba(255,255,255,.38);
  --ft-tx2:    rgba(255,255,255,.22);
  --ft-tx3:    rgba(255,255,255,.55);
  --ft-bdr:    rgba(255,255,255,.07);
  --ft-copy:   rgba(255,255,255,.15);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}
body {
  background: var(--bg); color: var(--tx);
  font-family: var(--ff-b); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
h1, h2, h3 { font-family: var(--ff-d); font-weight: 400; line-height: 1.15; }
a { color: inherit; text-decoration: none; }

/* UTILITIES */
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.eyebrow { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--primary-h); margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: var(--r); font-family: var(--ff-b); font-size: 14px; font-weight: 500; cursor: pointer; border: none; transition: background var(--ease), transform var(--ease), box-shadow var(--ease); }
.btn-p { background: var(--primary); color: #fff; }
.btn-p:hover { background: var(--primary-h); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(85,0,0,.4); }
.btn-g { background: transparent; color: var(--tx2); border: 1px solid var(--bdr); }
.btn-g:hover { color: var(--tx); border-color: var(--bdr-h); }
.btn-lg { padding: 15px 32px; font-size: 15px; }

/* REVEAL */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.rv.in { opacity: 1; transform: translateY(0); }

/* NAVBAR */
#nav { position: fixed; inset: 0 0 auto 0; z-index: 200; height: var(--nav-h); display: flex; align-items: center; border-bottom: 1px solid transparent; transition: background var(--ease), border-color var(--ease); }
#nav.sc { background: var(--nav-bg); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-bottom-color: var(--bdr); }
.nav-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--tx2); transition: color var(--ease); }
.nav-links a:hover { color: var(--tx); }
.nav-r { display: flex; align-items: center; gap: 10px; }
.lang-tog { display: flex; border-radius: 7px; overflow: hidden; border: 1px solid var(--bdr); }
.lang-tog button { background: none; border: none; padding: 5px 10px; cursor: pointer; font-family: var(--ff-b); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--tx2); transition: background var(--ease), color var(--ease); }
.lang-tog button.on { background: var(--primary); color: #fff; }
.theme-btn { width: 32px; height: 32px; border-radius: 7px; background: var(--in); border: 1px solid var(--bdr); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; line-height: 1; transition: background var(--ease), border-color var(--ease); }
.theme-btn:hover { background: var(--in-f); border-color: var(--bdr-h); }

/* FOOTER */
footer { background: var(--bg-foot); border-top: 1px solid var(--ft-bdr); padding: 44px 0 32px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-logo { display: flex; align-items: center; }
.foot-links { display: flex; gap: 22px; list-style: none; flex-wrap: wrap; }
.foot-links a { font-size: 13px; color: var(--ft-tx2); transition: color var(--ease); }
.foot-links a:hover { color: var(--ft-tx3); }
.foot-copy { font-size: 12px; color: var(--ft-copy); }

/* COOKIE BANNER */
#ck-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 500; width: calc(100% - 48px); max-width: 680px; background: var(--bg-card); border: 1px solid var(--bdr); border-radius: 14px; padding: 20px 24px; display: none; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; box-shadow: 0 8px 40px rgba(0,0,0,.3); transition: opacity .3s ease, transform .3s ease; }
#ck-banner.hide { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
.ck-txt { flex: 1; min-width: 180px; }
.ck-txt p { font-size: 14px; color: var(--tx2); line-height: 1.55; }
.ck-txt a { color: var(--primary-h); text-decoration: underline; text-underline-offset: 2px; }
.ck-btns { display: flex; gap: 8px; flex-shrink: 0; }
.ck-all { background: var(--primary); color: #fff; border: none; padding: 9px 18px; border-radius: 7px; font-family: var(--ff-b); font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--ease); }
.ck-all:hover { background: var(--primary-h); }
.ck-ess { background: var(--in); color: var(--tx2); border: 1px solid var(--bdr); padding: 9px 16px; border-radius: 7px; font-family: var(--ff-b); font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--ease), color var(--ease); }
.ck-ess:hover { background: var(--in-f); color: var(--tx); }

/* LEGAL PAGES */
.legal-wrap { max-width: 860px; margin: 0 auto; padding: calc(var(--nav-h) + 48px) 24px 96px; }
.legal-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--bdr); }
.legal-badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-h); margin-bottom: 14px; }
.legal-header h1 { font-size: clamp(28px,4vw,40px); letter-spacing: -.02em; color: var(--tx); margin-bottom: 10px; }
.legal-meta { font-size: 13px; color: var(--tx2); }
.toc { background: var(--bg-alt); border: 1px solid var(--bdr); border-radius: 10px; padding: 22px 26px; margin-bottom: 48px; }
.toc-title { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); margin-bottom: 12px; }
.toc ol { padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.toc li { font-size: 14px; }
.toc a { color: var(--tx2); text-decoration: none; transition: color var(--ease); }
.toc a:hover { color: var(--tx); }
.sec { margin-bottom: 44px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.sec h2 { font-size: 21px; color: var(--tx); margin-bottom: 14px; letter-spacing: -.01em; padding-bottom: 10px; border-bottom: 1px solid var(--bdr); }
.sec p { font-size: 15px; color: var(--tx); opacity: .88; margin-bottom: 12px; line-height: 1.72; }
.sec p:last-child { margin-bottom: 0; }
.sec ul, .sec ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sec li { font-size: 15px; color: var(--tx); opacity: .85; line-height: 1.65; }
.sec strong { font-weight: 600; opacity: 1; color: var(--tx); }
.sec a { color: var(--primary-h); text-decoration: underline; text-underline-offset: 3px; }
.sec a:hover { color: var(--primary); }
.box { background: var(--bg-alt); border: 1px solid var(--bdr); border-radius: 10px; padding: 20px 24px; margin-top: 14px; }
.box p { margin: 0; font-size: 14px; line-height: 1.65; opacity: .88; }
.notice { background: rgba(85,0,0,.07); border: 1px solid rgba(85,0,0,.18); border-radius: 10px; padding: 16px 20px; margin: 14px 0; }
.notice p { margin: 0; font-size: 14px; font-weight: 500; opacity: 1; }
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--bdr); margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
thead tr { background: var(--bg-alt); }
th { padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tx2); border-bottom: 1px solid var(--bdr); }
td { padding: 11px 14px; vertical-align: top; border-bottom: 1px solid var(--bdr); color: var(--tx); opacity: .85; line-height: 1.5; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--in); }
code { font-family: 'SF Mono','Consolas',monospace; font-size: 13px; background: var(--in); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--bdr); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .foot-row { flex-direction: column; align-items: flex-start; }
  .ck-btns { width: 100%; }
  .ck-all, .ck-ess { flex: 1; text-align: center; }
}
