/* ===== RESET & BASE ===== */
html {
  scroll-behavior: smooth;
  background: #07080B;
}

body {
  overflow-x: hidden;
  background-color: #07080B;
  color: #F7F8FA;
  font-family: 'Satoshi', 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Aurora global */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 40% at 85% 15%, rgba(124, 140, 255, 0.13), transparent 70%),
    radial-gradient(40% 35% at 10% 85%, rgba(56, 225, 245, 0.11), transparent 70%),
    radial-gradient(30% 30% at 50% 50%, rgba(56, 225, 245, 0.04), transparent 70%);
  animation: aurora 26s ease-in-out infinite alternate;
}

@keyframes aurora {
  to {
    transform: translate3d(-4%, 3%, 0) scale(1.08);
  }
}

::selection {
  background: #38E1F5;
  color: #07080B;
}

/* ===== BACKGROUND NETWORK ===== */
#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#net.off {
  opacity: 0;
}

main,
footer {
  position: relative;
  z-index: 1;
}

/* ===== CLICK / TAP RIPPLE ===== */
.ripple {
  position: fixed;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 80;
  background: radial-gradient(circle, transparent 58%, rgba(56, 225, 245, 0.55) 63%, transparent 69%);
  transform: scale(0.05);
  animation: ripple 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 58%, rgba(124, 140, 255, 0.45) 63%, transparent 69%);
  transform: scale(0.6);
}

@keyframes ripple {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ===== PROGRESS BAR ===== */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 70;
  background: linear-gradient(90deg, #38E1F5, #7C8CFF);
}

/* ===== HEADER ===== */
#header {
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

#header.sc {
  background: rgba(7, 8, 11, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-color: #1A1E26;
}

.nl {
  color: #9EA6B4;
  transition: color 0.2s;
}

.nl:hover,
.nl.act {
  color: #fff;
}

/* ===== LABELS ===== */
.lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #7A8292;
  text-transform: uppercase;
}

.lbl b {
  color: #38E1F5;
  font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn-p {
  background: linear-gradient(180deg, #fff, #DDE2EA);
  color: #07080B;
  box-shadow: 0 0 0 1px #ffffff30, 0 10px 40px -10px #38E1F580;
  text-shadow: none !important;
}

.btn-g {
  border: 1px solid #242932;
  background: #0B0D12b3;
  color: #fff;
  transition: border-color 0.2s;
  text-shadow: none !important;
}

.btn-p *,
.btn-g * {
  text-shadow: none !important;
}

.btn-g:hover {
  border-color: #5A6170;
}

/* ===== CARDS ===== */
.card {
  position: relative;
  border: 1px solid #1A1E26;
  border-radius: 1.5rem;
  background: #0C0E13d9;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.3s;
}

.card:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--x, -50%) var(--y, -50%), rgba(56, 225, 245, 0.09), transparent 40%);
}

.card:hover {
  border-color: #3A404C;
}

/* ===== FORM CARD — BORDA NEON ANIMADA ===== */
.form-neon {
  position: relative;
  border-radius: 1.5rem;
  border-color: transparent;
  overflow: hidden;
  isolation: isolate;
}

.form-neon:hover {
  border-color: transparent;
}

/* Feixe neon giratório */
.form-neon::before {
  content: "";
  position: absolute;
  inset: -150%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    transparent 40%,
    #38E1F5 45%,
    #7C8CFF 50%,
    transparent 55%,
    transparent 100%
  );
  animation: neon-spin 4s linear infinite;
  z-index: -2;
}

@keyframes neon-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Fundo do próprio formulário (deixa 2px visíveis = borda neon) */
.form-neon::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #0C0E13;
  border-radius: calc(1.5rem - 2px);
  pointer-events: none;
  z-index: -1;
}

/* ===== ANIMATIONS ===== */
.fi {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fi.on {
  opacity: 1;
  transform: none;
}

#title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(8px);
  transition: opacity 0.7s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s;
}

#title .w.on {
  opacity: 1;
  transform: none;
  filter: none;
}

.acc,
#title .w.acc {
  background: linear-gradient(90deg, #38E1F5, #7C8CFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none !important;
  display: inline-block;
}

.mw {
  color: rgba(238, 241, 246, 0.28);
  transition: color 0.4s;
}

.mw.on {
  color: #EEF1F6;
}

