/* Energias RS — site estático
   Paleta: verde de marca #8BC53F sobre fundo escuro / papel quente.
*/

:root {
  --green: #8bc53f;
  --green-hover: #9ad14c;
  --green-pressed: #79b032;
  --green-deep: #3f6a14;
  --green-ink: #3a6418;
  --green-soft: rgba(139, 197, 63, 0.14);
  --green-line: rgba(139, 197, 63, 0.4);
  --ink: #121611;
  --ink-2: #1c221b;
  --ink-3: #2a3228;
  --paper: #f5f4ef;
  --paper-2: #ecebe4;
  --white: #fffcf7;
  --muted: #5c6358;
  --muted-2: #8a9184;
  --line: #d8d6ce;
  --line-strong: #c5c3ba;
  --danger: #b42318;
  --danger-bg: #fcecea;
  --ok: #3f6a14;
  --ok-bg: #eef6e0;
  --header-h: 4.5rem;
  --radius: 1rem;
  --radius-sm: 0.7rem;
  --shadow: 0 1px 2px rgba(18, 22, 17, 0.06), 0 12px 32px rgba(18, 22, 17, 0.06);
  --shadow-lg: 0 20px 50px rgba(18, 22, 17, 0.18);
  --max: 72rem;
  --font-sans: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Outfit", "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-ink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.7em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.85rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.02em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--green);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: var(--ink);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

@media (max-width: 600px) {
  .container { width: min(100% - 1.5rem, var(--max)); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--green);
  color: var(--ink);
  border-color: var(--green);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--green-hover);
  color: var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 252, 247, 0.35);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--green);
  color: var(--white);
  background: rgba(139, 197, 63, 0.12);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
}
.btn[disabled],
.btn.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(18, 22, 17, 0.92);
  color: var(--white);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 252, 247, 0.06);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand:hover { color: inherit; }
.brand img {
  width: 2.35rem;
  height: auto;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 0.15rem;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--white);
}
.brand-name .cap { font-weight: 600; }
.brand-sub {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  color: rgba(255, 252, 247, 0.72);
  font-weight: 500;
}
.brand-rs {
  color: var(--green);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 252, 247, 0.2);
  color: var(--white);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--green);
}
.nav-toggle-bars {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  position: relative;
  border: 0;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
}
.site-nav a {
  color: rgba(255, 252, 247, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
}
.site-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--green);
}
.site-nav .btn {
  margin-left: 0.5rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    padding: 0.75rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 252, 247, 0.08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 0.85rem 0.2rem;
    border-bottom: 1px solid rgba(255, 252, 247, 0.08);
  }
  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--green);
  }
  .site-nav .btn {
    margin: 1rem 0 0.25rem;
    width: 100%;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
  background: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 22, 17, 0.28) 0%, rgba(18, 22, 17, 0.55) 45%, rgba(18, 22, 17, 0.92) 100%),
    linear-gradient(90deg, rgba(18, 22, 17, 0.72) 0%, rgba(18, 22, 17, 0.2) 55%, rgba(18, 22, 17, 0.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4rem;
  max-width: 44rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--green);
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
}
.hero .lede {
  font-size: 1.15rem;
  color: rgba(255, 252, 247, 0.86);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  font-size: 0.82rem;
  color: rgba(255, 252, 247, 0.7);
  font-weight: 600;
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-trust svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--green);
}

/* ---------- Sections ---------- */
.section {
  padding: 5.5rem 0;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 2.6rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
}
.section-dark {
  background: var(--ink);
  color: var(--white);
}
.section-dark h2,
.section-dark h3 { color: var(--white); }
.section-dark .section-head p { color: rgba(255, 252, 247, 0.72); }
.section-muted { background: var(--paper-2); }

.section-cta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}
.section-cta-row .section-head { margin-bottom: 0; }

