/*
Theme Name: 5853 Portal
Theme URI: https://5853.buzz/
Author: 5853 Editorial
Description: Tema editorial independente em pt-BR para o site 5853.
Version: 1.0.2
Text Domain: portal-5853
*/

:root {
  --bg: #07110e;
  --bg-soft: #0d1b17;
  --card: #12241e;
  --card-hover: #183027;
  --lime: #b8f34a;
  --cyan: #3dd6c6;
  --text: #f3f8f5;
  --muted: #afc2b8;
  --border: #29453a;
  --warning: #f0b44d;
  --error: #e16f73;
  --focus: #d3ff7c;
  --content: 1200px;
  --reading: 800px;
  --radius: 14px;
  --shadow: 0 14px 36px rgba(0, 0, 0, .24);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: .18em; }
a:hover { color: var(--lime); }
.email-address { white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 12px; padding: 12px 16px;
  background: var(--lime); color: var(--bg); z-index: 10000;
}
.site-shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.reading-width { width: min(100%, var(--reading)); }

.site-header {
  min-height: 66px;
  background: rgba(7, 17, 14, .97);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 28px; }
.site-brand {
  display: inline-flex; align-items: center; line-height: 0; text-decoration: none; flex: 0 0 auto;
}
.site-brand img { width: auto; height: 36px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--lime); }
.header-cta, .button {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border: 1px solid var(--lime); border-radius: 10px;
  background: var(--lime); color: var(--bg); font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 24px rgba(184, 243, 74, .1);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.header-cta:hover, .button:hover { color: var(--bg); background: #d0ff78; transform: translateY(-1px); }
.button-secondary { background: transparent; color: var(--cyan); border-color: var(--cyan); box-shadow: none; }
.button-secondary:hover { background: rgba(61, 214, 198, .1); color: var(--text); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { width: 22px; height: 2px; display: block; background: currentColor; position: relative; }
.menu-toggle-lines::before, .menu-toggle-lines::after { content: ""; position: absolute; left: 0; }
.menu-toggle-lines::before { top: -7px; }
.menu-toggle-lines::after { top: 7px; }

main { min-height: 62vh; }
.page-content { padding-bottom: 72px; }
.page-hero {
  padding: 72px 0 32px;
  background: radial-gradient(circle at 82% 8%, rgba(61, 214, 198, .10), transparent 36%), linear-gradient(180deg, rgba(18, 36, 30, .72), transparent);
}
.page-hero .reading-width { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--lime); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; scroll-margin-top: 90px; }
h1 { margin: 18px 0 22px; font-size: clamp(2.55rem, 7vw, 5.4rem); letter-spacing: -.055em; max-width: 950px; }
h2 { margin: 0 0 22px; font-size: clamp(1.85rem, 4vw, 3rem); letter-spacing: -.035em; }
h3 { margin: 30px 0 12px; font-size: clamp(1.25rem, 2.8vw, 1.75rem); }
p { margin: 0 0 1.25em; }
.lead { color: var(--muted); font-size: clamp(1.08rem, 2.4vw, 1.32rem); max-width: 780px; }
.hero-subtitle { color: var(--text); font-size: 1.05rem; font-weight: 650; max-width: 720px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }
.content-section { padding: 72px 0; border-top: 1px solid rgba(41, 69, 58, .72); }
.content-section.compact { padding-block: 48px; }
.content-section p, .content-section li { color: var(--muted); }
.content-section strong { color: var(--text); }
.section-kicker { display: block; margin-bottom: 10px; color: var(--cyan); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.content-figure { margin: 38px 0 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.content-figure img { width: 100%; }
.figure-home img { aspect-ratio: 16 / 9; object-fit: cover; }
.figure-categories img { aspect-ratio: 8 / 5; object-fit: cover; }
.figure-mobile img { aspect-ratio: 4 / 3; object-fit: cover; }
.figure-editorial img { aspect-ratio: 14 / 9; object-fit: cover; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); gap: 42px; align-items: start; }
.note, .editorial-box {
  margin: 28px 0; padding: 22px 24px; border: 1px solid var(--border); border-left: 4px solid var(--cyan);
  border-radius: var(--radius); background: var(--card); color: var(--muted);
}
.note-warning { border-left-color: var(--warning); }
.editorial-box strong { color: var(--lime); }
.steps { counter-reset: steps; list-style: none; padding: 0; margin: 30px 0; display: grid; gap: 14px; }
.steps li { counter-increment: steps; position: relative; min-height: 72px; padding: 18px 20px 18px 76px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.steps li::before {
  content: counter(steps, decimal-leading-zero); position: absolute; left: 18px; top: 16px;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  background: var(--lime); color: var(--bg); font-weight: 900;
}
.steps li strong { display: block; margin-bottom: 4px; }
.table-wrap { margin: 30px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 680px; background: var(--card); }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--bg-soft); color: var(--lime); font-size: .86rem; letter-spacing: .02em; }
td { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.faq-list details[open] { border-color: var(--cyan); }
.faq-list summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; cursor: pointer; color: var(--text); font-weight: 750; }
.faq-list summary::after { content: "+"; color: var(--lime); font-size: 1.4rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { padding: 0 20px 20px; color: var(--muted); }
.breadcrumb { padding-top: 26px; color: var(--muted); font-size: .9rem; }
.breadcrumb a { color: var(--muted); }
.next-links { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 10px; }
.site-boundary { color: var(--muted); font-size: .92rem; border-top: 1px solid var(--border); padding-top: 28px; }

.site-footer { border-top: 1px solid var(--border); background: #050d0b; padding: 48px 0 26px; }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 40px; }
.footer-brand { margin: 0 0 14px; font-size: 1.5rem; font-weight: 900; letter-spacing: .08em; }
.footer-copy, .footer-note { color: var(--muted); max-width: 650px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; align-content: start; }
.footer-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.error-page { padding: 100px 0; text-align: center; }

@media (max-width: 900px) {
  .header-inner { min-height: 58px; }
  .site-header { min-height: 58px; }
  .site-brand img { height: 32px; }
  .header-cta { display: none; }
  .site-nav { margin-left: auto; }
  .site-nav ul { flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
  .nav-ready .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .nav-ready .site-nav {
    display: none; position: absolute; inset: 58px 0 auto; padding: 14px 20px 24px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-ready .site-nav.is-open { display: block; }
  .nav-ready .site-nav ul { display: grid; gap: 4px; width: min(100%, var(--content)); margin-inline: auto; }
  .nav-ready .site-nav a { min-height: 48px; padding: 4px 8px; }
  .nav-mobile-cta { color: var(--bg) !important; background: var(--lime); border-radius: 10px; padding-inline: 16px !important; margin-top: 8px; justify-content: center; }
  .split { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
}

@media (min-width: 901px) { .nav-mobile-cta { display: none !important; } }

@media (max-width: 768px) {
  body { font-size: 16px; }
  .site-shell { width: min(calc(100% - 32px), var(--content)); }
  .page-hero { padding: 44px 0 22px; }
  .content-section { padding: 44px 0; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.6rem); }
  .hero-actions, .hero-actions .button { width: 100%; }
  .table-wrap { overflow: visible; border: 0; }
  table, thead, tbody, tr, th, td { display: block; min-width: 0; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tr { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); }
  td { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--lime); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
  .footer-nav { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
.site-bottom-cta {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 9990;
  width: min(calc(100% - 32px), 560px); transform: translateX(-50%); pointer-events: none;
}
.site-bottom-cta__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px;
  padding: 8px; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(7, 17, 14, .96); box-shadow: 0 14px 38px rgba(0, 0, 0, .42);
  backdrop-filter: blur(10px);
}
.site-bottom-cta__button {
  min-width: 0; min-height: 52px; display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 11px;
  font-weight: 850; line-height: 1.15; text-align: center; text-decoration: none; white-space: nowrap;
  pointer-events: auto; transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.site-bottom-cta__login { border-color: var(--cyan); background: var(--card); color: var(--text); }
.site-bottom-cta__register {
  border-color: var(--lime); background: var(--lime); color: var(--bg);
  box-shadow: 0 8px 22px rgba(184, 243, 74, .2);
}
.site-bottom-cta__login:hover { background: var(--card-hover); color: var(--lime); transform: translateY(-2px); }
.site-bottom-cta__register:hover { background: #d0ff78; color: var(--bg); transform: translateY(-2px); }

@media (max-width: 480px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .site-bottom-cta { width: calc(100% - 24px); bottom: max(8px, env(safe-area-inset-bottom)); }
  .site-bottom-cta__button { min-height: 50px; padding-inline: 12px; font-size: .95rem; }
}
