/* =========================================================
   Identidade visual e componentes compartilhados
   HTML semântico, CSS modular e JS local para a interação
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #090f1f;
  --bg-elevated: #111c31;
  --surface: #141e33;
  --surface-border: rgba(195, 209, 241, 0.12);
  --text: #f8faff;
  --text-soft: #c0cbe1;
  --muted: #93a2be;
  --accent: #8e9bff;
  --accent-bright: #56e3d2;
  --link-hover: #c2caff;
  --content-width: 1100px;
  --radius: 24px;
}

/* Reset e acessibilidade */
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 400 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 5px; border-radius: 3px; }
::selection { background: rgba(142, 155, 255, 0.32); }

.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.site-shell { position: relative; display: flex; min-height: 100vh; flex-direction: column; isolation: isolate; overflow: hidden; }
.site-shell::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(770px, 94vh);
  background:
    radial-gradient(ellipse 42% 55% at 22% 14%, rgba(89, 97, 202, .18), transparent 85%),
    radial-gradient(ellipse 42% 50% at 82% 22%, rgba(21, 181, 192, .12), transparent 85%);
  content: "";
  pointer-events: none;
}

/* Cabeçalho */
.site-header { padding-block: 28px; }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-size: 15px; font-weight: 750; letter-spacing: -.01em; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-symbol { display: block; width: 36px; height: 36px; color: var(--accent); }
.header-link { color: var(--text-soft); font-size: 13px; font-weight: 600; text-decoration: none; }
.header-link span { color: var(--accent-bright); margin-left: 4px; }

/* Página inicial e etapas de interação */
.loading-main { flex: 1; display: grid; min-height: 380px; place-items: center; padding: 48px 24px 86px; }
.loading-content { position: relative; width: 100%; max-width: 570px; text-align: center; }
.loading-visual { position: relative; display: grid; width: 150px; height: 150px; margin: 0 auto 31px; place-items: center; }
.loading-halo {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(142, 155, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 80px 2px rgba(104, 117, 242, .13);
}
.loading-halo::after {
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(142, 155, 255, 0.10);
  border-radius: inherit;
  content: "";
}
.loading-ring {
  width: 82px;
  height: 82px;
  border: 5px solid rgba(142, 155, 255, 0.15);
  border-top-color: var(--accent);
  border-right-color: var(--accent-bright);
  border-radius: 50%;
  animation: rotate-ring 1.0s linear infinite;
}
.loading-core { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 25px 8px rgba(86, 227, 210, .2); }
.loading-content h1 { margin: 0; font-size: clamp(25px, 4.5vw, 39px); font-weight: 690; letter-spacing: -.045em; line-height: 1.2; }
.loading-ellipsis { color: var(--accent); }
@keyframes rotate-ring { to { transform: rotate(360deg); } }

/* Rodapé */
.site-footer { border-top: 1px solid var(--surface-border); background: rgba(8, 14, 27, .55); padding: 29px 0 31px; }
.footer-content { display: grid; gap: 20px; }
.footer-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 29px; row-gap: 10px; }
.footer-nav a { color: var(--text-soft); font-size: 12px; font-weight: 550; text-decoration: none; transition: color .2s ease; }
.footer-nav a:hover, .footer-nav a[aria-current="page"] { color: var(--accent-bright); }
.footer-disclaimer { max-width: 690px; margin: 0 auto; color: var(--muted); font-size: 11px; line-height: 1.8; text-align: center; }
.footer-disclaimer a { color: inherit; }
.footer-disclaimer a:hover { color: var(--text); }

