/* ==========================================================================
   Base4 Solutions — Landing page
   Estrutura:
   1. Tokens (cores, tipografia, espaçamento)
   2. Base / reset
   3. Utilitários e layout
   4. Componentes (logo, botões, pill, cards…)
   5. Seções
   6. Animações
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  /* Neutros */
  --onix: #0F1115;
  --onix-2: #181B21;
  --linha-escura: #2A2E36;
  --linha-escura-2: #3A3F49;
  --nuvem: #F5F6F8;
  --linha: #DDE0E5;
  --linha-suave: #EEF0F3;
  --branco: #FFFFFF;

  /* Texto */
  --texto: #0F1115;
  --texto-2: #3A4049;
  --texto-suave: #5F6672;
  --texto-escuro-suave: #A9B0BB;
  --texto-escuro: #D4D8DE;

  /* Cores dos pilares */
  --verde: #00D26A;
  /* Financeiro */
  --laranja: #FF5A1F;
  /* Marketing */
  --azul: #2563FF;
  /* Tecnologia */
  --violeta: #8B3DFF;
  /* Estratégico */

  /* Versões para texto (contraste AA) */
  --verde-texto: #007A3E;
  --laranja-texto: #C43D0B;
  --laranja-claro: #FF7A47;
  /* laranja para texto sobre fundo escuro */
  --azul-texto: #2563FF;
  --violeta-texto: #7A2EF0;

  /* Tipografia */
  --fonte: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Escala tipográfica por papel */
  --t-display: clamp(40px, 5.4vw, 76px);
  --t-h2: clamp(30px, 3.6vw, 48px);
  --t-h2-xl: clamp(32px, 4vw, 52px);
  --t-title: 26px;
  --t-sub: 20px;
  --t-body-lg: 17px;
  --t-body: 15px;
  --t-small: 14px;
  --t-label: 13px;

  /* Forma — o "canto quadrante" da marca */
  --raio-q-sm: 6px 16px 6px 6px;
  --raio-q: 6px 22px 6px 6px;
  --raio-q-lg: 6px 28px 6px 6px;

  /* Layout */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --secao-y: clamp(64px, 9vw, 120px);
  --header-h: 84px;
}

/* 2. BASE ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--fonte);
  color: var(--texto);
  background: var(--branco);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

p,
li,
dd {
  text-wrap: pretty;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--branco);
  color: var(--onix);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* 3. LAYOUT ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--secao-y);
}

.section--cloud {
  background: var(--nuvem);
}

.section--dark {
  background: var(--onix);
  color: var(--branco);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 48px;
}

.section__head--split {
  max-width: none;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section__head--split>div {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section__head--split>.lead {
  flex: 1 1 320px;
  max-width: 420px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Tipografia de seção */
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--texto-suave);
}

.section--dark .eyebrow {
  color: var(--texto-escuro-suave);
}

