/* =========================================================
   Rojak Instalações
   Paleta: código de cores dos sistemas hidráulicos
   ========================================================= */

:root {
  --navy: #0F2633;        /* "dentro da parede" */
  --navy-deep: #0B1E28;
  --navy-card: #13303F;
  --cimento: #E3E4E0;     /* fundo claro, concreto */
  --cimento-line: rgba(19, 41, 58, 0.16);
  --tinta: #13293A;       /* texto sobre cimento */
  --tinta-2: #4A5C68;
  --branco: #F6F7F5;
  --linha: #9FC3D6;       /* traço de projeto */

  --fria: #2F74F0;        /* água fria — azul caixa d'água */
  --quente: #E8472E;      /* água quente */
  --esgoto: #C79B5B;      /* esgoto */
  --pluvial: #1FB5A5;     /* águas pluviais */
  --geral: #8FA7B5;       /* estrutura / geral */

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--cimento);
  color: var(--tinta);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1; letter-spacing: -0.015em; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--pluvial);
  outline-offset: 3px;
}

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

.skip {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--branco);
  color: var(--tinta);
  border-radius: 6px;
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--fria);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 108%;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: #2063DC; }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: inherit;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }

.btn--small {
  min-height: 42px;
  padding: 0 20px;
  font-size: 0.9375rem;
}

/* ---------- Navegação ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 14px var(--gutter);
  color: var(--branco);
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s;
}
.nav[data-theme="light"] {
  background: rgba(227, 228, 224, 0.9);
  color: var(--tinta);
  box-shadow: 0 1px 0 var(--cimento-line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav[data-theme="dark"].is-scrolled {
  background: rgba(15, 38, 51, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Assinatura: símbolo + ROJAK (SVG embutido, gerado por logo/aplicar-no-site.mjs) */
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  padding: 2px 0;
  color: inherit;
  text-decoration: none;
}
.brand__logo {
  display: block;
  width: auto;
  height: 38px;
  overflow: visible;
}
.brand__logo--full { height: 76px; }

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.85;
  text-underline-offset: 6px;
}
.nav__links a:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 900px) {
  .nav__links { display: none; }
}
@media (max-width: 420px) {
  .nav { gap: 12px; }
  .nav .brand__logo { height: 32px; }
  .nav .btn--small { padding: 0 16px; font-size: 0.875rem; }
}

/* ---------- Palco 3D ---------- */

.stage {
  position: relative;
  background: var(--navy);
  color: var(--branco);
}

.stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.stage__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 38, 51, 0.92) 0%, rgba(15, 38, 51, 0.55) 30%, rgba(15, 38, 51, 0) 52%),
    linear-gradient(180deg, rgba(15, 38, 51, 0.5) 0%, rgba(15, 38, 51, 0) 18%, rgba(15, 38, 51, 0) 80%, rgba(15, 38, 51, 0.7) 100%);
}