/* ---------- Key figures / badges ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.figure-card,
.badge-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.3rem;
}
.figure-card.is-placeholder {
  border-style: dashed;
  background: repeating-linear-gradient(
    -45deg,
    var(--white),
    var(--white) 8px,
    #faf8f2 8px,
    #faf8f2 16px
  );
}
.figure-card .value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.figure-card.is-placeholder .value {
  color: var(--muted);
  font-size: 1.15rem;
}
.figure-card .label,
.badge-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}
.placeholder-tag {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-ink);
  background: var(--green-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.badge-card h3 {
  font-size: 1.05rem;
  margin: 0.4rem 0 0.4rem;
}
.badge-icon {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--green-ink);
}
.badge-icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  height: 100%;
}
a.service-card:hover,
a.service-card:focus-visible {
  border-color: var(--green);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
}
.service-card h3 { margin: 0; }
.service-card p { color: var(--muted); margin: 0; flex: 1; }
.service-card .more {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--green-ink);
}
.icon-pill {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  background: var(--green-soft);
  color: var(--green-ink);
  display: grid;
  place-items: center;
}
.icon-pill svg { width: 1.35rem; height: 1.35rem; }

/* ---------- Project cards ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.6rem;
}
.filter-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: var(--ink);
}
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.project-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-2);
  position: relative;
}
.project-card .thumb picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.project-card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .thumb img {
  transform: scale(1.04);
}
.split-media picture,
.media-stack picture,
.hero-media picture,
.modal-dialog picture {
  display: block;
  width: 100%;
  height: 100%;
}
.modal-dialog img.cover,
.modal-dialog picture:first-child img.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink-2);
}
.modal-gallery picture { width: 100%; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  letter-spacing: 0;
  word-break: break-word;
}
.project-card .body {
  padding: 1rem 1.1rem 1.15rem;
}
.project-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.project-card.is-placeholder .thumb {
  background:
    linear-gradient(160deg, #2a3228, #1c221b);
}
.hidden { display: none !important; }

.empty-filter {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- Testimonials ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}
.quote-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.quote-card.is-placeholder {
  border-style: dashed;
}
.quote-card blockquote {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  color: var(--ink-3);
}
.quote-card .who {
  font-weight: 700;
  font-size: 0.92rem;
}
.quote-card .role {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 4.5rem 0;
  background:
    linear-gradient(180deg, rgba(18, 22, 17, 0.55), rgba(18, 22, 17, 0.88)),
    url("../assets/images/projetos/veolia-epal/01.jpg") center/cover no-repeat;
  color: var(--white);
}
.cta-band h2 { color: var(--white); max-width: 20ch; }
.cta-band p { color: rgba(255, 252, 247, 0.82); max-width: 38rem; margin-bottom: 1.5rem; }
.cta-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.cta-contacts a {
  color: var(--white);
  text-decoration: none;
}
.cta-contacts a:hover { color: var(--green); }

/* ---------- Page header ---------- */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 3.5rem 0 3rem;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.6rem; }
.page-hero p { color: rgba(255, 252, 247, 0.78); max-width: 40rem; margin: 0; }

/* ---------- About / process ---------- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.media-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.media-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
}
.media-stack picture:first-child {
  grid-row: 1 / 3;
  height: 100%;
}
.media-stack picture:first-child img {
  aspect-ratio: auto;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  counter-reset: step;
}
.process-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  position: relative;
}
.process-step .num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 650;
  color: var(--green-ink);
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
}
.process-step h3 { margin-bottom: 0.4rem; }
.process-step p { color: var(--muted); margin: 0; }

.cert-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cert-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.cert-card h3 { margin-bottom: 0.35rem; font-size: 1.1rem; }
.cert-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 50rem;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex: none;
  margin-top: -0.25rem;
}
.faq-item[open] summary::after {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}
.faq-item .answer {
  padding: 0 1.2rem 1.15rem;
  color: var(--muted);
}

/* ---------- Form ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.contact-aside h2 { margin-top: 0; }
.contact-aside a { color: var(--ink); text-decoration: none; font-weight: 700; }
.contact-aside a:hover { color: var(--green-ink); }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.contact-list li {
  margin-bottom: 1rem;
}
.contact-list .k {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.form {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.2rem);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}
.form-field,
.form-check {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-field.full,
.form-check.full,
.form-actions {
  grid-column: 1 / -1;
}
.form label {
  font-weight: 700;
  font-size: 0.88rem;
}
.form .hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.form input,
.form select,
.form textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  padding: 0.7rem 0.8rem;
  width: 100%;
  appearance: none;
}
.form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23121611' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2rem;
}
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green-ink);
}
.form input[aria-invalid="true"],
.form select[aria-invalid="true"],
.form textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 0;
}
.hp {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none;
}
.form-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.7rem;
}
.form-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  min-width: 1.5rem;
  margin: 0.05rem 0 0;
  padding: 0;
  flex: none;
  border: 2px solid var(--green-ink);
  border-radius: 0.35rem;
  background-color: var(--paper);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem 1rem;
  cursor: pointer;
}
.form-check input[type="checkbox"]:checked {
  background-color: var(--green-ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.form-check label { cursor: pointer; }
.form-status {
  grid-column: 1 / -1;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  display: none;
}
.form-status.is-ok {
  display: block;
  background: var(--ok-bg);
  color: var(--ok);
}
.form-status.is-err {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 252, 247, 0.78);
  padding: 3.5rem 0 1.6rem;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.site-footer h2 {
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.site-footer a {
  color: rgba(255, 252, 247, 0.82);
  text-decoration: none;
}
.site-footer a:hover { color: var(--green); }
.site-footer .brand { margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 252, 247, 0.08);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255, 252, 247, 0.55);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 17, 0.72);
}
.modal-dialog {
  position: relative;
  background: var(--white);
  border-radius: 1.1rem;
  max-width: 52rem;
  width: 100%;
  max-height: min(90vh, 54rem);
  overflow: auto;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 22, 17, 0.7);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { background: var(--ink); }
.modal-dialog img.cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--ink-2);
}
.modal-body { padding: 1.4rem 1.5rem 1.7rem; }
.modal-body h2 { margin-bottom: 0.35rem; }
.modal-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
}
.modal-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.6rem;
}
.modal-gallery img:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
}

/* ---------- Legal / 404 ---------- */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; font-size: 1.1rem; }
.prose ul { color: var(--muted); }
.note {
  background: var(--green-soft);
  border-left: 3px solid var(--green);
  padding: 0.9rem 1rem;
  border-radius: 0 0.6rem 0.6rem 0;
  color: var(--ink-3);
  margin: 1.2rem 0;
}

