:root {
  --ink: #071927;
  --ink-2: #0b2432;
  --graphite: #17191b;
  --graphite-2: #25292d;
  --text: #19242d;
  --muted: #5f6f7a;
  --soft: #f5f8fa;
  --soft-2: #edf3f6;
  --white: #ffffff;
  --line: #dce6eb;
  --aqua: #31b7aa;
  --aqua-dark: #16887f;
  --blue: #347ba7;
  --gold: #cba35d;
  --shadow: 0 18px 46px rgba(7, 25, 39, 0.11);
  --shadow-soft: 0 10px 24px rgba(7, 25, 39, 0.08);
  --radius: 8px;
  --container: 1180px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

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

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

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

button {
  border: 0;
}

:focus-visible {
  outline: 3px solid rgba(49, 183, 170, 0.7);
  outline-offset: 3px;
}

::selection {
  background: rgba(49, 183, 170, 0.22);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-140%);
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 900;
  height: var(--header-height);
  background: rgba(248, 251, 255, 0.92);
  border-bottom: 1px solid rgba(220, 230, 235, 0.72);
  backdrop-filter: blur(16px);
  transition: background 180ms ease, box-shadow 180ms ease, height 180ms ease;
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(7, 25, 39, 0.08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--graphite);
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: grid;
  line-height: 1.08;
  color: var(--ink);
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.91rem;
  font-weight: 650;
  color: #24313a;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--aqua);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--ink);
  background: var(--white);
  font-weight: 760;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(7, 25, 39, 0.08);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn:hover {
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(7, 25, 39, 0.14);
}

.btn svg,
.icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--aqua), #2180a7);
}

.btn-primary:hover {
  color: var(--white);
}

.btn-dark {
  color: var(--white);
  background: var(--ink);
}

.btn-dark:hover {
  color: var(--white);
}

.btn-soft {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.87);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(7, 25, 39, 0.18);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--soft);
}

.hero .btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.32);
}

.hero .btn-ghost:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.btn-small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  min-height: min(700px, calc(100svh - 96px));
  padding: 104px 0 46px;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 25, 39, 0.98) 0%, rgba(7, 25, 39, 0.86) 45%, rgba(7, 25, 39, 0.52) 72%, rgba(7, 25, 39, 0.78) 100%),
    url("../assets/images/matheus-leal-merli.jpeg") right center / contain no-repeat,
    var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .9) 54%, transparent 95%);
}

.hero::after {
  content: "";
  position: absolute;
  right: min(7vw, 80px);
  bottom: 72px;
  width: min(420px, 44vw);
  height: 250px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(49, 183, 170, 0.2), rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 55px);
  opacity: .62;
  transform: skewY(-5deg);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 920px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--aqua);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: currentColor;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 870px;
  font-size: clamp(2.15rem, 3.35vw, 3.65rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 690px;
  margin: 22px 0 0;
  color: #dce9ee;
  font-size: clamp(1rem, 1.55vw, 1.16rem);
}

.hero-actions,
.section-actions,
.social-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.proof-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: #edf6f7;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-weight: 650;
}

.section {
  padding: 88px 0;
}

.section-tight {
  padding: 64px 0;
}

.section-dark {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 18%, rgba(49, 183, 170, 0.16), transparent 28%),
    linear-gradient(135deg, var(--ink), #102f3a 72%, #16191c);
}

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

.section-line {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin-bottom: 36px;
}

.section-header.center {
  margin-inline: auto;
  text-align: center;
}

.section-header.center .eyebrow {
  justify-content: center;
}

.section-header.center .eyebrow::before {
  display: none;
}

.section-header h2,
.section-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.09;
  letter-spacing: 0;
}