/* Páginas institucionais */
.legal-main { flex: 1; padding: 31px 0 90px; }
.legal-container { max-width: 930px; }
.back-link { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 29px; color: var(--text-soft); font-size: 13px; font-weight: 620; text-decoration: none; }
.back-link span { color: var(--accent-bright); font-size: 19px; }
.legal-article { overflow: hidden; border: 1px solid var(--surface-border); border-radius: var(--radius); background: rgba(19, 29, 50, .94); box-shadow: 0 22px 66px rgba(0, 0, 0, .15); }
.article-header { padding: 48px clamp(25px, 6vw, 66px) 33px; border-bottom: 1px solid var(--surface-border); background: linear-gradient(110deg, rgba(142, 155, 255, .08), rgba(86, 227, 210, .025)); }
.article-category { margin: 0 0 14px; color: var(--accent-bright); font-size: 11px; font-weight: 780; letter-spacing: .17em; }
.article-header h1 { margin: 0 0 14px; font-size: clamp(30px, 4.6vw, 43px); font-weight: 720; letter-spacing: -.045em; line-height: 1.14; }
.article-intro { max-width: 620px; margin: 0 0 20px; color: var(--text-soft); font-size: 15px; line-height: 1.75; }
.article-date { margin: 0; color: var(--muted); font-size: 12px; }
.article-body { padding: 19px clamp(25px, 6vw, 66px) 47px; }
.section-heading { margin: 31px 0 11px; font-size: 18px; font-weight: 670; letter-spacing: -.02em; line-height: 1.4; }
.article-body p, .article-body li { color: var(--text-soft); font-size: 14px; line-height: 1.85; }
.article-body p { margin: 0 0 15px; }
.article-body ul { margin: 0 0 20px; padding-left: 23px; }
.article-body li + li { margin-top: 8px; }
.article-body strong { color: var(--text); font-weight: 680; }
.article-body a { color: #aeb9ff; }
.editable-field { border-bottom: 1px dashed rgba(86, 227, 210, .6); color: #c6fff8; overflow-wrap: anywhere; }
.contact-row { display: grid; grid-template-columns: minmax(170px, 225px) minmax(0, 1fr); column-gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--surface-border); }
.contact-row strong { font-weight: 630; }
.related-note { margin: 23px 0 0; padding: 19px 22px; border: 1px solid rgba(142, 155, 255, .18); border-left: 3px solid var(--accent); border-radius: 6px 12px 12px 6px; background: rgba(142, 155, 255, .055); }
.related-note p { margin-bottom: 0; }

/* Layout compacto e acessibilidade */
@media (max-width: 680px) {
  .container { width: min(var(--content-width), calc(100% - 34px)); }
  .site-header { padding-block: 21px; }
  .loading-main { min-height: 350px; padding-bottom: 60px; }
  .loading-visual { width: 134px; height: 134px; margin-bottom: 26px; }
  .loading-ring { width: 75px; height: 75px; }
  .footer-nav { column-gap: 18px; row-gap: 11px; }
  .footer-content { gap: 18px; }
  .legal-main { padding: 19px 0 55px; }
  .legal-article { border-radius: 18px; }
  .article-header { padding-block: 35px 28px; }
  .article-body { padding-block: 12px 32px; }
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-ring { animation-duration: 3s; }
  .footer-nav a { transition: none; }
}


/* =========================================================
   Etapas de carregamento e acesso
   ========================================================= */
[hidden] { display: none !important; }
.stage-enter { animation: stage-appear .38s ease both; }
@keyframes stage-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.offer-content { width: min(100%, 500px); text-align: center; }
.offer-icon {
  display: grid; place-items: center;
  width: 88px; height: 88px; margin: 0 auto 28px;
  border: 1px solid rgba(86, 227, 210, .28);
  border-radius: 26px;
  background: radial-gradient(circle at 30% 22%, rgba(86, 227, 210, .22), rgba(142, 155, 255, .1));
  box-shadow: 0 16px 65px rgba(21, 181, 192, .12), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: var(--accent-bright);
}
.offer-icon svg { width: 40px; height: 40px; }
.offer-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 15px; font-size: 11px; letter-spacing: .17em; font-weight: 750; color: var(--accent-bright); }
.offer-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.offer-content h1 { margin: 0; font-size: clamp(29px, 5.3vw, 42px); font-weight: 720; letter-spacing: -.045em; line-height: 1.2; }
.offer-description { margin: 16px 0 31px; color: var(--text-soft); font-size: 15px; }
.offer-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  width: min(100%, 310px); min-height: 58px; padding: 15px 22px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 15px;
  background: linear-gradient(125deg, #96a1ff 0%, #7d94fa 52%, #63cbd6 100%);
  box-shadow: 0 15px 37px rgba(98, 124, 233, .23), inset 0 1px 0 rgba(255,255,255,.26);
  color: #071122; font: inherit; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.offer-button:hover { transform: translateY(-2px); box-shadow: 0 21px 45px rgba(98, 124, 233, .33); }
.offer-button:active { transform: translateY(0); }
.offer-button:focus-visible, .verification-close:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 4px; }
.offer-button svg { width: 20px; height: 20px; }

