/* ================================================
   QTV — Custom styles (anti-AI-slop edition)
   Complements Tailwind CDN
   ================================================ */

/* ---------- Reveal Animation (staggered) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Navbar scroll state ---------- */
#navbar.scrolled {
  background: rgba(242, 241, 237, 0.92);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(12, 17, 22, 0.04),
              0 4px 24px rgba(12, 17, 22, 0.04);
}

/* Header acima do overlay do menu mobile (#mobileMenu z-[999]) para o hambúrguer fechar */
#navbar.menu-open {
  z-index: 1000;
}

/* ---------- Nav link hover underline ---------- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- Hamburger animation ---------- */
#hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#hamburger.active span:nth-child(2) {
  opacity: 0;
}

#hamburger.active span:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

#mobileMenu.open {
  display: flex;
}

/* ---------- Scroll line animation ---------- */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.15); }
}

.hero-surface {
  position: relative;
  isolation: isolate;
}

.hero-ambient__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(240, 237, 232, 0.5) 100%
  );
  pointer-events: none;
}

.eco-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(27, 94, 107, 0.12);
  background: linear-gradient(
    155deg,
    #ffffff 0%,
    #fafbfc 42%,
    rgba(200, 227, 231, 0.35) 100%
  );
  box-shadow:
    0 4px 6px -1px rgba(12, 17, 22, 0.04),
    0 22px 48px -18px rgba(12, 17, 22, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.eco-hero-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -25%;
  width: 55%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(56, 190, 201, 0.14) 0%,
    transparent 68%
  );
  pointer-events: none;
}

.eco-hero-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(27, 94, 107, 0.22),
    transparent
  );
  pointer-events: none;
}

.eco-hero-card:hover {
  border-color: rgba(27, 94, 107, 0.22);
  box-shadow:
    0 4px 6px -1px rgba(12, 17, 22, 0.05),
    0 28px 56px -20px rgba(27, 94, 107, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

/* ---------- Ecossistema — cards Base (infra) ---------- */
.eco-base-card {
  position: relative;
  z-index: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.11) 50%,
      transparent 100%
    ) 0 0 / 100% 1px no-repeat,
    linear-gradient(158deg, #1c252d 0%, #141a20 48%, #0a0d10 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 50px -24px rgba(0, 0, 0, 0.55);
  transition:
    border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.eco-base-card::before {
  content: '';
  position: absolute;
  top: -42%;
  right: -18%;
  width: 70%;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(56, 190, 201, 0.11) 0%,
    transparent 62%
  );
  pointer-events: none;
}

.eco-base-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 190, 201, 0.2) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.eco-base-card--static:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 60px -28px rgba(0, 0, 0, 0.6);
  transform: translateY(-3px);
}

.eco-base-card--static:hover .eco-base-card__logo {
  opacity: 0.9;
  filter: brightness(1.08);
}

.eco-base-card--link {
  text-decoration: none;
  color: inherit;
}

.eco-base-card--link:hover {
  border-color: rgba(56, 190, 201, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 26px 60px -22px rgba(12, 17, 22, 0.65),
    0 0 48px -20px rgba(56, 190, 201, 0.15);
  transform: translateY(-3px);
}

.eco-base-card--link:hover .eco-base-card__logo {
  opacity: 0.9;
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .eco-base-card--static:hover,
  .eco-base-card--link:hover {
    transform: none;
  }
}

.stats-band__veil {
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(56, 190, 201, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(27, 94, 107, 0.2), transparent 55%);
}

.stat-card {
  position: relative;
  height: 100%;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 42%,
    rgba(12, 17, 22, 0.15) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  pointer-events: none;
}

.stat-card:hover {
  border-color: rgba(56, 190, 201, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 24px 48px -28px rgba(0, 0, 0, 0.55);
  transform: translateY(-3px);
}

.stat-card--accent {
  border-color: rgba(56, 190, 201, 0.18);
}

.stat-card--accent::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 190, 201, 0.45),
    transparent
  );
}

@media (prefers-reduced-motion: reduce) {
  .stat-card:hover {
    transform: none;
  }
}

/* ---------- História / Sobre — mega tipografia ao fundo ---------- */
.historia-mega {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(2rem, 6vw, 5rem);
  gap: 0;
}

.historia-mega__row {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
}

