/* ============================================================
   Instituto Limite Pesquisas — Estudo Contabilidade Online
   Página de resultados (institucional, sem captura de lead)
   Design system herdado do site (mesmos tokens da referência)
   ============================================================ */

:root {
  /* cores — idênticas ao design system do site */
  --bg: #FAF6F0;
  --grad-top: #FBF8F3;
  --grad-mid: #F6F0E7;
  --grad-bottom: #F9F5EE;
  --ink: #2B2F36;
  --ink-strong: #23272E;
  --ink-72: rgba(43, 47, 54, .72);
  --ink-68: rgba(43, 47, 54, .68);
  --ink-55: rgba(43, 47, 54, .55);
  --ink-50: rgba(43, 47, 54, .50);
  --ink-45: rgba(43, 47, 54, .45);
  --ink-38: rgba(43, 47, 54, .38);
  --ink-22: rgba(43, 47, 54, .22);
  --line: rgba(43, 47, 54, .11);
  --line-strong: rgba(43, 47, 54, .18);
  --line-soft: rgba(43, 47, 54, .14);
  --orange: #FF7A00;
  --orange-hover: #E86D00;
  --orange-active: #CF6100;
  --orange-deep: #C25F00;
  --orange-light: #FF8A00;
  --orange-wash: rgba(255, 122, 0, .10);
  --surface: #FFFFFF;
  --surface-soft: #FCFAF7;
  --dark: #23272E;

  /* forma */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --pill: 100px;
  --shadow-card: 0 18px 40px -28px rgba(43, 47, 54, .28);

  /* tipografia e medidas */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1120px;
  --content: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-deep); text-decoration: none; }
a:hover { color: var(--orange); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- animações (só transform/opacity) ---------- */
@keyframes limDrift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(0, -26px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- topo decorativo (herói) ---------- */
.hero-deco {
  position: absolute; inset: 0 0 auto 0; height: 640px;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.hero-deco span { position: absolute; border-radius: 50%; display: block; }
.hero-deco .deco--1 {
  top: -180px; right: -160px; width: 560px; height: 560px;
  border: 1px solid rgba(43, 47, 54, .07);
  animation: limDrift 18s ease-in-out infinite;
}
.hero-deco .deco--2 {
  top: -90px; right: -70px; width: 380px; height: 380px;
  border: 1px solid rgba(255, 122, 0, .16);
  animation: limDrift 22s ease-in-out infinite;
}
.hero-deco .deco--3 {
  top: 5px; right: 25px; width: 190px; height: 190px;
  background: rgba(255, 122, 0, .05);
  animation: limDrift 26s ease-in-out infinite;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 246, 240, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--max); margin: 0 auto; width: 100%;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .brand { display: flex; align-items: center; }
.logo { height: 28px; width: auto; display: block; }
.site-header .meta { text-align: right; }
.site-header .tag {
  display: block;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-45); font-weight: 600;
}
.site-header .tag--sub { color: var(--ink-38); font-weight: 500; letter-spacing: .04em; margin-top: 2px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto; width: 100%;
  padding: 56px 20px 40px;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line-soft); border-radius: var(--pill);
  background: var(--surface);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); display: block; }
.badge__text { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-72); }

.hero__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -.02em;
  margin: 18px 0 0; color: var(--ink-strong); text-wrap: pretty;
}
.hero__title mark {
  background: none; color: inherit; position: relative; white-space: nowrap;
}
.hero__title mark::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 8px;
  background: rgba(255, 122, 0, .32); z-index: -1;
}
.hero__lead { font-size: 16px; line-height: 1.6; color: var(--ink-68); margin: 16px 0 0; max-width: 60ch; }

/* ---------- tira de números ---------- */
.stat-strip {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 30px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.stat-strip a {
  display: block; padding: 18px 18px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  transition: transform .16s ease, border-color .16s ease;
}
.stat-strip a:hover { transform: translateY(-2px); border-color: var(--orange-light); }
.stat-strip strong {
  display: block; font-family: var(--font-serif); font-size: 30px; color: var(--ink-strong);
}
.stat-strip span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--ink-55); }

/* ---------- layout com sumário ---------- */
.layout {
  max-width: var(--max); margin: 0 auto; padding: 56px 20px 0;
  display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start;
}