.h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2--xl {
  font-size: var(--t-h2-xl);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.lead {
  font-size: var(--t-body-lg);
  line-height: 1.6;
  color: var(--texto-2);
}

.section--dark .lead {
  color: var(--texto-escuro-suave);
}

/* Palavra em destaque do título: gradiente pelas 4 cores dos pilares, na ordem da marca.
   A cor sólida é o plano B para navegadores sem background-clip: text. */
.text-verde {
  color: var(--verde);
  background: linear-gradient(90deg, rgba(0, 210, 106, 1) 0%, rgba(255, 90, 31, 1) 33%, rgba(37, 99, 255, 1) 66%, rgba(139, 61, 255, 1) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 4. COMPONENTES ----------------------------------------------------------- */

/* Logo: "base4" com "solutions" sempre abaixo, justificado à largura de base4 */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo__symbol {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.logo__word {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.logo__base {
  display: inline-flex;
  align-items: baseline;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.logo__four {
  width: 19px;
  height: 20px;
  margin-left: 2px;
  align-self: center;
  transform: translateY(1px);
}

.logo__solutions {
  display: flex;
  justify-content: space-between;
  padding: 0 1px;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
}

.logo--light .logo__base {
  color: var(--branco);
}

.logo--light .logo__solutions {
  color: var(--texto-escuro-suave);
}

.logo--dark .logo__base {
  color: var(--onix);
}

.logo--dark .logo__solutions {
  color: var(--texto-suave);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--raio-q);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--raio-q-sm);
}

.btn--lg {
  min-height: 54px;
  padding: 0 26px;
}

.btn--block {
  width: 100%;
}

.btn__icon {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--verde);
  color: var(--onix);
}

.btn--primary:hover {
  background: #12E07A;
}

/* Botão branco que revela o gradiente das 4 cores (verde no início, roxo no fim) sob o cursor.
   O main.js (initButtonSpotlight) atualiza --bx e --by (px, relativos ao botão). */
.btn--spotlight {
  --bx: -200;
  --by: -200;
  position: relative;
  isolation: isolate;
  background: var(--branco);
  color: var(--onix);
}

/* A camada de cor sai 1px para fora, sobre a borda, e herda o canto quadrante do botão:
   assim a borda também acende onde o cursor passa. */
.btn--spotlight::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 210, 106, 1) 0%, rgba(255, 90, 31, 1) 33%, rgba(37, 99, 255, 1) 66%, rgba(139, 61, 255, 1) 100%);
  -webkit-mask-image: radial-gradient(circle 110px at calc(var(--bx) * 1px) calc(var(--by) * 1px), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 110px at calc(var(--bx) * 1px) calc(var(--by) * 1px), #000 0%, transparent 100%);
  opacity: 0;
  transition: opacity .25s ease;
}

.btn--spotlight:hover::before {
  opacity: 1;
}

.btn--light {
  background: var(--branco);
  color: var(--onix);
}

.btn--light:hover {
  background: var(--nuvem);
}

.btn--dark {
  background: var(--onix);
  color: var(--branco);
}

.btn--dark:hover {
  background: #22262E;
}

.btn--ghost {
  border-color: var(--linha-escura-2);
  color: var(--branco);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--branco);
}

/* Pill */
.pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--linha-escura);
  border-radius: 999px;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--texto-escuro);
}

.pill__dots {
  display: inline-flex;
  gap: 3px;
}

.pill__dots i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.pill__dots i:nth-child(1) {
  background: var(--verde);
}

.pill__dots i:nth-child(2) {
  background: var(--laranja);
}

.pill__dots i:nth-child(3) {
  background: var(--azul);
}

.pill__dots i:nth-child(4) {
  background: var(--violeta);
}

/* Os 4 quadradinhos pulam um por vez, na ordem dos pilares, e o ciclo recomeça no primeiro */
@media (prefers-reduced-motion: no-preference) {
  .pill__dots i {
    animation: dot-hop 1.6s ease-in-out infinite;
  }

  .pill__dots i:nth-child(2) {
    animation-delay: .4s;
  }

  .pill__dots i:nth-child(3) {
    animation-delay: .8s;
  }

  .pill__dots i:nth-child(4) {
    animation-delay: 1.2s;
  }
}

@keyframes dot-hop {
  0%, 25%, 100% {
    transform: translateY(0);
  }

  12.5% {
    transform: translateY(-5px);
  }
}

/* Faixa 4 cores */
.stripe {
  display: flex;
  height: 8px;
}

.stripe i {
  flex: 1 1 0;
}

.stripe i:nth-child(1) {
  background: var(--verde);
}

.stripe i:nth-child(2) {
  background: var(--laranja);
}

.stripe i:nth-child(3) {
  background: var(--azul);
}

.stripe i:nth-child(4) {
  background: var(--violeta);
}

