:root {
  color-scheme: light;
  --ink: #0b1d2d;
  --ink-soft: #142b3b;
  --paper: #f7f6f0;
  --white: #fffef9;
  --sage: #c0ceaa;
  --olive: #4a5d39;
  --muted: #4c585d;
  --line: #d5dad0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.75rem);
  --section-space: clamp(3.75rem, 8vw, 7.4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid #617d48; outline-offset: 5px; }
.hero :focus-visible, .method :focus-visible, .footer :focus-visible { outline-color: var(--sage); }

.shell {
  width: min(100% - var(--gutter) * 2, 79rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: 1rem auto auto 1rem;
  z-index: 5;
  padding: .75rem 1rem;
  transform: translateY(-200%);
  background: var(--white);
}

.skip-link:focus { transform: none; }

.header { background: var(--paper); position: relative; z-index: 2; }
.header-inner { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; flex: none; align-items: center; }
.brand img { height: auto; }
.header nav { display: flex; align-items: center; gap: clamp(1.1rem, 3vw, 2.45rem); }
.header nav > a { font-size: .9375rem; font-weight: 600; text-decoration: none; }
.header nav > a:not(.button):hover { text-decoration: underline; text-underline-offset: .35em; }
.menu-toggle { display: none; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.25rem;
  padding: .65rem 1.3rem;
  border: 1px solid transparent;
  border-radius: .25rem;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.button-outline { min-height: 2.75rem; border-color: #a5ad9d; }
.button-outline:hover { background: #e9eddf; }
.button-accent { background: var(--sage); color: var(--ink); }
.button-accent:hover { background: #d7e1c8; }
.button-message { background: #206446; color: var(--white); }
.button-message:hover { background: #194e38; }

.hero {
  background: radial-gradient(ellipse at 83% 46%, #183748 0, transparent 50%), var(--ink);
  color: var(--paper);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  min-height: 36rem;
  padding-block: clamp(3.2rem, 5.5vw, 5.4rem);
}

.section-label {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.1rem;
  color: var(--olive);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.45;
  text-transform: uppercase;
}

.section-label::before {
  content: '';
  display: block;
  flex: 0 0 .32rem;
  height: .32rem;
  margin-top: -.37rem;
  background: currentColor;
  box-shadow: 0 .39rem currentColor;
}

.hero .section-label, .method .section-label { color: var(--sage); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.065em; text-wrap: balance; }
h1 { font-size: clamp(3.15rem, 4.65vw, 5.05rem); line-height: 1.015; text-wrap: wrap; }
h1 em { display: block; color: var(--sage); font-weight: 400; }
h2 { font-size: clamp(2.55rem, 4.1vw, 4.125rem); line-height: 1.03; }
h3, .example-copy h4 { font-size: clamp(1.25rem, 1.8vw, 1.53rem); letter-spacing: -.03em; line-height: 1.24; font-weight: 650; }

.hero-description { max-width: 29rem; margin-top: 1.6rem; color: #d5dfe0; font-size: clamp(1rem, 1.5vw, 1.1875rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.55rem; margin-top: 1.95rem; }
.link-light { color: var(--paper); font-weight: 600; font-size: .9375rem; text-underline-offset: .3em; }
.link-light:hover { color: var(--sage); }

.brand-panel {
  --panel-line: #45616a;
  --panel-background: #112737;
  min-width: 0;
  border: 1px solid var(--panel-line);
  border-radius: .45rem;
  overflow: hidden;
  background: var(--panel-background);
  box-shadow: 0 1.25rem 3rem #08172566;
}

.brand-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(13rem, 25.5vw, 23rem);
  background:
    radial-gradient(ellipse at center, #27495499, transparent 72%),
    linear-gradient(90deg, #45616a3d 1px, transparent 1px) center / 1.75rem 1.75rem,
    linear-gradient(#45616a3d 1px, transparent 1px) center / 1.75rem 1.75rem,
    #102434;
}

.brand-stage::before {
  --corner-line: linear-gradient(#a6b88d85, #a6b88d85);
  position: absolute;
  inset: .95rem;
  background:
    var(--corner-line) top left / 1rem 1px,
    var(--corner-line) top left / 1px 1rem,
    var(--corner-line) top right / 1rem 1px,
    var(--corner-line) top right / 1px 1rem,
    var(--corner-line) bottom left / 1rem 1px,
    var(--corner-line) bottom left / 1px 1rem,
    var(--corner-line) bottom right / 1rem 1px,
    var(--corner-line) bottom right / 1px 1rem;
  background-repeat: no-repeat;
  pointer-events: none;
  content: '';
}

.brand-reveal {
  /* The supplied logo reserves 36 of 143 SVG units below the wordmark. */
  --signature-height: 25.175%;
  --wordmark-height: calc(100% - var(--signature-height));
  --signature-logo: url('assets/com-descritivo-negativa.svg');
  position: relative;
  width: min(76%, 26rem);
}
.brand-wordmark { width: 100%; height: auto; }
.brand-letter, .brand-colon, .brand-cursor, .brand-signature { position: absolute; display: none; }

.brand-colon, .brand-signature { inset: 0; background: var(--signature-logo) center / 100% 100% no-repeat; }
/* Use the original r alone so the introductory mark contains no adjacent letters. */
.brand-letter { inset: 0 0 var(--signature-height); background: url('assets/monograma-r.svg') center / 100% 100% no-repeat; }
.brand-colon { clip-path: inset(0 43% var(--signature-height) 53.6%); }
.brand-signature { clip-path: inset(var(--wordmark-height) 0 0); }
.brand-cursor { top: calc(var(--wordmark-height) * .29); width: 1px; height: calc(var(--wordmark-height) * .61); background: var(--sage); }

@keyframes open-brand-panel {
  0%, 14% { clip-path: inset(0 0 calc(100% - 2.65rem) 0 round .45rem); }
  100% { clip-path: inset(0 round .45rem); }
}

@keyframes reveal-brand-mark {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes place-initial {
  0%, 21% { transform: translateX(41.4%); }
  32%, 100% { transform: translateX(0); }
}

@keyframes type-wordmark {
  0% { clip-path: inset(0 100% var(--signature-height) 0); }
  36% { clip-path: inset(0 77.5% var(--signature-height) 0); }
  42% { clip-path: inset(0 68% var(--signature-height) 0); }
  47% { clip-path: inset(0 62.8% var(--signature-height) 0); }
  52% { clip-path: inset(0 48% var(--signature-height) 0); }
  61% { clip-path: inset(0 31.6% var(--signature-height) 0); }
  67% { clip-path: inset(0 21% var(--signature-height) 0); }
  73% { clip-path: inset(0 11.4% var(--signature-height) 0); }
  79%, 100% { clip-path: inset(0 0 var(--signature-height) 0); }
}

@keyframes move-cursor {
  0%, 17% { left: 59%; opacity: 1; }
  10%, 23% { left: 59%; opacity: 0; }
  61% { left: 69.5%; opacity: 1; }
  67% { left: 80%; opacity: 1; }
  73% { left: 89.5%; opacity: 1; }
  79% { left: 99.5%; opacity: 1; }
  89%, 100% { left: 99.5%; opacity: 0; }
}

.brand-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: .3rem;
  margin: 0;
  padding: 1rem .65rem 1.15rem;
  border-top: 1px solid var(--panel-line);
  list-style: none;
  color: #d5dfe0;
  font-size: .875rem;
  line-height: 1.35;
  text-align: center;
}

.brand-flow li { z-index: 1; }
.brand-flow li::before {
  content: '';
  display: block;
  width: .55rem;
  height: .55rem;
  margin: 0 auto .55rem;
  border: 1px solid var(--sage);
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 .21rem var(--panel-background);
}

.brand-flow::before, .brand-flow::after {
  position: absolute;
  inset: 1.275rem 17% auto;
  height: 1px;
  background: var(--sage);
  content: '';
}

.brand-flow::before { background: var(--panel-line); }

@keyframes trace-flow {
  0%, 28% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes activate-step {
  from { background: var(--panel-background); }
  to { background: var(--sage); }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-panel {
    --panel-opening-duration: .85s;
    --logo-animation-duration: 3.2s;
    animation: open-brand-panel var(--panel-opening-duration) cubic-bezier(.22, .73, .25, 1) backwards;
  }

  .brand-reveal { animation: reveal-brand-mark .18s ease-out var(--panel-opening-duration) both; }
  .brand-letter, .brand-colon, .brand-cursor, .brand-signature { display: block; }
  .brand-letter { animation: place-initial var(--logo-animation-duration) ease-in-out var(--panel-opening-duration) both; }
  .brand-wordmark { animation: type-wordmark var(--logo-animation-duration) steps(1, end) var(--panel-opening-duration) both; }
  .brand-cursor { animation: move-cursor var(--logo-animation-duration) steps(1, end) var(--panel-opening-duration) both; }
  .brand-signature {
    animation: reveal-brand-mark .32s ease-out calc(var(--panel-opening-duration) + var(--logo-animation-duration) * .89) both;
  }
  .brand-flow::after {
    transform-origin: left;
    animation: trace-flow 2.2s ease-out var(--panel-opening-duration) both;
  }
  .brand-flow li { --step-offset: .58s; }
  .brand-flow li:nth-child(2) { --step-offset: 1.32s; }
  .brand-flow li:nth-child(3) { --step-offset: 2.02s; }
  .brand-flow li::before, .brand-flow li > span {
    animation-duration: .38s;
    animation-delay: calc(var(--panel-opening-duration) + var(--step-offset));
    animation-fill-mode: both;
  }
  .brand-flow li::before { animation-name: activate-step; }
  .brand-flow li > span { animation-name: reveal-brand-mark; }
}

.section { padding-block: var(--section-space); }
.section-intro { margin-bottom: clamp(2rem, 4.3vw, 3.5rem); }
.section-intro p:not(.section-label) { max-width: 34rem; color: var(--muted); font-size: 1.0625rem; }
.split-intro { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); align-items: end; gap: 1.25rem 4rem; }

.challenges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.challenge { padding: 1.45rem clamp(1rem, 3vw, 2.25rem) .25rem; border-top: 1px solid #aab4a5; }
.challenge:first-child { padding-left: 0; }
.challenge:last-child { padding-right: 0; }
.challenge + .challenge { border-left: 1px solid var(--line); }
.challenge p, .service > p:last-child { color: var(--muted); margin-top: .6rem; }
.challenge-mark { display: block; width: 1.55rem; height: .19rem; margin-bottom: 1.1rem; background: #8da279; }

.services { background: #e9ede3; }
.services-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid #b6c1af; background: #b6c1af; }
.service { padding: clamp(1.4rem, 3vw, 2.65rem); background: #f1f3eb; }
.service-name { margin-bottom: .75rem; color: var(--olive); font-size: .875rem; font-weight: 700; }
.service > p:last-child { max-width: 34rem; }

.method { background: var(--ink); color: var(--paper); }
.method-grid { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1fr); align-items: start; gap: 2rem clamp(2.5rem, 8vw, 8.5rem); }
.method .section-intro { margin: 0; }
.method .section-intro p:not(.section-label) { margin-top: 1.2rem; color: #d5dfe0; }
.method-steps { border-bottom: 1px solid #435663; }
.method-steps details { border-top: 1px solid #435663; }
.method-steps summary {
  position: relative;
  display: grid;
  grid-template-columns: 2.55rem 1fr 1.4rem;
  align-items: center;
  gap: 1rem;
  min-height: 4.65rem;
  padding: .7rem .25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.2rem;
}

.method-steps summary::-webkit-details-marker { display: none; }
.method-steps summary::after { content: '+'; color: var(--sage); text-align: center; font-size: 1.55rem; font-weight: 400; }
.method-steps details[open] summary::after { content: '−'; }
.method-steps summary:hover { color: var(--sage); }
.method-steps .initial { color: var(--sage); font: 2.2rem/1 var(--serif); }
.method-steps details p { max-width: 34rem; margin: -.15rem 2rem 1.2rem 3.8rem; color: #d5dfe0; }

.example-links { display: flex; flex-wrap: wrap; gap: .6rem; justify-self: end; }
.example-group { scroll-margin-top: 1.5rem; }
.example-group + .example-group { margin-top: clamp(2.75rem, 6vw, 5rem); }
.example-group-header {
  margin-bottom: 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #aab4a5;
}
.example-group-header h3 {
  font: 400 clamp(1.9rem, 3.3vw, 2.65rem)/1.08 var(--serif);
  letter-spacing: -.045em;
}
.example-group-header p { margin-top: .55rem; color: var(--muted); }

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}

.example {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--white);
}

.example-copy { padding: clamp(1.15rem, 2.2vw, 1.75rem); }
.example-copy p { margin-top: .6rem; color: var(--muted); }
.demo {
  display: grid;
  align-items: start;
  padding: clamp(.85rem, 2vw, 1.35rem);
  border-top: 1px solid var(--line);
  background: #e8ede3;
}

#exemplos-contabilidade .demo { background: #e5ebed; }
.mock-window { min-width: 0; overflow: hidden; border: 1px solid #b3bfb6; border-radius: .4rem; background: var(--white); }
.mock-header { padding: .7rem .8rem; background: var(--ink-soft); color: var(--white); font-size: .875rem; font-weight: 650; line-height: 1.35; }
.mock-records { margin: 0; padding: .2rem .75rem; font-size: .875rem; line-height: 1.4; }
.mock-records div { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: .5rem; padding: .68rem 0; }
.mock-records div + div { border-top: 1px solid var(--line); }
.mock-records dt, .mock-records dd { min-width: 0; overflow-wrap: anywhere; }
.mock-records dt { color: var(--muted); }
.mock-records dd { margin: 0; font-weight: 600; }
.mock-records-values dd { text-align: right; font-variant-numeric: tabular-nums; }
.mock-pending { color: #784d20; }
.mock-case-tasks { margin: 0; padding: .65rem .75rem .7rem 1.9rem; border-top: 1px solid var(--line); font-size: .875rem; line-height: 1.4; }
.mock-case-tasks li + li { margin-top: .3rem; }
.mock-case-tasks li::marker { color: var(--olive); }
.mock-chat-body { display: grid; gap: .5rem; margin: 0; padding: .65rem; list-style: none; }
.bubble { width: fit-content; max-width: 93%; padding: .45rem .65rem; border-radius: .35rem; font-size: .875rem; line-height: 1.4; }
.bubble strong { display: block; margin-bottom: .12rem; color: var(--olive); }
.bubble-visitor { justify-self: start; background: #edf0eb; }
.bubble-assistant { justify-self: end; background: #dce9d3; }

.contact { background: #dbe5ce; }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .8fr); align-items: end; gap: 1.85rem 5rem; }
.contact-inner h2 { max-width: 42rem; }
.contact-details { display: grid; justify-items: start; gap: .55rem; }
.contact-email { color: var(--ink); font-size: .9375rem; font-weight: 600; text-underline-offset: .2em; overflow-wrap: anywhere; }
.contact-notice { max-width: 32rem; color: #36473b; font-size: .9375rem; }

.contact-dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100% - 2rem);
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1.5rem 5rem #08172555;
}

.contact-dialog::backdrop { background: #0b1d2dbb; }
.contact-dialog h2 { padding-right: 3rem; font-size: clamp(2.15rem, 7vw, 3.2rem); text-wrap: wrap; }
.contact-dialog h2 + p { margin-top: .7rem; color: var(--muted); }
.contact-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.contact-close:hover { background: #e9ede3; }
.contact-form { display: grid; gap: .45rem; margin-top: 1.35rem; }
.contact-form label { font-size: .9375rem; font-weight: 650; }
.contact-form label:not(:first-child) { margin-top: .5rem; }
.contact-form label span { color: var(--muted); font-weight: 400; }
.contact-form input, .contact-form select {
  width: 100%;
  min-height: 2.9rem;
  padding: .55rem .75rem;
  border: 1px solid #a5ad9d;
  border-radius: .25rem;
  background-color: var(--white);
  color: var(--ink);
  font: inherit;
}

.contact-form select {
  appearance: none;
  padding-right: 2.1rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--olive) 50%), linear-gradient(135deg, var(--olive) 50%, transparent 50%);
  background-position: calc(100% - 1rem - 5px) center, calc(100% - 1rem) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.contact-form .button { margin-top: .75rem; cursor: pointer; }
.contact-form .contact-notice { font-size: .875rem; line-height: 1.45; }
.contact-form .contact-notice a { color: var(--olive); text-underline-offset: .18em; overflow-wrap: anywhere; }

.footer { background: var(--ink); color: #d6dfdf; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; min-height: 6.3rem; padding-block: 1.4rem; }
.footer-inner p, .footer-inner > a:last-child { font-size: .9375rem; }
.footer-inner > a:last-child { text-underline-offset: .25em; }

@media (max-width: 970px) {
  .hero-inner { gap: 2.4rem; min-height: auto; }
  .hero-actions { gap: .9rem 1.1rem; }
  .split-intro, .contact-inner { column-gap: 2rem; }
}

@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: .45rem 1rem; min-height: 4.4rem; padding-block: .7rem; }
  .header .brand img { width: 8.5rem; }
  .menu-toggle { display: flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .35rem .05rem .35rem .6rem; border: 0; background: transparent; color: var(--ink); font-weight: 600; cursor: pointer; }
  .menu-icon { width: .9rem; height: .55rem; border-block: 1px solid currentColor; }
  .header nav { flex: 1 0 100%; flex-wrap: wrap; gap: .6rem 1.2rem; padding-block: .36rem .55rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero-copy { max-width: 36rem; }
  .brand-panel { width: min(100%, 36rem); }
  .method-grid { gap: 2.4rem; }
  .contact-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(2.15rem, 9.25vw, 3.55rem); }
  h2 { font-size: clamp(2.3rem, 9vw, 3.45rem); }
  .header nav { display: grid; gap: 0; }
  .header nav > a:not(.button) { padding: .65rem .1rem; border-top: 1px solid var(--line); }
  .header nav > .button { justify-self: start; margin-top: .5rem; }
  .hero-inner { gap: 2rem; padding-block: clamp(2.25rem, 9vw, 3.2rem); }
  .brand-stage { min-height: clamp(10rem, 46vw, 15rem); }
  .brand-stage::before { inset: .65rem; }
  .hero-description { margin-top: 1.05rem; }
  .hero-actions { margin-top: 1.45rem; }
  .split-intro, .challenges, .services-grid, .method-grid, .examples-grid { grid-template-columns: minmax(0, 1fr); }
  .example-links { justify-self: start; }
  .challenge, .challenge:first-child, .challenge:last-child { padding: 1rem 0 1.4rem; }
  .challenge + .challenge { border-left: 0; }
  .challenge:last-child { padding-bottom: 0; }
  .challenge-mark { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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