.stage.no-webgl .stage__canvas { display: none; }
.stage.no-webgl .stage__sticky {
  background:
    radial-gradient(ellipse at 70% 50%, rgba(47, 116, 240, 0.25), transparent 60%),
    linear-gradient(rgba(159, 195, 214, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(159, 195, 214, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--navy);
}

.stage__content {
  position: relative;
  z-index: 2;
  margin-top: -100vh;
  margin-top: -100svh;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 820px;
  padding: 120px var(--gutter) 72px;
}

.hero__title {
  max-width: 11.5ch;
  font-size: clamp(2.7rem, 6.6vw, 6.4rem);
  font-weight: 820;
  font-stretch: 122%;
  line-height: 0.93;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 48ch;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  color: rgba(246, 247, 245, 0.82);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero > * {
  animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 130ms + 250ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* Legenda / código de cores */

.legend { margin-top: 56px; }
.legend__hint {
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: rgba(246, 247, 245, 0.65);
}
.legend__items { display: flex; flex-wrap: wrap; gap: 8px; }
.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(159, 195, 214, 0.22);
  border-radius: 999px;
  background: rgba(15, 38, 51, 0.55);
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.legend__item::before {
  content: "";
  width: 22px;
  height: 8px;
  border-radius: 4px;
  background: var(--c);
}
.legend__item:hover { border-color: var(--c); }
.legend__item[aria-pressed="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 24%, rgba(15, 38, 51, 0.6));
}

/* Fases */

.phase {
  display: flex;
  align-items: center;
  min-height: 115vh;
  min-height: 115svh;
  padding: 96px var(--gutter);
}

.phase__card {
  width: min(450px, 100%);
  padding: 28px 30px 26px;
  background: rgba(11, 30, 40, 0.8);
  border: 1px solid rgba(159, 195, 214, 0.16);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.phase__step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 88%;
  color: var(--linha);
}
.phase__num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-stretch: 100%;
}

.phase__title {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  font-weight: 780;
  font-stretch: 112%;
  line-height: 1.02;
  text-wrap: balance;
}

.phase__card p:not(.phase__step) { color: rgba(246, 247, 245, 0.8); }

.phase__list {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(159, 195, 214, 0.16);
  list-style: none;
  font-size: 0.9375rem;
}
.phase__list li { display: flex; align-items: center; gap: 12px; }
.phase__list li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--c, var(--geral));
}

.phase__link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #BFD6E3;
  text-underline-offset: 5px;
}
.phase__link:hover { color: #fff; }

/* Indicador de progresso: um tubo que enche */

.progress {
  position: absolute;
  left: var(--gutter);
  bottom: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.progress.is-on { opacity: 1; transform: none; }

.progress__pipe {
  position: relative;
  width: 210px;
  height: 10px;
  border-radius: 5px;
  background: rgba(159, 195, 214, 0.16);
}
.progress__water {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--p, 0) * 100%);
  border-radius: 5px;
  background: var(--fria);
  box-shadow: 0 0 12px rgba(47, 116, 240, 0.7);
}
.progress__joint {
  position: absolute;
  top: -4px;
  left: calc(var(--i) / 6 * 100% - 4px);
  width: 8px;
  height: 18px;
  border-radius: 2px;
  background: #2A4A5D;
  transition: background-color 0.3s;
}
.progress__joint.is-done { background: #7FB2FF; }

.progress__text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.progress__num {
  font-stretch: 85%;
  font-weight: 500;
  color: var(--linha);
}

/* Etiquetas presas a pontos do modelo 3D */

.stage__labels {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-stretch: 85%;
  white-space: nowrap;
  color: #fff;
  opacity: 0;
  translate: -4.5px -50%;
  transition: opacity 0.35s;
  will-change: transform;
}
.tag::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent);
}
.tag span {
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(11, 30, 40, 0.85);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.tag.is-on { opacity: 1; }

/* Palco em tela "em pé" (celular, tablet vertical): modelo em cima, texto embaixo */
@media (max-aspect-ratio: 21/20) {
  .stage__shade {
    background:
      linear-gradient(180deg, rgba(15, 38, 51, 0.6) 0%, rgba(15, 38, 51, 0) 16%, rgba(15, 38, 51, 0) 42%, rgba(15, 38, 51, 0.95) 78%);
  }
  .hero {
    justify-content: flex-start;
    min-height: 0;
    padding-top: 47vh;
    padding-top: 47svh;
    padding-bottom: 72px;
  }
  .hero__title { font-size: clamp(2.5rem, 11vw, 4rem); }
  .hero__lead { margin-top: 20px; }
  .legend { margin-top: 36px; }
  .phase {
    align-items: flex-end;
    padding-bottom: 12svh;
  }
  .phase__card { padding: 22px 22px 20px; }
  .progress {
    top: 76px;
    bottom: auto;
  }
  .progress__pipe { width: 140px; }
  .tag { font-size: 0.75rem; }
}

/* ---------- Cano de PVC impresso ---------- */

.pipe-band {
  position: relative;
  padding: 30px 0;
  background: linear-gradient(180deg, var(--navy) 50%, #0B1D27 50%);
  overflow-x: clip;
}
.pipe {
  position: relative;
  height: 66px;
  background: linear-gradient(180deg,
    #6F695D 0%, #ADA594 7%, #DDD7CA 16%, #F6F3EC 25%, #FFFFFF 31%, #F2EEE6 40%,
    #E4DED2 58%, #CBC4B5 76%, #A39B8B 90%, #6E675B 100%);
  box-shadow: 0 26px 24px -20px rgba(0, 0, 0, 0.8);
}
/* sombreado do cilindro por cima da impressão: a tinta curva junto com o cano */
.pipe::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(30, 30, 25, 0.38) 0%, rgba(30, 30, 25, 0) 16%,
    rgba(255, 255, 255, 0.42) 27%, rgba(255, 255, 255, 0) 37%,
    rgba(30, 30, 25, 0) 60%, rgba(30, 30, 25, 0.4) 100%);
}
.pipe__track {
  position: absolute;
  inset: 0;
  display: flex;
  will-change: transform;
}
.pipe__seg {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2.4em;
  height: 100%;
  padding-left: 2.4em;
  font-size: 0.9375rem;
  font-weight: 700;
  font-stretch: 68%;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(19, 41, 58, 0.8);
}
.pipe__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 800;
  font-stretch: 100%;
  letter-spacing: 0.05em;
}
.pipe__brand img { width: auto; height: 26px; opacity: 0.85; }
/* setas de fluxo impressas */
.pipe__arrows { display: inline-flex; gap: 1px; }
.pipe__arrows i {
  width: 9px;
  height: 9px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
  transform: rotate(45deg);
}
/* bolsa da junta (ponta e bolsa): mais grossa que o cano, com o cone de entrada */
.pipe__joint {
  position: relative;
  z-index: 3;
  flex: none;
  align-self: stretch;
  width: 58px;
  margin: -7px 0;
  background: linear-gradient(180deg,
    #6A6458 0%, #A9A190 8%, #DCD6C9 17%, #F8F6F0 27%, #FFFFFF 32%, #EEEAE1 44%,
    #DCD5C8 64%, #BDB5A5 82%, #958D7D 93%, #66605A 100%);
  clip-path: polygon(0 14%, 12px 0, 100% 0, 100% 100%, 12px 100%, 0 86%);
}
.pipe__joint::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.2) 0 2px, transparent 2px 12px,
    rgba(0, 0, 0, 0.14) 12px 14px, transparent 14px calc(100% - 3px),
    rgba(0, 0, 0, 0.24) calc(100% - 3px));
}

