/*
Theme Name: 80win Editorial
Theme URI: https://80win.buzz/
Author: Equipe editorial 80win.buzz
Description: Tema editorial independente em português do Brasil para o projeto 80win.
Version: 1.0.1
Text Domain: eightywin
*/

:root {
  --page: #f7f4ee;
  --surface: #fff;
  --surface-muted: #f0ebe2;
  --ink: #242321;
  --muted: #68645e;
  --brick: #a83e32;
  --brick-dark: #8e332a;
  --amber: #d89a32;
  --sage: #2f7764;
  --info: #eef4f1;
  --warning-bg: #fff4d9;
  --warning: #9b6416;
  --danger: #b43b3b;
  --border: #ddd5c8;
  --shadow: 0 12px 32px rgba(58, 45, 30, .09);
  --content: 1160px;
  --reading: 780px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-wrap: anywhere;
}
body.menu-open { overflow: hidden; }
a { color: var(--brick-dark); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { color: var(--brick); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-150%);
  padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 6px;
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  min-height: 68px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(58,45,30,.04); backdrop-filter: blur(10px);
}
.header-inner {
  width: min(calc(100% - 40px), var(--content)); min-height: 68px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.site-logo {
  color: var(--ink); font-size: 1.65rem; line-height: 1; font-weight: 900;
  letter-spacing: -.05em; text-decoration: none;
}
.site-logo span { color: var(--brick); }
.site-navigation { display: flex; align-items: center; gap: 24px; }
.primary-menu { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.primary-menu a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 12px;
  color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 8px;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a {
  color: var(--brick-dark); background: var(--surface-muted);
}
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 11px 19px; background: var(--brick); color: #fff; border: 2px solid var(--brick);
  border-radius: 10px; font-weight: 800; line-height: 1.25; text-decoration: none;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.button:hover { background: var(--brick-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(142,51,42,.16); }
.button.secondary { background: #fff; color: var(--brick-dark); }
.button.secondary:hover { background: var(--surface-muted); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; border: 0; background: transparent; color: var(--ink); }
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.menu-icon { display: grid; gap: 5px; }
.menu-icon i { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 4px; }

.site-main { min-height: 65vh; }
.editorial-page, .listing-page { padding: 52px 20px 80px; }
.article-hero {
  width: min(100%, var(--content)); margin: 0 auto 38px; padding: clamp(32px, 5vw, 64px);
  background: var(--surface-muted); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.article-hero::after {
  content: ""; position: absolute; width: 230px; height: 230px; right: -70px; bottom: -110px;
  border: 34px solid rgba(216,154,50,.18); border-radius: 50%; box-shadow: 0 0 0 30px rgba(168,62,50,.08);
}
.article-hero.compact { max-width: 920px; margin-bottom: 30px; }
.eyebrow { color: var(--brick-dark); font-size: .78rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.16; letter-spacing: -.025em; text-wrap: balance; }
h1 { max-width: 900px; margin-top: 12px; font-size: clamp(2.25rem, 5.4vw, 3.65rem); }
.lead { max-width: 800px; margin: 20px 0 24px; color: #393632; font-size: clamp(1.08rem, 2vw, 1.25rem); line-height: 1.65; }
.article-content { width: min(100%, var(--reading)); margin: 0 auto; }
.article-content > *:first-child { margin-top: 0; }
.article-content section { margin-block: 58px; scroll-margin-top: 92px; }
.article-content h2 { margin: 0 0 20px; padding-top: 3px; font-size: clamp(1.8rem, 3.6vw, 2.3rem); }
.article-content h2::before { content: ""; display: block; width: 52px; height: 5px; margin-bottom: 15px; background: var(--brick); border-radius: 10px; }
.article-content h3 { margin: 34px 0 12px; font-size: clamp(1.35rem, 2.4vw, 1.58rem); }
.article-content p { margin: 0 0 20px; }
.article-content ul, .article-content ol { margin: 0 0 24px; padding-left: 1.35em; }
.article-content li + li { margin-top: 9px; }
.article-content strong { color: #1f1e1c; }
.article-content blockquote {
  margin: 28px 0; padding: 22px 24px; background: var(--info); border-left: 5px solid var(--sage); border-radius: 0 var(--radius) var(--radius) 0;
}
.article-content blockquote p:last-child { margin-bottom: 0; }
.notice { margin: 28px 0; padding: 20px 22px; border: 1px solid #c9ddd6; background: var(--info); border-radius: var(--radius); }
.notice.warning { border-color: #efd9aa; background: var(--warning-bg); color: #603f10; }
.notice.danger { border-color: #edc9c9; background: #fff1f1; }
.responsible-note { border-top: 1px solid var(--border); padding-top: 24px; color: var(--muted); }

.editorial-figure { margin: 32px 0 40px; }
.editorial-image { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.editorial-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; text-align: center; }

.table-wrap { margin: 28px 0 38px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 660px; font-size: .95rem; }
th, td { padding: 14px 15px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--surface-muted); color: #312e2a; font-weight: 800; }
tbody tr:nth-child(even) td { background: #fcfbf8; }

.steps { counter-reset: steps; margin: 26px 0 36px; padding: 0; list-style: none; }
.steps li { counter-increment: steps; position: relative; min-height: 64px; margin: 0; padding: 2px 0 26px 68px; }
.steps li::before {
  content: counter(steps); position: absolute; left: 0; top: 0; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--brick); color: #fff; font-weight: 900;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 22px; top: 48px; bottom: 0; width: 2px; background: var(--border); }
.steps strong { display: block; margin-bottom: 4px; }
.link-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.editorial-meta { margin-top: 58px; padding: 22px 0 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .93rem; }
.editorial-meta p { margin-bottom: 8px; }

.site-footer { background: var(--ink); color: #f6f3ed; }
.footer-inner {
  width: min(calc(100% - 40px), var(--content)); margin: 0 auto; padding: 58px 0 40px;
  display: grid; grid-template-columns: 1.35fr .75fr 1.2fr; gap: 48px;
}
.footer-logo { color: #fff; }
.footer-brand p, .footer-notes p { color: #d7d1c8; margin: 16px 0 0; font-size: .94rem; }
.footer-contact { color: #fff !important; }
.footer-nav { display: grid; align-content: start; gap: 8px; }
.footer-nav a { min-height: 44px; display: flex; align-items: center; color: #fff; text-decoration: none; }
.footer-nav a:hover { color: #ffd477; }
.footer-notes { padding-left: 26px; border-left: 1px solid #514d47; }
.footer-bottom { padding: 18px 20px; border-top: 1px solid #45413d; color: #c8c1b7; text-align: center; font-size: .85rem; }
.listing-card { margin: 20px 0; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .site-header, .header-inner { min-height: 58px; }
  .header-inner { width: min(calc(100% - 32px), var(--content)); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-navigation {
    position: absolute; top: 58px; left: 0; right: 0; display: none; align-items: stretch;
    padding: 16px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-navigation.is-open { display: grid; }
  .primary-menu { display: grid; gap: 2px; }
  .primary-menu a { min-height: 48px; }
  .header-cta { width: 100%; margin-top: 8px; }
  .editorial-page, .listing-page { padding: 32px 16px 56px; }
  .article-hero { margin-bottom: 28px; padding: 30px 24px; border-radius: 14px; }
  .article-content section { margin-block: 44px; scroll-margin-top: 74px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-notes { grid-column: 1 / -1; padding: 22px 0 0; border-left: 0; border-top: 1px solid #514d47; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(2.05rem, 11vw, 2.65rem); }
  .article-hero { padding: 26px 20px; }
  .article-hero::after { width: 150px; height: 150px; right: -70px; bottom: -90px; border-width: 24px; }
  .article-hero .button, .link-row .button { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; padding-top: 44px; }
  .footer-notes { grid-column: auto; }
  .table-wrap { border: 0; overflow: visible; background: transparent; }
  table, thead, tbody, th, td, tr { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: grid; gap: 14px; }
  tr { padding: 6px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
  td, tbody tr:last-child td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--border); background: transparent !important; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); display: block; color: var(--brick-dark); font-size: .75rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
}

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