:root {
  --ink: #102a43;
  --ink-soft: #486581;
  --paper: #f6f8fa;
  --white: #ffffff;
  --line: #d9e2ec;
  --teal: #087f8c;
  --teal-dark: #05606a;
  --yellow: #f4b942;
  --yellow-dark: #d99a20;
  --danger: #b42318;
  --success: #087a55;
  --shadow: 0 14px 35px rgba(16, 42, 67, .10);
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar {
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; }
.brand span { display: grid; gap: 1px; }
.brand strong { font-family: "Libre Franklin", Arial, sans-serif; font-size: 17px; }
.brand small { color: var(--ink-soft); font-size: 11px; }
.topbar nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.topbar nav > a { font-size: 14px; font-weight: 600; text-decoration: none; }

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button-primary { color: #fff; background: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-accent { background: var(--yellow); color: #172b3a; }
.button-accent:hover { background: var(--yellow-dark); }
.button-secondary { background: #fff; color: var(--ink); border-color: var(--line); }

.intro-band {
  padding: clamp(36px, 6vw, 76px) clamp(18px, 6vw, 92px);
  min-height: 330px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  color: #fff;
  background: #102a43;
  position: relative;
  overflow: hidden;
}
.intro-band::after {
  content: "PE";
  position: absolute;
  right: clamp(16px, 6vw, 90px);
  top: 14px;
  color: rgba(244, 185, 66, .10);
  font-family: "Libre Franklin", Arial, sans-serif;
  font-size: 260px;
  font-weight: 800;
  line-height: 1;
}
.intro-band > * { position: relative; z-index: 1; }
.intro-band > div { max-width: 760px; }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.intro-band .eyebrow { color: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Libre Franklin", Arial, sans-serif; letter-spacing: 0; }
h1 { max-width: 720px; margin-bottom: 18px; font-size: clamp(36px, 6vw, 68px); line-height: 1.02; }
.intro-band p:not(.eyebrow) { max-width: 690px; margin-bottom: 0; color: #d9e2ec; font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }

.directory, .how-it-works { padding: clamp(44px, 6vw, 78px) clamp(18px, 6vw, 92px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 42px); }
.result-count { color: var(--ink-soft); font-size: 14px; }

.filters { display: grid; grid-template-columns: minmax(260px, 1.7fr) minmax(180px, .7fr) minmax(180px, .7fr); gap: 12px; margin-bottom: 30px; }
.filters input, .filters select {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  padding: 0 14px;
  outline: none;
}
.filters input:focus, .filters select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .13); }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 15px; top: 15px; width: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2; }
.search-field input { padding-left: 44px; }

.business-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.business-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 18px rgba(16, 42, 67, .06); }
.card-media { aspect-ratio: 16 / 10; position: relative; background: #e9eff5; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media img[src=""] { display: none; }
.card-media::after { content: "NEGÓCIO LOCAL"; position: absolute; inset: 0; display: grid; place-items: center; color: #829ab1; font-weight: 800; font-size: 12px; }
.card-media:has(img:not([src=""]))::after { display: none; }
.card-category { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 6px 9px; color: #fff; background: rgba(16, 42, 67, .9); border-radius: 4px; font-size: 11px; font-weight: 700; }
.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 5px; font-size: 21px; }
.card-location { color: var(--teal-dark); font-size: 13px; font-weight: 600; }
.card-description { min-height: 66px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-services { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.card-services span { padding: 5px 8px; background: #eef5f6; border-radius: 4px; color: var(--teal-dark); font-size: 11px; font-weight: 600; }
.card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.card-actions .button { flex: 1; }
.icon-link { color: var(--teal-dark); font-size: 13px; font-weight: 700; }

.empty-state { padding: 56px 24px; text-align: center; border: 1px dashed #bcccdc; background: #fff; border-radius: 8px; }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 18px; display: grid; place-items: center; color: #fff; background: var(--teal); border-radius: 50%; font-size: 30px; }
.empty-state h3 { margin-bottom: 8px; font-size: 23px; }
.empty-state p { color: var(--ink-soft); }

.how-it-works { background: #eaf0f5; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #b8c7d5; }
.steps li { padding: 24px 28px 0 0; }
.steps span { display: block; margin-bottom: 24px; color: var(--teal); font-size: 13px; font-weight: 800; }
.steps strong { display: block; margin-bottom: 8px; font-size: 19px; }
.steps p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

footer { padding: 34px clamp(18px, 6vw, 92px); display: flex; justify-content: space-between; gap: 28px; color: #d9e2ec; background: #0b1f33; }
footer p { margin: 6px 0 0; font-size: 13px; }
footer a { align-self: center; color: var(--yellow); font-weight: 700; }

dialog { width: min(820px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 8px; box-shadow: 0 24px 80px rgba(0, 0, 0, .32); }
dialog::backdrop { background: rgba(5, 20, 34, .74); }
.dialog-shell { background: #fff; }
.dialog-header { padding: 24px 28px 18px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 28px; }
.icon-button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #edf2f7; color: var(--ink); cursor: pointer; font-size: 27px; line-height: 1; }
.progress { height: 4px; background: #e6edf3; }
.progress span { display: block; width: 33.33%; height: 100%; background: var(--yellow); transition: width .2s ease; }
#business-form { padding: 26px 28px 28px; }
.form-step { display: none; }
.form-step.active { display: block; }
.step-label { margin-bottom: 6px; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.form-step h3 { margin-bottom: 20px; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; border: 1px solid #bcccdc; border-radius: 6px; background: #fff; color: var(--ink); padding: 11px 12px; outline: none; font-weight: 400; }
.form-grid input, .form-grid select { min-height: 45px; }
.form-grid textarea { resize: vertical; line-height: 1.5; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 140, .12); }
.form-grid [aria-invalid="true"] { border-color: var(--danger); }
.form-grid small { color: var(--ink-soft); font-size: 11px; font-weight: 400; }
.compact-consent { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f7fafc; }
.compact-consent input { width: 18px; min-height: 18px; }
.upload-field { padding: 20px; border: 1px dashed #9fb3c8; border-radius: 6px; background: #f7fafc; cursor: pointer; }
.upload-title { font-size: 15px; }
.upload-field input { padding: 8px 0 0; border: 0; background: transparent; }
.file-summary { color: var(--teal-dark); font-weight: 600; }
.consent { grid-template-columns: 22px 1fr !important; align-items: start; padding: 14px; background: #f0f5f8; border-radius: 6px; line-height: 1.45; font-weight: 500 !important; }
.consent input { min-height: 20px; width: 20px; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.form-message { margin-top: 18px; padding: 12px 14px; border-radius: 6px; background: #fff0ee; color: var(--danger); font-size: 13px; }
.success-state { padding: 54px 28px; text-align: center; }
.success-mark { width: 62px; height: 62px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--success); font-size: 30px; }
.success-state h3 { font-size: 26px; }
.success-state p { max-width: 520px; margin: 0 auto 22px; color: var(--ink-soft); line-height: 1.6; }
.honeypot { position: absolute !important; left: -10000px !important; opacity: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .topbar nav > a { display: none; }
  .intro-band { align-items: start; flex-direction: column; min-height: 360px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { min-height: 64px; padding: 10px 14px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .topbar nav .button { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .intro-band { min-height: 430px; padding: 42px 18px 36px; }
  .intro-band::after { right: 12px; top: 18px; font-size: 150px; }
  h1 { font-size: 42px; }
  .intro-band .button { width: 100%; }
  .directory, .how-it-works { padding: 40px 16px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .filters, .business-grid, .steps, .form-grid { grid-template-columns: 1fr; }
  .filters .search-field, .form-grid .wide { grid-column: auto; }
  .business-grid { gap: 16px; }
  .steps { gap: 24px; }
  .steps li { padding-top: 20px; }
  .steps span { margin-bottom: 12px; }
  footer { flex-direction: column; }
  footer a { align-self: start; }
  dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-shell { min-height: 100%; }
  .dialog-header { padding: 18px 16px 14px; }
  #business-form { padding: 22px 16px; }
  .form-actions { position: sticky; bottom: 0; padding: 12px 0 4px; background: #fff; }
  .form-actions .button { flex: 1; }
}
