:root {
  --ink: #142018;
  --muted: #4d5c52;
  --green: #157a32;
  --green-deep: #0d4f22;
  --green-soft: #e7f5ea;
  --sand: #f4f7f2;
  --paper: #fbfcf9;
  --line: #d9e3da;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(20, 32, 24, 0.08);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --header-h: 4.4rem;
  --wa-space: 5.5rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
  overflow-x: hidden;
  padding-bottom: calc(var(--wa-space) + var(--safe-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
h1 { font-size: clamp(1.85rem, 7vw, 4.4rem); margin: 0.2em 0 0.35em; }
h2 { font-size: clamp(1.45rem, 4.5vw, 2.6rem); margin: 0 0 0.4em; }
h3 { font-size: clamp(1.15rem, 3vw, 1.35rem); margin: 0 0 0.4em; }
p { margin: 0 0 1em; }
.wrap {
  width: min(1120px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
.narrow { width: min(760px, 100%); }
.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--green-deep); color: white; padding: 0.5rem 0.8rem; z-index: 40;
}
.skip:focus { top: 0.5rem; }

.topbar { background: var(--green-deep); color: #e7f5ea; font-size: 0.88rem; }
.topbar a { color: white; text-decoration: none; }
.topbar-inner, .header-inner, .footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
}
.topbar-inner { min-height: 2.25rem; }
.topbar-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 252, 249, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  min-height: var(--header-h);
  gap: 0.75rem;
}
.brand { flex: 0 1 auto; min-width: 0; }
.brand img {
  width: min(210px, 58vw);
  height: auto;
  background: transparent;
}
.nav { display: flex; gap: 1.15rem; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a.is-active, .nav a:hover { color: var(--green); }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 700;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: white;
}
.header-cta, .button {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green); color: white; text-decoration: none; font-weight: 700;
  border: 0; border-radius: 999px; padding: 0.8rem 1.15rem; cursor: pointer;
  min-height: 48px; text-align: center;
}
.button-ghost { background: transparent; color: var(--green-deep); border: 1px solid var(--green); }
.button-block { width: 100%; }
.header-cta { background: var(--green-deep); flex-shrink: 0; }

.hero {
  padding: 2.5rem 0 2rem;
  background:
    radial-gradient(circle at 85% 10%, #dff3e4 0, transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--sand) 100%);
}
.hero-grid, .split, .detail, .contact-grid, .footer-grid { display: grid; gap: 1.5rem; }
.hero-grid { grid-template-columns: 1.4fr 0.8fr; align-items: end; }
.eyebrow {
  color: var(--green); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.72rem; margin-bottom: 0.6rem;
}
.eyebrow a { color: inherit; }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 42rem; }
.actions {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.35rem;
}
.actions .button { flex: 1 1 12rem; }
.hero-panel {
  background: var(--green-deep); color: white;
  border-radius: 1.35rem; padding: 1.35rem 1.4rem; box-shadow: var(--shadow);
}
.hero-panel p, .hero-panel li { color: #e7f5ea; }
.hero-number {
  font-family: var(--serif); font-size: clamp(3.2rem, 12vw, 4.5rem);
  line-height: 0.9; margin: 0; color: white;
}
.hero-panel ul { padding-left: 1.1rem; margin: 1rem 0 0; }

.section { padding: 3rem 0; }
.section-sand { background: var(--sand); }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 1rem; margin-bottom: 1.35rem;
}
.job-excerpt { overflow-wrap: anywhere; word-break: break-word; }
.text-link { font-weight: 700; }
.page-hero { padding: 2.2rem 0 0.8rem; }

.job-grid, .cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.job-card, .cards-3 article, .contact-card, .detail-side {
  background: white; border: 1px solid var(--line);
  border-radius: 1.2rem; padding: 1.15rem 1.2rem;
  min-width: 0;
}
.job-card { display: flex; flex-direction: column; }
.job-card h3 a { color: var(--ink); text-decoration: none; }
.job-card h3 a:hover { color: var(--green-deep); }
.job-card-top, .job-meta {
  display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap;
  color: var(--muted); font-size: 0.92rem;
}
.job-card .text-link {
  margin-top: auto; padding-top: 0.8rem;
  min-height: 44px; display: inline-flex; align-items: center;
}
.job-excerpt { color: var(--muted); }
.pill {
  background: var(--green-soft); color: var(--green-deep);
  border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.78rem; font-weight: 700;
}
.split { grid-template-columns: 1fr 1fr; }
.split article, .prose-page {
  background: white; border-radius: 1.3rem; padding: 1.35rem;
  border: 1px solid var(--line);
}
.cards-3 article p:last-child, .contact-card p:last-child { margin-bottom: 0; }

.filters {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 0.8rem; align-items: end; margin-bottom: 1.4rem;
}
.filters label { display: grid; gap: 0.3rem; font-weight: 700; font-size: 0.9rem; }
.cadastro-form {
  display: grid; gap: 1.2rem;
  background: white; border: 1px solid var(--line);
  border-radius: 1.3rem; padding: 1.35rem;
}
.cadastro-form fieldset {
  border: 0; margin: 0; padding: 0; min-width: 0;
}
.cadastro-form legend {
  font-family: var(--serif); font-size: 1.45rem; margin-bottom: 0.8rem;
}
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem;
}
.form-grid .span-2 { grid-column: span 2; }
.cadastro-form label, .aceite {
  display: grid; gap: 0.3rem; font-weight: 700; font-size: 0.9rem;
}
.aceite {
  grid-template-columns: auto 1fr; align-items: center; font-weight: 600;
}
.aceite input { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; }
.cadastro-form input, .cadastro-form select,
.filters input, .filters select {
  font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 0.8rem;
  padding: 0.85rem 0.9rem; background: white; color: var(--ink);
  width: 100%; min-height: 48px;
}
.filters .button { width: 100%; }
.field-validation-error {
  color: #9b2c2c; font-weight: 600; font-size: 0.82rem;
}
.validation-summary-valid { display: none; }
.honeypot { position: absolute; left: -9999px; }
.cadastro-ok { max-width: 40rem; }
.cadastro-form input[readonly] { background: var(--sand); }
.result-count { color: var(--muted); }
.notice {
  background: #fff6e8; border: 1px solid #efd3a4;
  border-radius: 0.9rem; padding: 0.9rem 1rem;
}
.pager {
  display: flex; flex-wrap: wrap; gap: 0.85rem 1rem;
  align-items: center; margin-top: 1.5rem;
}
.pager a {
  font-weight: 700; min-height: 44px;
  display: inline-flex; align-items: center;
}

