/*
Theme Name: NNZZ Guia Brasil HM4iOHff
Theme URI: https://nnzz.cam/
Author: NNZZ Guia Brasil
Description: Tema editorial independente criado para a reconstrução HM4iOHff.
Version: 1.0.0
Text Domain: nnzz-guia
*/

:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --ink: #151515;
  --muted: #5c5b57;
  --line: #1e1e1e;
  --night: #101010;
  --accent: #a92f2b;
  --info: #e9eef1;
  --max: 1240px;
  --read: 760px;
  --space: clamp(3rem, 7vw, 6.5rem);
  --sans: "DejaVu Sans", "Noto Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: clamp(1rem, .4vw + .92rem, 1.125rem); line-height: 1.72; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: #74211f; text-decoration-thickness: .09em; text-underline-offset: .18em; }
a:hover { color: #111; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #2d5f8b; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: .5rem; left: .5rem; transform: translateY(-160%); background: #fff; color: #000; border: 3px solid #000; padding: .75rem 1rem; }
.skip-link:focus { transform: none; }
.wrap { width: min(calc(100% - clamp(2rem, 7vw, 8rem)), var(--max)); margin-inline: auto; }

.site-header { background: var(--night); color: #fff; border-bottom: 4px solid var(--accent); }
.identity-row { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.custom-logo-link { display: inline-flex; align-items: center; min-height: 52px; }
.custom-logo { width: min(330px, 58vw); max-height: 66px; object-fit: contain; object-position: left center; }
.site-name-fallback { color: #fff; font-size: 1.35rem; font-weight: 800; text-decoration: none; }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; border: 2px solid #fff; background: transparent; color: #fff; font: inherit; font-weight: 700; }
.primary-nav { border-top: 1px solid #4c4c4c; }
.primary-nav ul { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); padding: 0; margin: 0; }
.primary-nav li { border-right: 1px solid #4c4c4c; }
.primary-nav li:first-child { border-left: 1px solid #4c4c4c; }
.primary-nav a { min-height: 58px; height: 100%; display: flex; align-items: center; padding: .75rem .65rem; color: #fff; font-size: .84rem; font-weight: 700; text-decoration: none; line-height: 1.25; }
.primary-nav a:hover, .primary-nav a:focus-visible { background: #fff; color: #111; }

.site-main { min-height: 50vh; }
.entry-hero { background: var(--night); color: #fff; padding: clamp(3rem, 8vw, 7rem) 0; border-bottom: 1px solid #000; }
.entry-hero .kicker { display: block; color: #f0b3ae; font-size: .85rem; font-weight: 800; letter-spacing: .08em; margin-bottom: 1rem; }
.entry-hero h1 { max-width: 1120px; margin: 0; font-size: clamp(2.25rem, 6.3vw, 5.25rem); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.entry-content { padding: var(--space) 0; }
.entry-content > * { max-width: var(--read); margin-left: auto; margin-right: auto; }
.entry-content > h2, .entry-content > h3 { scroll-margin-top: 2rem; }
.entry-content > h2 { max-width: 980px; margin-top: var(--space); margin-bottom: 1.25rem; padding-top: .85rem; border-top: 4px solid var(--line); font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.12; letter-spacing: -.025em; }
.entry-content > h2::before { content: attr(data-chapter); display: block; margin-bottom: .7rem; color: var(--accent); font-size: .78rem; line-height: 1; letter-spacing: .13em; }
.entry-content > h3 { margin-top: 2.5rem; font-size: clamp(1.35rem, 2.3vw, 1.8rem); line-height: 1.2; }
.entry-content > p { margin-top: 0; margin-bottom: 1.35rem; }
.entry-content > p:first-of-type { font-size: 1.16em; font-weight: 600; line-height: 1.55; }
.entry-content > ul, .entry-content > ol { padding-left: 1.35rem; }
.entry-content li { margin-bottom: .65rem; }
.entry-content > figure, .entry-content > table, .entry-content > .table-scroll, .entry-content > .editorial-asset { max-width: 1100px; }
.editorial-image { margin-top: clamp(2.25rem, 5vw, 4rem); margin-bottom: clamp(2.75rem, 6vw, 5rem); border-top: 4px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0; }
.editorial-image img { width: 100%; aspect-ratio: 14 / 9; object-fit: cover; }
.editorial-image.hero-image img { aspect-ratio: 16 / 9; }
.editorial-image figcaption { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.table-scroll { overflow-x: auto; margin-top: 2rem; margin-bottom: 2.5rem; border: 2px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { min-width: 150px; padding: .85rem; vertical-align: top; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th { background: var(--night); color: #fff; }
tr:last-child td { border-bottom: 0; }
.editorial-asset { margin-top: 2rem; margin-bottom: 2.5rem; background: var(--info); border: 3px solid var(--line); padding: clamp(1.25rem, 4vw, 2.5rem); }
.editorial-asset ol { margin: 0; padding-left: 1.35rem; }
.source-note { padding: 1.25rem; border-left: 6px solid var(--accent); background: #fff; }

.faq-block { max-width: 920px !important; margin-top: var(--space); }
.faq-block h2 { padding-top: .85rem; border-top: 4px solid var(--line); font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.12; }
.faq-item { border-top: 2px solid var(--line); }
.faq-item:last-child { border-bottom: 2px solid var(--line); }
.faq-item summary { cursor: pointer; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 800; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { max-width: var(--read); padding: 0 0 1.3rem; }

.site-footer { background: var(--night); color: #fff; border-top: 4px solid var(--accent); padding: 3.25rem 0; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: start; }
.footer-title { margin: 0 0 .75rem; font-size: 1.45rem; }
.footer-note { margin: 0 0 1rem; max-width: 620px; color: #ddd; }
.site-footer a { color: #fff; }
.footer-menu { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-menu li { margin: 0 0 .65rem; break-inside: avoid; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { grid-template-columns: 1fr 1fr; }
  .primary-nav li, .primary-nav li:first-child { border-left: 1px solid #4c4c4c; border-bottom: 1px solid #4c4c4c; }
  .primary-nav a { min-height: 52px; }
}

@media (max-width: 600px) {
  .wrap { width: min(calc(100% - 2rem), var(--max)); }
  .identity-row { min-height: 68px; }
  .custom-logo { width: min(245px, 68vw); max-height: 52px; }
  .primary-nav ul { grid-template-columns: 1fr; }
  .entry-hero { padding: 3.5rem 0; }
  .entry-hero h1 { font-size: clamp(2.15rem, 10.6vw, 3.15rem); }
  .entry-content { padding: 3rem 0; }
  .entry-content > h2 { margin-top: 3.6rem; }
  .editorial-image { width: 100%; }
  .editorial-image img, .editorial-image.hero-image img { aspect-ratio: 5 / 4; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-menu { columns: 1; }
}

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