/* Divisor de rack: faixa de painel entre as seções, com LEDs dos pilares, medidor de leitura e unidade */
.rack {
  /* Sem JS, a faixa aparece cheia. O main.js atualiza --p (0 a 1) e --lit (0 a 4) ao rolar */
  --p: 1;
  --lit: 4;
  background: var(--onix-2);
  border-block: 1px solid var(--linha-escura);
  color: var(--texto-escuro-suave);
}

.rack__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
}

.rack__leds {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}

.rack__leds i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.rack__leds i:nth-child(1) {
  background: var(--verde);
  opacity: clamp(0.2, calc(var(--lit) - 0), 1);
}

.rack__leds i:nth-child(2) {
  background: var(--laranja);
  opacity: clamp(0.2, calc(var(--lit) - 1), 1);
}

.rack__leds i:nth-child(3) {
  background: var(--azul);
  opacity: clamp(0.2, calc(var(--lit) - 2), 1);
}

.rack__leds i:nth-child(4) {
  background: var(--violeta);
  opacity: clamp(0.2, calc(var(--lit) - 3), 1);
}

@media (prefers-reduced-motion: no-preference) {
  .rack__leds i {
    transition: opacity .25s ease;
  }
}

/* Medidor: enche enquanto a faixa sobe pela tela (main.js, initRack) */
/* Os quadrados do medidor são criados pelo main.js (initRack), em número inteiro para a largura da barra.
   Eles dividem o espaço por igual, então o primeiro e o último ficam alinhados às bordas e nenhum é cortado. */
.rack__meter {
  flex: 1 1 auto;
  display: flex;
  gap: 4px;
  height: 8px;
}

.rack__meter i {
  flex: 1 1 0;
  min-width: 0;
  background: var(--linha-escura-2);
}

.rack__meter i.is-on {
  background: var(--branco);
}

/* Sem JS não há quadrados: a barra aparece como uma linha cheia */
.rack__meter:empty {
  background: var(--linha-escura-2);
}

.rack__id {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

/* 5. SEÇÕES ---------------------------------------------------------------- */

/* Cabeçalho */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--onix);
  transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 17, 21, .88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--linha-escura);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}

.nav a:not(.btn) {
  color: var(--texto-escuro);
  text-decoration: none;
  padding: 10px 0;
  position: relative;
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--branco);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav a:not(.btn):hover {
  color: var(--branco);
}

.nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--linha-escura-2);
  border-radius: var(--raio-q-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--branco);
  transition: transform .25s ease, opacity .25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--onix);
    border-bottom: 1px solid var(--linha-escura);
    font-size: 17px;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--linha-escura);
  }

  .nav a:not(.btn)::after {
    display: none;
  }

  .nav .btn {
    margin-top: 16px;
  }
}

/* Hero */
.hero {
  background: var(--onix);
  color: var(--branco);
  overflow: hidden;
}

.hero__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(64px, 9vw, 120px);
}

.hero__copy {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__title {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 58ch;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
  color: var(--texto-escuro-suave);
}

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

.hero__actions .btn {
  border-radius: 6px 20px 6px 6px;
}

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-top: 8px;
  font-size: var(--t-small);
  color: var(--texto-escuro-suave);
}

.hero__proof li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__proof svg {
  width: 16px;
  height: 16px;
  color: var(--verde);
}