@media (max-width: 600px) {
  .pipe-band { padding: 22px 0; }
  .pipe { height: 52px; }
  .pipe__seg { font-size: 0.8125rem; gap: 2em; padding-left: 2em; }
  .pipe__brand img { height: 21px; }
  .pipe__joint { width: 46px; margin: -6px 0; }
}

/* ---------- Seções claras ---------- */

.section { padding: clamp(88px, 11vw, 150px) 0; }

.wrap {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px 72px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head h2 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  font-weight: 820;
  font-stretch: 120%;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.section-head p {
  max-width: 48ch;
  color: var(--tinta-2);
}
.section-head a {
  color: var(--tinta);
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; margin-bottom: 44px; }
}

/* ---------- Serviços: painel de sistemas ---------- */

.services {
  --sv-bg: #0B1D27;
  --sv-card: #0F2633;
  --sv-line: rgba(159, 195, 214, 0.16);
  position: relative;
  isolation: isolate;
  overflow: clip; /* clip (e não hidden) para a lista de abas continuar fixa ao rolar */
  padding: clamp(96px, 11vw, 150px) 0 clamp(96px, 10vw, 140px);
  background: var(--sv-bg);
  color: var(--branco);
}
/* grade de planta técnica */
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(159, 195, 214, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 195, 214, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(159, 195, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 195, 214, 0.035) 1px, transparent 1px);
  background-size: 88px 88px, 88px 88px, 22px 22px, 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 62% 48%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 62% 48%, #000 30%, transparent 100%);
}

