/* ==========================================================================
   Nai Araújo — Design tokens
   Palette: Branco + grafite + dourado sutil (editorial minimalista)
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F4F4F2;
  --text: #2C2C2C;
  --text-muted: #6B6B6B;
  --accent: #B8892E;
  --accent-hover: #9C7326;
  --accent-soft: #F0E4C7;
  --accent-tint: #FBF6EA;
  --border: #E5E5E2;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);

  --font-serif: 'Fraunces', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --container: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; color: var(--text); margin: 0 0 .6em; font-variation-settings: "opsz" 32, "WONK" 0; }
p { margin: 0 0 1em; }
input, select { font-family: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: all .25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(184, 137, 46, 0.15);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #fff; }
.btn-link {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 12px 6px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.btn-link:hover { color: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-yt { padding: 9px 18px; font-size: 14px; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 14, "WONK" 0;
}
.brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.brand-name { color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--text-muted);
}
.nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px; height: 40px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform .25s ease;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; margin-bottom: 12px; }
.section-sub { color: var(--text-muted); font-size: 17px; }
.section-cta { text-align: center; margin-top: 40px; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(1000px 500px at 15% -20%, var(--accent-tint), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-title {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: 500;
  margin: .2em 0 .4em;
  font-variation-settings: "opsz" 60, "WONK" 0;
}
.underline-gold {
  position: relative;
  font-style: normal;
  font-weight: 600;
  color: var(--text);
  font-variation-settings: "opsz" 60, "WONK" 0;
}
.underline-gold::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 6px;
  background: var(--accent);
  opacity: .75;
  border-radius: 4px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
  text-align: justify;
  hyphens: auto;
}
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.hero-photo {
  position: relative;
  margin: 0;
  justify-self: center;
}
.hero-photo-frame {
  width: min(420px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--border);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-badge {
  position: absolute;
  top: -14px; right: -14px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Bio
   ========================================================================== */

.bio {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  align-items: start;
}
.bio-text p { font-size: 17px; color: var(--text); }
.facts {
  list-style: none;
  padding: 30px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 18px;
}
.facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px dashed var(--border); padding-bottom: 12px; }
.facts li:last-child { border-bottom: none; padding-bottom: 0; }
.facts span { font-size: 13px; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }
.facts strong { font-family: var(--font-serif); font-size: 18px; font-weight: 500; }

/* ==========================================================================
   Calculadoras
   ========================================================================== */

.calc-tabs {
  display: inline-flex;
  padding: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin: 0 auto 32px;
  gap: 4px;
}
.section .calc-tabs { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }
.calc-tab {
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: all .2s ease;
}
.calc-tab.is-active {
  background: var(--text);
  color: #fff;
}

.calc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.calc-goal-header {
  text-align: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent-tint), #fff);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.calc-goal-header .eyebrow { margin-bottom: 4px; }
.calc-goal-header strong {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.01em;
  font-variation-settings: "opsz" 28, "WONK" 0;
}

