/* ===================================================================
   Run to America — Design System
   =================================================================== */

:root {
  /* Marca */
  --color-bg: #FBF7F1;
  --color-bg-alt: #F3ECE1;
  --color-surface: #FFFFFF;
  --color-ink: #20262B;
  --color-ink-soft: #4A5259;
  --color-ink-faint: #767F86;
  --color-border: #E4DCCC;
  --color-border-strong: #D4C9B3;

  --color-blue-900: #0B3350;
  --color-blue-700: #124A72;
  --color-blue-500: #1C6796;
  --color-blue-100: #E4EEF5;

  --color-red-700: #A8431F;
  --color-red-500: #C25A33;
  --color-red-100: #F6E4DA;

  --color-green-600: #5F7D52;
  --color-green-500: #7C9A6C;
  --color-green-100: #E7EEE1;

  --color-focus: #1C6796;

  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(32, 38, 43, 0.08);
  --shadow-md: 0 6px 20px rgba(11, 51, 80, 0.10);
  --shadow-lg: 0 16px 40px rgba(11, 51, 80, 0.14);

  --container-w: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--color-blue-700); text-decoration: underline; text-decoration-color: var(--color-blue-100); text-underline-offset: 3px; }
a:hover { color: var(--color-red-700); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--color-blue-900); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
table { width: 100%; border-collapse: collapse; }
button { font-family: inherit; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-blue-900); color: #fff;
  padding: 0.6em 1em; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.section--alt { background: var(--color-bg-alt); }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head p { color: var(--color-ink-soft); }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--color-blue-900); text-decoration: none; }
.brand:hover { color: var(--color-red-700); }
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav__links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.main-nav__links a { color: var(--color-ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.main-nav__links a:hover, .main-nav__links a[aria-current="page"] { color: var(--color-red-700); }
.nav-toggle { display: none; background: none; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav__links { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: 16px 20px; gap: 14px; border-bottom: 1px solid var(--color-border); display: none; }
  .main-nav__links.is-open { display: flex; }
  .main-nav { width: 100%; justify-content: flex-end; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--color-red-700); color: #fff; }
.btn--primary:hover { background: var(--color-red-500); color: #fff; }
.btn--secondary { background: transparent; color: var(--color-blue-900); border-color: var(--color-blue-900); }
.btn--secondary:hover { background: var(--color-blue-900); color: #fff; }
.btn--ghost { background: var(--color-surface); color: var(--color-blue-900); border-color: var(--color-border-strong); }
.btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- Badges / tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--color-blue-100); color: var(--color-blue-900); }
.badge--red { background: var(--color-red-100); color: var(--color-red-700); }
.badge--green { background: var(--color-green-100); color: var(--color-green-600); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1em; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
}
.card__icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--color-blue-100); display: flex; align-items: center; justify-content: center; }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 0.2em; }
.card h3 a { color: var(--color-blue-900); text-decoration: none; }
.card h3 a:hover { color: var(--color-red-700); }
.card p { color: var(--color-ink-soft); margin-bottom: 0; }
.card--link { text-decoration: none; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: var(--color-ink-faint); }
.card__photo {
  width: calc(100% + 44px);
  margin: -22px -22px 14px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: block;
  background: var(--color-bg-alt);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; color: #fff; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(11,51,80,0.92) 0%, rgba(11,51,80,0.78) 38%, rgba(11,51,80,0.35) 68%, rgba(11,51,80,0.15) 100%),
    linear-gradient(180deg, rgba(11,51,80,0.1) 0%, rgba(11,51,80,0.55) 100%);
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__eyebrow { color: #F4C9B4; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px; }
.hero__title { margin-bottom: 0.5em; color: #fff; }
.hero__lead { font-size: 1.1rem; color: #E6EEF4; max-width: 540px; }
.hero__actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero__credit { position: relative; z-index: 1; font-size: 0.72rem; color: rgba(255,255,255,0.65); margin-top: 28px; }
.hero__credit a { color: rgba(255,255,255,0.75); }

/* ---------- Banner de página (categoria / artigo) com foto ---------- */
.page-hero { position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; min-height: 220px; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,51,80,0.35) 0%, rgba(11,51,80,0.92) 100%);
}
.page-hero__content { position: relative; z-index: 2; width: 100%; padding: 36px 0 26px; }
.page-hero h1 { color: #fff; }
.page-hero .article-header__meta { color: rgba(255,255,255,0.82); }
.page-hero .section-head p { color: rgba(255,255,255,0.88); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0; font-size: 0.85rem; color: var(--color-ink-faint); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--color-border-strong); }
.breadcrumbs a { color: var(--color-ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-red-700); }

/* ---------- Article ---------- */
.article-header { padding: 40px 0 10px; }
.article-header__meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--color-ink-faint); font-size: 0.85rem; margin-bottom: 1em; }
.article-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 96px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }
.toc h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.7em; }
.toc ol { list-style: decimal; padding-left: 1.2em; margin: 0; font-size: 0.9rem; }
.toc li { margin-bottom: 0.5em; }
.toc a { color: var(--color-ink-soft); text-decoration: none; }
.toc a:hover { color: var(--color-red-700); }
.article-body h2 { margin-top: 2em; padding-top: 0.2em; border-top: 1px solid var(--color-border); padding-top: 1em; }
.article-body h2:first-of-type { border-top: none; }
.article-body table { margin: 1.4em 0; font-size: 0.93rem; }
.article-body th, .article-body td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--color-blue-100); color: var(--color-blue-900); }
.article-body caption { text-align: left; font-weight: 700; margin-bottom: 0.4em; color: var(--color-blue-900); }
.structured-block { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px; margin: 1.4em 0; }
.structured-block h3 { margin-bottom: 0.6em; }
.callout { background: var(--color-green-100); border-left: 4px solid var(--color-green-600); border-radius: var(--radius-sm); padding: 14px 18px; margin: 1.4em 0; }
.callout p:last-child { margin-bottom: 0; }