.toc {
  position: sticky; top: 92px;
  display: flex; flex-direction: column; gap: 2px;
}
.toc__label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-38); margin: 0 0 10px;
}
.toc a {
  display: block; padding: 7px 0; font-size: 13.5px; color: var(--ink-55);
  border-left: 2px solid transparent; padding-left: 12px; margin-left: -13px;
  transition: color .14s ease, border-color .14s ease;
}
.toc a:hover { color: var(--ink-strong); }
.toc a.is-active { color: var(--orange-deep); border-color: var(--orange); font-weight: 600; }

.content { min-width: 0; display: flex; flex-direction: column; gap: 64px; padding-bottom: 40px; }

/* ---------- bloco de achado ---------- */
.finding { scroll-margin-top: 96px; }
.finding__kicker {
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange-deep); margin: 0;
}
.finding__title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.22; letter-spacing: -.01em;
  margin: 10px 0 0; color: var(--ink-strong); text-wrap: pretty; max-width: 34ch;
}
.finding__lead { font-size: 15.5px; line-height: 1.65; color: var(--ink-68); margin: 14px 0 0; max-width: 62ch; }

.finding__grid {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 44px; margin-top: 26px; align-items: start;
}

.numbers { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 4px; }
.numbers .num strong {
  display: block; font-family: var(--font-serif); font-size: 34px; color: var(--ink-strong); line-height: 1;
}
.numbers .num span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-50); max-width: 18ch; line-height: 1.35; }

.quote {
  margin: 22px 0 0; padding: 16px 20px;
  border-left: 3px solid var(--orange);
  background: var(--surface-soft);
  font-family: var(--font-serif); font-style: italic; font-size: 16px; line-height: 1.55;
  color: var(--ink-strong);
}

.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 20px 16px 16px; margin: 0;
}
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-card figcaption { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-50); max-width: 42ch; }
.chart-card--compact { max-width: 340px; }

.finding__extra { margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-68); }
.finding__extra strong { color: var(--ink-strong); }

/* ---------- ficha técnica ---------- */
.tech { scroll-margin-top: 96px; }
.tech__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px 28px;
  margin: 24px 0 0; padding: 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.tech__grid dt { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-45); margin: 0; }
.tech__grid dd { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-strong); }

.tech__note { margin-top: 28px; }
.tech__note h3 { font-size: 14px; font-weight: 600; color: var(--ink-strong); margin: 0 0 6px; }
.tech__note p { font-size: 14px; line-height: 1.65; color: var(--ink-68); margin: 0; }
.tech__notes { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }

.tech table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 13.5px; }
.tech th, .tech td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tech th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-45); font-weight: 600; }
.tech td:last-child, .tech th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- como citar ---------- */
.cite { scroll-margin-top: 96px; }
.cite__box {
  margin-top: 20px; display: flex; gap: 20px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; padding: 22px 24px; background: var(--dark); border-radius: var(--radius-lg);
}
.cite__text { margin: 0; max-width: 56ch; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.82); }
.cite__text b { color: #fff; }
.cite__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cite-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.24); color: #fff; background: rgba(255,255,255,.08);
  padding: 10px 16px; border-radius: var(--pill); cursor: pointer; transition: background .15s ease;
  white-space: nowrap;
}
.cite-btn:hover { background: rgba(255,255,255,.16); }
.cite-btn--solid { background: var(--orange); border-color: var(--orange); }
.cite-btn--solid:hover { background: var(--orange-hover); }
.cite-btn[data-copied="true"] { background: rgba(120,200,140,.24); border-color: rgba(120,200,140,.5); }

/* ---------- footer ---------- */
.site-footer { position: relative; background: var(--surface); border-top: 1px solid rgba(43, 47, 54, .09); margin-top: 60px; }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 26px 20px;
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-start;
}
.site-footer .brand { display: flex; align-items: center; }
.logo--footer { height: 20px; }
.site-footer__text { margin: 0; max-width: 640px; font-size: 12px; line-height: 1.6; color: var(--ink-55); }
.site-footer__text strong { color: var(--ink-72); }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding-top: 24px; }
  .toc {
    position: sticky; top: 60px; z-index: 10; flex-direction: row; gap: 6px;
    overflow-x: auto; background: var(--bg); padding: 10px 0; margin: -8px 0 8px;
    border-bottom: 1px solid var(--line);
  }
  .toc__label { display: none; }
  .toc a {
    border-left: none; margin-left: 0; padding: 6px 12px; white-space: nowrap;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
  }
  .toc a.is-active { background: var(--orange-wash); border-color: var(--orange); }
  .finding__grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-header .meta { display: none; }
  .cite__box { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-deco span { animation: none; }
}