/* Mosaico dos 4 pilares (desenho do símbolo) */
.tiles {
  flex: 1 1 400px;
  min-width: 0;
  max-width: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  aspect-ratio: 1 / 1;
  padding: clamp(16px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}

.tile:hover {
  transform: scale(1.03);
}

.tile__num {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.tile__name {
  font-size: clamp(16px, 2.2vw, 26px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tile__line {
  font-size: var(--t-small);
  line-height: 1.4;
}

.tile--1 {
  background: var(--verde);
  color: var(--onix);
  border-radius: 42% 10px 10px 10px;
  justify-content: flex-end;
}

.tile--2 {
  background: var(--laranja);
  color: var(--onix);
  border-radius: 10px 42% 10px 10px;
  justify-content: flex-end;
}

.tile--3 {
  background: var(--azul);
  color: var(--branco);
  border-radius: 10px 10px 10px 42%;
  justify-content: flex-start;
}

.tile--4 {
  background: var(--violeta);
  color: var(--branco);
  border-radius: 10px 10px 42% 10px;
  justify-content: flex-start;
}

/* Montagem do mosaico: a cruz risca o centro, cada cor cresce a partir dele até o seu canto,
   depois os textos sobem. O main.js (initTiles) põe .is-built quando o mosaico entra na tela. */
.tiles {
  position: relative;
}

/* Cada cor cresce como uma miniatura do próprio formato (cantos arredondados desde o início),
   ancorada no canto que se encaixa no centro da cruz. */
.tile--1 {
  --i: 0;
  --origin: 100% 100%;
}

/* ancora no canto inferior direito */
.tile--2 {
  --i: 1;
  --origin: 0 100%;
}

/* inferior esquerdo */
.tile--3 {
  --i: 2;
  --origin: 100% 0;
}

/* superior direito */
.tile--4 {
  --i: 3;
  --origin: 0 0;
}

/* superior esquerdo */

.tiles::before,
.tiles::after {
  content: "";
  position: absolute;
  background: var(--texto-escuro);
  opacity: 0;
  pointer-events: none;
}

.tiles::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
}

.tiles::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  margin-top: -1px;
}

@media (prefers-reduced-motion: no-preference) {

  /* Antes de montar: tudo recolhido no centro. O failsafe revela depois de 4s se o JS não chegar a disparar. */
  .js .tiles:not(.is-built) .tile {
    transform: scale(0);
    transform-origin: var(--origin);
    animation: tile-failsafe .01s linear 4s forwards;
  }

  .js .tiles:not(.is-built) .tile>span {
    opacity: 0;
    animation: tile-failsafe-text .01s linear 4s forwards;
  }

  .tiles.is-built .tile {
    animation: tile-build 1.05s cubic-bezier(.16, 1, .3, 1) backwards;
    animation-delay: calc(.3s + var(--i) * .09s);
  }

  .tiles.is-built .tile>span {
    animation: tile-text .7s cubic-bezier(.16, 1, .3, 1) backwards;
    animation-delay: calc(.95s + var(--i) * .09s);
  }

  .tiles.is-built::before {
    animation: tile-line-v 1.2s cubic-bezier(.65, 0, .35, 1) both;
  }

  .tiles.is-built::after {
    animation: tile-line-h 1.2s cubic-bezier(.65, 0, .35, 1) both;
  }
}

@keyframes tile-build {
  from {
    transform: scale(0);
    transform-origin: var(--origin);
  }

  to {
    transform: scale(1);
    transform-origin: var(--origin);
  }
}

@keyframes tile-text {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tile-line-v {
  0% {
    opacity: 1;
    transform: scaleY(0);
  }

  35% {
    opacity: 1;
    transform: scaleY(1);
  }

  100% {
    opacity: 0;
    transform: scaleY(1);
  }
}

@keyframes tile-line-h {
  0% {
    opacity: 1;
    transform: scaleX(0);
  }

  35% {
    opacity: 1;
    transform: scaleX(1);
  }

  100% {
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes tile-failsafe {
  to {
    transform: none;
  }
}

@keyframes tile-failsafe-text {
  to {
    opacity: 1;
  }
}

/* Hover do mosaico (só mouse): a cor do quadrante sob o cursor inunda os vizinhos, que passam a mostrar
   as frentes do pilar. Os elementos .tile__flood e .tile__info são criados pelo main.js (initTilesHover). */
.tile {
  position: relative;
  isolation: isolate;
}

.tile>span {
  position: relative;
  z-index: 1;
  transition: opacity .25s ease;
}

.tile.is-source {
  z-index: 2;
}

.tile__flood {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: var(--flood, transparent);
  /* Uma só circunferência para o mosaico todo: o centro é o centro do quadrante de origem, visto daqui.
     --dx e --dy dizem quantos quadrantes (colunas e linhas) separam este do de origem; 12px é o gap do .tiles. */
  clip-path: circle(0 at calc(50% + var(--dx, 0) * (100% + 12px)) calc(50% + var(--dy, 0) * (100% + 12px)));
  transition: clip-path .5s cubic-bezier(.5, 0, .75, 0), background-color .3s ease;
  pointer-events: none;
}

.tile.is-flooded .tile__flood {
  /* 240% do lado cobre o quadrante diagonal inteiro a partir do centro da origem */
  clip-path: circle(240% at calc(50% + var(--dx, 0) * (100% + 12px)) calc(50% + var(--dy, 0) * (100% + 12px)));
  transition: clip-path 1s cubic-bezier(.25, .7, .3, 1), background-color .3s ease;
}

.tile.is-flooded>span {
  opacity: 0;
}

.tile__info {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: inherit;
  gap: 6px;
  padding: clamp(16px, 2.4vw, 28px);
  color: var(--flood-ink, var(--onix));
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}

.tile.is-flooded .tile__info {
  opacity: 1;
  transition: opacity .45s ease calc(.4s + var(--d, 0s));
}

.tile__tag {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tile__fname {
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.tile__gloss {
  font-size: var(--t-small);
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .tile__gloss {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .tile__flood,
  .tile__info,
  .tile>span {
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* O desafio */
.pain {
  border: 1px solid var(--linha);
  border-radius: var(--raio-q);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--branco);
  transition: border-color .25s ease, transform .25s ease;
}

.pain:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.pain__bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.pain__title {
  font-size: var(--t-sub);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.pain p {
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--texto-suave);
}

/* Pilares */
.pillar {
  --cor: var(--verde);
  --cor-texto: var(--verde-texto);
  border-radius: var(--raio-q-lg);
  background: var(--branco);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 0 var(--linha);
  transition: transform .25s ease, box-shadow .25s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(15, 17, 21, .35);
}

.pillar--financeiro {
  --cor: var(--verde);
  --cor-texto: var(--verde-texto);
}

.pillar--marketing {
  --cor: var(--laranja);
  --cor-texto: var(--laranja-texto);
}

.pillar--tecnologia {
  --cor: var(--azul);
  --cor-texto: var(--azul-texto);
}

.pillar--estrategico {
  --cor: var(--violeta);
  --cor-texto: var(--violeta-texto);
}

/* Pilares como módulos de rack: uma linha por pilar, em vez de quatro cards iguais */
.grid--rack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid--rack .pillar {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-areas:
    "top name list"
    "top text list";
  column-gap: clamp(20px, 4vw, 48px);
  row-gap: 6px;
  align-items: center;
  padding: 26px clamp(20px, 3vw, 36px);
  border-radius: var(--raio-q);
  box-shadow: none;
  border: 1px solid var(--linha);
}

.grid--rack .pillar:hover {
  transform: translateX(4px);
  /* Linha de 2px na cor do pilar: a borda de 1px mais um anel externo de 1px, sem mexer no layout */
  box-shadow: 0 0 0 1px var(--cor);
  border-color: var(--cor);
}

.grid--rack .pillar__top {
  grid-area: top;
  justify-content: flex-start;
  gap: 16px;
}

.grid--rack .pillar__name {
  grid-area: name;
  align-self: end;
}

.grid--rack .pillar>p {
  grid-area: text;
  align-self: start;
}

.grid--rack .pillar__list {
  grid-area: list;
  padding-top: 0;
  padding-left: clamp(20px, 3vw, 36px);
  border-top: 0;
  border-left: 1px solid var(--linha-suave);
}

@media (max-width: 860px) {
  .grid--rack .pillar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "name" "text" "list";
    align-items: start;
  }

  .grid--rack .pillar__list {
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--linha-suave);
  }
}

.pillar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pillar__shape {
  width: 48px;
  height: 48px;
  fill: var(--cor);
}

.pillar__tag {
  font-size: var(--t-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cor-texto);
}

.pillar__name {
  font-size: var(--t-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.pillar>p {
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--texto-2);
}

.pillar__list {
  padding-top: 18px;
  border-top: 1px solid var(--linha-suave);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--t-body);
  font-weight: 500;
}

.pillar__list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar__list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cor-texto);
  flex: 0 0 auto;
}

/* Como trabalhamos */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--linha);
}

.step {
  padding: 30px 28px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--accent);
}

.step__num {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-texto, var(--accent));
}

.step__title {
  font-size: var(--t-sub);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.step p {
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--texto-suave);
}

/* Planos */
.plan {
  border: 1px solid var(--linha-escura);
  border-radius: var(--raio-q-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: border-color .25s ease, translate .3s ease;
}

/* A levantada usa `translate`, não `transform`: o `transform` do card é controlado pela animação de entrada
   (data-reveal), que impedia o efeito de aparecer. */
.plan:hover {
  border-color: var(--linha-escura-2);
  translate: 0 -6px;
}

@media (prefers-reduced-motion: no-preference) {
  .js .plan[data-reveal] {
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1), translate .3s ease, border-color .25s ease;
    transition-delay: var(--delay, 0s), var(--delay, 0s), 0s, 0s;
  }
}

.plan__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.plan__name {
  font-size: var(--t-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.plan__head p {
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--texto-escuro-suave);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.plan__price strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.plan__price span {
  font-size: var(--t-small);
  color: var(--texto-escuro-suave);
}

.plan__list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--texto-escuro);
}

.plan__list li {
  display: flex;
  gap: 10px;
}

.plan__list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--accent);
}

