/* ==========================================================================
   ANÁLISE LUSA — Design System ("Árvore de Resultados")
   Priority Palette: #F9F9F7, #1B4332, #C59B27, #1E1E1E
   ========================================================================== */

:root {
  --bg-base: #F9F9F7;
  --bg-surface: #F2F1EC;
  --bg-surface-alt: #E7E6DF;
  --bg-dark: #1B4332;
  --bg-dark-card: #245440;
  
  --accent-primary: #1B4332;
  --accent-primary-hover: #133124;
  --accent-gold: #C59B27;
  --accent-gold-dark: #8F6D13;
  
  --text-main: #1E1E1E;
  --text-secondary: #3B3B38;
  --text-on-dark: #F9F9F7;
  --text-on-dark-muted: #DCE4DF;
  
  --border-subtle: #C9C7BC;
  --border-strong: #1B4332;
  
  --font-serif: 'Literata', Georgia, serif;
  --font-sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --container-max: 1160px;
  --grid-gap: 18px;
  --section-py: 60px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg-base);
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(145px);
  opacity: 0.13;
  animation: blobDrift 24s ease-in-out infinite alternate;
}

.ambient-blob--emerald {
  width: 520px;
  height: 520px;
  background: #1B4332;
  top: -80px;
  left: -100px;
}

.ambient-blob--gold {
  width: 480px;
  height: 480px;
  background: #C59B27;
  bottom: 10%;
  right: -80px;
  animation-delay: -12s;
}

@keyframes blobDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(45px, 35px) scale(1.08); }
}

.ambient-tree-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.12;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.12;
  margin-bottom: 20px;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent-gold-dark);
}

.section-dark h1 em, .section-dark h2 em {
  color: var(--accent-gold);
}

h2 {
  font-size: clamp(26px, 3vw, 33px);
  line-height: 1.2;
  margin-bottom: 16px;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 12px;
}

p {
  margin-top: 0;
  margin-bottom: 18px;
  max-width: 680px;
}

.lead-box {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  background-color: var(--bg-surface-alt);
  border-left: 4px solid var(--accent-primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 24px;
  max-width: 680px;
}

.formula-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.formula-block {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  overflow-x: auto;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

.section-dark .mono-tag {
  color: var(--accent-gold);
}

.big-stat {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

.section-dark .big-stat {
  color: var(--accent-gold);
}

a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--accent-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.25s var(--ease-out), text-decoration-color 0.25s var(--ease-out);
}

a:hover {
  color: var(--accent-primary);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #F9F9F7;
}

.btn-primary:hover {
  background-color: var(--accent-gold);
  color: #1E1E1E;
}

.btn-primary .btn-arrow {
  transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #1E1E1E;
}

.btn-gold:hover {
  background-color: #D8AD34;
  color: #1E1E1E;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background-color: var(--accent-primary);
  z-index: 1002;
  transition: width 0.1s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  height: 74px;
  transition: height 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.site-header.is-scrolled {
  height: 56px;
  box-shadow: 0 4px 20px rgba(30, 30, 30, 0.06);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-main);
  flex-shrink: 0;
}

.axis-nav {
  flex: 1;
  max-width: 640px;
  position: relative;
  padding-top: 8px;
}

.axis-track {
  position: relative;
  height: 2px;
  background-color: var(--border-subtle);
  margin: 0 24px 6px;
}

.axis-marker {
  position: absolute;
  top: -5px;
  left: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  border: 2px solid var(--accent-primary);
  transform: translateX(-50%);
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.axis-points {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.axis-point {
  position: relative;
  text-align: center;
  flex: 1;
}

.axis-point::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 1px;
  height: 8px;
  background-color: var(--accent-primary);
}

.axis-tick-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--text-secondary);
  margin-bottom: 2px;
  transition: opacity 0.25s ease, height 0.25s ease;
}

.site-header.is-scrolled .axis-tick-val {
  opacity: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
}

.axis-point a {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-main);
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.axis-point a:hover,
.axis-point a.active {
  color: var(--accent-primary);
  background-color: var(--bg-surface-alt);
}

.header-cta {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
}

.mobile-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--accent-primary);
  padding: 20px;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-drawer a {
  font-size: 22px;
  font-family: var(--font-serif);
  font-weight: 700;
  text-decoration: none;
  display: block;
  padding: 6px 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--text-on-dark);
}

.section-dark p {
  color: var(--text-on-dark-muted);
}

