/* ═══════════════════════════════════════════════════════════════
   Norfin Tecnologia — landing institucional
   Paleta derivada do manual de marca: navy profundo, azul e aqua.
   Sem build: CSS puro, fontes self-hosted em /fonts.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Outfit';
  src: url('/fonts/outfit.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains.woff2') format('woff2-variations');
  font-weight: 400 500;
  font-display: swap;
}

:root {
  /* marca */
  --navy-900: #050C1A;
  --navy-800: #0A1628;
  --navy-700: #0F1E36;
  --azul:     #2A7BC0;
  --azul-esc: #14357E;
  --aqua:     #4FE3C8;
  --aqua-esc: #1E9FB8;

  --texto:    #E9F0FA;
  --texto-2:  #93A7C4;
  --linha:    rgba(147, 167, 196, .16);
  --linha-2:  rgba(147, 167, 196, .28);

  --grad-marca: linear-gradient(100deg, var(--azul) 0%, var(--aqua-esc) 32%, var(--aqua) 72%);

  --fonte-tit:  'Outfit', ui-sans-serif, sans-serif;
  --fonte-corpo:'Archivo', ui-sans-serif, sans-serif;
  --fonte-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max: 1180px;
  --gut: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

/* Fonte de reserva com o mesmo tamanho visual enquanto a web font carrega
   (modern-web-guidance: visually-stable-font-fallbacks). Vai em todos os elementos, e não
   só no body: `from-font` vira número no elemento onde é declarado e esse número é herdado —
   no body ele mediria a Archivo e aumentaria os títulos em Outfit. */
* { font-size-adjust: from-font; }

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

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--texto);
  font-family: var(--fonte-corpo);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--fonte-tit);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--aqua); color: var(--navy-900); }

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

.pular {
  position: fixed; top: .75rem; left: .75rem; z-index: 200;
  padding: .6rem 1rem; border-radius: 8px;
  background: var(--aqua); color: var(--navy-900);
  font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s;
}
.pular:focus { transform: none; }

/* ─── atmosfera de fundo ─────────────────────────────────────── */