.not-found {
  min-height: calc(80svh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}
.not-found .code {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--green-ink);
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

/* Service detail blocks */
.service-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.service-block:last-of-type { border-bottom: 0; }
.service-block h2 { margin-bottom: 0.5rem; }
.service-block p { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .badge-grid,
  .card-grid,
  .project-grid,
  .quote-grid,
  .process,
  .cert-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid { gap: 1.5rem; }
}

@media (max-width: 700px) {
  .figures,
  .badge-grid,
  .card-grid,
  .project-grid,
  .quote-grid,
  .process,
  .cert-list,
  .split,
  .contact-layout,
  .footer-grid,
  .form-grid,
  .modal-gallery {
    grid-template-columns: 1fr;
  }
  .hero-content { padding: 3.5rem 0 3rem; }
  .section { padding: 3.6rem 0; }
  .split-media img { aspect-ratio: 16 / 10; }
  .media-stack { grid-template-columns: 1fr 1fr; }
  .brand-sub .tagline { display: none; }
}

/* ---------- A11y ---------- */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.modal-open { overflow: hidden; }

.mt-lg { margin-top: 2rem; }
.mt-md { margin-top: 1.5rem; }
.actions-row {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }

/* ---------- Conversion notes, WhatsApp, form files ---------- */
.cta-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.cta-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}
.hero-actions .cta-note-hero {
  flex: 1 0 100%;
  margin: 0.15rem 0 0;
  color: rgba(255, 252, 247, 0.82);
}
.cta-band .cta-note {
  color: rgba(255, 252, 247, 0.82);
  margin-top: 0.55rem;
  margin-bottom: 0;
}
.site-nav .cta-note-nav {
  display: none;
}
@media (max-width: 900px) {
  .site-nav .cta-note-nav {
    display: block;
    color: rgba(255, 252, 247, 0.72);
    text-align: center;
    margin: 0.15rem 0 0.2rem;
  }
}

.form input[type="file"].file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}
.file-btn {
  align-self: flex-start;
  cursor: pointer;
  font-weight: 700;
}
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.file-list:empty::after {
  content: "Nenhum ficheiro escolhido.";
}
.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0;
}

.wa-float {
  position: fixed;
  right: max(0.85rem, env(safe-area-inset-right));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  z-index: 40;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.wa-float:hover,
.wa-float:focus-visible {
  background: var(--green-hover);
  color: var(--ink);
}
.wa-float svg {
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { transition: none; }
}

@media (max-width: 900px) {
  .hero-content { padding-bottom: 5.75rem; }
  .contact-aside { padding-bottom: 4.25rem; }
  .site-footer { padding-bottom: 5.25rem; }
  .cta-band { padding-bottom: 5.25rem; }
}

.nowrap { white-space: nowrap; }