.detail { grid-template-columns: 1.5fr 0.8fr; align-items: start; }
.prose h2, .prose-page h2, .legal h2 { margin-top: 1.6rem; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.preserve { white-space: pre-line; }
.detail-side { position: sticky; top: calc(var(--header-h) + 1rem); }
.detail-side .button { margin-bottom: 1rem; }
.detail-side dl { margin: 0 0 1rem; }
.detail-side div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--line);
}
.detail-side dt { color: var(--muted); }
.detail-side dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.fine { color: var(--muted); font-size: 0.92rem; }
.contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose-page ul { padding-left: 1.2rem; }

.site-footer {
  background: var(--ink); color: #d7e2da; padding-top: 2.5rem;
  padding-bottom: calc(1rem + var(--safe-bottom));
}
.site-footer a { color: white; }
.footer-grid {
  grid-template-columns: 1.3fr 1fr 0.8fr;
  padding-bottom: 1.5rem; gap: 1.5rem;
}
.footer-brand, .footer-title { color: white; font-weight: 700; margin-bottom: 0.4rem; }
.footer-brand { font-family: var(--serif); font-size: 1.8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.site-footer li a { min-height: 40px; display: inline-flex; align-items: center; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem 0 1.2rem; font-size: 0.92rem;
  flex-wrap: wrap;
}

.whatsapp {
  position: fixed;
  right: calc(0.9rem + var(--safe-right));
  bottom: calc(0.9rem + var(--safe-bottom));
  z-index: 30;
  display: flex; align-items: center; gap: 0.45rem;
  background: #1fa855; color: white; text-decoration: none; font-weight: 800;
  border-radius: 999px; padding: 0.75rem 1rem 0.75rem 0.8rem;
  box-shadow: 0 12px 30px rgba(15, 90, 40, 0.35);
  min-height: 52px;
}
.whatsapp svg { width: 1.45rem; height: 1.45rem; flex-shrink: 0; }
.whatsapp:hover { background: #178a46; }

/* Tablet */
@media (max-width: 1024px) {
  .job-grid, .cards-3, .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; align-items: stretch; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .button { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
  body { font-size: 1rem; }
  .wrap { width: min(1120px, calc(100% - 1.25rem)); }
  .topbar { font-size: 0.8rem; }
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.45rem 0;
    gap: 0.2rem;
  }
  .topbar-links { width: 100%; }
  .topbar-email { display: none; }

  .header-inner { min-height: 4rem; }
  .brand img { width: min(168px, 52vw); }
  .header-cta { padding: 0.65rem 0.9rem; min-height: 44px; font-size: 0.92rem; }
  .nav-button { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(20, 32, 24, 0.08);
    padding: 0.35rem 1rem 1rem;
  }
  .site-header .wrap.header-inner {
    width: 100%;
    max-width: none;
    padding-left: max(0.75rem, var(--safe-left));
    padding-right: max(0.75rem, var(--safe-right));
  }
  .nav a {
    width: 100%;
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav a:last-of-type { border-bottom: 0; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle:checked + .nav-button {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-deep);
  }

  .hero { padding: 1.8rem 0 1.4rem; }
  .hero-grid, .split, .job-grid, .cards-3, .contact-grid, .footer-grid, .filters, .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 { grid-column: auto; }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; flex: 1 1 auto; }
  .section { padding: 2.2rem 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: 1.6rem 0 0.5rem; }
  .split article, .prose-page, .hero-panel { padding: 1.15rem; border-radius: 1.1rem; }
  .filters { gap: 0.7rem; }
  .filters .button { grid-column: auto; }
  .detail-side div { flex-direction: column; gap: 0.15rem; }
  .detail-side dd { text-align: left; }
  .pager { justify-content: space-between; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.4rem; }

  .whatsapp span { display: none; }
  .whatsapp {
    width: 3.6rem; height: 3.6rem; min-height: 3.6rem;
    padding: 0; justify-content: center; border-radius: 50%;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .brand img { width: min(148px, 48vw); }
  .hero-number { font-size: 2.8rem; }
  h1 { font-size: 1.7rem; }
}

@media (min-width: 769px) {
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3.5rem 0; }
  .wrap { width: min(1120px, calc(100% - 2rem)); }
  .lede { font-size: 1.15rem; }
}
