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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); overflow-x: clip; }
html:not(.lenis) { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.15; margin: 0; }
h1 strong, h2 strong { font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200; padding: 10px 16px;
  background: var(--navy); color: var(--white); font-weight: 600; transform: translateY(-150%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* ===== Tipografia de seção (padrão rnp.br: rótulo 600 + frase grande 400) ===== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.25rem;
  color: var(--text); margin-bottom: 18px; line-height: 1.3;
}
.eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.eyebrow--light { color: var(--white); }
.eyebrow--dark { color: var(--black); }
.eyebrow--dark::before { background: var(--navy); }

.section-title { font-size: var(--fs-h2); font-weight: 400; color: var(--text); max-width: 22ch; }
.section-title--light { color: var(--white); }
.section-lead { font-size: var(--fs-lead); color: var(--text-muted); margin-top: 20px; max-width: 60ch; }
.section-lead--light { color: var(--text-on-dark-muted); }
.section-head { margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { text-align: center; }
.section-head--center .section-title { margin-inline: auto; }

/* ===== Botões (pílula, como rnp.br) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; background: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--white { background: var(--white); color: var(--gray-700); }
.btn--white:hover { background: var(--accent); color: var(--white); }
.btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--accent); }
.btn--outline { color: var(--gray-700); border-color: var(--gray-700); }
.btn--outline:hover { background: var(--gray-700); color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 20px; font-size: .95rem; }

/* ===== Barra de progresso ===== */
.progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 120; pointer-events: none; }
.progress__bar { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ===== Header ===== */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  background: var(--white); color: var(--black); transition: height .3s, box-shadow .3s;
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header.is-scrolled { --header-h: 68px; box-shadow: 0 1px 0 var(--border); }

.logo { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: inherit; }
.logo__text { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1; }
.logo__text strong { font-weight: 700; }
.logo__mark { width: 30px; height: 30px; order: 2; margin-left: 2px; overflow: visible; }
.logo__mark line { stroke: var(--accent); stroke-width: 5; }
.logo__mark circle { fill: var(--accent); }
.logo__mark circle:last-child { transform-origin: 28px 28px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

.nav__list { display: flex; align-items: center; gap: 30px; }
.nav__list a:not(.btn) { position: relative; text-decoration: none; font-weight: 600; font-size: 1.0625rem; }
.nav__list a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav__list a:not(.btn):hover::after,
.nav__list a.is-active::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 960px) {
  .nav__toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border: 0;
    background: transparent; color: inherit; cursor: pointer;
  }
  .nav__burger, .nav__burger::before, .nav__burger::after {
    display: block; width: 24px; height: 2px; background: currentColor;
    transition: transform .25s; position: relative;
  }
  .nav__burger::before, .nav__burger::after { content: ""; position: absolute; left: 0; }
  .nav__burger::before { top: -7px; }
  .nav__burger::after { top: 7px; }
  .nav__toggle[aria-expanded="true"] .nav__burger { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__burger::before { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__burger::after { transform: translateY(-7px) rotate(-45deg); }

  .nav__list {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--white); border-bottom: 4px solid var(--accent);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav__list.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list li a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--accent); }
  .nav__list li a:not(.btn)::after { display: none; }
  .nav__cta-item { margin-top: 18px; }
  .nav__cta-item .btn { width: 100%; }
}

/* ===== Hero: grade de pontos ciano + bloco azul-marinho (rnp.br) ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  background: var(--white); overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 90px;
}
/* fallback sem JS / sem canvas */
.no-js .hero { background: var(--dots-cyan), var(--white); }
.hero__canvas, .contact__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__content { position: relative; z-index: 2; }
.hero__panel {
  max-width: 640px; padding: clamp(32px, 5vw, 60px); background: var(--navy); color: var(--white);
}
.hero__title { font-size: var(--fs-hero); font-weight: 400; color: var(--white); line-height: 1.08; }
.hero__lead { font-size: var(--fs-lead); color: var(--text-on-dark-muted); margin-top: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid var(--navy); border-radius: 20px; background: var(--white);
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--accent); animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ===== Números (faixa ciano, como "Somos a Rede..." em rnp.br) ===== */
.stats { background: var(--cyan); color: var(--black); padding: clamp(48px, 7vw, 80px) 0; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { padding: 8px 12px; border-left: 3px solid var(--navy); }
.stat__value {
  font-family: var(--font-heading); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: 10px; color: var(--black); font-size: 1.05rem; }
@media (max-width: 860px) { .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; } }

/* ===== Serviços (cards brancos retos sobre faixa ciano/azul) ===== */
.services {
  padding: var(--section-y) 0;
  background: linear-gradient(to bottom, var(--gray-100) 0 62%, var(--navy) 62% 100%);
}
.services__head { margin-bottom: 48px; }
.services__track {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
}
/* Rolagem horizontal fixada (ativada via JS no desktop) */
.services.has-hscroll { padding: 0; background: var(--navy); }
.has-hscroll .services__pin {
  background: linear-gradient(to bottom, var(--gray-100) 0 64%, var(--navy) 64% 100%);
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) 0 40px;
}
.has-hscroll .services__head { margin-bottom: clamp(28px, 4vh, 48px); }
.has-hscroll .services__viewport { overflow: hidden; }
.has-hscroll .services__track {
  display: flex; width: max-content; max-width: none; margin: 0;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}
