/*
Theme Name: 53a Editorial
Theme URI: https://53a.quest/
Author: 53a.quest
Description: Tema editorial independente em português do Brasil para o 53a.quest.
Version: 1.0.3
Text Domain: cinquenta-tres
*/

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

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 17px/1.76 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.menu-open { overflow: hidden; }
a { color: var(--brand-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
p, ul, ol, table { margin: 0 0 1.35em; }
h1, h2, h3 { margin: 0 0 .55em; line-height: 1.16; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
h2 { position: relative; margin-top: 2em; padding-top: .2em; font-size: clamp(1.75rem, 4vw, 2.25rem); }
h2::before { display: block; width: 42px; height: 4px; margin-bottom: .55em; border-radius: 2px; background: var(--brand); content: ""; }
h3 { margin-top: 1.6em; font-size: clamp(1.35rem, 3vw, 1.55rem); }
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.reading { width: min(100%, var(--reading)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 999; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 50; top: 0; height: 68px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 26px; }
.site-logo { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--ink); font-size: 1.8rem; font-weight: 900; letter-spacing: -.08em; text-decoration: none; }
.site-logo img { width: auto; height: 34px; }
.primary-nav { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 24px); }
.primary-nav ul { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 24px); margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: .94rem; font-weight: 700; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--brand); }
.button, .primary-nav .nav-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 19px; border: 2px solid var(--brand); border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; transition: transform .18s ease, background .18s ease; }
.button:hover, .primary-nav .nav-cta:hover { transform: translateY(-1px); background: var(--brand-dark); color: #fff; }
.button.secondary { background: #fff; color: var(--brand); }
.menu-toggle { display: none; width: 48px; height: 48px; padding: 0; border: 0; background: transparent; color: var(--ink); }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { display: block; width: 24px; height: 2px; margin: 5px auto; background: currentColor; content: ""; }

.page-hero { padding: 72px 0 54px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f0ebe2 0%, #fbf8f3 75%); }
.eyebrow { margin-bottom: 12px; color: var(--brand); font-size: .79rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 760px; color: #45423e; font-size: clamp(1.08rem, 2.2vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.content-area { padding: 36px 0 80px; }
.article-panel { padding: clamp(24px, 5vw, 56px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.article-panel > section { padding-block: 24px; }
.section-image { margin: 30px 0 38px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.section-image.portraitish img { aspect-ratio: 4 / 3; }
.caption { padding: 10px 14px; background: var(--surface-soft); color: var(--muted); font-size: .88rem; }
.toc { margin: 18px 0 36px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.toc summary { min-height: 48px; cursor: pointer; font-weight: 850; }
.toc ul { columns: 2; margin: 12px 0 0; padding-left: 22px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.notice { margin: 28px 0; padding: 18px 20px; border-left: 4px solid var(--sage); border-radius: 0 var(--radius) var(--radius) 0; background: var(--info); }
.notice.warning { border-left-color: var(--amber); background: var(--warning); }
.verification-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 28px 0; }
.verification-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.verification-card h3 { margin-top: 0; }
.verification-card ul { margin-bottom: 0; }
.check-list { columns: 2; padding-left: 22px; }
.check-list li { margin-bottom: 7px; break-inside: avoid; }
.source-list { padding: 18px 20px 18px 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.source-url { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; }
.table-wrap { max-width: 100%; margin: 28px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; margin: 0; border-collapse: collapse; background: #fff; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); font-size: .92rem; }
tr:last-child td { border-bottom: 0; }
.steps { margin: 28px 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 58px; margin-bottom: 18px; padding-left: 66px; counter-increment: steps; }
.steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; content: counter(steps); }
.faq { margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq summary { min-height: 54px; padding: 14px 46px 14px 18px; cursor: pointer; font-weight: 800; }
.faq[open] { border-left: 4px solid var(--brand); }
.faq p { padding: 0 18px 18px; }
.related { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.reviewed { margin-top: 38px; color: var(--muted); font-size: .9rem; }

.contact-form { display: grid; gap: 18px; margin: 28px 0; }
.contact-form label { display: grid; gap: 7px; font-weight: 750; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #aaa197; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.form-status { padding: 15px 18px; border-radius: 9px; background: var(--info); }

.site-footer { padding: 52px 0 26px; background: var(--ink); color: #eee9e1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .75fr .9fr; gap: 38px; }
.footer-logo { color: #fff; font-size: 1.8rem; font-weight: 900; text-decoration: none; }
.site-footer h2 { margin: 0 0 14px; color: #fff; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer h2::before { display: none; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { color: #fff; }
.footer-meta { margin-top: 30px; padding-top: 20px; border-top: 1px solid #514d48; color: #c9c2b8; font-size: .86rem; }
.site-bottom-cta-spacer { height: calc(96px + env(safe-area-inset-bottom)); background: var(--ink); }
.site-bottom-cta { position: fixed; z-index: 1000; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); pointer-events: none; }
.site-bottom-cta__inner { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px; width: min(100%, 520px); padding: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(36,35,33,.96); box-shadow: 0 14px 38px rgba(0,0,0,.34); backdrop-filter: blur(12px); pointer-events: auto; }
.site-bottom-cta__button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 54px; padding: 10px 16px; border: 2px solid #fff; border-radius: 11px; font-size: clamp(.95rem, 3.8vw, 1.05rem); 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 { background: #fff; color: var(--brand-dark); }
.site-bottom-cta__register { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 7px 18px rgba(168,62,50,.38); }
.site-bottom-cta__button:hover { transform: translateY(-2px); }
.site-bottom-cta__login:hover { background: var(--surface-soft); color: var(--brand-dark); }
.site-bottom-cta__register:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; box-shadow: 0 9px 22px rgba(168,62,50,.48); }
.not-found { min-height: 55vh; padding: 100px 0; text-align: center; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

@media (max-width: 1040px) {
  .site-header { height: 58px; }
  .menu-toggle { display: block; }
  .primary-nav { position: fixed; inset: 58px 0 auto; display: none; max-height: calc(100vh - 58px); overflow-y: auto; padding: 18px 16px 26px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: grid; gap: 2px; }
  .primary-nav a { min-height: 48px; padding: 5px 8px; font-size: 1rem; }
}

@media (max-width: 800px) {
  body { font-size: 16px; }
  .site-header { height: 58px; }
  .site-logo img { height: 30px; }
  .container { width: min(calc(100% - 32px), var(--content)); }
  .page-hero { padding: 46px 0 36px; }
  .content-area { padding: 22px 0 55px; }
  .article-panel { padding: 24px 18px; border-radius: 14px; }
  .toc ul { columns: 1; }
  .verification-grid { grid-template-columns: 1fr; }
  .check-list { columns: 1; }
  .table-wrap { border: 0; overflow: visible; }
  .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .responsive-table tr { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
  .responsive-table td { display: grid; grid-template-columns: minmax(105px, 38%) 1fr; gap: 10px; border-bottom: 1px solid var(--line); }
  .responsive-table td::before { color: var(--muted); font-size: .82rem; font-weight: 850; content: attr(data-label); }
  .responsive-table tr td:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .archive-grid { grid-template-columns: 1fr; }
}

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