/* Costa, Gonçalves, Soares e Trinca — mundo visual "Comprovante do Benefício" */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/AtkinsonHyperlegibleNext-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("assets/fonts/AtkinsonHyperlegibleNext-italic-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("assets/fonts/CourierPrime-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("assets/fonts/CourierPrime-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #001f3f;
  --navy-2: #0a2a52;
  --navy-line: #24487a;
  --on-navy: #ffffff;
  --on-navy-2: #b9c6d8;

  --paper: #f7f8f6;
  --paper-2: #eef1ee;
  --ink: #0b1830;
  --ink-2: #3a4a63;
  --rule: #c9d1dc;

  --green: #1a7f4b;
  --green-2: #146a3d;
  --red: #b3261e;

  --sans: "Atkinson Hyperlegible Next", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;

  --tooth: 14px;
  --sheet-pad: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;

  --step--1: 1rem;
  --step-0: 1.125rem;
  --step-1: 1.35rem;
  --step-2: 1.7rem;
  --step-3: clamp(2rem, 1.2rem + 3.5vw, 3rem);
  --step-4: clamp(2.4rem, 1.4rem + 4vw, 3.4rem);

  color-scheme: light;
  scrollbar-color: var(--navy-line) var(--navy);
  accent-color: var(--green);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--on-navy);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
}

::selection {
  background: var(--green);
  color: #fff;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}
.btn-go:focus-visible {
  outline-color: var(--ink);
}
.top .btn-go:focus-visible,
.fixed-cta .btn:focus-visible {
  outline-color: #fff;
}

img {
  max-width: 100%;
  display: block;
}

svg[hidden] {
  display: none;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 100;
}
.skip:focus {
  top: 1rem;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 2rem, 62rem);
  margin-inline: auto;
}

.section {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--navy-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-height: 48px;
}
.brand img {
  width: 56px;
  height: auto;
}
.brand-name {
  font-weight: 700;
  font-size: var(--step--1);
  line-height: 1.3;
}
.brand-name small {
  display: block;
  font-weight: 400;
  color: var(--on-navy-2);
  font-size: 0.9rem;
}

.top-actions {
  display: flex;
  gap: 0.5rem;
}
.top-actions .btn {
  min-height: 48px;
  padding-inline: 1rem;
}
.top-actions .btn-quiet {
  display: none;
}
@media (max-width: 39.99em) {
  .brand img {
    width: 44px;
  }
  .brand-name {
    font-size: 0.9rem;
  }
  .top-actions .btn {
    min-height: 48px;
    padding: 0.5rem 0.9rem;
  }
  .sheet-head {
    font-size: 0.9rem;
  }
  .hero-sheet .sheet-head .firm {
    display: none;
  }
  .hero .lede {
    font-size: var(--step-0);
  }
}
@media (min-width: 40em) {
  .top-actions .btn-quiet {
    display: inline-flex;
  }
}

/* ---------- Sheets (comprovantes) ---------- */

