:root {
  /* Tokens visuais da marca: cores, sombra e superficies principais. */
  --bg: #f5f7f2;
  --paper: #ffffff;
  --ink: #18211f;
  --muted: #5f6c68;
  --line: #dbe2dc;
  --graphite: #15201e;
  --green: #0d7b57;
  --green-strong: #095f45;
  --teal: #168a90;
  --gold: #c88c2e;
  --blue: #246aa6;
  --danger: #b4463f;
  --shadow: 0 18px 45px rgba(21, 32, 30, 0.13);
}

/* Base global e pequenos resets para manter o layout previsivel. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body::selection {
  background: rgba(13, 123, 87, 0.2);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  /* Header fixo com blur leve para ficar legivel sobre qualquer secao. */
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(245, 247, 242, 0.86);
  border-bottom: 1px solid rgba(24, 33, 31, 0.08);
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  left: 0;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  position: sticky;
  top: 0;
  z-index: 15;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  min-width: max-content;
}

.brand__mark {
  align-items: center;
  background: var(--graphite);
  border-radius: 8px;
  color: #f3d79c;
  display: inline-flex;
  font-weight: 800;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: -0.15rem;
}

.nav {
  align-items: center;
  display: flex;
  gap: 0.15rem;
  justify-content: center;
}

.nav a {
  border-radius: 6px;
  color: #35413f;
  font-size: 0.92rem;
  padding: 0.55rem 0.7rem;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(13, 123, 87, 0.08);
  color: var(--green-strong);
}

.header-cta,
.btn {
  align-items: center;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.78rem 1.05rem;
}

.header-cta {
  background: var(--green);
  color: white;
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
}

.btn--primary {
  background: var(--green);
  color: white;
  box-shadow: 0 12px 26px rgba(13, 123, 87, 0.24);
}

.btn--primary:hover,
.header-cta:hover {
  background: var(--green-strong);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: white;
}

.btn svg,
.header-cta svg,
.feature-card svg {
  height: 1.1rem;
  width: 1.1rem;
}

.hero {
  /* Hero com imagem real + overlay escuro para preservar contraste do texto. */
  background-image:
    linear-gradient(90deg, rgba(8, 18, 15, 0.96) 0%, rgba(8, 18, 15, 0.72) 39%, rgba(8, 18, 15, 0.18) 70%),
    url("../img/hero-spedin79.png");
  background-position: center;
  background-size: cover;
  color: white;
  display: grid;
  min-height: 82vh;
  overflow: hidden;
  place-items: center start;
  position: relative;
}

.hero__content {
  max-width: 720px;
  padding: clamp(4.5rem, 9vw, 7rem) clamp(1.25rem, 6vw, 5rem);
  position: relative;
  width: min(100%, 720px);
  z-index: 1;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(3.8rem, 8vw, 8rem);
  line-height: 0.86;
  margin: 0 0 1.35rem;
}

.hero__lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 650px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.hero__proof {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2.4rem 0 0;
  max-width: 620px;
}

.hero__proof div {
  border-left: 3px solid var(--gold);
  padding-left: 0.85rem;
}

.hero__proof dt {
  color: white;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.hero__proof dd {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin: 0.3rem 0 0;
}

.section {
  /* Espacamento padrao das secoes principais. */
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section__inner {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 clamp(1.15rem, 4vw, 2.5rem);
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  margin: 0;
  max-width: 880px;
}

.section p {
  color: var(--muted);
  font-size: 1.03rem;
}

.two-column,
.calculator-grid,
.investment-layout,
.faq-layout,
.contact-layout {
  display: grid;
  gap: clamp(1.4rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
}

.section--intro {
  background: #ffffff;
}

.risk-panel {
  background: var(--graphite);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  padding: clamp(1.4rem, 3vw, 2rem);
}

.risk-panel__tag {
  color: #f3d79c;
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.risk-panel strong {
  display: block;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 1rem 0;
}

.risk-panel p {
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 0;
}

.section--calculator {
  background: #edf3ee;
}

.calculator {
  /* Painel isolado da calculadora para destacar a simulacao de risco. */
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
}

.calculator label {
  color: var(--ink);
  display: grid;
  font-weight: 800;
  gap: 0.6rem;
}

.calculator output {
  background: rgba(36, 106, 166, 0.1);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.85rem;
  justify-self: start;
  padding: 0.18rem 0.58rem;
}

input[type="range"] {
  accent-color: var(--green);
  width: 100%;
}

.calculator__result {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.3rem;
  padding-top: 1rem;
}

.calculator__result span {
  color: var(--muted);
  font-weight: 700;
}

.calculator__result strong {
  color: var(--danger);
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1;
}

.section-heading {
  margin-bottom: clamp(1.7rem, 4vw, 3rem);
}

.flow {
  /* Layout em duas partes: tabs do fluxo de um lado, detalhe da etapa do outro. */
  display: grid;
  gap: 1.3rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.flow__steps {
  display: grid;
  gap: 0.75rem;
}

.flow__step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  text-align: left;
}

.flow__step span,
.flow__panel span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.flow__step small {
  color: var(--muted);
}

.flow__step.is-active {
  border-color: rgba(13, 123, 87, 0.45);
  box-shadow: inset 4px 0 0 var(--green), var(--shadow);
}

.flow__panels {
  align-self: stretch;
  background: var(--graphite);
  border-radius: 8px;
  color: white;
  display: grid;
  min-height: 100%;
  padding: clamp(1.3rem, 3vw, 2rem);
}

.flow__panel {
  display: none;
}

.flow__panel.is-active {
  align-content: center;
  display: grid;
}

.flow__panel h3 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.05;
  margin: 0.5rem 0 0.8rem;
}

.flow__panel p {
  color: rgba(255, 255, 255, 0.78);
}

.section--features,
.section--faq {
  background: #ffffff;
}

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

.feature-card,
.code-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 1.15rem;
}

.feature-card svg {
  color: var(--green);
  height: 1.45rem;
  width: 1.45rem;
}

.feature-card h3,
.code-card h3 {
  font-size: 1.08rem;
  line-height: 1.2;
  margin: 0.85rem 0 0.45rem;
}

.feature-card p,
.code-card p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

.segmented {
  /* Controle segmentado usado para filtrar os codigos de ajuste. */
  background: #e7eee8;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
  padding: 0.35rem;
  width: fit-content;
}

.segmented button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #394642;
  font-size: 0.92rem;
  font-weight: 800;
  min-height: 2.3rem;
  padding: 0.55rem 0.75rem;
}

.segmented button.is-active {
  background: var(--paper);
  box-shadow: 0 4px 12px rgba(21, 32, 30, 0.12);
  color: var(--green-strong);
}

.code-grid {
  grid-template-columns: repeat(7, minmax(145px, 1fr));
}

.code-card {
  border-top: 4px solid var(--green);
}

.code-card[data-code-type="extra"] {
  border-top-color: var(--teal);
}

.code-card[data-code-type="credito"] {
  border-top-color: var(--blue);
}

.code-card[data-code-type="estorno"] {
  border-top-color: var(--gold);
}

.code-card[hidden] {
  display: none;
}

.code-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.code-card strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1.1;
  margin-top: 0.45rem;
  overflow-wrap: anywhere;
}