.coord-frame {
  position: relative;
}

.coord-frame::before,
.coord-frame::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-primary);
  opacity: 0.45;
  pointer-events: none;
}

.coord-frame::before { top: 12px; left: 16px; }
.coord-frame::after { bottom: 12px; right: 16px; }

.curve-divider {
  width: 100%;
  height: 36px;
  display: block;
  overflow: hidden;
  line-height: 0;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  align-items: stretch;
}

.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: 0 12px 28px rgba(27, 67, 50, 0.08);
}

.card:hover::after {
  left: 140%;
}

.section-dark .card {
  background-color: var(--bg-dark-card);
  border-color: rgba(249, 249, 247, 0.18);
  color: var(--text-on-dark);
}

.section-dark .card:hover {
  border-color: var(--accent-gold);
}

.node-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--bg-surface-alt);
  border: 1.5px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--accent-primary);
}

.bias-card {
  border-left: 4px solid var(--accent-gold);
}

.bias-card--emerald {
  border-left-color: var(--accent-primary);
}

.quote-card {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(197, 155, 39, 0.4);
}

.quote-card blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.45;
  margin: 0 0 16px;
  color: var(--text-on-dark);
}

.sci-figure {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}

.sci-figure-caption {
  display: inline-block;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 10px;
}

.outcome-matrix {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-width: 380px;
}

.matrix-cell {
  aspect-ratio: 1;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.matrix-cell:hover,
.matrix-cell.is-highlighted {
  background-color: var(--accent-primary);
  color: #F9F9F7;
  border-color: var(--accent-primary);
  transform: scale(1.06);
}

.matrix-tooltip {
  margin-top: 12px;
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  min-height: 44px;
}

.sim-panel {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.sim-range-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.sim-range-group input[type="range"] {
  accent-color: var(--accent-primary);
  width: 100%;
  cursor: pointer;
}

.sim-canvas-box {
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  width: 100%;
}

.doors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.door-box {
  background-color: var(--bg-surface-alt);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.door-box:hover {
  border-color: var(--accent-primary);
}

.door-box.is-selected {
  border-color: var(--accent-gold);
  background-color: #EFE9D5;
}

.door-box.is-revealed-empty {
  opacity: 0.65;
  background-color: #E2E0D8;
  cursor: default;
}

.door-box.is-winner {
  border-color: var(--accent-primary);
  background-color: #D6E7DF;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 17px;
  padding: 12px 14px;
  background-color: var(--bg-base);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-main);
}

.form-control:focus {
  border-color: var(--accent-primary);
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  padding: 14px 18px;
  border-radius: 8px;
  margin-top: 16px;
  font-weight: 500;
  display: none;
}

.form-status.is-success {
  display: block;
  background-color: #D6E7DF;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
}

.form-status.is-error {
  display: block;
  background-color: #F6DFDC;
  border: 1px solid #9E2A2B;
  color: #7A1C1D;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 20px;
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #F9F9F7;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 17px;
  color: var(--text-secondary);
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 8px;
  color: var(--border-subtle);
}

.breadcrumbs li:last-child::after {
  content: "";
}

.article-body {
  max-width: 680px;
}

.key-takeaways {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 28px 0;
}

.key-takeaways h3 {
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer-curve-wrap {
  background-color: transparent;
  line-height: 0;
  margin-top: 40px;
}

.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.footer-col h4 {
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 15px;
}

.footer-col a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.footer-disclaimer {
  background-color: var(--bg-dark-card);
  border-left: 4px solid var(--accent-gold);
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 17px;
  color: var(--text-on-dark);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(249, 249, 247, 0.15);
  font-size: 14px;
  color: var(--text-on-dark-muted);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(4px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (max-width: 960px) {
  .axis-nav {
    display: none;
  }
  .header-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .col-7, .col-6, .col-5, .col-4, .col-3, .col-8 {
    grid-column: span 12;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .doors-grid {
    grid-template-columns: 1fr;
  }
  .shot img {
    max-height: 260px;
  }
}

.shot {
  display: grid;
  place-items: center;
  background: #E6E3D8;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px;
  margin: 0 0 18px;
}

.shot img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 380px;
  object-fit: contain;
  border-radius: 8px;
}

.shot--card {
  padding: 6px;
  margin-bottom: 14px;
}

.shot--card img {
  max-height: 188px;
}

.shot--hero img {
  max-height: 340px;
}