.has-hscroll .service-card { width: min(370px, 80vw); flex-shrink: 0; }

.service-card {
  position: relative; padding: 36px 32px; background: var(--white); border-radius: var(--radius-card);
  border-bottom: 4px solid transparent; transition: border-color .25s, transform .25s;
}
.service-card:hover { border-bottom-color: var(--accent); transform: translateY(-4px); }
.service-card__num {
  position: absolute; top: 28px; right: 30px; font-family: var(--font-heading);
  font-weight: 600; font-size: 1rem; color: var(--accent);
}
.service-card__icon { width: 56px; height: 56px; padding: 11px; margin-bottom: 26px; color: var(--white); background: var(--navy); border-radius: 50%; }
.service-card h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--black); margin-bottom: 12px; }
.service-card p { color: var(--text-muted); font-size: 1rem; }
.service-card--highlight { background: var(--cyan); }
.service-card--highlight:hover { border-bottom-color: var(--navy); }
.service-card--highlight .service-card__num { color: var(--navy); }
.service-card--highlight p { color: var(--black); }
.service-card--highlight .tags li { background: var(--white); color: var(--navy); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li {
  font-size: .85rem; font-weight: 600; padding: 2px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--gray-700); color: var(--gray-700);
}
.service-card--highlight .tags li { border-color: var(--white); }

/* ===== Datacenter IA (bloco azul-marinho) ===== */
.ai { background: var(--navy); color: var(--text-on-dark); padding: var(--section-y) 0; overflow: hidden; }
.ai__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.ai__frame { position: relative; overflow: hidden; aspect-ratio: 8 / 7; }
.ai__frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.ai__list { margin-top: 36px; display: grid; gap: 0; }
.ai__list li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--accent); }
.ai__list strong { font-family: var(--font-heading); font-weight: 600; color: var(--white); font-size: 1.15rem; }
.ai__list span { color: var(--text-on-dark-muted); font-size: 1rem; }
@media (max-width: 900px) { .ai__grid { grid-template-columns: 1fr; } }

/* ===== Método (fundo branco com grade de pontos cinza) ===== */
.method { padding: var(--section-y) 0; background: var(--dots-gray), var(--white); overflow-x: clip; }
.timeline { position: relative; max-width: 920px; margin-inline: auto; }
.timeline__line { position: absolute; left: 50%; top: 0; width: 4px; height: 100%; margin-left: -2px; background: var(--gray-100); overflow: hidden; }
.timeline__fill { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: 50% 0; }
.timeline__list { display: grid; gap: 48px; }
.step { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.step__dot {
  position: absolute; left: 50%; top: 30px; width: 22px; height: 22px; margin-left: -11px;
  border-radius: 50%; background: var(--white); border: 4px solid var(--gray-dots); z-index: 1;
  transition: border-color .4s, background-color .4s, transform .4s;
}
.step.is-active .step__dot { border-color: var(--accent); background: var(--accent); transform: scale(1.15); }
.step__card { grid-column: 1; margin-right: 56px; padding: 28px 30px; background: var(--white); border: 1px solid var(--gray-100); border-top: 4px solid var(--navy); }
.step:nth-child(even) .step__card { grid-column: 2; margin: 0 0 0 56px; }
.step__num { font-size: .95rem; font-weight: 600; color: var(--accent); }
.step__card h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--black); margin: 4px 0 8px; }
.step__card p { color: var(--text-muted); }

