/* ==================================================
   HERO SERVIÇOS — BASE / DESKTOP
================================================== */

.z-service-hero,
.z-service-hero * {
  box-sizing: border-box;
}

.z-service-hero {
  --hero-decoration-width: clamp(180px, 22vw, 340px);
  --hero-orange: var(--color-brand-orange, #f46e00);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 84px 24px 76px;
  background: var(--color-bg-card, #f3f3f1);
  font-family: Inter, Arial, sans-serif;
}

/* Container */

.z-service-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
}

.z-service-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

/* ==================================================
   TÍTULO E DESCRIÇÃO
================================================== */

.z-service-hero__title {
  max-width: 100%;
  margin: 0;
  padding-block: 0.08em;

  color: #980d3d;
  font-family: inherit;
  font-size: clamp(32px, 3.5vw, 54px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  overflow-wrap: anywhere;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .z-service-hero__title {
    background-image: linear-gradient(
      100deg,
      #780039 0%,
      #b62e29 48%,
      #ff7900 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.z-service-hero__description {
  width: 100%;
  max-width: 620px;
  margin-top: 22px;
  color: #7b7b88;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* Rich text */

.z-service-hero__description p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.z-service-hero__description p + p {
  margin-top: 0.65em;
}

.z-service-hero__description > :first-child {
  margin-top: 0;
}

.z-service-hero__description > :last-child {
  margin-bottom: 0;
}

/* ==================================================
   BOTÃO
================================================== */

.z-service-hero__action {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 32px;
}

.z-service-hero .z-service-hero__button,
.z-service-hero .z-service-hero__button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  min-height: 44px;
  padding: 12px 28px;

  border: 0;
  border-radius: 999px;
  background: var(--hero-orange);
  color: #fff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;

  transition: background-color 180ms ease;
}

.z-service-hero a.z-service-hero__button:hover {
  background: #d95d00;
  color: #fff;
  text-decoration: none;
}

.z-service-hero a.z-service-hero__button:focus-visible {
  outline: 2px solid #040098;
  outline-offset: 4px;
}

/* ==================================================
   IMAGENS LATERAIS — TEMA PADRÃO
================================================== */

.z-service-hero__decoration {
  position: absolute;
  z-index: 0;
  width: var(--hero-decoration-width);
  pointer-events: none;
  user-select: none;
}

.z-service-hero__decoration--left {
  top: -75%;
  left: -20%;
  width: 55%;
  height: 55%;
  transform: rotateZ(21.22deg);
}

.z-service-hero__decoration--right {
  top: -70%;
  right: -28%;
  width: 50%;
  height: 50%;
}

.z-service-hero__decoration img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

/* ==================================================
   PALETAS DOS SERVIÇOS
   Variáveis compartilhadas com banner e contato
================================================== */

/* Prevenção a Fraudes */

body:has(.z-service-hero[data-service-theme="magenta"]) {
  --service-title-fallback: #65003f;

  --service-title-gradient: linear-gradient(
    90deg,
    #65003f 0%,
    #0700fe 100%
  );

  --service-banner-gradient: linear-gradient(
    90deg,
    #040098 0%,
    #65003f 100%
  );

  --service-banner-gradient-mobile: linear-gradient(
    to bottom,
    #040098 0%,
    #65003f 100%
  );

  --service-banner-subtitle: #f46e00;

  --service-contact-gradient: linear-gradient(
    90deg,
    #040098 0%,
    #65003f 100%
  );

  --service-contact-gradient-mobile: linear-gradient(
    to bottom,
    #040098 0%,
    #65003f 100%
  );
}

/* Gestão de Riscos de Terceiros */

body:has(.z-service-hero[data-service-theme="orange"]) {
  --service-title-fallback: #65003f;

  --service-title-gradient: linear-gradient(
    90deg,
    #65003f 0%,
    #f46e00 100%
  );

  --service-banner-gradient: linear-gradient(
    110deg,
    #f46e00 0%,
    #65003f 100%
  );

  --service-banner-gradient-mobile: linear-gradient(
    to bottom,
    #f46e00 0%,
    #65003f 100%
  );

  --service-banner-subtitle: #fff;

  --service-contact-gradient: linear-gradient(
    90deg,
    #f46e00 0%,
    #65003f 100%
  );

  --service-contact-gradient-mobile: linear-gradient(
    to bottom,
    #f46e00 0%,
    #65003f 100%
  );
}

/* ==================================================
   APLICAÇÃO DOS TEMAS
================================================== */

/* Título */

body:has(
  .z-service-hero[data-service-theme="magenta"],
  .z-service-hero[data-service-theme="orange"]
) .z-service-hero__title {
  color: var(--service-title-fallback);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  body:has(
    .z-service-hero[data-service-theme="magenta"],
    .z-service-hero[data-service-theme="orange"]
  ) .z-service-hero__title {
    background-image: var(--service-title-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

/* Banner de atuação */

body:has(
  .z-service-hero[data-service-theme="magenta"],
  .z-service-hero[data-service-theme="orange"]
) .z-acting-banner {
  background: var(--service-banner-gradient);
}

body:has(
  .z-service-hero[data-service-theme="magenta"],
  .z-service-hero[data-service-theme="orange"]
) .z-acting-banner__subtitle {
  color: var(--service-banner-subtitle);
}

/* Contato */

body:has(
  .z-service-hero[data-service-theme="magenta"],
  .z-service-hero[data-service-theme="orange"]
) .contact-page--service {
  background: var(--service-contact-gradient);
}

/* Deixa visível o fundo aplicado à seção. */

body:has(
  .z-service-hero[data-service-theme="magenta"],
  .z-service-hero[data-service-theme="orange"]
) .contact-page--service .contact-page__inner {
  background: transparent;
}

/* ==================================================
   IMAGENS LATERAIS — TEMAS MAGENTA E LARANJA
================================================== */

.z-service-hero[data-service-theme="magenta"] {
  --theme-z-left-width: 40%;
  --theme-z-left-top: -27%;
  --theme-z-left-left: -11%;
  --theme-z-left-rotation: 0deg;

  --theme-z-right-width: 50%;
  --theme-z-right-top: -70%;
  --theme-z-right-right: -28%;
  --theme-z-right-rotation: 0deg;
}

.z-service-hero[data-service-theme="orange"] {
  --theme-z-left-width: 55%;
  --theme-z-left-top: -30%;
  --theme-z-left-left: -20%;
  --theme-z-left-rotation: 0deg;

  --theme-z-right-width: 50%;
  --theme-z-right-top: 30%;
  --theme-z-right-right: -42%;
  --theme-z-right-rotation: 90deg;
}

.z-service-hero:is(
  [data-service-theme="magenta"],
  [data-service-theme="orange"]
) .z-service-hero__decoration--left {
  width: var(--theme-z-left-width);
  top: var(--theme-z-left-top);
  left: var(--theme-z-left-left);
  transform: rotate(var(--theme-z-left-rotation));
}

.z-service-hero:is(
  [data-service-theme="magenta"],
  [data-service-theme="orange"]
) .z-service-hero__decoration--right {
  width: var(--theme-z-right-width);
  top: var(--theme-z-right-top);
  right: var(--theme-z-right-right);
  transform: rotate(var(--theme-z-right-rotation));
}

/* ==================================================
   TABLET — ATÉ 1024px
   Ajustes compartilhados com mobile
================================================== */

@media (max-width: 1024px) {
  .z-service-hero {
    --hero-decoration-width: 210px;

    padding: 72px 24px 64px;
  }

  .z-service-hero__content {
    max-width: 580px;
  }

  .z-service-hero__title {
    font-size: 38px;
  }

  .z-service-hero__description {
    max-width: 520px;
    font-size: 17px;
  }

  /* Imagens do tema padrão */

  .z-service-hero__decoration--left {
    top: -55%;
    left: -50%;
    width: 100%;
    height: 100%;
  }

  .z-service-hero__decoration--right {
    top: -70%;
    right: -65%;
    width: 100%;
    height: 100%;
  }

  /* Tema magenta */

  .z-service-hero[data-service-theme="magenta"] {
    --theme-z-left-width: 100%;
    --theme-z-left-top: -40%;
    --theme-z-left-left: -40%;

    --theme-z-right-width: 100%;
    --theme-z-right-top: -70%;
    --theme-z-right-right: -65%;
  }

  /* Tema laranja */

  .z-service-hero[data-service-theme="orange"] {
    --theme-z-left-width: 100%;
    --theme-z-left-top: -35%;
    --theme-z-left-left: -50%;

    --theme-z-right-width: 100%;
    --theme-z-right-top: 20%;
    --theme-z-right-right: -85%;
  }

  /* Gradiente vertical no contato */

  body:has(
    .z-service-hero[data-service-theme="magenta"],
    .z-service-hero[data-service-theme="orange"]
  ) .contact-page--service {
    background: var(--service-contact-gradient-mobile);
  }
}

/* ==================================================
   MOBILE — ATÉ 767px
================================================== */

@media (max-width: 767px) {
  .z-service-hero {
    --hero-decoration-width: 170px;

    padding: 60px 24px 200px;
  }

  .z-service-hero__content {
    max-width: 440px;
  }

  .z-service-hero__title {
    font-size: clamp(28px, 7.5vw, 34px);
  }

  .z-service-hero__description {
    max-width: 360px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.45;
  }

  .z-service-hero__action {
    margin-top: 26px;
  }

  .z-service-hero .z-service-hero__button {
    padding-inline: 26px;
    font-size: 13px;
  }

  /* Tema padrão: mostra apenas o Z direito. */

  .z-service-hero__decoration--left {
    display: none;
  }

  .z-service-hero__decoration--right {
    top: 32%;
    right: -20%;
    width: 150%;
    height: 120%;
  }

  /* Temas magenta e laranja: mostram apenas o Z esquerdo. */

  .z-service-hero[data-service-theme="magenta"] {
    --theme-z-left-width: 120%;
    --theme-z-left-top: 40%;
    --theme-z-left-left: -10%;
  }

  .z-service-hero[data-service-theme="orange"] {
    --theme-z-left-width: 120%;
    --theme-z-left-top: 50%;
    --theme-z-left-left: -10%;
  }

  .z-service-hero:is(
    [data-service-theme="magenta"],
    [data-service-theme="orange"]
  ) .z-service-hero__decoration--left {
    display: block;
    height: auto;
    right: auto;
    bottom: auto;
  }

  .z-service-hero:is(
    [data-service-theme="magenta"],
    [data-service-theme="orange"]
  ) .z-service-hero__decoration--right {
    display: none;
  }

  /* Gradiente vertical no banner de atuação */

  body:has(
    .z-service-hero[data-service-theme="magenta"],
    .z-service-hero[data-service-theme="orange"]
  ) .z-acting-banner {
    background: var(--service-banner-gradient-mobile);
  }
}

/* ==================================================
   ACESSIBILIDADE — REDUÇÃO DE MOVIMENTO
================================================== */

@media (prefers-reduced-motion: reduce) {
  .z-service-hero .z-service-hero__button {
    transition: none;
  }
}