/* Menu Hamburger */
html {
  scroll-behavior: smooth;
}

#menu-checkbox {
  display: none;
}

.toggle {
  position: relative;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition-duration: .5s;
  z-index: 60;
}

.bars {
  width: 100%;
  height: 3px;
  background-color: #0f172a;
  border-radius: 4px;
  transition-duration: .3s;
}

#bar2 {
  transition-duration: .8s;
}

#bar1, #bar3 {
  width: 70%;
}

#menu-checkbox:checked + .toggle .bars {
  position: absolute;
  transition-duration: .5s;
  background-color: #2dd4bf;
}

#menu-checkbox:checked + .toggle #bar2 {
  transform: scaleX(0);
  transition-duration: .5s;
}

#menu-checkbox:checked + .toggle #bar1 {
  width: 100%;
  transform: rotate(45deg);
  transition-duration: .5s;
}

#menu-checkbox:checked + .toggle #bar3 {
  width: 100%;
  transform: rotate(-45deg);
  transition-duration: .5s;
}

#menu-checkbox:checked + .toggle {
  transition-duration: .5s;
  transform: rotate(180deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #043b3a 100%);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

#menu-checkbox:checked ~ .mobile-menu {
  transform: translateX(0);
}

.mobile-menu a {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-menu a:hover {
  color: #2dd4bf;
  padding-left: 0.5rem;
}

.mobile-menu .menu-buttons {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Arredondamento superior das seções */
.section-rounded-top {
  position: relative;
  z-index: 1;
}

.section-rounded-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48px;
  background: inherit;
  border-top-left-radius: 48px;
  border-top-right-radius: 48px;
  transform: translateY(-48px);
  z-index: 0;
  pointer-events: none;
}

.section-rounded-top > * {
  position: relative;
  z-index: 1;
}

/* Fundo escuro com grid quadriculado */
.bg-dark-grid {
  background-color: #0f0f0f;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Arredondamento completo (topo e base) */
.section-rounded-full {
  border-radius: 48px;
  margin-left: 0;
  margin-right: 0;
}

/* Trazer seção para frente */
.section-foreground {
  position: relative;
  z-index: 20;
}