.services__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 72px;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.services__head h2 {
  font-size: clamp(2.6rem, 6.2vw, 5.6rem);
  font-weight: 860;
  font-stretch: 125%;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.services__head p {
  max-width: 46ch;
  font-size: 1.0625rem;
  color: rgba(246, 247, 245, 0.72);
}

.sv {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.6fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* Abas: um cano de cada cor */
.sv__tabs {
  position: sticky;
  top: 104px;
  display: grid;
  border-top: 1px solid var(--sv-line);
}
.sv__tab {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 4px;
  align-items: center;
  width: 100%;
  padding: 22px 12px 22px 0;
  border: 0;
  border-bottom: 1px solid var(--sv-line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.48;
  transition: opacity 0.25s, background-color 0.3s;
}
.sv__tab:hover { opacity: 0.85; }
.sv__tab[aria-selected="true"] {
  opacity: 1;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%);
}
.sv__tab:focus-visible { outline-offset: -3px; }

/* joelho de 90° desenhado em CSS */
.sv__swatch {
  grid-row: span 2;
  width: 44px;
  height: 28px;
  border: 9px solid var(--c);
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 22px;
  transition: filter 0.3s;
}
.sv__tab[aria-selected="true"] .sv__swatch {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--c) 70%, transparent));
}
.sv__name {
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  font-weight: 820;
  font-stretch: 118%;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.sv__hint {
  font-size: 0.9375rem;
  font-weight: 600;
  font-stretch: 75%;
  color: color-mix(in srgb, var(--c) 70%, #fff);
}

/* Palco: planta + ficha */
.sv__stage { display: grid; gap: 16px; min-width: 0; }

.sv__draw {
  position: relative;
  margin: 0;
  padding: clamp(10px, 2vw, 22px) clamp(10px, 2vw, 22px) 14px;
  border: 1px solid var(--sv-line);
  border-radius: 24px;
  background: var(--sv-card);
}
.plan {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--font);
}
.sv__caption {
  margin-top: 6px;
  padding: 0 4px;
  font-size: 0.8125rem;
  color: rgba(246, 247, 245, 0.5);
}

.plan [data-sys="fria"] { --sys: var(--fria); }
.plan [data-sys="quente"] { --sys: var(--quente); }
.plan [data-sys="esgoto"] { --sys: var(--esgoto); }
.plan [data-sys="pluvial"] { --sys: var(--pluvial); }
.plan [data-sys="geral"] { --sys: #D2DEE5; }

.plan .st { fill: none; stroke: rgba(159, 195, 214, 0.3); stroke-width: 1.2; transition: stroke 0.4s; }
.plan .st .slab { fill: rgba(159, 195, 214, 0.08); }
.plan .st .fx { stroke: rgba(159, 195, 214, 0.5); }
.plan[data-active="geral"] .st { stroke: rgba(210, 222, 229, 0.62); }

.plan .obj {
  fill: rgba(159, 195, 214, 0.05);
  stroke: rgba(159, 195, 214, 0.28);
  stroke-width: 1.4;
  transition: fill 0.4s, stroke 0.4s;
}
.plan .obj.on {
  fill: color-mix(in srgb, var(--sys) 28%, transparent);
  stroke: var(--sys);
}

.plan .pipe {
  fill: none;
  stroke: rgba(159, 195, 214, 0.15);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.4s;
}
.plan .pipe.on {
  stroke: var(--sys);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--sys) 55%, transparent));
}
.plan.drawing .pipe.on {
  stroke-dasharray: 1;
  animation: sv-draw 1s cubic-bezier(0.3, 0.6, 0.2, 1) both;
}
@keyframes sv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.plan .flows path {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
  opacity: 0;
  transition: opacity 0.3s;
}
.plan .flows path.on {
  opacity: 0.8;
  animation: sv-flow 1.1s linear infinite;
}
@keyframes sv-flow { to { stroke-dashoffset: -16; } }

.plan .tags g { opacity: 0; transition: opacity 0.35s; }
.plan .tags g.on { opacity: 1; transition-delay: 0.35s; }
.plan .tags text {
  fill: var(--branco);
  font-size: 13.5px;
  font-weight: 650;
  font-stretch: 82%;
}
.plan .tags path { fill: none; stroke: rgba(246, 247, 245, 0.5); stroke-width: 1; }