.calc-mode {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 28px;
}
.calc-mode button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-muted);
  transition: all .2s ease;
  cursor: pointer;
}
.calc-mode button.is-active {
  background: var(--text);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.calc-card[data-mode="tempo"] .field-aporte-only { display: none; }
.calc-card[data-mode="aporte"] .field-tempo-only { display: none; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .02em;
}
.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.input-prefix > span {
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 12px 14px;
  font-size: 14px;
  display: flex; align-items: center;
  border-right: 1px solid var(--border);
  min-width: 44px; justify-content: center;
}
.input-prefix > span.dim { color: var(--text-muted); }
.input-prefix input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  width: 100%;
  min-width: 0;
}
.input-suffix select {
  border: none;
  border-left: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.calc-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.calc-results { margin-top: 40px; }

.result-hero {
  text-align: center;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--accent-tint), var(--accent-soft));
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.result-hero strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.015em;
  font-variation-settings: "opsz" 40, "WONK" 0;
  margin-bottom: 8px;
}
.result-hero span {
  display: block;
  color: var(--text-muted);
  font-size: 14.5px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.result-summary-3 { grid-template-columns: repeat(3, 1fr); }
.result-card {
  background: var(--bg-alt);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.result-card span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.result-card strong {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  font-variation-settings: "opsz" 22, "WONK" 0;
}
.result-card-goal {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
}

.chart-wrap {
  position: relative;
  height: 340px;
  margin-bottom: 24px;
}

.table-wrap { border-top: 1px solid var(--border); padding-top: 16px; }
.table-wrap summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
  padding: 8px 0;
  list-style: none;
}
.table-wrap summary::-webkit-details-marker { display: none; }
.table-wrap summary::before { content: '▸ '; transition: transform .2s; display: inline-block; }
.table-wrap[open] summary::before { transform: rotate(90deg); }
.table-scroll {
  max-height: 380px;
  overflow: auto;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-scroll th, .table-scroll td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.table-scroll th:first-child, .table-scroll td:first-child { text-align: left; }
.table-scroll thead th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  position: sticky; top: 0;
}
.table-scroll tbody tr:hover { background: var(--accent-tint); }

/* ==========================================================================
   Vídeos
   ========================================================================== */

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.videos-grid .video-card:nth-child(4) { grid-column: 1 / span 1; }
.videos-grid .video-card:nth-child(5) { grid-column: 2 / span 2; }

.video-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-thumb .play {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 40px;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  opacity: .95;
}
.video-card h3 {
  font-size: 17px;
  padding: 20px 22px 22px;
  margin: 0;
  line-height: 1.35;
}

/* ==========================================================================
   Planilha (em breve)
   ========================================================================== */

.soon-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-md);
  background-image: radial-gradient(400px 200px at 90% 10%, var(--accent-tint), transparent 70%);
}
.soon-icon {
  width: 90px; height: 90px;
  border-radius: var(--radius-lg);
  background: var(--accent-tint);
  color: var(--accent);
  display: grid; place-items: center;
}
.soon-copy h2 { font-size: 28px; margin-bottom: 8px; }
.soon-copy p { color: var(--text-muted); max-width: 560px; }
.soon-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: grid;
  gap: 8px;
  max-width: 560px;
}
.soon-features li {
  font-size: 14.5px;
  color: var(--text);
}
.soon-features li::first-letter { color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Artigo em destaque
   ========================================================================== */

.article-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, var(--accent-tint), var(--accent-soft) 60%, #fff);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.article-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 20px, rgba(184, 137, 46, .06) 20px 40px);
}
.article-mark {
  position: relative;
  font-size: 64px;
  color: var(--accent);
}
.article-source {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}
.article-body h3 { font-size: 24px; margin-bottom: 12px; line-height: 1.25; }
.article-body p { color: var(--text-muted); margin-bottom: 16px; }
.article-cta { color: var(--accent); font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--text);
  color: #fff;
  padding: 60px 0 40px;
}
.site-footer .brand-name { color: #fff; font-family: var(--font-serif); font-size: 24px; margin-bottom: 6px; display: block; }
.footer-tag { color: rgba(255, 255, 255, 0.65); margin: 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}
.footer-social { justify-self: center; display: flex; gap: 14px; }
.footer-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background .25s ease;
}
.footer-social a:hover { background: var(--accent); }
.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: right;
  justify-self: end;
}
.footer-sep {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.25);
}
.footer-credit {
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.footer-credit:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-photo-frame { width: min(320px, 100%); }
  .bio { grid-template-columns: 1fr; gap: 32px; }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid .video-card:nth-child(n) { grid-column: auto; }
  .soon-card { grid-template-columns: 1fr; text-align: center; padding: 40px 28px; }
  .soon-icon { margin: 0 auto; }
  .article-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .footer-social { justify-self: center; }
  .footer-copy { text-align: center; justify-self: center; }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 60px 0 80px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 24px 20px; }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .btn-yt { margin-left: auto; }
  .nav-toggle { display: flex; }
  .calc-card { padding: 24px 20px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-actions { justify-content: center; flex-direction: column-reverse; }
  .calc-actions .btn { width: 100%; justify-content: center; }
  .result-summary { grid-template-columns: repeat(2, 1fr); }
  .videos-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 280px; }
}

@media (max-width: 480px) {
  .section-head { margin-bottom: 40px; }
  .result-summary { grid-template-columns: 1fr; }
  .header-inner { gap: 12px; }
  .brand { font-size: 19px; }
}

/* Focus visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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