/* ==========================================================
   O toque de artista: uma camada por cima do site original, que se tira apagando este ficheiro e
   o arte.js. Tudo respeita prefers-reduced-motion.
   ========================================================== */

/* ---------------------------------------------------------- grão, como papel impresso */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- herói: aurora e constelação */
.hero{ isolation: isolate; }
.aurora{ position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i{
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: aurora-move 24s ease-in-out infinite alternate;
}
.aurora i:nth-child(1){
  width: 46vw; height: 46vw; left: -9vw; top: -15vw; opacity: .55;
  background: radial-gradient(circle, #2a8fc0, transparent 66%);
}
.aurora i:nth-child(2){
  width: 40vw; height: 40vw; right: -8vw; top: 6vh; opacity: .5;
  background: radial-gradient(circle, #43a9dc, transparent 66%);
  animation-duration: 30s; animation-delay: -9s;
}
.aurora i:nth-child(3){
  width: 36vw; height: 36vw; left: 28vw; bottom: -18vw; opacity: .5;
  background: radial-gradient(circle, #1f6f94, transparent 66%);
  animation-duration: 36s; animation-delay: -16s;
}
.constelacao{ position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-copy, .hero-system, .scroll-note{ position: relative; z-index: 2; }
.scroll-note{ position: absolute; }

/* o título sobe linha a linha, como se saísse de uma máscara */
.hero h1 .linha{ display: block; overflow: hidden; padding: .04em 0 .16em; margin-bottom: -.12em; }
.hero h1 .linha > span{ display: block; transform: translateY(112%); }
.hero-copy.visible h1 .linha > span{ animation: linha-sobe 1.1s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero-copy.visible h1 .linha:nth-child(2) > span{ animation-delay: .12s; }
.hero-copy.visible h1 .linha:nth-child(3) > span{ animation-delay: .24s; }

/* a palavra de destaque ganha um brilho que passa devagar */
.hero h1 em{
  background: linear-gradient(100deg, var(--blue) 0%, var(--blue-2) 42%, #fff 50%, var(--blue-2) 58%, var(--blue) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: brilho 8s ease-in-out infinite;
}

/* ---------------------------------------------------------- títulos: um traço à mão sob o destaque */
.section h2 em, .contact h2 em{ position: relative; display: inline-block; }
.section h2 em::after, .contact h2 em::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -.06em;
  height: .16em;
  width: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%2343a9dc' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / auto 100%;
  opacity: .7;
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1) .35s;
}
.visible h2 em::after, h2.visible em::after, .contact-inner.visible h2 em::after{ width: 100%; }

/* ---------------------------------------------------------- holofote que segue o rato */
.holofote{
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 520px;
  height: 520px;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(135,216,247,.13), transparent 62%);
  transition: opacity .5s;
}
.holofote.on{ opacity: 1; }

/* ---------------------------------------------------------- trilho das secções */
.trilho{
  position: fixed;
  z-index: 70;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  padding: 14px 9px;
  background: rgba(8,43,60,.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(3,25,36,.22);
}
.trilho ol{ list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.trilho a{ position: relative; display: grid; place-items: center; width: 22px; height: 22px; }
.trilho a::before{
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  transition: transform .3s, background .3s, border-color .3s, box-shadow .3s;
}
.trilho a[aria-current="true"]::before{
  background: var(--blue-2);
  border-color: var(--blue-2);
  transform: scale(1.5);
  box-shadow: 0 0 12px var(--blue);
}
.trilho a:hover::before, .trilho a:focus-visible::before{ border-color: var(--blue-2); transform: scale(1.35); }
.trilho a:focus-visible{ outline: 2px solid var(--blue-2); outline-offset: 2px; border-radius: 50%; }
.trilho .trilho-t{
  position: absolute;
  right: 34px;
  top: 50%;
  white-space: nowrap;
  padding: 7px 12px;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity .2s, transform .2s;
}
.trilho .trilho-t b{ margin-right: 8px; color: var(--blue-2); font-weight: 600; font-size: .7rem; }
.trilho a:hover .trilho-t, .trilho a:focus-visible .trilho-t{ opacity: 1; transform: translate(0, -50%); }

/* ---------------------------------------------------------- botões magnéticos */
.button, .nav-contact{ transition: transform .28s cubic-bezier(.2, .8, .2, 1), background .25s, color .25s; }

/* ---------------------------------------------------------- faixa dos setores */
.sector-list.faixa{
  display: block;
  overflow: hidden;
  padding: 10px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.faixa__pista{ display: flex; width: max-content; animation: faixa-corre 44s linear infinite; }
.sector-list.faixa:hover .faixa__pista{ animation-play-state: paused; }
.sector-list.faixa span{
  padding: 0 30px 0 0;
  border: 0;
  background: none;
  font: 600 clamp(2.1rem, 4.6vw, 4rem)/1.25 var(--serif);
  letter-spacing: -.035em;
  white-space: nowrap;
  color: var(--ink);
}
.sector-list.faixa span::after{
  content: "✦";
  margin-left: 30px;
  font-family: var(--sans);
  font-size: .4em;
  vertical-align: middle;
  color: var(--blue);
}
.sector-list.faixa span:hover{ background: none; border: 0; color: var(--blue); transform: none; }

/* ---------------------------------------------------------- contacto: o nome em contorno, ao fundo */
.contact{ position: relative; overflow: hidden; }
.contact::before{
  content: "Drilldown";
  position: absolute;
  left: 50%;
  bottom: -.2em;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
  font: 700 clamp(7rem, 23vw, 24rem)/1 var(--serif);
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(135,216,247,.13);
}
.contact-inner, .contact-meta{ position: relative; z-index: 1; }

@keyframes aurora-move{ to{ transform: translate3d(6vw, 5vh, 0) scale(1.2); } }
@keyframes linha-sobe{ to{ transform: none; } }
@keyframes brilho{ 0%, 100%{ background-position: 100% 0; } 50%{ background-position: 0 0; } }
@keyframes faixa-corre{ to{ transform: translateX(-50%); } }

/* o herói ganhou a ligação ao produto, e num ecrã de 800px de altura o texto ficava colado ao logótipo */
@media (min-width: 901px){ .hero{ min-height: 860px; } }
@media (max-width: 1180px){ .trilho{ display: none; } }
@media (max-width: 560px){
  .aurora i{ opacity: .4; }
  .hero h1 .linha{ padding-bottom: .12em; }
}
@media (prefers-reduced-motion: reduce){
  .aurora i, .hero h1 em, .faixa__pista{ animation: none; }
  .hero h1 .linha > span{ transform: none; animation: none; }
  .hero h1 em{ background-position: 50% 0; }
  .section h2 em::after, .contact h2 em::after{ transition: none; }
  .holofote{ display: none; }
}

/* ---------------------------------------------------------- página 404 */
.erro{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px max(6vw, 28px);
  color: #fff;
}
.erro .brand img{ width: 148px; margin-bottom: 46px; }
.erro h1{ font: 600 clamp(3rem, 7vw, 6rem)/.95 var(--serif); letter-spacing: -.04em; margin: 18px 0 22px; }
.erro h1 em{ color: var(--blue); font-style: normal; }
