/* Site Contábil — identidade editorial clara */
:root {
  --blue: #1a5fb4;
  --blue-dark: #0f3d73;
  --blue-soft: #e8f1fb;
  --cyan: #2aa8c8;
  --text: #1c2430;
  --text-muted: #5a6573;
  --border: #e4e9f0;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --shadow: 0 1px 2px rgba(15, 61, 115, 0.06);
  --radius: 10px;
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --leading: 1.65;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: var(--leading);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--blue-dark);
}

a:focus-visible,
button:focus-visible,
.nav-toggle-label:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--blue-dark);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--blue-dark);
}

.brand__mark {
  color: var(--blue);
  flex-shrink: 0;
}

.brand__name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__list {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--blue-dark);
}

.nav-toggle-label {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: #fff;
}

.nav-toggle-label__bar {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 1px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn--secondary {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn--small {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

.hero {
  padding: 3.5rem 0 2.75rem;
  background:
    radial-gradient(1200px 420px at 90% -10%, rgba(42, 168, 200, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-soft) 0%, #fff 70%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.article-header h1 {
  margin: 0 0 1rem;
  color: var(--blue-dark);
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.hero__lead,
.page-hero__lead,
.article-header__lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 38rem;
}

.hero__actions,
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.25rem;
  min-height: 17.5rem;
}

.hero-visual__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.hero-visual__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d7dee8;
}

.hero-visual__url {
  flex: 1;
  margin-left: 0.35rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--bg-soft);
}

.hero-visual__nav {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.hero-visual__nav-item {
  height: 0.45rem;
  width: 2.1rem;
  border-radius: 999px;
  background: #dce7f4;
}

.hero-visual__nav-item--accent {
  background: var(--blue);
  opacity: 0.55;
  width: 2.6rem;
}

.hero-visual__body {
  display: grid;
  gap: 0.7rem;
}

.hero-visual__hero {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-soft) 0%, #f3f8fd 100%);
  min-height: 4.2rem;
  padding: 0.85rem 0.9rem;
  display: grid;
  gap: 0.45rem;
  align-content: center;
}

.hero-visual__line {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 61, 115, 0.18);
  max-width: 78%;
}

.hero-visual__line--short {
  max-width: 48%;
  height: 0.35rem;
  background: rgba(15, 61, 115, 0.12);
}

.hero-visual__cta {
  display: block;
  width: 4.6rem;
  height: 1.05rem;
  border-radius: 5px;
  background: var(--blue);
  opacity: 0.85;
  margin-top: 0.15rem;
}

.hero-visual__services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.hero-visual__service {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  min-height: 3.4rem;
  padding: 0.55rem;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.hero-visual__service-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  background: var(--blue-soft);
  border: 1px solid rgba(26, 95, 180, 0.18);
}

.hero-visual__service-line {
  display: block;
  height: 0.3rem;
  border-radius: 999px;
  background: #d7dee8;
  width: 85%;
}

.hero-visual__service-line--tiny {
  width: 55%;
  background: #e4e9f0;
}

.hero-visual__footer-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--bg-soft);
}

.section {
  padding: 3.25rem 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section__header {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.section__header h2,
.content h2 {
  margin: 0 0 0.65rem;
  color: var(--blue-dark);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.section__header p,
.content > p,
.content li {
  color: var(--text-muted);
}

.feature-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.feature,
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.3rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.card:hover,
.card:focus-within {
  border-color: #c5d5ea;
  box-shadow: 0 2px 8px rgba(15, 61, 115, 0.08);
  background: #fbfdff;
}

.card > a {
  display: block;
  height: 100%;
  outline: none;
}

.feature h3,
.card h3 {
  margin: 0 0 0.45rem;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.feature p,
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.card__meta {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.card a:hover h3 {
  color: var(--blue);
}

.card__link {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.cta-band {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
}

.cta-band h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.cta-band p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
}

.page-hero {
  padding: 2.5rem 0 1.25rem;
  background: linear-gradient(180deg, var(--bg-soft), #fff 80%);
}

.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: #a0aab8;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--blue);
}

.content {
  padding: 0.5rem 0 3rem;
}

.content-wrap {
  max-width: 42rem;
}

.content h2 {
  margin-top: 2.25rem;
  scroll-margin-top: 5.5rem;
}

.guide-toc {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem;
  max-width: 28rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.guide-toc__title {
  margin: 0 0 0.65rem;
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.guide-toc__list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
}

.guide-toc__list a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.guide-toc__list a:hover,
.guide-toc__list a:focus-visible {
  color: var(--blue);
}

.structure-flow {
  margin: 1.25rem 0 1.5rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.structure-flow__label {
  margin: 0 0 0.85rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.structure-flow__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.35rem;
}

.structure-flow__step {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.structure-flow__arrow {
  color: #9aa8bc;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.content h3 {
  margin: 1.6rem 0 0.5rem;
  color: var(--blue-dark);
  font-size: 1.1rem;
}

.content p,
.content ul,
.content ol {
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  padding-left: 1.2rem;
}

.content li + li {
  margin-top: 0.35rem;
}

.related {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.related h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--blue-dark);
}

.related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.related__item {
  margin: 0;
}

.related__link {
  display: block;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.related__link:hover,
.related__link:focus-visible {
  border-color: #c5d5ea;
  background: #fbfdff;
}

.related__meta {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.related__title {
  display: block;
  color: var(--blue-dark);
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.35;
}

.related__summary {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 3.5rem 0;
  margin-top: auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.25rem;
}

.site-footer__name {
  margin: 0 0 0.35rem;
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-footer__tagline {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

.site-footer__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 36rem;
  line-height: 1.6;
}

.site-footer__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.site-footer__nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.site-footer__nav a:hover {
  color: var(--blue);
}

.error-page {
  padding: 4rem 0;
  text-align: left;
}

.error-page h1 {
  margin: 0 0 0.75rem;
  color: var(--blue-dark);
}

.error-page p {
  color: var(--text-muted);
  max-width: 36rem;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (max-width: 860px) {
  .hero__grid,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    max-width: 28rem;
  }

  .structure-flow__list {
    flex-direction: column;
    align-items: stretch;
  }

  .structure-flow__arrow {
    transform: rotate(90deg);
    align-self: center;
    padding: 0.1rem 0;
  }

  .guide-toc {
    max-width: none;
  }

  .nav-toggle-label {
    display: inline-flex;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .nav-toggle:checked ~ .site-header__nav {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    gap: 0.65rem;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
  }

  .feature-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero {
    padding-top: 2.5rem;
  }

  .btn {
    width: 100%;
  }

  .hero__actions .btn,
  .cta-band__actions .btn,
  .error-page__actions .btn {
    width: auto;
  }

  .hero-visual__services {
    grid-template-columns: 1fr;
  }
}
