/*
Theme Name: N58 Guia Editorial
Theme URI: https://n58.cam/
Author: n58.cam
Description: Tema editorial independente em português do Brasil para o guia n58.
Version: 1.0.0
Text Domain: n58-guide
*/

:root {
  --bg: #071915;
  --surface: #0b211c;
  --surface-2: #102a24;
  --text: #f4f8f6;
  --muted: #afc2ba;
  --border: #29483e;
  --gold: #e8c45b;
  --mint: #3bc29a;
  --focus: #79e0be;
  --warning: #e0a54b;
  --max: 1180px;
  --article: 760px;
  --radius: 14px;
  --shadow: 0 18px 42px rgba(0,0,0,.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-wrap: break-word;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image: linear-gradient(rgba(59,194,154,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(59,194,154,.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: #fff1a9; }
.email-at::before { content: "@"; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 9999; transform: translateY(-180%); background: var(--gold); color: #071915; padding: 10px 14px; border-radius: 6px; font-weight: 800; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 68px; background: rgba(7,25,21,.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-logo { color: var(--text); font-size: 1.55rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
.site-logo span { color: var(--gold); }
.site-nav ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 7px 11px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 700; border-radius: 8px; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--text); background: var(--surface-2); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 800; }

.page-shell { position: relative; padding: 68px 0 96px; }
.article { width: min(var(--article), calc(100% - 40px)); margin-inline: auto; }
.article-header { margin-bottom: 34px; }
.eyebrow { margin: 0 0 14px; color: var(--mint); font-size: .82rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; }
h1, h2, h3 { color: var(--text); line-height: 1.16; letter-spacing: -.03em; text-wrap: balance; }
h1 { margin: 0 0 22px; font-size: clamp(2.45rem, 5.4vw, 4.25rem); }
h2 { margin: 82px 0 24px; padding-top: 18px; border-top: 1px solid var(--border); font-size: clamp(1.75rem, 3vw, 2.55rem); }
h2::before { content: ""; display: block; width: 52px; height: 4px; margin: -22px 0 20px; background: var(--gold); border-radius: 99px; }
h3 { margin: 38px 0 14px; color: #d8f5eb; font-size: 1.28rem; }
p { margin: 0 0 1.35em; }
.lead { color: #dce9e4; font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.68; }
.relationship { margin: 24px 0 0; padding: 16px 18px; color: #dce9e4; background: var(--surface-2); border-left: 4px solid var(--mint); border-radius: 0 8px 8px 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border: 1px solid var(--gold); border-radius: 8px; color: #071915; background: var(--gold); font-weight: 900; text-decoration: none; }
.button:hover { color: #071915; background: #fff1a9; }
.button.secondary { color: var(--text); background: transparent; border-color: var(--border); }
.button.secondary:hover { color: var(--text); border-color: var(--mint); background: var(--surface-2); }
.featured-media, .section-media { margin: 34px 0 46px; }
.section-media { margin-block: 28px 36px; }
.featured-media img, .section-media img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
figure figcaption { margin-top: 10px; color: var(--muted); font-size: .82rem; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0; }
.fact { padding: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.fact strong { display: block; color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; }
.notice { margin: 26px 0; padding: 20px; background: #15372f; border: 1px solid #396d5c; border-radius: 10px; }
.notice.warning { background: #332815; border-color: #6f5728; }
ol, ul { padding-left: 1.35em; }
li { margin-bottom: .55em; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; padding: 12px 14px 12px 44px; margin-bottom: 8px; background: var(--surface-2); border-radius: 8px; }
.checklist li::before { content: "✓"; position: absolute; left: 16px; top: 11px; color: var(--mint); font-weight: 900; }
.table-wrap { width: 100%; margin: 28px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .93rem; }
th, td { padding: 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--gold); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.faq details { margin-bottom: 10px; padding: 2px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; }
.faq summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--text); font-weight: 850; }
.faq details p { color: #dce9e4; }

.site-footer { position: relative; padding: 58px 0 34px; background: #06120f; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr) minmax(180px, .6fr); gap: 42px; }
.footer-title { margin: 0 0 12px; font-size: 1.2rem; color: var(--text); }
.footer-note { max-width: 520px; color: var(--muted); font-size: .92rem; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.footer-links a:hover { color: var(--gold); }
.copyright { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--border); color: #8ea69c; font-size: .82rem; }

.error-404 { min-height: 60vh; display: grid; place-items: center; text-align: center; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { position: fixed; top: 68px; left: 0; right: 0; max-height: calc(100vh - 68px); overflow-y: auto; padding: 14px 20px 24px; background: #071915; border-bottom: 1px solid var(--border); transform: translateY(-130%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .site-nav.is-open { transform: none; visibility: visible; }
  .site-nav ul { display: block; }
  .site-nav a { min-height: 48px; padding-inline: 14px; }
  body.menu-open { overflow: hidden; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .article { width: min(100% - 32px, var(--max)); }
  .page-shell { padding: 46px 0 68px; }
  h1 { font-size: clamp(2.08rem, 11vw, 2.72rem); }
  h2 { margin-top: 58px; font-size: 1.75rem; }
  .facts { grid-template-columns: 1fr; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-about { grid-column: auto; }
  .table-wrap { margin-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