/* =========================================================
   Janela de confirmação (visual, sem CAPTCHA de verdade)
   ========================================================= */
.verification-dialog {
  position: fixed;
  width: min(440px, calc(100% - 32px)); max-width: none;
  max-height: calc(100dvh - 36px); padding: 0; overflow: auto;
  border: 1px solid rgba(174, 190, 237, .22); border-radius: 23px;
  background: #142038; color: var(--text);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,255,255,.025);
}
.verification-dialog::backdrop { background: rgba(2, 7, 17, .78); backdrop-filter: blur(10px); }
.verification-dialog[open] { animation: modal-appear .25s cubic-bezier(.2,.7,.2,1) both; }
@keyframes modal-appear { from { opacity: 0; transform: translateY(14px) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
.verification-topbar { height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); }
.verification-body { position: relative; padding: 34px clamp(20px, 5vw, 34px) 30px; }
.verification-close {
  position: absolute; top: 18px; right: 18px;
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--surface-border); border-radius: 11px;
  background: rgba(255,255,255,.025); color: var(--text-soft);
  cursor: pointer;
}
.verification-close svg { width: 18px; height: 18px; }
.verification-close:hover { background: rgba(255,255,255,.09); color: var(--text); }
.verification-badge {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 1px solid rgba(142, 155, 255, .18); border-radius: 15px;
  color: var(--accent-bright); background: rgba(142, 155, 255, .07);
}
.verification-badge svg { width: 28px; height: 28px; }
.verification-label { margin: 23px 0 8px; color: var(--accent-bright); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.verification-body h2 { margin: 0; font-size: clamp(24px, 4vw, 29px); font-weight: 740; line-height: 1.2; letter-spacing: -.04em; }
.verification-description { margin: 11px 0 25px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.verification-choice {
  display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 17px;
  border: 1px solid rgba(195, 209, 241, .18); border-radius: 15px;
  background: rgba(255,255,255,.035); color: var(--text);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.verification-choice:hover, .verification-choice:focus-within { border-color: rgba(86, 227, 210, .55); background: rgba(86,227,210,.055); }
.verification-choice:has(input:checked) { border-color: rgba(86,227,210,.65); }
.verification-choice input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.verification-checkbox {
  flex: 0 0 27px; display: grid; place-items: center; width: 27px; height: 27px;
  border: 2px solid #8291ad; border-radius: 7px; color: #061a1c; transition: background .15s, border-color .15s;
}
.verification-checkbox svg { width: 19px; height: 19px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.verification-choice input:checked + .verification-checkbox { background: var(--accent-bright); border-color: var(--accent-bright); }
.verification-choice input:checked + .verification-checkbox svg { opacity: 1; transform: scale(1); }
.verification-choice input:focus-visible + .verification-checkbox { outline: 3px solid var(--accent); outline-offset: 4px; }
.verification-choice-text { flex: 1; font-weight: 660; font-size: 15px; }
.verification-choice-icon { width: 24px; height: 24px; color: #91a4c2; }
.verification-choice-icon svg { width: 24px; height: 24px; }
.verification-notice { margin: 18px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 680px) {
  .offer-icon { width: 76px; height: 76px; border-radius: 22px; }
  .offer-description { font-size: 14px; }
  .verification-body { padding-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-enter, .verification-dialog[open] { animation: none; }
  .offer-button, .verification-choice, .verification-checkbox, .verification-checkbox svg { transition: none; }
}