/* Ficha do sistema */
.sv__panel {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 24px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--sv-card)), var(--sv-card) 62%);
}
.sv__panel:not([hidden]) { animation: sv-in 0.45s var(--ease) both; }
@keyframes sv-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sv__panel h3 {
  max-width: 24ch;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  font-weight: 820;
  font-stretch: 115%;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.sv__panel > p:not(.sv__phases) {
  max-width: 60ch;
  margin-top: 14px;
  color: rgba(246, 247, 245, 0.78);
}
.sv__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.sv__chips li {
  padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  font-size: 0.9375rem;
  font-weight: 550;
}
.sv__phases {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: rgba(246, 247, 245, 0.68);
}
.sv__phases a {
  color: #fff;
  font-weight: 650;
  text-decoration-color: var(--c);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.sv__cta { margin-top: 24px; }

@media (max-width: 900px) {
  .services__head { grid-template-columns: 1fr; }
  .sv { grid-template-columns: minmax(0, 1fr); }
  .sv__tabs {
    position: static;
    display: flex;
    gap: 8px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 6px;
    border: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .sv__tabs::-webkit-scrollbar { display: none; }
  .sv__tab {
    flex: none;
    width: auto;
    grid-template-columns: 26px auto;
    column-gap: 10px;
    padding: 10px 16px 10px 12px;
    border: 1px solid var(--sv-line);
    border-radius: 999px;
    scroll-snap-align: start;
    opacity: 0.72;
  }
  .sv__tab[aria-selected="true"] {
    border-color: var(--c);
    background: color-mix(in srgb, var(--c) 22%, transparent);
  }
  .sv__swatch { grid-row: auto; width: 26px; height: 16px; border-width: 6px; border-top-right-radius: 13px; }
  .sv__name { font-size: 1rem; font-stretch: 105%; }
  .sv__hint { display: none; }
  .sv__draw { border-radius: 18px; }
  .sv__panel { border-radius: 18px; }
}

/* no celular a planta encolhe: nomes das peças maiores para continuarem legíveis */
@media (max-width: 600px) {
  .plan .tags text { font-size: 21px; font-stretch: 75%; }
  .plan .pipe { stroke-width: 6; }
}

@media (prefers-reduced-motion: reduce) {
  .plan.drawing .pipe.on, .plan .flows path.on, .sv__panel:not([hidden]) { animation: none; }
}

/* ---------- Diário de obra ---------- */

/* concreto: grão fino, marcas da forma de madeira e manchas suaves */
.works {
  background-color: var(--cimento);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .13 0 0 0 0 .17 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(180deg, transparent 0 139px, rgba(19, 41, 58, 0.05) 139px 140px),
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(19, 41, 58, 0.06), transparent 70%),
    radial-gradient(ellipse 50% 55% at 88% 82%, rgba(255, 255, 255, 0.4), transparent 70%);
}

.dv {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}

/* Visualizador */
.dv__view {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--navy);
  color: var(--branco);
  box-shadow: 0 40px 70px -40px rgba(15, 38, 51, 0.6);
}
.dv__frame {
  position: relative;
  height: clamp(320px, 40vw, 560px);
  overflow: hidden;
  background: #0B1D27;
}
.dv__bg {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  max-width: none;
  height: calc(100% + 80px);
  object-fit: cover;
  filter: blur(30px) brightness(0.42) saturate(1.15);
  transition: opacity 0.3s;
}
.dv__photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s;
}
.dv__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: fill;
}
.dv.is-swapping .dv__photo,
.dv.is-swapping .dv__bg { opacity: 0; }

/* Etiquetas presas nas peças da foto */
.dv__pins { position: absolute; inset: 0; pointer-events: none; }
.dv__pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-9px, -50%);
  animation: dv-pin 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 120ms + 120ms);
}
.dv__pin i {
  flex: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 38%, transparent), 0 4px 12px rgba(0, 0, 0, 0.45);
}
.dv__pin b {
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 6px;
  background: rgba(11, 30, 40, 0.88);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 650;
  font-stretch: 85%;
  white-space: nowrap;
}
.dv__pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 9px), -50%); }
@keyframes dv-pin { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }

.dv__zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(11, 30, 40, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: zoom-in;
  transition: background-color 0.2s;
}
.dv__zoom:hover { background: rgba(11, 30, 40, 0.92); }
.dv__zoom svg { width: 16px; height: 16px; }

.dv__cap {
  display: grid;
  gap: 10px;
  padding: 24px 28px 28px;
  border-top: 3px solid var(--c);
}
.dv__cap h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 820;
  font-stretch: 115%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.dv__text { max-width: 62ch; color: rgba(246, 247, 245, 0.78); }
