* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brancoTitle: rgba(255, 255, 255, 0.9);
  --brancoText: rgba(255, 255, 255, 0.75);
  --pretoTitle: rgba(0, 0, 0, 0.9);
  --pretoText: rgba(0, 0, 0, 0.75);
  --marcaAzul: #4d6eb5;
  --marcaRoxo: #6c57a2;
  /* --marcaGradiente: linear-gradient(0deg, var(--marcaAzul) 0%, var(--marcaAzul) 100%); */
}

@font-face {
  font-family: "Clash";
  src: url(assets/fonts/ClashDisplay-Bold.ttf);
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url(assets/fonts/ClashDisplay-Medium.ttf);
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url(assets/fonts/ClashDisplay-Regular.ttf);
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url(assets/fonts/ClashDisplay-Light.ttf);
  font-weight: 300;
  font-display: swap;
}

html,
body {
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--brancoTitle);
  background-color: #000000;
}

a {
  color: var(--brancoText);
}

section {
  padding: 4vw;
}

h2 {
  font-size: 3.8vw;
  font-family: "Clash", "Inter", Sans-Serif;
  line-height: 5vw;
  font-weight: 400;
}

.nomeMarca {
  font-family: "Roboto", "Inter", sans-serif;
  font-weight: 900;
}

header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3% 4vw;
  z-index: 9;

  h1 {
    font-size: 24px;
    mix-blend-mode: difference;
  }

  img {
    width: 40px;
    mix-blend-mode: normal;
  }

  .menuHeader {
    display: flex;
    align-items: center;
    gap: 28px;

    a {
      background: none;
      padding: 0;
      color: var(--brancoTitle);
      font-size: 15px;
      font-weight: 500;
      mix-blend-mode: difference;
    }
  }
}

a {
  text-decoration: none;
  border: none;
  outline: none;
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px 8px 20px;
  font-size: 16px;
  gap: 12px;
}

p {
  color: var(--brancoText);
}

.botaoPrimario {
  background-color: var(--brancoTitle);
  color: var(--pretoTitle);
}

.botaoSecundario {
  background-color: var(--pretoTitle);
  color: var(--brancoTitle);
  border: 2px solid rgba(255, 255, 255, 0.205);
  height: 68px;
}

/* PRELOADER */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
  touch-action: none;
  overscroll-behavior: contain;
}

.preloader-bg {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 1;
  will-change: transform;
}

.preloader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  aspect-ratio: 46 / 33;
  transform: translate(-50%, -50%);
  z-index: 2;
  will-change: transform, opacity;
}

.preloader-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.preloader-logo-empty {
  opacity: 0.15;
}

.preloader-logo-fill {
  opacity: 0.95;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}

