/* TitusOne — site institucional (PT em /, EN em /en/). Tema único escuro: é a marca. */

@font-face { font-family: Barlow; font-weight: 300; font-display: swap; src: url(fontes/Barlow-300-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-weight: 300; font-display: swap; src: url(fontes/Barlow-300-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fontes/Barlow-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fontes/Barlow-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fontes/Barlow-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fontes/Barlow-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@property --g-olhos { syntax: "<color>"; inherits: true; initial-value: #ff2bd6; }
@property --rev { syntax: "<percentage>"; inherits: false; initial-value: 115%; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  color-scheme: dark;
  --fundo: #05070d;
  --fundo-2: #0a0f1a;
  --borda: #16202d;
  --texto: #eaf6ff;
  --suave: #8696a8;
  --ciano: #19f0ff;
  --magenta: #ff2bd6;
  --violeta: #8a5cff;
  --verde: #3dffa8;
  --ambar: #ffb547;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --larg: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 400 18px/1.55 Barlow, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* grelha de fundo, a apagar-se para as bordas */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(25, 240, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 240, 255, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.envolve { width: min(var(--larg), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }

/* gorila: um sprite, as cores vêm por variáveis. Cada app pinta o seu; os olhos são sempre magenta. */
.gor {
  --g-linha: var(--ciano); --g-escura: var(--fundo); --g-clara: #0c2230; --g-olhos: var(--magenta);
  display: block; overflow: visible;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--g-linha) 55%, transparent));
}
.gor--3d { --g-linha: var(--ambar); --g-clara: #2a1a05; }
.gor--flow { --g-linha: var(--violeta); --g-clara: #140b2a; }
.gor--core { --g-linha: var(--ciano); --g-clara: #0c2230; }
.gor--crm { --g-linha: var(--verde); --g-clara: #062417; }

/* topo */
.topo { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: rgba(5, 7, 13, .72); border-bottom: 1px solid var(--borda); }
.topo .envolve { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.topo .marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.topo .marca .gor { width: 34px; height: 34px; filter: none; }
.topo .marca img { height: 16px; width: auto; }
.linguas { display: flex; gap: 4px; font: 600 13px/1 var(--mono); letter-spacing: .08em; }
.linguas a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--suave); }
.linguas a[aria-current="page"] { color: var(--fundo); background: var(--ciano); }
.linguas a:hover:not([aria-current]) { color: var(--texto); }

/* abertura */
.abertura { position: relative; overflow: hidden; padding: 72px 0 96px; }
.abertura .envolve { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.etiqueta { font: 600 13px/1 var(--mono); letter-spacing: .32em; color: var(--ciano); text-transform: uppercase; margin: 0 0 28px; }
.abertura h1 { margin: 0; }
.nome-grande svg { display: block; width: min(560px, 100%); height: auto; overflow: visible; }
.lead { font-size: clamp(20px, 2.2vw, 26px); font-weight: 300; line-height: 1.4; margin: 32px 0 0; max-width: 30ch; }
.lead strong { font-weight: 600; color: var(--ciano); }
.accoes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; align-items: center; }
.botao {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px;
  font: 600 15px/1 var(--mono); letter-spacing: .06em; text-decoration: none;
  background: var(--ciano); color: var(--fundo);
  box-shadow: 0 0 24px rgba(25, 240, 255, .35);
}
.botao:hover { box-shadow: 0 0 36px rgba(25, 240, 255, .6); }
.subdominios { font: 400 14px/1 var(--mono); color: var(--suave); }
.subdominios b { font-weight: 400; color: var(--texto); }
.gor--heroi { width: min(460px, 100%); height: auto; aspect-ratio: 18 / 17.6; margin-inline: auto; animation: olhar 4.5s ease-in-out infinite; }
.palco { position: relative; }
.palco::before { content: ""; position: absolute; inset: 8% 10%; background: radial-gradient(circle at 50% 42%, rgba(25, 240, 255, .16), rgba(255, 43, 214, .05) 45%, transparent 68%); filter: blur(20px); z-index: -1; }
@keyframes olhar {
  0%, 82%, 100% { --g-olhos: #ff2bd6; }
  86% { --g-olhos: #ffd1f6; }
  90% { --g-olhos: #ff2bd6; }
  93% { --g-olhos: #ffd1f6; }
}

/* secções */
section { padding: 88px 0; border-top: 1px solid var(--borda); }
.titulo { display: flex; align-items: baseline; gap: 16px; margin: 0 0 40px; }
.titulo h2 { margin: 0; font: 300 clamp(28px, 3.4vw, 40px)/1.1 Barlow, sans-serif; letter-spacing: .02em; }
.titulo .n { font: 600 13px/1 var(--mono); color: var(--ciano); letter-spacing: .2em; }

/* apps */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.app {
  position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--borda); border-radius: 20px; padding: 26px 24px 28px;
  background: linear-gradient(180deg, var(--fundo-2), var(--fundo));
  display: flex; flex-direction: column; gap: 14px; min-height: 320px;
}
.app .gor { width: 84px; height: 82px; }
.app .nome { height: 22px; width: auto; margin-top: 8px; }
.app .dom { font: 400 14px/1 var(--mono); color: var(--suave); }
.app p { margin: 0; color: #c3cfdc; font-size: 17px; }
.app .estado { margin-top: auto; align-self: flex-start; font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; border: 1px solid currentColor; }
.app--3d { color: var(--ambar); }
.app--flow { color: var(--violeta); }
.app--core { color: var(--ciano); }
.app--crm { color: var(--verde); }
.app--3d p, .app--flow p, .app--core p, .app--crm p { color: #c3cfdc; }
.app .estado--ativo { background: currentColor; }
.app .estado--ativo span { color: var(--fundo); }
.app a.dom { text-decoration: none; }
.app a.dom:hover { color: var(--texto); text-decoration: underline; }
.app--mais { border-style: dashed; color: var(--suave); justify-content: center; align-items: flex-start; }
.app--mais .mais { font: 300 64px/1 Barlow, sans-serif; color: var(--ciano); }
.app--mais h3 { margin: 0; font: 600 18px/1.2 Barlow, sans-serif; color: var(--texto); }

/* princípios */
.principios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.principio { border-left: 2px solid var(--ciano); padding: 4px 0 4px 22px; }
.principio:nth-child(2) { border-color: var(--magenta); }
.principio:nth-child(3) { border-color: var(--violeta); }
.principio h3 { margin: 0 0 10px; font: 600 20px/1.2 Barlow, sans-serif; }
.principio p { margin: 0; color: #c3cfdc; }

/* rodapé */
.rodape { border-top: 1px solid var(--borda); padding: 40px 0 56px; color: var(--suave); font-size: 15px; }
.rodape .envolve { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.rodape img { height: 14px; width: auto; }

:focus-visible { outline: 2px solid var(--ciano); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 960px) {
  .abertura .envolve { grid-template-columns: minmax(0, 1fr); }
  .palco { order: -1; }
  .gor--heroi { width: min(320px, 78vw); }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principios { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .abertura { padding: 40px 0 64px; }
  section { padding: 64px 0; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .app { min-height: 0; }
  .topo .marca img { height: 13px; }
}


/* ===================== Animações =====================
   Tudo o que esconde conteúdo à espera de animar está debaixo de .js (posto no <head>),
   por isso sem JavaScript o site aparece completo. prefers-reduced-motion desliga tudo. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* rede de nós por trás da abertura (desenhada em site.js) */
.rede {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 60% 45%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 75% at 60% 45%, #000 35%, transparent 80%);
}
.abertura .envolve { position: relative; z-index: 1; }

/* entrada da abertura */
.js .etiqueta { animation: subir .6s .1s cubic-bezier(.2, .7, .2, 1) both; }
.js .nome-grande .t {
  stroke-dasharray: 1 2; stroke-dashoffset: 1; opacity: 0;
  animation: tracar .5s cubic-bezier(.65, 0, .25, 1) forwards;
  animation-delay: calc(.35s + var(--i) * .085s);
}
@keyframes tracar { 0% { opacity: 0; stroke-dashoffset: 1; } 1% { opacity: 1; } 100% { opacity: 1; stroke-dashoffset: 0; } }
.nome-grande .one-halo { opacity: 0; }
.js .nome-grande .one-halo { animation: acender 1.1s 1.55s ease-out forwards, respirar 3.2s 2.65s ease-in-out infinite; }
@keyframes acender { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: .7; } }
@keyframes respirar { 0%, 100% { opacity: .7; } 50% { opacity: .35; } }
html:not(.js) .nome-grande .one-halo { opacity: .7; }
.js .lead { animation: subir .8s 1.15s cubic-bezier(.2, .7, .2, 1) both; }
.js .accoes { animation: subir .8s 1.35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* gorila: varrimento de cima para baixo, depois tilt 3D a seguir o ponteiro */
.gorila-tilt {
  position: relative; width: min(460px, 100%); margin-inline: auto;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--fy, 0px));
  will-change: transform;
}
.gorila-tilt .gor--heroi { width: 100%; }
/* a revelação recorta o embrulho com folga de 25 % (uma máscara no SVG cortava o brilho e as pontas no telemóvel) */
.js .gor--heroi { animation: olhar 4.5s 2.2s ease-in-out infinite; }
.js .gorila-tilt { animation: revelar 1.7s .2s cubic-bezier(.55, 0, .3, 1) both; }
@keyframes revelar { from { clip-path: inset(-25% -25% 100% -25%); } to { clip-path: inset(-25% -25% -25% -25%); } }
.scan {
  position: absolute; left: 4%; right: 4%; top: 0; height: 2px; border-radius: 2px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ciano) 20%, #fff 50%, var(--ciano) 80%, transparent);
  box-shadow: 0 0 12px 2px rgba(25, 240, 255, .8), 0 0 40px 6px rgba(25, 240, 255, .35);
}
.js .scan { animation: varrer 1.7s .2s cubic-bezier(.55, 0, .3, 1) both; }
@keyframes varrer {
  0% { top: 0; opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; }
}
@keyframes olhar {
  0%, 70%, 100% { --g-olhos: #ff2bd6; }
  76% { --g-olhos: #ffe3fa; }
  80% { --g-olhos: #ff2bd6; }
  84% { --g-olhos: #ffe3fa; }
  88% { --g-olhos: #ff2bd6; }
}
.palco::after {
  content: ""; position: absolute; left: 50%; bottom: -6%; width: 70%; height: 14%; translate: -50% 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(25, 240, 255, .35), transparent 70%); filter: blur(12px);
  animation: chao 4s ease-in-out infinite;
}
@keyframes chao { 0%, 100% { opacity: .55; scale: 1; } 50% { opacity: .9; scale: 1.08; } }

/* botão com reflexo */
.botao { position: relative; overflow: hidden; transition: box-shadow .3s, translate .3s; }
.botao::after {
  content: ""; position: absolute; inset: 0; translate: -120% 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%);
}
.botao:hover { translate: 0 -2px; }
.botao:hover::after { translate: 120% 0; transition: translate .7s ease; }

/* faixa a correr com os subdomínios */
.faixa {
  border-top: 1px solid var(--borda); overflow: hidden; padding: 18px 0;
  background: linear-gradient(90deg, rgba(25, 240, 255, .04), rgba(255, 43, 214, .04));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.faixa-trilho {
  display: flex; width: max-content; gap: 28px; align-items: center;
  font: 600 15px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--suave);
  animation: correr 38s linear infinite;
}
.faixa-trilho i { font-style: normal; color: var(--magenta); opacity: .7; }
.faixa-trilho .c-3d { color: var(--ambar); }
.faixa-trilho .c-flow { color: var(--violeta); }
.faixa-trilho .c-core { color: var(--ciano); }
.faixa-trilho .c-crm { color: var(--verde); }
.faixa:hover .faixa-trilho { animation-play-state: paused; }
@keyframes correr { to { transform: translateX(-50%); } }

/* revelação ao fazer scroll (cascata pelo --d que o site.js põe) */
.js .revelar {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 90ms),
              transform .8s cubic-bezier(.2, .7, .2, 1) calc(var(--d, 0) * 90ms),
              translate .3s ease, border-color .3s;
}
.js .revelar.visivel { opacity: 1; transform: none; }

/* cartões: brilho que segue o cursor e borda cónica a rodar */
.app > * { position: relative; z-index: 1; }
.app::before, .app::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 0; }
.app::before { background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, currentColor 17%, transparent), transparent 65%); }
.app::after {
  padding: 1px;
  background: conic-gradient(from var(--ang), transparent 0 55%, currentColor 72%, #fff 76%, currentColor 80%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rodar 2.8s linear infinite; animation-play-state: paused;
}
.app:hover, .app:focus-within { translate: 0 -4px; border-color: color-mix(in srgb, currentColor 30%, var(--borda)); }
.app:hover::before, .app:hover::after, .app:focus-within::before, .app:focus-within::after { opacity: 1; }
.app:hover::after, .app:focus-within::after { animation-play-state: running; }
@keyframes rodar { to { --ang: 360deg; } }
.app .gor { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.app:hover .gor { transform: scale(1.08) rotate(-3deg); }

/* secção do núcleo */
.nucleo-texto { max-width: 56ch; margin: -12px 0 36px; color: #c3cfdc; font-size: clamp(18px, 1.8vw, 21px); font-weight: 300; }
.nucleo-texto strong { color: var(--ciano); font-weight: 600; }
.diagrama { margin: 0; border: 1px solid var(--borda); border-radius: 24px; padding: clamp(8px, 2vw, 24px); background: radial-gradient(ellipse at center, rgba(25, 240, 255, .06), transparent 70%), var(--fundo); }
.diagrama svg { display: block; width: 100%; height: auto; }
.diagrama .base { stroke: var(--c); opacity: .35; }
.diagrama .pulso { stroke: var(--c); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 7 93; stroke-dashoffset: 100; opacity: 0; }
.diagrama .no-app text { font: 700 22px/1 var(--mono); letter-spacing: .12em; fill: #8696a8; }
.diagrama .gor--core { filter: none; }
.diagrama .anel { transform-box: fill-box; transform-origin: center; animation: girar 24s linear infinite; }
.diagrama .anel--2 { animation-duration: 40s; animation-direction: reverse; }
@keyframes girar { to { rotate: 360deg; } }
.js .diagrama .base { stroke-dasharray: 100; stroke-dashoffset: 100; }
.js .diagrama .no-app, .js .diagrama .juncoes { opacity: 0; transition: opacity .6s .9s; }
.js .diagrama.visivel .no-app, .js .diagrama.visivel .juncoes { opacity: 1; }
.js .diagrama.visivel .base { animation: ligar 1.1s .3s cubic-bezier(.65, 0, .25, 1) forwards; }
@keyframes ligar { to { stroke-dashoffset: 0; } }
.diagrama.visivel .pulso, html:not(.js) .diagrama .pulso { opacity: 1; animation: pulsar var(--t) calc(1.4s + var(--a)) linear infinite; }
.diagrama.visivel .pulso.volta { animation-direction: reverse; animation-delay: calc(1.4s + var(--a) + var(--t) / 2); }
@keyframes pulsar { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

@media (max-width: 560px) {
  .faixa-trilho { font-size: 13px; gap: 20px; }
  .nucleo-texto { margin-top: -16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .revelar { opacity: 1; transform: none; }
  .js .gorila-tilt { animation: none !important; clip-path: none; }
  .scan, .rede { display: none; }
  .faixa-trilho { animation: none !important; }
  .diagrama .pulso { opacity: 0 !important; }
  .js .diagrama .base { stroke-dashoffset: 0; }
  .js .diagrama .no-app, .js .diagrama .juncoes { opacity: 1; }
  .gorila-tilt { transform: none; }
}