.dv__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.dv__fase,
.dv__sys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.dv__fase {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}
.dv__fase:hover { background: rgba(255, 255, 255, 0.14); }
.dv__fase::after { content: ""; width: 7px; height: 7px; margin-left: 2px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.dv__sys {
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.dv__sys::before { content: ""; width: 16px; height: 6px; border-radius: 3px; background: var(--c); }

/* Lista de fotos */
.dv__list { display: grid; gap: 10px; }
.dv__item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--cimento-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
  color: var(--tinta);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dv__item:hover { background: rgba(255, 255, 255, 0.7); }
.dv__item[aria-selected="true"] {
  border-color: transparent;
  background: #fff;
  box-shadow: inset 5px 0 0 var(--c), 0 18px 30px -22px rgba(15, 38, 51, 0.55);
}
.dv__item img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  filter: saturate(0.85);
  transition: filter 0.25s;
}
.dv__item[aria-selected="true"] img { filter: none; }
.dv__item-title {
  display: block;
  font-size: 1.0625rem;
  font-weight: 760;
  font-stretch: 110%;
  line-height: 1.15;
}
.dv__item-fase {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.875rem;
  font-stretch: 90%;
  color: var(--tinta-2);
}
.dv__item-fase::before { content: ""; flex: none; width: 16px; height: 6px; border-radius: 3px; background: var(--c); }

@media (max-width: 900px) {
  .dv { grid-template-columns: minmax(0, 1fr); }
  .dv__frame { height: clamp(300px, 92vw, 460px); }
  .dv__cap { padding: 20px 20px 22px; }
  .dv__list {
    display: flex;
    gap: 10px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .dv__list::-webkit-scrollbar { display: none; }
  .dv__item {
    flex: none;
    width: 250px;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    padding: 8px;
    scroll-snap-align: start;
  }
  .dv__item img { width: 60px; height: 60px; }
  .dv__item-title { font-size: 0.9375rem; }
  .dv__pin b { padding: 4px 8px; font-size: 0.75rem; }
  .dv__pin i { width: 15px; height: 15px; border-width: 2.5px; }
  .dv__zoom { top: 12px; right: 12px; min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .dv__pin { animation: none; }
  .dv__photo, .dv__bg { transition: none; }
}

/* Lightbox */

.lightbox {
  max-width: min(92vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(8, 20, 28, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox[open] { animation: pop 0.35s var(--ease); }
@keyframes pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}
.lightbox__figure { margin: 0; }
.lightbox__img {
  width: auto;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 8px;
}
.lightbox__caption {
  max-width: 60ch;
  margin: 14px auto 0;
  text-align: center;
  font-size: 0.9375rem;
}
.lightbox__caption strong { font-stretch: 110%; }
.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 42px;
  color: #fff;
}

/* ---------- Contato ---------- */

.contact {
  background: var(--navy);
  color: var(--branco);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px 88px;
  align-items: start;
}
.contact h2 {
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 5.4vw, 4.8rem);
  font-weight: 820;
  font-stretch: 122%;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.contact__lead {
  max-width: 40ch;
  color: rgba(246, 247, 245, 0.8);
}
.contact__channels {
  display: grid;
  gap: 2px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.contact__channels a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(159, 195, 214, 0.18);
  font-size: 1.125rem;
  font-weight: 650;
  text-decoration: none;
}
.contact__channels a span {
  font-weight: 400;
  color: var(--linha);
}
.contact__channels a:hover span { color: #fff; }

.quote {
  display: grid;
  gap: 20px;
  padding: clamp(22px, 3vw, 36px);
  background: var(--navy-card);
  border: 1px solid rgba(159, 195, 214, 0.14);
  border-radius: 10px;
}
.field { display: grid; gap: 8px; }
.field label,
.choices legend {
  font-size: 0.9375rem;
  font-weight: 600;
}
.field__opt { font-weight: 400; color: var(--linha); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(159, 195, 214, 0.28);
  border-radius: 8px;
  background: #0D2430;
  color: var(--branco);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 112px; resize: vertical; }
.field select option { background: #0D2430; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--fria); }
.field input[aria-invalid="true"] { border-color: #FF8A75; }

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choices legend { margin-bottom: 10px; padding: 0; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(159, 195, 214, 0.3);
  border-radius: 999px;
  font-size: 0.9375rem;
  transition: background-color 0.2s, border-color 0.2s;
}
.choice input:checked + span {
  background: var(--fria);
  border-color: var(--fria);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--pluvial);
  outline-offset: 2px;
}

.quote__submit { justify-self: start; margin-top: 4px; }
.quote__status {
  min-height: 1.5em;
  font-size: 0.9375rem;
  color: #BFD6E3;
}
.quote__status.is-error { color: #FF9C8A; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .quote__submit { justify-self: stretch; }
}

/* ---------- Rodapé ---------- */

.footer {
  padding: 36px 0;
  background: var(--navy-deep);
  color: rgba(246, 247, 245, 0.7);
  font-size: 0.9375rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}
.footer .brand { margin-right: 0; color: var(--branco); }
.footer a { text-underline-offset: 4px; }

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > * { animation: none; }
  .lightbox[open] { animation: none; }
}
