/*
Theme Name: Ojwin Editorial
Theme URI: https://ojwin.buzz/
Author: Equipe editorial ojwin.buzz
Description: Tema editorial claro para o site independente de conteúdo sobre ojwin.
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: ojwin-editorial
*/

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

* { 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;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
a { color: var(--accent-dark); text-decoration-thickness: .09em; text-underline-offset: .16em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 3px;
}
img { display: block; max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.reading { width: min(100%, var(--reading)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-160%); padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 68px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-logo { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--ink); text-decoration: none; }
.site-logo--text { font-size: 28px; font-weight: 850; letter-spacing: -.045em; }
.site-logo--text::after { content: ".buzz"; color: var(--accent); font-size: .52em; letter-spacing: 0; }
.site-logo__image { width: auto; height: 40px; max-width: 146px; object-fit: contain; }
.site-nav ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 14px; color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 9px; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--accent-dark); background: var(--surface-soft); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; padding: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; font: inherit; font-weight: 750; cursor: pointer; }
.menu-toggle-lines, .menu-toggle-lines::before, .menu-toggle-lines::after { display: block; width: 23px; height: 2px; margin-inline: auto; background: currentColor; content: ""; transition: transform .2s ease; }
.menu-toggle-lines { position: relative; }
.menu-toggle-lines::before { position: absolute; top: -7px; }
.menu-toggle-lines::after { position: absolute; top: 7px; }
.menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.page-shell { padding: 56px 0 80px; }
.page-header { padding: 12px 0 36px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-dark); font-size: .78rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--ink); line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
h1 { max-width: 920px; margin-bottom: 20px; font-size: clamp(2.25rem, 5.2vw, 3.65rem); }
h2 { position: relative; margin: 72px 0 24px; font-size: clamp(1.8rem, 3.5vw, 2.35rem); }
h2::before { content: ""; display: block; width: 46px; height: 5px; margin-bottom: 14px; background: var(--accent); border-radius: 99px; }
h3 { margin: 38px 0 16px; font-size: clamp(1.35rem, 2.4vw, 1.6rem); }
p { margin: 0 0 1.25em; }
.lead { max-width: 850px; margin-bottom: 0; color: #44413d; font-size: clamp(1.08rem, 2vw, 1.27rem); line-height: 1.7; }
.article-panel { padding: 54px clamp(22px, 5vw, 72px) 64px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.article-panel > * { max-width: var(--reading); margin-left: auto; margin-right: auto; }
.article-panel > .wide, .article-panel > figure, .article-panel > .table-wrap { max-width: 980px; }
.article-panel ul, .article-panel ol { padding-left: 1.35em; }
.article-panel li { margin-bottom: .55em; }
.article-panel section { scroll-margin-top: 90px; }
.article-panel section:first-child h2 { margin-top: 0; }
.section-link { display: inline-flex; min-height: 48px; align-items: center; margin: 10px 0 16px; padding: 10px 17px; color: #fff; background: var(--accent); border-radius: 10px; font-weight: 800; text-decoration: none; }
.section-link:hover { color: #fff; background: var(--accent-dark); }
.section-link.secondary { color: var(--accent-dark); background: #fff; border: 1px solid var(--accent); }

.editorial-figure { margin-top: 34px; margin-bottom: 42px; }
.editorial-figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.editorial-figure figcaption { margin-top: 9px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.table-wrap { margin: 28px auto 38px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .96rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.steps { margin: 28px 0 34px; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 58px; margin: 0 0 18px; padding: 4px 0 18px 64px; border-bottom: 1px solid var(--line); counter-increment: steps; }
.steps li::before { content: counter(steps); position: absolute; left: 0; top: 0; display: grid; width: 44px; height: 44px; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font-weight: 850; }
.note { margin: 28px 0; padding: 20px 22px; background: var(--info-bg); border-left: 5px solid var(--info); border-radius: 10px; }
.note.warning { background: var(--warn-bg); border-left-color: var(--warn); }
.note.danger { background: #fff0ee; border-left-color: var(--danger); }
.faq-list { margin: 30px 0; }
.faq-list details { margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq-list details[open] { border-left: 5px solid var(--accent); }
.faq-list summary { min-height: 52px; display: flex; align-items: center; padding: 14px 18px; font-weight: 800; cursor: pointer; }
.faq-list details p { padding: 0 18px 18px; }
.editor-meta { margin-top: 56px !important; padding-top: 22px; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }

.editorial-form { display: grid; gap: 18px; margin-top: 26px; }
.editorial-form label { display: grid; gap: 7px; font-weight: 750; }
.editorial-form input, .editorial-form textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #bdb5a8; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.editorial-form textarea { min-height: 140px; resize: vertical; }
.editorial-form button { justify-self: start; min-height: 48px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 850; cursor: pointer; }
.form-message { padding: 14px 16px; border-radius: 9px; background: var(--info-bg); color: var(--info); }
.form-hp { position: absolute !important; left: -9999px !important; }

.site-footer { padding: 52px 0 34px; background: var(--ink); color: #f7f4ee; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
.footer-title { margin: 0 0 10px; color: #fff; font-size: 1.45rem; font-weight: 850; }
.footer-copy { max-width: 520px; color: #ddd7ce; }
.footer-nav { margin: 0; padding: 0; list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.site-footer a { color: #fff; }
.footer-small { margin-top: 32px; padding-top: 22px; color: #c9c2b7; border-top: 1px solid rgba(255,255,255,.18); font-size: .86rem; }

body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.site-bottom-cta {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 9990;
  width: min(calc(100% - 32px), 680px);
  transform: translateX(-50%);
  pointer-events: none;
}
.site-bottom-cta__inner {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(36, 35, 33, .96);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.site-bottom-cta__button {
  display: inline-flex;
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.site-bottom-cta__login {
  color: var(--ink);
  background: #fff;
  border-color: #fff;
}
.site-bottom-cta__register {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 7px 18px rgba(168, 62, 50, .38);
}
.site-bottom-cta__login:hover { color: var(--ink); background: var(--surface-soft); transform: translateY(-2px); }
.site-bottom-cta__register:hover { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }

.archive-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.archive-card { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.archive-card h2 { margin: 0 0 12px; font-size: 1.45rem; }
.archive-card h2::before { display: none; }

@media (max-width: 768px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 32px), var(--content)); }
  .site-header, .header-inner { min-height: 58px; }
  .site-logo__image { height: 34px; max-width: 124px; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .site-nav { width: 100%; padding: 8px 0 16px; }
  .site-nav ul { align-items: stretch; flex-direction: column; }
  .site-nav a { width: 100%; min-height: 48px; padding-inline: 12px; }
  .header-inner { position: relative; flex-wrap: wrap; gap: 0; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .page-shell { padding: 36px 0 52px; }
  .page-header { padding-bottom: 26px; }
  h1 { font-size: clamp(2.1rem, 10vw, 2.65rem); }
  h2 { margin-top: 48px; font-size: clamp(1.75rem, 8vw, 2.12rem); }
  .article-panel { padding: 34px 20px 44px; border-radius: 14px; }
  .table-wrap { border: 0; overflow: visible; }
  table, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  td { padding: 11px 13px; }
  td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
  .footer-grid, .archive-list { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 390px) {
  .container { width: min(calc(100% - 32px), var(--content)); }
  .article-panel { padding-inline: 16px; }
  .steps li { padding-left: 56px; }
  .section-link { width: 100%; justify-content: center; text-align: center; }
  .site-bottom-cta { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); }
  .site-bottom-cta__inner { gap: 8px; padding: 8px; border-radius: 14px; }
  .site-bottom-cta__button { min-height: 50px; padding: 10px 8px; font-size: .94rem; }
}

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