.plan .btn--ghost {
  border-radius: 6px 18px 6px 6px;
  min-height: 50px;
}

.plan--featured {
  background: var(--branco);
  color: var(--onix);
  border-color: var(--branco);
}

.plan--featured:hover {
  border-color: var(--branco);
}

.plan--featured .plan__head p {
  color: var(--texto-2);
}

.plan--featured .plan__price span {
  color: var(--texto-suave);
}

.plan--featured .plan__list {
  color: var(--texto-2);
}

.plan--featured .btn {
  border-radius: 6px 18px 6px 6px;
  min-height: 50px;
}

.plan--featured .pill__dots i {
  width: 9px;
  height: 9px;
}

/* Planos em degraus: cada card inclui o anterior. O quarto troca o preço por um convite ao contato. */
.plan__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--linha-escura);
}

.plan__includes {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--texto-escuro-suave);
}

.plan__price--contact strong {
  font-size: var(--t-title);
  letter-spacing: -0.025em;
}

/* Spotlight card: o brilho segue o mouse e acende a borda na cor do próprio card.
   O main.js (initGlowCards) atualiza --x e --y (px, relativos ao card) enquanto o mouse se move na seção. */
.glow-card {
  --glow-text: color-mix(in srgb, var(--glow) 62%, white);
  --accent: var(--glow-text);
  --x: -999;
  --y: -999;
  position: relative;
  background-color: rgba(255, 255, 255, 0.035);
  background-image: radial-gradient(
    280px circle at calc(var(--x) * 1px) calc(var(--y) * 1px),
    color-mix(in srgb, var(--glow) 16%, transparent),
    transparent 70%
  );
  background-repeat: no-repeat;
}