.section--investment {
  background: #e9f0ef;
}

.investment-layout {
  align-items: start;
}

.investment-layout .btn {
  margin-top: 1rem;
}

.timeline {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  counter-reset: timeline;
  list-style: none;
  margin: 0;
  padding: 1rem;
}

.timeline li {
  border-left: 3px solid rgba(13, 123, 87, 0.22);
  counter-increment: timeline;
  padding: 0.75rem 0 0.75rem 1rem;
}

.timeline li + li {
  margin-top: 0.2rem;
}

.timeline span {
  color: var(--gold);
  display: block;
  font-size: 0.82rem;
  font-weight: 900;
}

.responsibilities {
  align-items: start;
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr 1fr 1fr;
}

.responsibility-column {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
}

.responsibility-column h3 {
  margin-top: 0;
}

.responsibility-column ul {
  margin: 0;
  padding-left: 1.1rem;
}

.responsibility-column li + li {
  margin-top: 0.55rem;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin-bottom: 0;
}

.section--contact {
  background: var(--graphite);
  color: white;
}

.section--contact p {
  color: rgba(255, 255, 255, 0.75);
}

.lead-form {
  /* Grade do formulario: duas colunas no desktop e uma coluna no mobile. */
  background: white;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

.lead-form label {
  color: #2d3835;
  display: grid;
  font-size: 0.9rem;
  font-weight: 850;
  gap: 0.45rem;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  background: #f8faf7;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  color: var(--ink);
  min-height: 2.75rem;
  padding: 0.72rem 0.75rem;
  width: 100%;
}

.lead-form textarea {
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 123, 87, 0.14);
  outline: 0;
}

.lead-form__wide {
  grid-column: 1 / -1;
}

.honeypot {
  left: -10000px;
  position: absolute;
}

.form-status {
  color: var(--green-strong);
  font-weight: 800;
  margin: 0;
  min-height: 1.4rem;
}

.form-alert {
  border-radius: 8px;
  color: white;
  font-weight: 800;
  padding: 0.85rem 1rem;
}

.form-alert--success {
  background: rgba(13, 123, 87, 0.35);
}

.form-alert--error {
  background: rgba(180, 70, 63, 0.35);
}

.site-footer {
  align-items: center;
  background: #0f1715;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.2rem clamp(1rem, 4vw, 4rem);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong,
.site-footer a {
  color: white;
}

.js [data-animate] {
  /* Animacao discreta de entrada; sem JS os elementos continuam visiveis. */
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.js [data-animate].is-visible,
.js .site-header[data-animate],
.js .hero [data-animate] {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .code-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .responsibilities {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  /* Tablet/mobile: navegacao quebra linha e blocos viram uma coluna. */
  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .nav {
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
    width: 100%;
  }

  .header-cta {
    margin-left: auto;
  }

  .hero {
    background-image:
      linear-gradient(180deg, rgba(8, 18, 15, 0.93) 0%, rgba(8, 18, 15, 0.83) 48%, rgba(8, 18, 15, 0.46) 100%),
      url("../img/hero-spedin79.png");
    min-height: 84vh;
  }

  .hero__content {
    padding-top: 4.8rem;
  }

  .hero__proof {
    grid-template-columns: 1fr;
  }

  .two-column,
  .calculator-grid,
  .flow,
  .investment-layout,
  .faq-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .lead-form {
    grid-template-columns: 1fr;
  }

  .lead-form__wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  /* Ajustes finos para celulares estreitos. */
  .brand small {
    display: none;
  }

  .header-cta {
    font-size: 0.86rem;
    padding: 0.52rem 0.62rem;
  }

  .header-cta svg {
    height: 1.05rem;
    width: 1.05rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 18vw, 4.2rem);
  }

  .hero__actions,
  .btn {
    width: 100%;
  }

  .section {
    padding: 3.3rem 0;
  }

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

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1 1 auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