.fundo { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.fundo__grade {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(147,167,196,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(147,167,196,.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 10%, transparent 72%);
}

.fundo__halo {
  position: absolute;
  top: -34vh; right: -18vw;
  width: 78vw; height: 78vw; max-width: 1000px; max-height: 1000px;
  background:
    radial-gradient(circle at 38% 42%, rgba(79,227,200,.20), transparent 58%),
    radial-gradient(circle at 68% 28%, rgba(42,123,192,.24), transparent 62%);
  filter: blur(20px);
}

.fundo__grao {
  position: absolute; inset: 0; opacity: .3; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ─── topo ───────────────────────────────────────────────────── */

.topo {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem);
  padding: 1.05rem var(--gut);
  background: color-mix(in srgb, var(--navy-900) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
@supports (animation-timeline: scroll()) {
  .topo { animation: borda-topo linear both; animation-timeline: scroll(); animation-range: 0 90px; }
  @keyframes borda-topo { to { border-bottom-color: var(--linha); } }
}

.marca { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.marca img { width: auto; height: 30px; }

.topo__nav { display: flex; gap: 1.9rem; font-size: .93rem; }
.topo__nav a {
  text-decoration: none; color: var(--texto-2);
  transition: color .2s;
  position: relative;
}
.topo__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -.4rem; height: 1px;
  background: var(--aqua); transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.topo__nav a:hover { color: var(--texto); }
.topo__nav a:hover::after { transform: scaleX(1); }

@media (max-width: 780px) { .topo__nav { display: none; } }

/* ─── botões ─────────────────────────────────────────────────── */

.botao {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.45rem;
  border-radius: 999px;
  background: var(--aqua);
  color: var(--navy-900);
  font-family: var(--fonte-tit);
  font-size: .98rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(79,227,200,.4);
  transition: box-shadow .3s, transform .2s, background .2s;
}
.botao:hover { transform: translateY(-2px); box-shadow: 0 10px 34px -12px rgba(79,227,200,.85); }
.botao:active { transform: translateY(0); }
.botao svg { transition: transform .25s; }
.botao:hover svg { transform: translateX(3px); }

.botao--sm { padding: .62rem 1.1rem; font-size: .9rem; }
.botao--lg { padding: 1.05rem 2rem; font-size: 1.08rem; }

.botao--fantasma {
  background: transparent; color: var(--texto);
  border: 1px solid var(--linha-2);
  box-shadow: none;
}
.botao--fantasma:hover {
  border-color: var(--aqua); color: var(--aqua);
  box-shadow: none; transform: translateY(-2px);
}

/* ─── tipografia auxiliar ────────────────────────────────────── */

.olho {
  font-family: var(--fonte-mono);
  font-size: .76rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 1.4rem;
}

.secao__titulo {
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem);
  margin-bottom: 1.3rem;
}

/* ─── hero ───────────────────────────────────────────────────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 8rem) var(--gut) clamp(4.5rem, 10vh, 7rem);
}

.hero__titulo {
  font-size: clamp(2.9rem, 1.2rem + 7.4vw, 6.2rem);
  font-weight: 400;
  letter-spacing: -.045em;
  margin-bottom: 2rem;
}
.hero__titulo .linha { display: block; }
.hero__titulo em {
  font-style: normal;
  background: var(--grad-marca);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero__texto {
  max-width: 54ch;
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  color: var(--texto-2);
  margin-bottom: 2.6rem;
}
.hero__texto strong { color: var(--texto); font-weight: 600; }

.hero__acoes { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: clamp(3.5rem, 9vh, 6rem); }

.hero__fatos {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  background: var(--linha);
  border: 1px solid var(--linha);
  border-radius: 14px;
  overflow: hidden;
  margin: 0;
}
.hero__fatos > div { background: var(--navy-900); padding: 1.5rem 1.6rem; }
.hero__fatos dt {
  font-family: var(--fonte-mono);
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--aqua-esc); margin-bottom: .5rem;
}
.hero__fatos dd { margin: 0; font-size: .98rem; color: var(--texto); }

/* entrada escalonada — atrasos no CSS, não em style= inline (a CSP proíbe inline) */
.hero .olho,
.hero .linha,
.hero__texto,
.hero__acoes,
.hero__fatos {
  animation: sobe .85s cubic-bezier(.16,.84,.3,1) both;
  animation-delay: var(--d, 0ms);
}
.hero .olho                     { --d: 0ms; }
.hero__titulo .linha:nth-child(1) { --d: 80ms; }
.hero__titulo .linha:nth-child(2) { --d: 160ms; }
.hero__texto                    { --d: 340ms; }
.hero__acoes                    { --d: 420ms; }
.hero__fatos                    { --d: 520ms; }
@keyframes sobe {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ─── seções ─────────────────────────────────────────────────── */

.secao {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7.5rem) var(--gut);
  border-top: 1px solid var(--linha);
}

.secao__cabeca { max-width: 62ch; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.secao__cabeca .olho { margin-bottom: 1rem; }
.secao__texto { color: var(--texto-2); font-size: 1.08rem; }
.secao__texto em { color: var(--texto); font-style: italic; }

/* painel de três colunas com numeração */
.painel {
  display: grid; gap: clamp(2rem, 4vw, 3.2rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.painel__col { position: relative; padding-top: 2.6rem; }
.painel__col::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: var(--linha-2);
}
.painel__col::after {
  content: ''; position: absolute; top: 0; left: 0; width: 34px; height: 2px;
  background: var(--aqua);
  transition: width .5s cubic-bezier(.2,.8,.3,1);
}
.painel__col:hover::after { width: 100%; }
.painel__num {
  font-family: var(--fonte-mono); font-size: .74rem; letter-spacing: .16em;
  color: var(--texto-2);
  position: absolute; top: 1rem; left: 0;
}
.painel__col h3 { font-size: 1.35rem; margin: .9rem 0 .7rem; }
.painel__col p { color: var(--texto-2); font-size: .99rem; }

/* produtos — com um só, o cartão ocupa a largura toda; com dois ou mais, vira grade */
.apps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}
.app {
  position: relative;
  display: flex; flex-direction: column; gap: 1.8rem;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border: 1px solid var(--linha);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(15,30,54,.9), rgba(10,22,40,.45));
  overflow: hidden;
  transition: border-color .3s;
}
.app::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px circle at 0% 0%, rgba(79,227,200,.09), transparent 62%);
}
.app::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-marca); opacity: .75;
}
.app:hover { border-color: var(--linha-2); }
.app > * { position: relative; }