.section-dark .section-header h2,
.section-dark .section-header h1 {
  color: var(--white);
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-dark .section-header p,
.section-dark p {
  color: #d6e5eb;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

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

.card {
  position: relative;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.11rem;
  line-height: 1.25;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-dark {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.card-dark h3,
.card-dark strong {
  color: var(--white);
}

.card-dark p,
.card-dark li {
  color: #d6e5eb;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  color: var(--ink);
  background: linear-gradient(135deg, rgba(49, 183, 170, 0.17), rgba(203, 163, 93, 0.16));
  border: 1px solid rgba(49, 183, 170, 0.22);
  border-radius: var(--radius);
}

.section-dark .icon {
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.indicators-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 24px;
  align-items: center;
}

.indicators-map-layout .stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-map-panel {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.service-map-panel img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  background: var(--white);
}

.service-map-panel figcaption {
  margin-top: 10px;
  color: #d9e7ec;
  font-size: .88rem;
  font-weight: 650;
  text-align: center;
}

.stat-card {
  padding: 26px 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.stat-number {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  font-weight: 850;
  line-height: 1;
  color: var(--white);
}

.stat-label {
  color: #d9e7ec;
  font-weight: 650;
}

.states-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.state-chip,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(49, 183, 170, 0.13);
  border: 1px solid rgba(49, 183, 170, 0.22);
  font-weight: 760;
}

.section-dark .state-chip,
.section-dark .tag {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.about-layout,
.profile-layout,
.contact-layout,
.location-layout,
.systems-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 44px;
  align-items: center;
}

.about-copy p,
.rich-text p {
  margin: 0 0 16px;
}

.media-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft-2);
  box-shadow: var(--shadow);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 74px;
  height: 74px;
  border-right: 4px solid var(--aqua);
  border-bottom: 4px solid var(--gold);
  opacity: .9;
}

.person-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.person-photo-wide {
  aspect-ratio: 16 / 12;
  object-position: center top;
}

.logo-showcase {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 30px;
  background:
    radial-gradient(circle at 25% 20%, rgba(49, 183, 170, .16), transparent 28%),
    linear-gradient(145deg, #232629, #55595d 52%, #17191b);
}

.logo-showcase img {
  width: min(420px, 84%);
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.28));
}

.registration-box {
  margin-top: 24px;
  padding: 18px;
  border-left: 4px solid var(--aqua);
  background: var(--soft);
  border-radius: var(--radius);
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.service-card .service-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  font-weight: 800;
}

.regime-card {
  overflow: hidden;
}

.regime-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(var(--aqua), var(--gold));
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 25px;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .74em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(49, 183, 170, .13);
}

.section-dark .feature-list li {
  color: #d6e5eb;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  counter-reset: step;
}

.timeline-step {
  position: relative;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  counter-increment: step;
}

.timeline-step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--aqua), var(--blue));
  border-radius: var(--radius);
  font-weight: 850;
}

.timeline-step p {
  margin: 0;
  color: var(--ink);
  font-weight: 720;
  line-height: 1.35;
}

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 30px;
  align-items: center;
}

.map-card img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
}

.system-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-top: 14px;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: #775b1a;
  background: #fff5dc;
  border: 1px solid #ead8a7;
  font-weight: 760;
}

.system-link[aria-disabled="true"] {
  pointer-events: none;
  color: var(--muted);
  background: var(--soft-2);
  box-shadow: none;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.faq-question svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  transition: transform 180ms ease;
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 20px;
  color: var(--muted);
}

.faq-answer.open {
  display: block;
}

.contact-card {
  display: grid;
  gap: 14px;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
}

.contact-line strong {
  display: block;
  color: var(--ink);
}

.form-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label,
.checkbox-field {
  color: var(--ink);
  font-weight: 720;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--text);
  border: 1px solid #cbd8df;
  border-radius: var(--radius);
  background: var(--white);
}

.form-field textarea {
  min-height: 118px;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--aqua-dark);
}

.form-message {
  min-height: 24px;
  margin-top: 12px;
  color: #9b3a2f;
  font-weight: 700;
}

.map-embed {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--radius);
  background: var(--soft-2);
}

.page-hero {
  position: relative;
  padding: 140px 0 74px;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(7, 25, 39, .96), rgba(13, 49, 64, .92)),
    url("../assets/images/logo-timbrado.png") right 10% center / min(46vw, 520px) no-repeat;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: .6;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero p {
  max-width: 720px;
  color: #dbe8ed;
  font-size: 1.09rem;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 18px;
  color: #b8d8df;
  font-weight: 720;
}