@media (max-width: 760px) {
  .timeline__line { left: 11px; }
  .step { grid-template-columns: 1fr; padding-left: 44px; }
  .step__dot { left: 11px; }
  .step__card, .step:nth-child(even) .step__card { grid-column: 1; margin: 0; }
}

/* ===== Treinamentos (cards brancos sobre cinza, como "Casos de uso") ===== */
.training { padding: var(--section-y) 0; background: var(--gray-100); }
.training__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; perspective: 1000px; }
.track-card {
  display: flex; flex-direction: column; overflow: hidden; background: var(--white);
  transform-style: preserve-3d; will-change: transform;
}
.track-card img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.track-card h3 { font-size: 1.2rem; font-weight: 600; color: var(--black); padding: 22px 24px 0; }
.track-card p { color: var(--text-muted); padding: 8px 24px 0; font-size: 1rem; flex: 1; }
.track-card__meta { margin: 18px 24px 24px; font-size: .9rem; font-weight: 600; color: var(--accent); }
@media (max-width: 1024px) { .training__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .training__grid { grid-template-columns: 1fr; } }

/* ===== Transformação ===== */
.transform { padding: var(--section-y) 0; background: var(--white); }
.transform__statement {
  font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  line-height: 1.2; color: var(--black); max-width: 30ch;
}
.transform__statement .word { display: inline-block; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(48px, 7vw, 80px); }
.pillar { padding: 26px 0 0; border-top: 4px solid var(--navy); }
.pillar:nth-child(even) { border-top-color: var(--accent); }
.pillar h3 { font-size: 1.2rem; font-weight: 600; color: var(--black); margin-bottom: 8px; }
.pillar p { color: var(--text-muted); font-size: 1rem; }
@media (max-width: 960px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* ===== Tecnologias (marquee) ===== */
.tech { padding: 32px 0; background: var(--navy); overflow: hidden; }
.marquee { overflow: hidden; }
.marquee__track { display: flex; gap: 40px; width: max-content; }
.marquee__track li {
  display: inline-flex; align-items: center; gap: 40px; white-space: nowrap;
  font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--white);
}
.marquee__track li::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.no-js .marquee__track, .reduced-motion .marquee__track { flex-wrap: wrap; width: auto; justify-content: center; padding-inline: var(--gutter); row-gap: 12px; }

/* ===== Contato (faixa ciano, como "Receba conteúdos" em rnp.br) ===== */
.contact { position: relative; overflow: hidden; background: var(--cyan); color: var(--black); padding: var(--section-y) 0; }
.contact__inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.contact .section-title { max-width: 18ch; }
.contact .section-lead { color: var(--black); }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 40px; }
.contact__link {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  font-family: var(--font-heading); font-weight: 600; font-size: clamp(1.3rem, 4vw, 2.2rem);
  color: var(--white); background: var(--navy); padding: 14px 32px; border-radius: var(--radius-pill);
  transition: background-color .25s, color .25s; word-break: break-all;
}
.contact__link:hover { background: var(--white); color: var(--navy); }
.contact__link .icon { color: var(--accent); }
.contact .btn--outline { border-color: var(--black); color: var(--black); }
.contact .btn--outline:hover { background: var(--black); color: var(--white); }
.contact__status { min-height: 1.7em; margin-top: 14px; color: var(--navy); font-weight: 600; }

/* ===== Rodapé (azul-marinho + barra cinza, como rnp.br) ===== */
.footer { background: var(--navy); color: var(--white); padding: 56px 0 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 48px; }
.logo--light { color: var(--white); }
.footer__links { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); column-gap: 32px; }
.footer__links a { display: block; padding: 6px 0; border-bottom: 1px solid var(--accent); font-weight: 600; font-size: .95rem; text-transform: uppercase; }
.footer a { text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer__contact { display: grid; gap: 4px; font-weight: 600; }
.footer__bottom { background: var(--gray-100); color: var(--gray-700); text-align: center; font-size: .85rem; padding: 12px 0; max-width: none; }
@media (max-width: 700px) { .footer__inner { flex-direction: column; } }

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