.rv {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.rv.in {
  opacity: 1;
  transform: none;
}

/* ===== MARQUEE ===== */
.mq {
  display: flex;
  width: max-content;
  animation: mq 40s linear infinite;
}

.mq.rev {
  animation-direction: reverse;
}

@keyframes mq {
  to {
    transform: translateX(-50%);
  }
}

.mask-x {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* ===== LOGOS / ICONS ===== */
.logoimg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* ===== BAR CHART ANIMATION ===== */
.bar {
  transform-origin: bottom;
  animation: bar 2.2s ease-in-out infinite alternate;
}

@keyframes bar {
  from {
    transform: scaleY(0.45);
  }
  to {
    transform: scaleY(1);
  }
}

/* ===== POP / DOTS / FLOW ===== */
.pop {
  animation: pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

.dot {
  display: inline-block;
  margin: 0 1px;
  font-size: 9px;
  animation: dot 1s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.15s;
}

.dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes dot {
  50% {
    opacity: 0.2;
  }
}

.flow {
  stroke-dasharray: 4 6;
  animation: flow 1.2s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -20;
  }
}

/* ===== GRID BACKGROUND ===== */
.grid-bg {
  background-image:
    linear-gradient(#ffffff09 1px, transparent 1px),
    linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ===== SECTION BACKGROUND VARIATIONS ===== */
.bg-dots,
.bg-grid-subtle,
.bg-lines,
.bg-circuit,
.bg-particles,
.bg-radial,
.bg-waves {
  position: relative;
}

.bg-dots::before,
.bg-grid-subtle::before,
.bg-lines::before,
.bg-circuit::before,
.bg-particles::before,
.bg-radial::before,
.bg-waves::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-dots > *,
.bg-grid-subtle > *,
.bg-lines > *,
.bg-circuit > *,
.bg-particles > *,
.bg-radial > *,
.bg-waves > * {
  position: relative;
  z-index: 1;
}

.bg-dots::before {
  background-image: radial-gradient(circle, rgba(56, 225, 245, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.bg-grid-subtle::before {
  background-image:
    linear-gradient(rgba(56, 225, 245, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 225, 245, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.bg-lines::before {
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 59px,
    rgba(124, 140, 255, 0.1) 59px,
    rgba(124, 140, 255, 0.1) 60px
  );
  background-size: 100% 60px;
  animation: lines-scroll 20s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
}

@keyframes lines-scroll {
  to {
    background-position: 0 60px;
  }
}

.bg-circuit::before {
  background:
    radial-gradient(circle at 20% 50%, rgba(56, 225, 245, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(124, 140, 255, 0.1) 0%, transparent 50%);
}

.bg-particles::before {
  background:
    radial-gradient(circle at 15% 25%, rgba(56, 225, 245, 0.18) 0%, transparent 2%),
    radial-gradient(circle at 85% 75%, rgba(124, 140, 255, 0.18) 0%, transparent 2%),
    radial-gradient(circle at 45% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 1.5%),
    radial-gradient(circle at 70% 40%, rgba(56, 225, 245, 0.15) 0%, transparent 1.5%),
    radial-gradient(circle at 25% 80%, rgba(124, 140, 255, 0.15) 0%, transparent 2%);
  background-size: 120% 120%;
  animation: particles-drift 15s ease-in-out infinite alternate;
}

@keyframes particles-drift {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 100% 100%;
  }
}

.bg-radial::before {
  background: radial-gradient(ellipse at 30% 50%, rgba(56, 225, 245, 0.08) 0%, transparent 60%);
}

.bg-waves::before {
  background:
    radial-gradient(ellipse at 0% 100%, rgba(56, 225, 245, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(124, 140, 255, 0.12) 0%, transparent 50%);
}

/* ===== ARQUITETURA: horizontal no desktop, vertical no mobile/tablet ===== */
#arquitetura svg {
  display: block;
  height: auto;
}

#arquitetura .arch-h {
  display: none;
}

#arquitetura .arch-v {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  #arquitetura .arch-h {
    display: block;
    width: 100%;
  }

  #arquitetura .arch-v {
    display: none;
  }
}

/* ===== FAQ ===== */
details[open] .chev {
  transform: rotate(45deg);
}

summary::-webkit-details-marker {
  display: none;
}

/* ===== FORM INPUTS ===== */
.inp {
  width: 100%;
  border: 1px solid #242932;
  background: #07080B;
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.inp:focus {
  border-color: #38E1F5;
  box-shadow: 0 0 0 3px rgba(56, 225, 245, 0.15);
}

.inp::placeholder {
  color: #5A6170;
}

select.inp option {
  background: #0B0D12;
}

/* ===== FORM ENTRANCE ===== */
.form-entrance {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-entrance.visible {
  opacity: 1;
  transform: none;
}

/* ===== WHATSAPP FLOAT ===== */
.wa {
  box-shadow: 0 10px 30px -5px #25D36680;
  transition: opacity 0.3s, transform 0.3s;
}

/* ===== HERO LAYOUT ===== */
#hero {
  position: relative;
  height: 185vh;
  --logo-zone: 0.38;
}

#hero > .sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}

@media (min-width: 1024px) {
  #hero {
    height: 185vh;
  }
}

#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: pan-y;
}

#gl canvas {
  display: block;
}

#fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 0;
}

#fallback.show {
  display: flex;
}

#fallback svg {
  width: 9rem;
  opacity: 0.85;
}

@media (min-width: 1024px) {
  #fallback {
    justify-content: flex-end;
    padding-right: 12%;
  }

  #fallback svg {
    width: 18rem;
  }
}