.content-placeholder {
  padding: 28px;
  border: 1px dashed #b7cbd5;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  font-weight: 720;
  text-align: center;
}

.privacy-nav {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy-nav a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 720;
}

.footer {
  padding: 64px 0 28px;
  color: #d9e5e9;
  background: #101315;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(150px, .65fr));
  gap: 36px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.footer-logo img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
}

.footer h2,
.footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  line-height: 1.25;
}

.footer p {
  margin: 0 0 12px;
  color: #c2d0d6;
}

.footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  color: #d9e5e9;
}

.footer a:hover {
  color: var(--aqua);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #aebfc6;
  font-size: 0.92rem;
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  background: #1fae66;
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(31, 174, 102, 0.34);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 920;
  display: none;
  max-width: 760px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.cookie-banner.show {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1180px) {
  .main-nav {
    gap: 12px;
    font-size: .84rem;
  }

  .header-actions .btn {
    display: none;
  }

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

@media (max-width: 1120px) {
  :root {
    --header-height: 70px;
  }

  .container {
    width: min(100% - 30px, var(--container));
  }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    display: grid;
    gap: 0;
    padding: 12px 16px 18px;
    background: rgba(255, 255, 255, .98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 220ms ease;
  }

  .main-nav.open {
    transform: translateY(0);
  }

  .main-nav a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::after {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .brand {
    min-width: auto;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    padding-top: 104px;
    background:
      linear-gradient(90deg, rgba(7, 25, 39, .96), rgba(7, 25, 39, .84)),
      url("../assets/images/matheus-leal-merli.jpeg") right top / auto 72% no-repeat,
      var(--ink);
  }

  .hero::after {
    display: none;
  }

  .grid-4,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .indicators-map-layout,
  .about-layout,
  .profile-layout,
  .contact-layout,
  .location-layout,
  .systems-layout,
  .map-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    background:
      linear-gradient(135deg, rgba(7, 25, 39, .96), rgba(13, 49, 64, .9)),
      url("../assets/images/logo-timbrado.png") right -80px center / 420px no-repeat;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 64px 0;
  }

  .section-tight {
    padding: 48px 0;
  }

  .brand-name {
    max-width: 164px;
    font-size: .78rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .hero {
    min-height: auto;
    padding: 96px 0 44px;
    background:
      linear-gradient(180deg, rgba(7, 25, 39, .9), rgba(7, 25, 39, .96)),
      url("../assets/images/matheus-leal-merli.jpeg") right top / auto 420px no-repeat,
      var(--ink);
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(1.78rem, 7.6vw, 2.55rem);
  }

  .hero-content {
    padding-top: 112px;
  }

  .hero p {
    margin-top: 16px;
    font-size: .98rem;
  }

  .hero-actions {
    margin-top: 18px;
  }

  .hero-actions,
  .section-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn,
  .section-actions .btn,
  .contact-actions .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stats-grid,
  .indicators-map-layout .stats-grid,
  .timeline,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .form-card {
    padding: 20px;
  }

  .footer-bottom,
  .cookie-banner.show {
    align-items: stretch;
    flex-direction: column;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
  }
}

@media (min-width: 1600px) {
  .hero {
    min-height: 780px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.hidden {
  display: none !important;
}

.portal-body {
  min-height: 100vh;
  background: #eef3f6;
}

.client-login-body {
  background:
    linear-gradient(135deg, rgba(7, 25, 39, .94), rgba(13, 49, 64, .86)),
    url("../assets/images/logo-timbrado.png") right -80px bottom -120px / min(560px, 80vw) no-repeat,
    #071927;
}

.client-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.client-login-brand {
  position: fixed;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-weight: 800;
}

.client-login-brand img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
}

.client-login-panel {
  width: min(100%, 460px);
}

.client-login-panel h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.7rem;
}

.client-login-panel p {
  color: var(--muted);
}

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 280px minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  color: #ffffff;
  background: #071927;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.portal-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.portal-nav {
  display: grid;
  gap: 8px;
}

.portal-nav button,
.portal-logout {
  width: 100%;
  min-height: 42px;
  border-radius: 8px;
  color: #dce6eb;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.portal-nav button {
  padding: 10px 12px;
}

.portal-nav button.active,
.portal-nav button:hover,
.portal-logout:hover {
  color: #071927;
  background: #ffffff;
}

.portal-logout {
  margin-top: auto;
  padding: 10px 12px;
}

.portal-main {
  min-width: 0;
  padding: 28px;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.portal-topbar h1 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.15;
}

.portal-kicker {
  margin: 0 0 4px;
  color: var(--aqua-dark);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-auth {
  display: grid;
  min-height: 68vh;
  place-items: center;
}

.portal-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.portal-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.portal-help {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: .9rem;
}

.portal-userline,
.portal-license {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.portal-userline {
  color: var(--muted);
  font-size: .92rem;
}

.portal-grid {
  display: grid;
  gap: 14px;
}

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

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

.portal-stat {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.portal-stat span,
.portal-stat small {
  display: block;
  color: var(--muted);
  font-size: .85rem;
}

.portal-stat strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.portal-form {
  display: grid;
  gap: 12px;
}

.portal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  background: #ffffff;
}

.portal-form textarea {
  resize: vertical;
}

.portal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 8px !important;
}

.portal-check input {
  width: auto;
  min-height: auto;
}

.portal-actions,
.portal-row-actions,
.portal-row-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.portal-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-message[data-kind="success"] {
  color: #16887f;
}

.portal-message[data-kind="error"] {
  color: #a73535;
}

.portal-list {
  display: grid;
  gap: 10px;
}

.portal-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.portal-news-thumb {
  width: 96px;
  height: 72px;
  flex: 0 0 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.portal-current-image {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  color: var(--muted);
  font-size: .86rem;
}

.portal-current-image:empty {
  display: none;
}

.portal-current-image img {
  width: 104px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.portal-row h3 {
  margin: 0 0 4px;
  font-size: .98rem;
}

.portal-row p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.portal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #c6d6dc;
  border-radius: 999px;
  padding: 4px 9px;
  color: #21313a;
  background: #eef5f7;
  font-size: .75rem;
  font-weight: 800;
}

.portal-pill[data-status="active"],
.portal-pill[data-status="acesso_liberado"],
.portal-pill[data-status="login_ativo"],
.portal-pill[data-status="trial"] {
  border-color: rgba(22, 136, 127, .35);
  color: #0c615b;
  background: rgba(49, 183, 170, .14);
}

.portal-pill[data-status="past_due"],
.portal-pill[data-status="suspended"],
.portal-pill[data-status="cancelled"],
.portal-pill[data-status="blocked"],
.portal-pill[data-status="login_bloqueado"],
.portal-pill[data-status="acesso_bloqueado"] {
  border-color: rgba(167, 53, 53, .32);
  color: #8d2424;
  background: rgba(167, 53, 53, .1);
}

.portal-empty {
  margin: 0;
  color: var(--muted);
}

.portal-public-news {
  display: grid;
  gap: 16px;
}

.portal-public-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.portal-public-image {
  display: block;
  width: min(100%, var(--portal-news-image-width, 100%));
  height: var(--portal-news-image-height, auto);
  aspect-ratio: 16 / 9;
  object-fit: var(--portal-news-image-fit, cover);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
}

.portal-public-card h2 {
  margin: 4px 0 8px;
  font-size: 1.22rem;
}

.portal-public-card p,
.portal-news-content {
  color: var(--muted);
}

.portal-news-content {
  margin-top: 12px;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: relative;
    height: auto;
  }

  .portal-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-layout,
  .portal-grid-4,
  .portal-grid-5 {
    grid-template-columns: 1fr;
  }

  .portal-topbar,
  .portal-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .portal-field-grid {
    grid-template-columns: 1fr;
  }
}