.app__rotulo {
  font-family: var(--fonte-mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--aqua-esc);
  margin-bottom: .9rem;
}
.app__nome { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: .9rem; }
/* produto com logo: a imagem ocupa o lugar do nome (alt = nome do produto) */
.app__nome img { height: clamp(40px, 30px + 2vw, 54px); width: auto; }
.app__frase { color: var(--texto-2); font-size: 1.04rem; max-width: 46ch; margin-bottom: 1.3rem; }
.app__status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--fonte-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--texto);
  padding: .38rem .75rem; border: 1px solid var(--linha-2); border-radius: 999px;
}
.app__status::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--aqua); box-shadow: 0 0 10px var(--aqua);
}

.app__itens {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  background: var(--linha); border: 1px solid var(--linha); border-radius: 12px; overflow: hidden;
}
.app__itens li {
  display: flex; align-items: baseline; gap: .7rem;
  background: var(--navy-800);
  padding: .85rem 1.1rem;
  font-size: .96rem;
}
.app__itens li::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 1px;
  background: var(--aqua); transform: translateY(-2px) rotate(45deg);
}

.app__link {
  display: inline-flex; align-items: center; gap: .5rem; width: fit-content;
  margin-top: auto;
  font-family: var(--fonte-tit); font-weight: 600; font-size: 1rem;
  color: var(--aqua); text-decoration: none;
}
.app__link svg { transition: transform .25s; }
.app__link:hover svg { transform: translateX(4px); }
.app__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* produto único: cabeça à esquerda, capacidades à direita */
@media (min-width: 900px) {
  .app:only-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "cabeca itens" "link itens";
    column-gap: clamp(2.5rem, 5vw, 4.5rem); row-gap: 1.6rem;
    padding: clamp(2.4rem, 4.5vw, 3.6rem);
  }
  .app:only-child .app__cabeca { grid-area: cabeca; }
  .app:only-child .app__itens  { grid-area: itens; grid-template-columns: 1fr 1fr; align-self: center; }
  .app:only-child .app__link   { grid-area: link; align-self: end; }
}

/* ─── chamada final ──────────────────────────────────────────── */

.chamada {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 8rem) var(--gut);
  text-align: center;
  border-top: 1px solid var(--linha);
}
.chamada__titulo {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.7rem);
  margin-bottom: 1.4rem;
}
.chamada__texto {
  max-width: 50ch; margin: 0 auto 2.4rem;
  color: var(--texto-2); font-size: 1.06rem;
}
.chamada__acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }

/* ─── rodapé ─────────────────────────────────────────────────── */

.rodape {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 4.5rem) var(--gut) 3rem;
  border-top: 1px solid var(--linha);
  display: grid; gap: 2.5rem;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, .7fr));
  font-size: .93rem;
}
@media (max-width: 760px) { .rodape { grid-template-columns: 1fr 1fr; } .rodape__marca { grid-column: 1 / -1; } }

.rodape__marca { display: flex; flex-direction: column; gap: .9rem; }
.rodape__logo { width: 140px; height: auto; }
.rodape__marca p { color: var(--texto-2); max-width: 34ch; }
.rodape__col { display: flex; flex-direction: column; gap: .55rem; }
.rodape__col h4 {
  font-family: var(--fonte-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--texto-2);
  margin-bottom: .35rem;
}
.rodape__col a { color: var(--texto); text-decoration: none; width: fit-content; transition: color .2s; }
.rodape__col a:hover { color: var(--aqua); }

.rodape__legal {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between;
  padding-top: 1.8rem; border-top: 1px solid var(--linha);
  color: var(--texto-2); font-size: .85rem;
}

/* ─── revelação no scroll (progressiva) ──────────────────────── */

@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .revela {
      animation: sobe .8s cubic-bezier(.16,.84,.3,1) both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
