/* ────────────────────────────────────────────────────────────
   NexusPT — CSS partilhado
   Tokens, reset, navbar, header de página, footer, reveal.
   Carregado antes do <style> específico de cada página.
   ──────────────────────────────────────────────────────────── */

:root{
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #8e8e93;
  --accent: #00f43c;
  --accent-gradient: linear-gradient(135deg, #00f43c, #00c9ff);
  --border: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.06);
  --glass-blur: blur(24px) saturate(160%);
  --nav-blur: blur(60px) saturate(180%);
  --nav-bg: rgba(0,0,0,0.8);
  --ease: cubic-bezier(0.42, 0, 0.58, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;
  --radius: 16px;
  --radius-lg: 24px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:hidden;-webkit-font-smoothing:antialiased}
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
::selection{background: rgba(0,244,60,0.3)}

.wrap{max-width: var(--container); margin: 0 auto; padding: 0 28px}

/* ─── NAVBAR ─── */
.header{
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 0;
  height: 52px;
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.header.scrolled{
  background: var(--nav-bg);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  border-bottom-color: var(--border);
}
.header .wrap{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo{
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo img{height: 26px; display: block}

.nav{display: flex; align-items: center; gap: 2px}
.nav a{
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
  letter-spacing: 0.01em;
}
.nav a:hover{color: var(--text); background: rgba(255,255,255,0.06)}
.nav a.active{color: var(--text)}

.menu-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after{
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  position: relative;
  transition: all 0.3s var(--ease);
}
.menu-toggle span::before,
.menu-toggle span::after{
  content: '';
  position: absolute;
  left: 0;
}
.menu-toggle span::before{top: -5px}
.menu-toggle span::after{top: 5px}
.menu-toggle.active span{background: transparent}
.menu-toggle.active span::before{transform: rotate(45deg); top: 0}
.menu-toggle.active span::after{transform: rotate(-45deg); top: 0}

.mobile-nav{
  display: none;
  position: fixed;
  top: 52px;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: calc(100vh - 52px);
  background: rgba(0,0,0,0.97);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  padding: 32px 28px;
  transition: right 0.5s var(--ease-out);
  z-index: 999;
  border-left: 1px solid var(--border);
}
.mobile-nav.active{right: 0}
.mobile-nav a{
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  font-size: 17px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color 0.3s var(--ease);
}
.mobile-nav a:hover,
.mobile-nav a.active{color: var(--text)}
.mobile-overlay{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 998;
  pointer-events: none;
}
.mobile-overlay.active{
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.client-area{
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  opacity: 0.6;
  transition: opacity 0.3s var(--ease);
}
.client-area:hover{opacity: 1}
.client-area img{width: 20px; height: 20px; display: block}
@media(max-width:768px){.client-area{display:none}}

.scroll-progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  background: var(--accent-gradient);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ─── PAGE HEADER (uniforme em todas as páginas) ─── */
.page-header{
  padding-top: 132px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--border);
}
.page-header h1{
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 640;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.1;
}
.page-header h1 strong,
.page-header h1 span{font-weight: 650}
.page-header h1 span{
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header .header-rule{
  width: 72px;
  height: 2px;
  margin: 0 0 24px;
  background: var(--accent);
  border-radius: 2px;
}
.page-header p{
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 560px;
  line-height: 1.65;
}

/* ─── FOOTER ─── */
.footer{
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  text-align: center;
}
.footer-links{
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.footer-links a{
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s var(--ease);
  letter-spacing: 0.02em;
}
.footer-links a:hover{color: var(--text)}
.footer p{color: var(--text-tertiary); font-size: 12px}

/* ─── SKIP LINK + A11Y ─── */
.skip-link{
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 3000;
  padding: 12px 20px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus{top: 0}

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

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

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

/* ─── CONSENTIMENTO RGPD ─── */
.nx-consent{
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 4000;
  max-width: 400px;
  pointer-events: none;
}
.nx-consent[hidden]{display: none}
.nx-consent-box{
  pointer-events: auto;
  width: 100%;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.nx-consent-title{
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.nx-consent-text{
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.nx-consent-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nx-consent-btn{
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 100px;
  cursor: pointer;
  min-height: 40px;
  transition: all 0.3s var(--ease);
}
.nx-consent-primary{
  background: rgba(0,244,60,0.14);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: var(--accent);
  border: 1px solid rgba(0,244,60,0.3);
}
.nx-consent-primary:hover{background: rgba(0,244,60,0.22)}
.nx-consent-ghost{
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
}
.nx-consent-ghost:hover{background: rgba(255,255,255,0.09)}

.nx-consent-overlay{
  position: fixed;
  inset: 0;
  z-index: 4100;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nx-consent-overlay[hidden]{display: none}
.nx-consent-dialog{
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
  background: rgba(10,10,10,0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.nx-consent-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.nx-consent-h2{
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nx-consent-x{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}
.nx-consent-x:hover{background: rgba(255,255,255,0.12); color: var(--text)}
.nx-consent-item{
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.nx-consent-row{
  display: flex;
  align-items: center;
  gap: 12px;
}
.nx-consent-check{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.nx-consent-label{
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.nx-consent-desc{
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-left: 30px;
}
.nx-consent-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.nx-consent-more{
  color: var(--accent);
  font-size: 13px;
  text-decoration: underline;
}

/* ─── REVEAL ─── */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s var(--ease-out);
}
.reveal.show{
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE (partes partilhadas) ─── */
@media(max-width: 768px){
  .menu-toggle{display: flex}
  .mobile-nav{display: block}
  .mobile-overlay.active{display: block}
  .nav{display: none}
  .page-header{padding-top: 96px; padding-bottom: 48px}
  .footer{padding: 36px 0 20px}
  .footer-links{gap: 20px}
  .nx-consent{left: 12px; right: 12px; bottom: 12px; max-width: none}
  .nx-consent-box{padding: 18px}
  .nx-consent-actions .nx-consent-btn{flex: 1 1 auto}
}