.historia-mega__row--stroke {
  font-size: clamp(3.25rem, 17vw, 12.5rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(12, 17, 22, 0.1);
  transform: translateX(-5%);
}

.historia-mega__row--accent {
  font-size: clamp(2.5rem, 11vw, 8rem);
  margin-top: -0.06em;
  color: rgba(27, 94, 107, 0.09);
  transform: translateX(4%);
  text-align: right;
  align-self: stretch;
  padding-right: clamp(0.5rem, 3vw, 2.5rem);
}

@media (max-width: 639px) {
  .historia-mega__row--stroke {
    -webkit-text-stroke: 0.75px rgba(12, 17, 22, 0.08);
  }

  .historia-mega__row--accent {
    color: rgba(27, 94, 107, 0.07);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @media (min-width: 1024px) {
    .historia-mega__row--stroke {
      animation: historiaMegaShiftA 24s ease-in-out infinite alternate;
    }

    .historia-mega__row--accent {
      animation: historiaMegaShiftB 30s ease-in-out infinite alternate;
    }
  }
}

@keyframes historiaMegaShiftA {
  from {
    transform: translateX(-6%);
  }

  to {
    transform: translateX(-2%);
  }
}

@keyframes historiaMegaShiftB {
  from {
    transform: translateX(2%);
  }

  to {
    transform: translateX(6%);
  }
}

.historia-topico {
  position: relative;
  overflow: hidden;
}

.historia-topico__mega {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.historia-topico__mega .historia-mega__row {
  white-space: nowrap;
}

.historia-topico__mega-line--stroke {
  font-size: clamp(2rem, 11vw, 6.25rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(12, 17, 22, 0.085);
  transform: translateX(-4%);
}

.historia-topico__mega-line--accent {
  font-size: clamp(1.35rem, 6.5vw, 3.5rem);
  margin-top: -0.05em;
  color: rgba(27, 94, 107, 0.072);
  transform: translateX(3%);
  text-align: right;
  align-self: stretch;
  padding-right: clamp(0.25rem, 2vw, 1.25rem);
}

.historia-topico--flip .historia-topico__mega-line--stroke {
  transform: translateX(3%);
  text-align: right;
  align-self: stretch;
  padding-right: clamp(0.25rem, 2vw, 1.25rem);
}

.historia-topico--flip .historia-topico__mega-line--accent {
  text-align: left;
  padding-right: 0;
  padding-left: clamp(0.25rem, 2vw, 1.25rem);
  transform: translateX(-4%);
}

@media (max-width: 639px) {
  .historia-topico__mega-line--stroke {
    -webkit-text-stroke: 0.65px rgba(12, 17, 22, 0.07);
  }

  .historia-topico__mega-line--accent {
    color: rgba(27, 94, 107, 0.065);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @media (min-width: 1024px) {
    .historia-topico__mega-line--stroke {
      animation: historiaTopoShiftA 34s ease-in-out infinite alternate;
    }

    .historia-topico__mega-line--accent {
      animation: historiaTopoShiftB 40s ease-in-out infinite alternate;
    }

    .historia-topico--flip .historia-topico__mega-line--stroke {
      animation: historiaTopoFlipShiftA 34s ease-in-out infinite alternate;
    }

    .historia-topico--flip .historia-topico__mega-line--accent {
      animation: historiaTopoFlipShiftB 40s ease-in-out infinite alternate;
    }
  }
}

@keyframes historiaTopoShiftA {
  from {
    transform: translateX(-5%);
  }

  to {
    transform: translateX(-1.5%);
  }
}

@keyframes historiaTopoShiftB {
  from {
    transform: translateX(1.5%);
  }

  to {
    transform: translateX(5%);
  }
}

@keyframes historiaTopoFlipShiftA {
  from {
    transform: translateX(2%);
  }

  to {
    transform: translateX(5.5%);
  }
}

@keyframes historiaTopoFlipShiftB {
  from {
    transform: translateX(-5%);
  }

  to {
    transform: translateX(-1.5%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @media (min-width: 1024px) {
    .historia-mega,
    .historia-topico__mega {
      -webkit-mask-image: linear-gradient(
        to right,
        hsl(0 0% 0% / 0) 0%,
        hsl(0 0% 0% / 0.4) 5%,
        hsl(0 0% 0% / 0.92) 11%,
        hsl(0 0% 0% / 1) 15%,
        hsl(0 0% 0% / 1) 85%,
        hsl(0 0% 0% / 0.92) 89%,
        hsl(0 0% 0% / 0.4) 95%,
        hsl(0 0% 0% / 0) 100%
      );
      mask-image: linear-gradient(
        to right,
        hsl(0 0% 0% / 0) 0%,
        hsl(0 0% 0% / 0.4) 5%,
        hsl(0 0% 0% / 0.92) 11%,
        hsl(0 0% 0% / 1) 15%,
        hsl(0 0% 0% / 1) 85%,
        hsl(0 0% 0% / 0.92) 89%,
        hsl(0 0% 0% / 0.4) 95%,
        hsl(0 0% 0% / 0) 100%
      );
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
      -webkit-mask-size: 100% 100%;
      mask-size: 100% 100%;
      mask-mode: alpha;
    }
  }
}

/* ---------- VerticoSys CSS Logo ---------- */
.vertico-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 1.75rem;
  max-height: 1.75rem;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

.vertico-logo__mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 1.4rem;
}

.vertico-logo__bar {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, #34D399 0%, #10B981 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.vertico-logo__bar:nth-child(1) { height: 55%; }
.vertico-logo__bar:nth-child(2) { height: 100%; }
.vertico-logo__bar:nth-child(3) { height: 75%; }

.vertico-logo__text {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
}

.vertico-logo__text-accent {
  color: #34D399;
  font-weight: 600;
}

.eco-base-card--static:hover .vertico-logo,
.eco-base-card--link:hover .vertico-logo {
  opacity: 1;
  transform: translateY(-1px);
}

/* ---------- Selection color ---------- */
::selection {
  background: rgba(27, 94, 107, 0.15);
  color: inherit;
}