.glow-card::before,
.glow-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  background-repeat: no-repeat;
  background-origin: border-box;
  /* Só o anel da borda aparece: borda inteira menos o miolo */
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
}

.glow-card::before {
  background-image: radial-gradient(
    240px circle at calc(var(--x) * 1px) calc(var(--y) * 1px),
    var(--glow),
    transparent 70%
  );
  border-width: 2px;
  inset: -2px;
}

.glow-card::after {
  background-image: radial-gradient(
    110px circle at calc(var(--x) * 1px) calc(var(--y) * 1px),
    color-mix(in srgb, var(--glow) 40%, white),
    transparent 100%
  );
}

/* Sobre */
.about {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.about__main {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__purpose {
  font-size: var(--t-sub);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.about__mv {
  padding-top: 8px;
}

.mv {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 3px solid var(--accent);
}

.mv p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--texto-2);
}

.about__values {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.values {
  border-top: 1px solid var(--linha);
}

.values>div {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--linha);
}

.values dt {
  flex: 0 0 120px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.values dd {
  font-size: 15px;
  line-height: 1.55;
  color: var(--texto-suave);
}

/* Contato */
.contact {
  border-radius: 10px 56px 10px 10px;
  background: var(--onix);
  color: var(--branco);
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.contact__copy {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact__copy .lead {
  color: var(--texto-escuro-suave);
}

.contact__symbol {
  width: 64px;
  height: 64px;
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  font-size: 15px;
  color: var(--texto-escuro);
}

.contact__channels li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact__channels svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--verde);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--texto-escuro);
}

.field input,
.field select {
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--linha-escura-2);
  border-radius: 8px;
  background: var(--onix-2);
  color: var(--branco);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input::placeholder {
  color: #7D8591;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(0, 210, 106, .25);
}

.field.is-invalid input {
  border-color: var(--laranja-claro);
}

.form .btn {
  margin-top: 6px;
  border-radius: 6px 20px 6px 6px;
}

.form .btn[disabled] {
  opacity: .6;
  cursor: progress;
  transform: none;
}

.form__note {
  font-size: 14px;
  color: var(--texto-escuro-suave);
}

.field__hint {
  font-size: var(--t-small);
  line-height: 1.4;
  color: var(--texto-escuro-suave);
}

.field__error {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--laranja-claro);
}