.sheet {
  --edge: var(--tooth);
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: calc(var(--sheet-pad) + var(--edge)) var(--sheet-pad);
  -webkit-mask:
    radial-gradient(circle at 50% 0, transparent 0 calc(var(--edge) / 2), #000 calc(var(--edge) / 2 + 0.6px)) top / var(--edge) var(--edge) repeat-x,
    radial-gradient(circle at 50% 100%, transparent 0 calc(var(--edge) / 2), #000 calc(var(--edge) / 2 + 0.6px)) bottom / var(--edge) var(--edge) repeat-x,
    linear-gradient(#000, #000) 50% 50% / 100% calc(100% - 2 * var(--edge)) no-repeat;
  mask:
    radial-gradient(circle at 50% 0, transparent 0 calc(var(--edge) / 2), #000 calc(var(--edge) / 2 + 0.6px)) top / var(--edge) var(--edge) repeat-x,
    radial-gradient(circle at 50% 100%, transparent 0 calc(var(--edge) / 2), #000 calc(var(--edge) / 2 + 0.6px)) bottom / var(--edge) var(--edge) repeat-x,
    linear-gradient(#000, #000) 50% 50% / 100% calc(100% - 2 * var(--edge)) no-repeat;
}

.sheet + .sheet {
  margin-top: 1.25rem;
}

.sheet,
.sheet * {
  min-width: 0;
}
.sheet {
  overflow-wrap: anywhere;
}

/* header row of a receipt: firm data, not a heading label */
.sheet-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding-bottom: 0.9rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px dashed var(--rule);
}

.rule {
  border: 0;
  border-top: 2px dashed var(--rule);
  margin: 1.75rem 0;
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--ink-2);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: var(--measure);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding: 0.75rem 1.4rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 1.35em;
  height: 1.35em;
  flex: none;
}

.btn-go {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn-go:hover {
  background: var(--green-2);
  border-color: var(--green-2);
}

.btn-quiet {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.08);
}
.sheet .btn-quiet:hover {
  background: var(--paper-2);
}

.btn-block {
  width: 100%;
}

/* ---------- Stamp ---------- */

.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--step--1);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.55em 0.8em;
  border: 3px solid currentColor;
  color: var(--green);
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
  opacity: 0.92;
}
.stamp-red {
  color: var(--red);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}

.hero-sheet {
  display: grid;
  gap: 2rem;
}
@media (min-width: 60em) {
  .hero-sheet {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 3rem;
  }
  .hero-sheet .sheet-head {
    grid-column: 1 / -1;
  }
}

.hero h1 {
  font-size: var(--step-4);
  max-width: 22ch;
}
@media (min-width: 60em) {
  .team {
    max-width: 23rem;
    justify-self: end;
    align-self: start;
  }
}

.hero .lede {
  margin-top: 1.25rem;
}

.cta-block {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
  max-width: 30rem;
}
.cta-number {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 0.6rem + 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cta-number a {
  display: inline-block;
  padding-block: 0.4rem;
  text-decoration-color: var(--rule);
}
.cta-note {
  color: var(--ink-2);
  font-size: var(--step--1);
}

.hero-stamp {
  margin-top: 1rem;
}
.row-stamp {
  margin-bottom: 0.6rem;
}
.row-stamp .stamp {
  font-size: 0.9rem;
  transform: rotate(-3deg);
}

/* team strip: four portraits, identical scale, one baseline */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-self: end;
}
@media (min-width: 40em) and (max-width: 59.99em) {
  .team {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.team a {
  text-decoration: none;
  display: grid;
  gap: 0.5rem;
}
.team img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-2);
}
.team-name {
  font-weight: 700;
  line-height: 1.3;
}
.team-role {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-top: 0.15rem;
}
.team a:hover .team-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

/* ---------- Ledger (cases) ---------- */

.section-title {
  font-size: var(--step-3);
  max-width: 22ch;
}
.section-intro {
  margin-top: 0.9rem;
  max-width: var(--measure);
  color: var(--on-navy-2);
  font-size: var(--step-1);
  line-height: 1.45;
}
.section > .wrap > .section-title + .sheet,
.section > .wrap > .section-intro + .sheet {
  margin-top: 1.75rem;
}

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.ledger > li {
  padding-block: 1.5rem;
  border-top: 2px dashed var(--rule);
  display: grid;
  gap: 1rem;
}
.ledger > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.ledger > li:last-child {
  padding-bottom: 0;
}
@media (min-width: 52em) {
  .ledger > li {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 2rem;
  }
}

.case-q {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: pretty;
}
.case-a {
  margin-top: 0.4rem;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* the "test strip": the exact message the button will send */
.slip {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: var(--step-0);
  line-height: 1.5;
  background: var(--paper-2);
  padding: 0.7rem 0.9rem;
  max-width: 44ch;
}
.slip b {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-bottom: 0.2rem;
}

@media (max-width: 51.99em) {
  .ledger .btn {
    width: 100%;
  }
}

/* ---------- Process: two mirrored columns ---------- */

.columns {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 60em) {
  .columns {
    grid-template-columns: 1fr 1fr;
  }
  .sheet + .sheet.col {
    margin-top: 0;
  }
}

.col-title {
  font-family: var(--mono);
  font-size: var(--step-1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.col-title::after {
  content: "";
  flex: 1;
  border-bottom: 3px dotted var(--rule);
  transform: translateY(-0.35em);
}

.step {
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 2px dashed var(--rule);
  display: grid;
  gap: 1rem;
}
.step-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.step-meta span {
  white-space: nowrap;
}
.step h3 {
  font-size: var(--step-2);
  line-height: 1.15;
}

.lawyer {
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.lawyer img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-2);
}
.lawyer-name {
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.3;
}
.lawyer-title {
  color: var(--ink-2);
  margin-top: 0.15rem;
}
.lawyer-oab {
  font-family: var(--mono);
  font-size: var(--step--1);
  margin-top: 0.5rem;
  color: var(--ink-2);
}

.bio {
  display: grid;
  gap: 0.75rem;
  max-width: var(--measure);
}
.bio p:first-child {
  font-weight: 700;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 60em) {
  .contact-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
  .contact-grid .sheet + .sheet {
    margin-top: 0;
  }
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding-block: 0.35rem;
  text-decoration: none;
}
.contact-line:hover .contact-text {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
.contact-line svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  color: var(--green);
}
.contact-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: var(--step-0);
  min-width: 0;
  overflow-wrap: anywhere;
}
.contact-text.is-email {
  font-family: var(--sans);
  font-weight: 700;
}
.contact-text small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-2);
  font-size: var(--step--1);
}

.offices {
  list-style: none;
  margin: 0;
  padding: 0;
}
.offices li {
  padding-block: 1.25rem;
  border-top: 2px dashed var(--rule);
  display: grid;
  gap: 0.5rem;
}
.offices li:first-child {
  border-top: 0;
  padding-top: 0;
}
.offices li:last-child {
  padding-bottom: 0;
}
.office-city {
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.3;
}
.office-addr {
  color: var(--ink-2);
}
.office-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.office-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 700;
}
.office-links svg {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--green);
}