.preloader-percent {
  position: absolute;
  top: calc(50% + 56px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-family: "Clash", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  z-index: 2;
  will-change: opacity, transform;
}

.logoHeader {
  opacity: 0;
}

@media (max-width: 768px) {
  .preloader-logo {
    width: 88px;
  }
  .preloader-percent {
    top: calc(50% + 44px);
    font-size: 13px;
  }
}

main {
  width: 100%;
  height: 100svh;

  overflow: hidden;
}

.hero {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;

  .midiaBackground {
    &:before {
      content: "";
      width: 100%;
      height: 100%;
      background: linear-gradient(180deg, #000 12.22%, rgba(0, 0, 0, 0) 61.85%);
      position: absolute;
      inset: 0;
      z-index: 1;
    }
  }

  .conteudo {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .cardSubtitulo {
      width: 324px;
      height: 49px;
      position: relative;
      border-radius: 40px;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;

      &:before {
        content: "";
        width: 100%;
        height: 100%;
        background-color: #1a0b0162;
        position: absolute;
        z-index: 1;
        border-radius: 40px;
        box-shadow:
          -1px -2px 0 0 rgba(255, 216, 194, 0.2) inset,
          1px 2px 0 0 rgba(255, 216, 194, 0.2) inset;
      }

      h3 {
        position: relative;
        z-index: 2;
        font-size: 14px;
        color: rgb(223, 223, 223);
        mix-blend-mode: color-dodge;
        font-weight: 500;
      }
    }

    h2 {
      margin: 3.5vw 0 2vw;
      width: 74vw;
      text-align: center;
    }

    p {
      font-size: clamp(16px, 1.1vw, 24px);
      line-height: 160%;
      text-align: center;
      width: 53vw;
      margin-bottom: 40px;
    }
  }

  .transition {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    display: flex;
    pointer-events: none;

    div {
      width: 100%;
      height: 100%;
      background-color: #000000;
      /* border-left: 1px solid #dc9a0b25; */
    }
  }
}

.midiaBackground {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: var(--marcaGradiente);
  overflow: hidden;

  img,
  video {
    width: 100%;

    object-fit: cover;
    object-position: center;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
  }
}

.moleculaCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.botoes {
  display: flex;
  gap: 32px;
}

.textoTransicao {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4vw;
  pointer-events: none;

  p {
    font-size: 5vw;
  }
}

.projetos {
  width: 100%;
  padding: 0;
  background-color: #000;
  position: relative;
  z-index: 3;
  margin-top: -1px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4vw;

  a {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .titulo {
    display: flex;
    flex-direction: column;
    align-items: center;

    h2 {
      margin-bottom: 12px;
    }
  }

  .projeto {
    width: 60%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6vw;
  }
  img {
    width: 100vw;
    object-fit: cover;
    filter: saturate(0);
  }
}

.div3d {
  margin-top: -1px;
  padding: 0;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(0, 0, 0);

  canvas {
    position: absolute;
    height: 100% !important;
  }

  h2 {
    position: absolute;
    font-size: 12vw;
  }
}

.animations {
  width: 100%;
  height: 100svh;
  position: relative;
}

footer {
  width: 100%;
  height: 100%;
  display: flex;
  padding: 4vw;
  position: absolute;
  align-items: end;
  gap: 32px;
  z-index: 9;
  top: 0;
  left: 0;
  background-color: #000;

  .midiaBackground {
    img,
    video {
      top: 0;
    }
  }

  .webhubFooter,
  .conteudo {
    position: relative;
    width: 50%;
  }

  .webhubFooter {
    display: flex;
    flex-direction: column;

    h2 {
      font-size: calc(9vw - 25px);
      line-height: 11vw;
    }

    .footerContato {
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin: 16px 0;

      p {
        font-size: 14px;
      }
    }

    div {
      display: flex;
      gap: 20px;
    }
  }
  .conteudo {
    display: flex;
    flex-direction: column;
    align-items: end;
    h2 {
      text-align: start;
      font-size: 3vw;
      line-height: 3.2vw;
      text-align: end;
      margin-bottom: clamp(32px, 2vw, 2vw);
    }
  }
}

@media (max-width: 1385px) {
  .hero {
    .conteudo {
      p {
        width: 733px;
      }
    }
  }
}

@media (max-width: 1250px) {
  footer {
    .webhubFooter {
      div {
        p {
          font-size: 14px;
        }
      }
    }
  }
}

@media (max-width: 1200px) {
  .hero {
    .conteudo {
      h2 {
        width: 100%;
        font-size: 4.5vw;
      }
    }
  }

  footer {
    .webhubFooter {
      div {
        flex-direction: column;
      }
    }
  }
}

@media (max-width: 1140px) {
  footer {
    .conteudo {
      width: 600px;
    }
  }
}

@media (max-width: 1004px) {
  footer {
    flex-direction: column;
    justify-content: end;
    align-items: center;
    gap: 80px;
    padding: 80px 20px;
    .conteudo {
      align-items: center;
      width: 100%;
      h2 {
        text-align: center;
      }
    }

    .webhubFooter {
      order: 2;

      div {
        align-items: center;
      }
    }
  }

  .webhubFooter,
  .conteudo {
    justify-content: center;
    align-items: center;
  }
}

@media (max-width: 900px) {
  .hero .conteudo {
    width: 100%;
  }
  .hero .conteudo p {
    width: 100%;
  }
  h2,
  .hero .conteudo h2,
  footer .conteudo h2 {
    font-size: 6.4vw;
    line-height: 7vw;
  }
}

@media (max-width: 600px) {
  header {
    padding: 32px 4vw;
  }
  a {
    width: 238px;
  }
  h2,
  .hero .conteudo h2,
  footer .conteudo h2 {
    font-size: 6.2vw;
    line-height: 7.4vw;
  }
  .botoes {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }

  .hero {
    padding: 40px 4vw 4vw;

    .conteudo {
      align-items: center;

      .cardSubtitulo {
        margin: auto;
      }

      h2,
      p {
        text-align: center;
      }

      h2 {
        margin: 32px 0px 20px;
      }

      p {
        margin-bottom: 28px;
      }
    }

    .midiaBackground {
      width: 220vw;
      right: 0;
      left: auto;
    }

    .transition {
      div:nth-child(6),
      div:nth-child(7),
      div:nth-child(8),
      div:nth-child(9),
      div:nth-child(10),
      div:nth-child(11) {
        display: none;
      }
    }
  }
  .textoTransicao {
    p {
      font-size: 7vw;
      width: 100%;
    }
  }

  .projetos {
    .titulo {
      padding: 0 4vw;
    }

    h2 {
      font-size: 8vw;
    }

    p {
      text-align: center;
      margin-bottom: 20px;
    }
  }

  footer {
    gap: 40px;
    .conteudo {
      align-items: start;
      h2 {
        font-size: 9.2vw;
        line-height: 10vw;
        text-align: start;
      }
    }

    .midiaBackground {
      width: 220vw;

      left: 0%;
    }

    .webhubFooter {
      width: 100%;
      h2 {
        font-size: calc(21vw - 25px);
        line-height: 22vw;
      }

      div {
        margin-top: 8px;
        gap: 4px;
      }
    }
  }
}

@media (max-height: 670px) {
  .hero {
    h2 {
      display: none;
    }

    p {
      margin-top: 32px;
    }
  }
}

@media (max-height: 600px) {
  .hero {
    h2 {
      display: none;
    }

    p {
      margin-top: 32px;
    }

    .botaoSecundario {
      display: none;
    }
  }

  footer {
    .webhubFooter {
      display: none;
    }
  }
}

@media (max-width: 350px) {
  .hero {
    & .conteudo {
      & .cardSubtitulo {
        width: 100%;
      }
    }
  }
}


/* ---------------------------------------------------------------
   CARROSSEL DE PRODUTOS
--------------------------------------------------------------- */
.produtosCarrossel {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6vh 4vw 0vh 7vw;
  background-color: #000;
  overflow: hidden;
  z-index: 4;
}

.produtosCarrossel-rotulo {
  position: absolute;
  left: 4vw;
  bottom: 14vh;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 11px;
  color: var(--brancoText);
}

.produtosCarrossel-janela {
  position: relative;
  overflow: hidden;
  cursor: none;
}

.produtosCarrossel-pista {
  display: flex;
  gap: 2vw;
  /* largura da janela: e o 45% dos cartoes resolve contra ela.
     Com max-content a percentagem media-se a si propria e rebentava. */
  width: 100%;
  will-change: transform;
}

/* o cartão pedido: 45% da largura da janela, mais 15px */
.produtoSlide {
  flex: 0 0 calc(45% + 15px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* mesma altura e largura em todos os cartoes, independente da imagem */
.produtoSlide-imagem {
  display: block;
  width: 100%;
  height: 52vh;
  overflow: hidden;
  border-radius: 4px;
}

.produtoSlide-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: saturate(0.9);
}

.produtoSlide-imagem--jogos img {
  object-fit: contain;
  background: #fff;
}

.produtoSlide-imagem:hover img {
  transform: scale(1.03);
  filter: saturate(1);
}

.produtoSlide-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--brancoText);
}



.produtoSlide-preco {
  font-size: clamp(18px, 1.8vw, 26px);
  color: var(--brancoTitle);
}

.produtoSlide-preco strong {
  color: var(--marcaAzul);
  font-weight: 500;
  margin: 0 6px;
}

.produtoSlide-preco span {
  font-size: 0.7em;
  color: var(--brancoText);
}

/* o preco anual numa segunda linha, mais discreto */
.produtoSlide-ano {
  display: block;
  margin-top: 4px;
  font-size: 0.52em;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* cursor de arrasto que segue o rato dentro da janela */
.produtosCarrossel-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

.produtosCarrossel-janela:hover .produtosCarrossel-cursor {
  opacity: 1;
  transform: scale(1);
}

.produtosCarrossel-controlos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

.produtosCarrossel-contador {
  font-size: 13px;
  font-style: normal;
  color: var(--brancoText);
  margin-right: 8px;
}

.produtosCarrossel-contador em {
  font-style: normal;
  color: var(--brancoTitle);
}

.produtosCarrossel-contador i {
  font-style: normal;
}

.produtosCarrossel-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: transparent;
  color: var(--brancoTitle);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    opacity 0.25s ease;
}

.produtosCarrossel-btn:hover:not(:disabled) {
  background-color: var(--marcaAzul);
  border-color: var(--marcaAzul);
}

.produtosCarrossel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 1004px) {
  .produtosCarrossel {
    padding: 8vh 4vw 10vh 10vw;
  }

  .produtoSlide {
    flex: 0 0 72%;
  }

  .produtosCarrossel-janela {
    cursor: grab;
  }

  .produtosCarrossel-cursor {
    display: none;
  }
}

@media (max-width: 600px) {
  .produtoSlide {
    flex: 0 0 86%;
  }

  .produtosCarrossel-rotulo {
    display: none;
  }
}

/* enquanto o scroll horizontal esta activo o cursor normal desaparece */
.produtosCarrossel-janela {
  touch-action: pan-y;
}

@media (max-width: 1004px) {
  .produtosCarrossel {
    padding: 8vh 4vw 10vh 10vw;
  }

  .produtoSlide-imagem {
    height: 42vh;
  }
}

/* ---------------------------------------------------------------
   INTRO "PRODUTOS & SERVIÇOS" — mesmo molde da página de produtos
--------------------------------------------------------------- */
.produtosIntroHome {
  width: 100%;
  background-color: #000;
  padding: 16vh 4vw 6vh 7vw;
  position: relative;
  z-index: 4;
}

.produtosIntroHome h2 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin-bottom: 16px;
  color: var(--brancoTitle);
  max-width: 46rem;
}