#heroContent {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  min-height: 100svh;
  padding-top: 7rem;
  padding-bottom: 3rem;
  background: none;
}

#heroContent .content-box {
  width: 100%;
  max-width: 42rem;
}

#heroContent #title .w:not(.acc),
#heroContent .content-box > p:not(#title) {
  text-shadow: 0 2px 18px rgba(7, 8, 11, 0.85);
}

#hero:not(.ready) #heroContent .content-box,
#hero:not(.ready) #hint {
  visibility: hidden;
  pointer-events: none;
}

@media (min-width: 1024px) {
  #heroContent {
    align-items: center;
    padding-top: 7.5rem;
    padding-bottom: 3rem;
  }
}

#title {
  font-size: 2rem;
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
}

@media (min-width: 640px) {
  #title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  #title {
    font-size: 3.5rem;
    line-height: 1.08;
  }
}

@media (min-width: 1280px) {
  #title {
    font-size: 4rem;
  }
}

/* ===== HERO MOBILE / TABLET ===== */
@media (max-width: 1023px) {
  #hero {
    height: 165svh;
  }

  #heroContent {
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    height: 100svh;
    min-height: 0;
    padding-top: calc(var(--logo-zone) * 100svh);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(1.25rem, 3.5svh, 2.5rem));
  }

  #heroContent .content-box {
    max-width: 36rem;
  }

  #heroContent #title .w:not(.acc),
  #heroContent .content-box > p:not(#title) {
    text-shadow: 0 2px 14px rgba(7, 8, 11, 0.95), 0 0 2px rgba(7, 8, 11, 0.8);
  }

  #heroContent .content-box > * + * {
    margin-top: clamp(0.75rem, 2.2svh, 1.75rem) !important;
  }

  #title {
    font-size: clamp(1.6rem, min(8.6vw, 4.6svh), 3rem);
    line-height: 1.08;
  }

  #heroContent .content-box > p:not(#title) {
    font-size: clamp(0.875rem, 2.1svh, 1.0625rem);
    line-height: 1.5;
    color: #C3C9D4;
  }

  #heroContent .btn-p,
  #heroContent .btn-g {
    padding-top: clamp(0.7rem, 1.7svh, 1rem);
    padding-bottom: clamp(0.7rem, 1.7svh, 1rem);
  }

  #fallback,
  #fallback.show {
    bottom: auto;
    height: calc(var(--logo-zone) * 100svh);
    padding-top: 4rem;
  }
}

@media (max-width: 1023px) and (max-height: 720px) {
  #hero {
    --logo-zone: 0.33;
  }
}

@media (max-width: 1023px) and (max-height: 600px) {
  #hero {
    --logo-zone: 0.28;
  }
}

/* ===== HINT ===== */
#hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 20;
}

@media (min-width: 1024px) {
  #hint {
    display: flex;
  }
}

/* ===== BADGES (O que entregamos) ===== */
#badges > div {
  min-width: 0;
}

#badges p {
  overflow-wrap: anywhere;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .fi,
  .rv,
  .form-entrance,
  #title .w {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .ripple {
    display: none;
  }

  /* Borda neon estática */
  .form-neon::before {
    inset: 0;
    background: linear-gradient(90deg, #38E1F5, #7C8CFF);
    opacity: 0.4;
  }
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid #1A1E26;
  background: rgba(7, 8, 11, 0.95);
  padding: 0.5rem 1.5rem 2rem;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

#mobileMenu.hidden {
  display: none;
}

/* ===== MANIFESTO ===== */
#manifesto {
  position: relative;
  height: 150vh;
  margin-top: 0;
}

@media (min-width: 1024px) {
  #manifesto {
    height: 170vh;
    margin-top: 0;
  }
}

#manifesto .sticky-box {
  position: sticky;
  top: 0;
  display: flex;
  height: 100svh;
  align-items: center;
}

#mText {
  margin-top: 1.5rem;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

@media (min-width: 768px) {
  #mText {
    font-size: 3.75rem;
  }
}

/* ===== METODOLOGIA HORIZONTAL SCROLL ===== */
#metodologia {
  position: relative;
  scroll-margin-top: 0;
}

@media (min-width: 768px) {
  #metodologia {
    height: 300vh;
  }
}

#metodologia .sticky-box {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  #metodologia .sticky-box {
    position: sticky;
    top: 0;
    display: flex;
    height: 100svh;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-top: 4rem;
    padding-bottom: 0;
  }
}

#track {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  #track {
    flex-direction: row;
    gap: 1.5rem;
    width: max-content;
    padding-left: max(1.5rem, calc((100vw - 80rem) / 2 + 1.5rem));
    padding-right: max(1.5rem, calc((100vw - 80rem) / 2 + 1.5rem));
    will-change: transform;
  }
}

/* ===== SECTIONS SPACING ===== */
section {
  scroll-margin-top: 6rem;
}

/* ===== FOOTER CLOCK ===== */
#clock {
  font-family: 'JetBrains Mono', monospace;
}