/* ---------- FAQ ---------- */

.faq {
  margin: 0;
  display: grid;
}
.faq-item {
  padding-block: 1.5rem;
  border-top: 2px dashed var(--rule);
  display: grid;
  gap: 0.6rem;
}
.faq-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.faq-item:last-child {
  padding-bottom: 0;
}
.faq dt {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.faq dt::after {
  content: "";
  flex: 1;
  border-bottom: 3px dotted var(--rule);
  transform: translateY(-0.35em);
  min-width: 2rem;
}
.faq dd {
  margin: 0;
  max-width: var(--measure);
}
@media (min-width: 52em) {
  .faq-item {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: 2rem;
    align-items: start;
  }
  .faq dt::after {
    display: none;
  }
}

/* ---------- Close ---------- */

.close-sheet {
  text-align: center;
}
.close-sheet h2 {
  font-size: var(--step-3);
  margin-inline: auto;
}
.close-sheet .cta-block {
  margin-inline: auto;
  margin-top: 1.5rem;
  justify-items: center;
}
.close-sheet .lede {
  margin: 1rem auto 0;
}

/* ---------- Footer ---------- */

.foot {
  padding-block: 2rem 7rem;
  border-top: 1px solid var(--navy-line);
  color: var(--on-navy-2);
  font-size: var(--step--1);
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 60em) {
  .foot {
    padding-bottom: 2.5rem;
  }
}
.foot a {
  color: var(--on-navy);
  display: inline-block;
  padding-block: 0.6rem;
}
.foot .oab {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* ---------- Fixed action (thumb zone) ---------- */

.fixed-cta {
  position: fixed;
  inset: auto 0 0 0;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--navy);
  border-top: 1px solid var(--navy-line);
  z-index: 50;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fixed-cta .btn {
  width: 100%;
  white-space: nowrap;
  font-size: 1.05rem;
}
.fixed-cta.is-hidden {
  transform: translateY(110%);
}
@media (min-width: 60em) {
  .fixed-cta {
    display: none;
  }
}

/* ---------- Motion: the receipt prints ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .print > * {
    animation: print-line 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  @keyframes print-line {
    from {
      opacity: 0;
      transform: translateY(10px);
      clip-path: inset(0 0 100% 0);
    }
    to {
      opacity: 1;
      transform: none;
      clip-path: inset(0 0 -10% 0);
    }
  }
  .js .hero .stamp {
    animation: stamp-in 480ms cubic-bezier(0.16, 1, 0.3, 1) 700ms both;
  }
  @keyframes stamp-in {
    from {
      opacity: 0;
      transform: rotate(-4deg) scale(1.25);
    }
    to {
      opacity: 0.92;
      transform: rotate(-4deg) scale(1);
    }
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .fixed-cta,
  .top-actions,
  .skip {
    display: none;
  }
  .sheet {
    mask: none;
    -webkit-mask: none;
    border: 1px solid #000;
  }
}
