/*
Theme Name: fxfx Editorial
Theme URI: https://fxfx.buzz/
Author: Equipe editorial do fxfx.buzz
Description: Tema editorial independente em português do Brasil para conteúdo sobre a fxfx.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fxfx-editorial
*/

:root {
  --bg: #090f1f;
  --surface: #0d1527;
  --header: #121a2c;
  --surface-soft: #151f33;
  --text: #ffffff;
  --muted: #d2d5dd;
  --muted-2: #aeb6c8;
  --border: #26334c;
  --gold: #f3bf37;
  --gold-soft: #ffe47a;
  --green: #16b35c;
  --cyan: #4dcbe8;
  --focus: #ffe47a;
  --content: 920px;
  --wide: 1150px;
  --radius: 6px;
  --header-height: 66px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 8%, rgba(77, 203, 232, 0.07), transparent 28rem),
    linear-gradient(rgba(243, 191, 55, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 191, 55, 0.025) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
}

a {
  color: var(--gold-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #101726;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 26, 44, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--header-height);
  gap: clamp(18px, 2.8vw, 44px);
  padding: 0 clamp(20px, 3vw, 36px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  text-decoration: none;
}

.site-brand::after {
  width: 7px;
  height: 7px;
  margin: 12px 0 0 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
  box-shadow: 0 0 16px rgba(243, 191, 55, 0.5);
}

.primary-menu-wrapper {
  min-width: 0;
}

.primary-menu,
.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 32px);
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a,
.primary-menu a:hover {
  color: var(--text);
}

.header-cta,
.button,
.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  background: var(--gold);
  color: #101726;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.header-cta:hover,
.button:hover,
.contact-submit:hover {
  transform: translateY(-1px);
  background: var(--gold-soft);
  color: #101726;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 4px;
  background: currentColor;
  content: "";
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle-lines::before {
  transform: translateY(-7px);
}

.menu-toggle-lines::after {
  transform: translateY(5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(0) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  transform: translateY(-2px) rotate(-45deg);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main {
  min-height: 65vh;
}

.article-shell {
  width: min(calc(100% - 40px), var(--wide));
  margin: 0 auto;
  padding: 76px 0 68px;
}

.article-header {
  width: min(100%, 940px);
  margin: 0 auto 50px;
  text-align: center;
}

.article-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 850;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 64px);
  letter-spacing: -0.045em;
}

.article-subtitle {
  max-width: 760px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 20px 0 0;
  color: var(--muted-2);
  font-size: 14px;
}

.article-lead {
  width: min(100%, var(--content));
  margin: 0 auto 48px;
  color: #f2f5fb;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.68;
}

.article-actions {
  width: min(100%, var(--content));
  margin: -22px auto 52px;
}

.entry-content {
  width: min(100%, var(--content));
  margin: 0 auto;
}

.entry-content > section {
  padding: 52px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.entry-content > section:first-child {
  border-top: 0;
}

.entry-content h2 {
  margin: 0 0 24px;
  font-size: clamp(29px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.entry-content h3 {
  margin: 34px 0 14px;
  font-size: clamp(22px, 2.8vw, 29px);
  letter-spacing: -0.02em;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content dl {
  margin-top: 0;
  margin-bottom: 22px;
}

.entry-content li + li {
  margin-top: 10px;
}

.entry-content strong {
  color: var(--text);
}

.entry-content code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--header);
  color: var(--gold-soft);
}

.definition-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.definition-list dt,
.definition-list dd {
  margin: 0;
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}

.definition-list dt {
  padding-right: 24px;
  color: var(--gold-soft);
  font-weight: 800;
}

.site-visual {
  width: min(100%, var(--wide));
  margin: 38px auto 12px;
}

.site-visual img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.table-scroll {
  margin: 30px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 15px;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

.steps {
  padding-left: 1.35em;
}

.steps li {
  padding-left: 0.5em;
}

.steps li::marker {
  color: var(--gold);
  font-weight: 900;
}

.decision-path {
  margin: 30px 0;
  padding: 22px 24px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.decision-path p:last-child {
  margin-bottom: 0;
}

.editorial-note {
  margin: 32px 0 0;
  padding: 18px 22px;
  border: 1px solid rgba(243, 191, 55, 0.6);
  border-radius: var(--radius);
  background: rgba(243, 191, 55, 0.06);
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.faq-item summary {
  position: relative;
  min-height: 58px;
  padding: 18px 52px 18px 18px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
  content: "+";
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.contact-form {
  margin-top: 26px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-field {
  margin-bottom: 20px;
}

.contact-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 750;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--header);
  color: var(--text);
}

.contact-field textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  margin: 20px 0 26px;
  color: var(--muted);
}

.contact-consent input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
}

.form-status {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(22, 179, 92, 0.12);
  color: #bff5d3;
}

.form-status.is-error {
  border: 1px solid #d86868;
  background: rgba(216, 104, 104, 0.1);
  color: #ffd5d5;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--header);
}

.footer-inner {
  width: min(calc(100% - 40px), var(--wide));
  margin: 0 auto;
  padding: 48px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 56px;
  align-items: start;
}

.footer-brand {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.footer-description,
.footer-disclaimer,
.footer-responsibility,
.footer-copy {
  color: var(--muted-2);
  font-size: 14px;
}

.footer-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 24px;
}

.footer-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-menu a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 6px 0;
}

.error-page {
  text-align: center;
}

.error-page .article-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

@media (max-width: 900px) {
  .header-inner {
    gap: 16px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .primary-menu {
    gap: 14px;
  }

  .header-cta {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 65px;
  }

  body {
    font-size: 16px;
    line-height: 1.7;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-cta {
    display: none;
  }

  .primary-menu-wrapper {
    grid-column: 1 / -1;
    width: 100%;
    padding-bottom: 14px;
  }

  html.js .primary-menu-wrapper {
    display: none;
  }

  html.js .primary-menu-wrapper.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }

  .primary-menu a {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 14px;
  }

  .article-shell {
    width: min(calc(100% - 32px), var(--wide));
    padding-top: 48px;
  }

  .article-header {
    margin-bottom: 36px;
  }

  h1 {
    font-size: clamp(30px, 9vw, 36px);
  }

  .article-subtitle {
    font-size: 18px;
  }

  .article-lead {
    font-size: 18px;
  }

  .entry-content > section {
    padding: 34px 0;
  }

  .entry-content h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .definition-list {
    grid-template-columns: 1fr;
  }

  .definition-list dt {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .definition-list dd {
    padding-top: 0;
  }

  .contact-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-top {
    gap: 26px;
  }

  .footer-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .primary-menu {
    grid-template-columns: 1fr;
  }

  .article-shell,
  .footer-inner {
    width: min(calc(100% - 28px), var(--wide));
  }

  .footer-menu {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