.errors-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.errors-list li { background: var(--color-red-100); border-radius: var(--radius-md); padding: 14px 18px; }
.errors-list strong { color: var(--color-red-700); display: block; margin-bottom: 4px; }

.faq-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--color-blue-900); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--color-red-700); }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 18px 16px; color: var(--color-ink-soft); }

.sources-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.sources-list a { word-break: break-word; }

.related-grid { margin-top: 1em; }

.author-box { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); margin: 1.6em 0; color: var(--color-ink-soft); font-size: 0.9rem; }
.author-box strong { color: var(--color-blue-900); }

.revision-note { font-size: 0.85rem; color: var(--color-ink-faint); background: var(--color-bg-alt); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 2em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-blue-900); color: #E6EEF4; padding: 48px 0 24px; margin-top: 60px; }
.site-footer a { color: #E6EEF4; }
.site-footer a:hover { color: var(--color-red-500); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.8em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.footer-note { font-size: 0.82rem; color: #A9BDCC; max-width: 560px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid rgba(255,255,255,0.14); margin-top: 32px; padding-top: 20px; font-size: 0.82rem; color: #A9BDCC; }

/* ---------- Region chips / shortcuts ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border-strong); font-weight: 700; color: var(--color-blue-900); text-decoration: none; font-size: 0.9rem; }
.chip:hover { border-color: var(--color-red-700); color: var(--color-red-700); }
.chip svg { width: 18px; height: 18px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 1.1em; }
.field label { font-weight: 700; font-size: 0.9rem; color: var(--color-blue-900); }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; background: var(--color-surface); color: var(--color-ink);
}
.field--check { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { margin-top: 4px; }
.form-note { font-size: 0.82rem; color: var(--color-ink-faint); }

/* ---------- Misc utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.divider-art { display: block; width: 100%; height: auto; margin: 8px 0; color: var(--color-border-strong); }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .no-print, .breadcrumbs { display: none !important; }
  body { background: #fff; }
  a { color: #000; text-decoration: none; }
}