.produtosIntroHome p {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 160%;
  color: var(--brancoText);
  max-width: 46rem;
}

@media (max-width: 1004px) {
  .produtosIntroHome {
    padding: 12vh 4vw 4vh 10vw;
  }
}

/* Sem pin (ecrã estreito ou movimento reduzido) a janela passa a
   deslizar à mão, senão os cartões ficavam inacessíveis. */
@media (prefers-reduced-motion: reduce) {
  .produtosCarrossel-janela {
    overflow-x: auto;
  }

  .produtosCarrossel-controlos {
    display: none;
  }
}

/* ---------------------------------------------------------------
   DESCRICAO SOBRE O CARTAO (hover)
--------------------------------------------------------------- */
/* contentor da imagem: a descricao sobrepoe-se aqui */
.produtoSlide-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

/* A descricao vive sempre no HTML (o Google le-a). Fica invisivel por
   opacidade, nao por display:none, para poder animar no hover. */
.produtoSlide-detalhe {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 8% 9%;
  /* opaco: no hover ve-se o conteudo, nao a imagem */
  background-color: #0c0c10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  pointer-events: none; /* o clique continua a chegar ao botao por baixo */
}

.produtoSlide-media:hover .produtoSlide-detalhe,
.produtoSlide-imagem:focus-visible + .produtoSlide-detalhe {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.produtoSlide-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--marcaAzul);
}

.produtoSlide-detalhe ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.produtoSlide-detalhe li {
  position: relative;
  padding-left: 20px;
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.45;
  color: var(--brancoTitle);
}

.produtoSlide-detalhe li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--marcaAzul);
}

/* sem hover (telemovel) a descricao nao aparece: fica o clique, que abre a ficha */
@media (hover: none) {
  .produtoSlide-detalhe {
    display: none;
  }
}