.field__error[hidden],
.plan-chip[hidden] {
  display: none;
}

.plan-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--linha-escura-2);
  border-radius: var(--raio-q-sm);
  background: var(--onix-2);
  font-size: 14px;
  color: var(--texto-escuro);
}

.plan-chip strong {
  color: var(--branco);
}

.plan-chip__remove {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--texto-escuro-suave);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.plan-chip__remove:hover {
  color: var(--branco);
}

.form__status {
  min-height: 1.4em;
  font-size: 14px;
  color: var(--texto-escuro);
}

.form__status a {
  color: var(--branco);
  font-weight: 700;
  text-underline-offset: 3px;
}

.form__status.is-error {
  color: var(--laranja-claro);
}

.form__status.is-success {
  color: var(--verde);
}

/* Rodapé */
.site-footer {
  border-top: 1px solid var(--linha);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 40px;
}

.site-footer .logo__symbol {
  width: 36px;
  height: 36px;
}

.site-footer .logo__base {
  font-size: 25px;
}

.site-footer .logo__four {
  width: 17px;
  height: 18px;
}

.site-footer .logo__solutions {
  font-size: 8.5px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 14px;
}

.site-footer__nav a {
  color: var(--texto-2);
  text-decoration: none;
  padding: 10px 0;
}

.site-footer__nav a:hover {
  color: var(--onix);
}

.site-footer__copy {
  font-size: var(--t-small);
  color: var(--texto-suave);
}

/* Texto claro sobre fundo escuro: um toque a mais de tracking para compensar o brilho */
.hero p,
.hero li,
.section--dark p,
.section--dark li,
.contact p,
.contact li {
  letter-spacing: 0.01em;
}

/* 6. ANIMAÇÕES ------------------------------------------------------------- */
/* Só esconde quando o JS está ativo e o usuário não pediu menos movimento */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
    transition-delay: var(--delay, 0s);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}